From 58ca076647fad421f8173c2b5a93c5516314150e Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Wed, 5 Feb 2014 16:19:56 +0000 Subject: [PATCH] stop describe-personal-keybindings adding trailing space When emacs is configured to highlight trailing whitespace, the *Personal Keybindings* buffer looked pretty ugly. This fixes that. --- lisp/use-package/bind-key.el | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/lisp/use-package/bind-key.el b/lisp/use-package/bind-key.el index 68146c05c2a..36de06023dc 100644 --- a/lisp/use-package/bind-key.el +++ b/lisp/use-package/bind-key.el @@ -197,16 +197,19 @@ (get-binding-description was-command))) (at-present-desc (get-binding-description at-present)) ) - (princ - (format - "%-18s%-40s%s\n" - key-name (format "`%s\'" command-desc) - (if (string= command-desc at-present-desc) - (if (or (null was-command) - (string= command-desc was-command-desc)) - "" - (format "was `%s\'" was-command-desc)) - (format "[now: `%s\']" at-present))))) + (let ((line + (format + "%-18s%-40s%s\n" + key-name (format "`%s\'" command-desc) + (if (string= command-desc at-present-desc) + (if (or (null was-command) + (string= command-desc was-command-desc)) + "" + (format "was `%s\'" was-command-desc)) + (format "[now: `%s\']" at-present))))) + (princ (if (string-match "[ \t]+\n" line) + (replace-match "\n" t t line) + line)))) (setq last-binding binding))))) -- 2.39.2