mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +00:00
Avoid trailing whitespace in snippet tables
* yasnippet.el (yas-describe-tables, yas--describe-pretty-table): Remove redundant tail spaces from output. Copyright-paperwork-exempt: yes
This commit is contained in:
parent
572c73d50b
commit
ea5ed74fb2
37
yasnippet.el
37
yasnippet.el
@ -2660,7 +2660,7 @@ and `kill-buffer' instead."
|
||||
(setq buffer-read-only nil)
|
||||
(erase-buffer)
|
||||
(cond ((not by-name-hash)
|
||||
(insert "YASnippet tables: \n")
|
||||
(insert "YASnippet tables:\n")
|
||||
(while (and table-lists
|
||||
continue)
|
||||
(dolist (table (car table-lists))
|
||||
@ -2716,19 +2716,21 @@ and `kill-buffer' instead."
|
||||
(setq group (truncate-string-to-width group 25 0 ? "..."))
|
||||
(insert (make-string 100 ?-) "\n")
|
||||
(dolist (p templates)
|
||||
(let ((name (truncate-string-to-width (propertize (format "\\\\snippet `%s'" (yas--template-name p))
|
||||
'yasnippet p)
|
||||
50 0 ? "..."))
|
||||
(group (prog1 group
|
||||
(setq group (make-string (length group) ? ))))
|
||||
(condition-string (let ((condition (yas--template-condition p)))
|
||||
(if (and condition
|
||||
original-buffer)
|
||||
(with-current-buffer original-buffer
|
||||
(if (yas--eval-condition condition)
|
||||
"(y)"
|
||||
"(s)"))
|
||||
"(a)"))))
|
||||
(let* ((name (truncate-string-to-width (propertize (format "\\\\snippet `%s'" (yas--template-name p))
|
||||
'yasnippet p)
|
||||
50 0 ? "..."))
|
||||
(group (prog1 group
|
||||
(setq group (make-string (length group) ? ))))
|
||||
(condition-string (let ((condition (yas--template-condition p)))
|
||||
(if (and condition
|
||||
original-buffer)
|
||||
(with-current-buffer original-buffer
|
||||
(if (yas--eval-condition condition)
|
||||
"(y)"
|
||||
"(s)"))
|
||||
"(a)")))
|
||||
(key-description-string (key-description (yas--template-keybinding p)))
|
||||
(template-key-padding (if (string= key-description-string "") nil ? )))
|
||||
(insert group " ")
|
||||
(insert condition-string " ")
|
||||
(insert name
|
||||
@ -2737,9 +2739,10 @@ and `kill-buffer' instead."
|
||||
" ")
|
||||
" ")
|
||||
(insert (truncate-string-to-width (or (yas--template-key p) "")
|
||||
15 0 ? "...") " ")
|
||||
(insert (truncate-string-to-width (key-description (yas--template-keybinding p))
|
||||
15 0 ? "...") " ")
|
||||
15 0 template-key-padding "...")
|
||||
(if template-key-padding (byte-to-string template-key-padding) ""))
|
||||
(insert (truncate-string-to-width key-description-string
|
||||
15 0 nil "..."))
|
||||
(insert "\n"))))
|
||||
groups-hash)))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user