summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-02-13 15:43:55 (GMT)
committer Bastien Guerry <bzg@altern.org>2013-02-13 15:43:55 (GMT)
commitafcb175e0571506afaa6fe91fbbff9c101952c82 (patch)
tree76cd22d883a9f8728076726c8e2b48372425a182
parent2108d294dbf90b0a39c9f2ac3c0ad0d16d8560cf (diff)
downloadorg-mode-afcb175e0571506afaa6fe91fbbff9c101952c82.zip
org-mode-afcb175e0571506afaa6fe91fbbff9c101952c82.tar.gz
org.el (org-end-of-line): Don't throw an error outside elements
* org.el (org-end-of-line): Don't throw an error outside elements.
-rw-r--r--lisp/org.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 153311c..a7480ce 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -22221,8 +22221,10 @@ the cursor is already beyond the end of the headline."
((fboundp 'move-end-of-line) 'move-end-of-line)
(t 'end-of-line))))
(if (or (not special) arg) (call-interactively move-fun)
- (let* ((element (save-excursion (beginning-of-line)
- (org-element-at-point)))
+ (let* ((element (ignore-errors
+ ;; Don't throw an error outside elements
+ (save-excursion (beginning-of-line)
+ (org-element-at-point))))
(type (org-element-type element)))
(cond
((memq type '(headline inlinetask))