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.
This commit is contained in:
parent
b56a648e9c
commit
ac2415ae38
17
lisp/org.el
17
lisp/org.el
|
@ -8892,7 +8892,22 @@ if `orgstruct-heading-prefix-regexp' is non-nil."
|
||||||
'item-body))))))))
|
'item-body))))))))
|
||||||
(if fallback
|
(if fallback
|
||||||
(let* ((orgstruct-mode)
|
(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)
|
(if (keymapp binding)
|
||||||
(set-temporary-overlay-map binding)
|
(set-temporary-overlay-map binding)
|
||||||
(let ((func (or binding
|
(let ((func (or binding
|
||||||
|
|
Loading…
Reference in New Issue