org.el (orgstruct-make-binding): Do not use loop in interpreted code.

* lisp/org.el (orgstruct-make-binding): Do not use loop in
interpreted code.
This commit is contained in:
Christopher Schmidt 2014-10-11 21:40:45 +02:00
parent 4a872ae3a0
commit 2b98cd6554
1 changed files with 12 additions and 9 deletions

View File

@ -9261,14 +9261,16 @@ if `orgstruct-heading-prefix-regexp' is not empty."
(if fallback
(let* ((orgstruct-mode)
(binding
(loop with key = ,key
for rep in
'(nil
("<\\([^>]*\\)tab>" . "\\1TAB")
("<\\([^>]*\\)return>" . "\\1RET")
("<\\([^>]*\\)escape>" . "\\1ESC")
("<\\([^>]*\\)delete>" . "\\1DEL"))
do
(let ((key ,key))
(catch 'exit
(dolist
(rep
'(nil
("<\\([^>]*\\)tab>" . "\\1TAB")
("<\\([^>]*\\)return>" . "\\1RET")
("<\\([^>]*\\)escape>" . "\\1ESC")
("<\\([^>]*\\)delete>" . "\\1DEL"))
nil)
(when rep
(setq key (read-kbd-macro
(let ((case-fold-search))
@ -9276,7 +9278,8 @@ if `orgstruct-heading-prefix-regexp' is not empty."
(car rep)
(cdr rep)
(key-description key))))))
thereis (key-binding key))))
(when (key-binding key)
(throw 'exit (key-binding key))))))))
(if (keymapp binding)
(org-set-transient-map binding)
(let ((func (or binding