summaryrefslogtreecommitdiff
path: root/lisp/org/org.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2014-10-12 15:56:45 -0700
committerGlenn Morris <rgm@gnu.org>2014-10-12 15:56:45 -0700
commitb1d5ab0352b6132eee4feaf9091ce7dc7a3e6a84 (patch)
treedf2e6708c30f53f071bd824c49c7f00dfbe0ffba /lisp/org/org.el
parentec11ab9b783fc1f2c0ce858a711baa5f728c238b (diff)
parente175fabcdd37f89db13ab90615cf0baa7bade4d9 (diff)
downloademacs-b1d5ab0352b6132eee4feaf9091ce7dc7a3e6a84.tar.gz
Merge from emacs-24; up to 2014-07-26T11:58:24Z!schwab@linux-m68k.org
Diffstat (limited to 'lisp/org/org.el')
-rw-r--r--lisp/org/org.el21
1 files changed, 12 insertions, 9 deletions
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 05a26a80cbe..1604241f6b3 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -9099,14 +9099,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))
@@ -9114,7 +9116,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