]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: help: check for nil key binding
authorMark Walters <markwalters1009@gmail.com>
Tue, 12 Nov 2013 20:10:53 +0000 (20:10 +0000)
committerDavid Bremner <david@tethera.net>
Thu, 14 Nov 2013 01:33:05 +0000 (21:33 -0400)
A standard way to unset a key binding is local-unset-key which is equivalent to
  (define-key (current-local-map) key nil)

Currently notmuch-help gives an error and fails if a user has done this.

To fix this we only add a help line if the binding is non-nil.

emacs/notmuch-lib.el

index bc695119b1978b24fd33c3102cc257bbf1aba278..4c615474dd0e012a4216e316dd4bf1f4bef6a573 100644 (file)
@@ -253,7 +253,7 @@ prefix argument.  PREFIX and TAIL are used internally."
            (setq tail
                  (notmuch-describe-keymap
                   binding ua-keys (notmuch-prefix-key-description key) tail)))
-          (t
+          (binding
            (when (and ua-keys (symbolp binding)
                       (get binding 'notmuch-prefix-doc))
              ;; Documentation for prefixed command