diff options
author | Christopher Schmidt <christopher@ch.ristopher.com> | 2013-03-15 22:16:47 +0100 |
---|---|---|
committer | Christopher Schmidt <christopher@ch.ristopher.com> | 2013-03-15 22:16:47 +0100 |
commit | ac2415ae3857ae6280916497bcb9c933f0d5a6b8 (patch) | |
tree | b19dd435b0bb873493d4f658b0fe414d51a4beb4 | |
parent | b56a648e9c3a357b4b6f6ed3872a864d56ec2fb0 (diff) | |
download | org-mode-ac2415ae3857ae6280916497bcb9c933f0d5a6b8.tar.gz |
org.el: Make the hijacker commands of orgstruct-mode try both general and specialised (function) key bindings
* org.el (orgstruct-make-binding): Make the hijacker commands
try both general and specialized (function) key bindings.
-rw-r--r-- | lisp/org.el | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el index af9b04a..db3edc0 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8892,7 +8892,22 @@ if `orgstruct-heading-prefix-regexp' is non-nil." 'item-body)))))))) (if fallback (let* ((orgstruct-mode) - (binding (key-binding ,key))) + (binding + (loop with key = ,key + for rep in '(nil + ("<tab>" . "TAB") + ("<return>" . "RET") + ("<escape>" . "ESC") + ("<delete>" . "DEL")) + do + (when rep + (setq key (read-kbd-macro + (let ((case-fold-search)) + (replace-regexp-in-string + (regexp-quote (car rep)) + (cdr rep) + (key-description key)))))) + thereis (key-binding key)))) (if (keymapp binding) (set-temporary-overlay-map binding) (let ((func (or binding |