diff options
author | Adam Spiers <emacs@adamspiers.org> | 2014-02-05 16:19:56 +0000 |
---|---|---|
committer | Adam Spiers <emacs@adamspiers.org> | 2014-02-05 16:19:56 +0000 |
commit | 58ca076647fad421f8173c2b5a93c5516314150e (patch) | |
tree | f840d749043f5425a9d4765bb84ad8c7529813ff /lisp/use-package/bind-key.el | |
parent | 6ca942d7803fdb0885e60d76d4ca0d7648dfd3b7 (diff) | |
download | emacs-58ca076647fad421f8173c2b5a93c5516314150e.tar.gz emacs-58ca076647fad421f8173c2b5a93c5516314150e.tar.bz2 emacs-58ca076647fad421f8173c2b5a93c5516314150e.zip |
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.
Diffstat (limited to 'lisp/use-package/bind-key.el')
-rw-r--r-- | lisp/use-package/bind-key.el | 23 |
1 files 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))))) |