mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-14 05:23: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
15
yasnippet.el
15
yasnippet.el
@ -2660,7 +2660,7 @@ and `kill-buffer' instead."
|
|||||||
(setq buffer-read-only nil)
|
(setq buffer-read-only nil)
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(cond ((not by-name-hash)
|
(cond ((not by-name-hash)
|
||||||
(insert "YASnippet tables: \n")
|
(insert "YASnippet tables:\n")
|
||||||
(while (and table-lists
|
(while (and table-lists
|
||||||
continue)
|
continue)
|
||||||
(dolist (table (car table-lists))
|
(dolist (table (car table-lists))
|
||||||
@ -2716,7 +2716,7 @@ and `kill-buffer' instead."
|
|||||||
(setq group (truncate-string-to-width group 25 0 ? "..."))
|
(setq group (truncate-string-to-width group 25 0 ? "..."))
|
||||||
(insert (make-string 100 ?-) "\n")
|
(insert (make-string 100 ?-) "\n")
|
||||||
(dolist (p templates)
|
(dolist (p templates)
|
||||||
(let ((name (truncate-string-to-width (propertize (format "\\\\snippet `%s'" (yas--template-name p))
|
(let* ((name (truncate-string-to-width (propertize (format "\\\\snippet `%s'" (yas--template-name p))
|
||||||
'yasnippet p)
|
'yasnippet p)
|
||||||
50 0 ? "..."))
|
50 0 ? "..."))
|
||||||
(group (prog1 group
|
(group (prog1 group
|
||||||
@ -2728,7 +2728,9 @@ and `kill-buffer' instead."
|
|||||||
(if (yas--eval-condition condition)
|
(if (yas--eval-condition condition)
|
||||||
"(y)"
|
"(y)"
|
||||||
"(s)"))
|
"(s)"))
|
||||||
"(a)"))))
|
"(a)")))
|
||||||
|
(key-description-string (key-description (yas--template-keybinding p)))
|
||||||
|
(template-key-padding (if (string= key-description-string "") nil ? )))
|
||||||
(insert group " ")
|
(insert group " ")
|
||||||
(insert condition-string " ")
|
(insert condition-string " ")
|
||||||
(insert name
|
(insert name
|
||||||
@ -2737,9 +2739,10 @@ and `kill-buffer' instead."
|
|||||||
" ")
|
" ")
|
||||||
" ")
|
" ")
|
||||||
(insert (truncate-string-to-width (or (yas--template-key p) "")
|
(insert (truncate-string-to-width (or (yas--template-key p) "")
|
||||||
15 0 ? "...") " ")
|
15 0 template-key-padding "...")
|
||||||
(insert (truncate-string-to-width (key-description (yas--template-keybinding p))
|
(if template-key-padding (byte-to-string template-key-padding) ""))
|
||||||
15 0 ? "...") " ")
|
(insert (truncate-string-to-width key-description-string
|
||||||
|
15 0 nil "..."))
|
||||||
(insert "\n"))))
|
(insert "\n"))))
|
||||||
groups-hash)))
|
groups-hash)))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user