outshine-define-key: don't error if there's no other binding (Fix #73)

master
Thibault Polge 6 years ago
parent 4c6107da8f
commit 317a3c925a
No known key found for this signature in database
GPG Key ID: 1B1336171A0B9064
  1. 13
      outshine.el

@ -886,14 +886,11 @@ Otherwise, fallback to the original binding of %s in the current mode."
,def
;; turn mode off and recover the original function
(let ((,mode-name nil))
;; Check for `<tab>'. It translates to `TAB' which
;; will prevent `(key-binding ...)' from finding the
;; original binding.
(if (equal (kbd "<tab>") ,key)
(or (key-binding ,key)
(key-binding (kbd "TAB")))
(key-binding ,key))))))
(define-key ,keymap ,key ',fn-name))))
(or (key-binding ,key)
,(if (equal (kbd "<tab>") key)
(key-binding (kbd "TAB")))
(lambda nil (interactive) (message "`%s' can do nothing useful here." (key-description ,key))))))))
(define-key ,keymap ,key (quote ,fn-name)))))
;;;;;; original macro (obsolete)

Loading…
Cancel
Save