diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-01-27 16:04:59 +0100 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-01-27 16:04:59 +0100 |
commit | 0e7f2d6e263a15e383e5db97dc297bf7767999f7 (patch) | |
tree | 41e1eb4b73c00d54d86cb4a8a1ba0cec2de715f1 | |
parent | d9970d1bd9c19c2b053cdf85c9dad1efb566b3fe (diff) | |
download | org-mode-0e7f2d6e263a15e383e5db97dc297bf7767999f7.tar.gz |
Fix error when using a special C-a at an empty item
* lisp/org.el (org-beginning-of-line): Handle case when there's no
character after box.
-rw-r--r-- | lisp/org.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/org.el b/lisp/org.el index 7a68b73..07e3d43 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -20511,9 +20511,11 @@ beyond the end of the headline." ;; Set special position at first white space character after ;; bullet, and check-box, if any. (let ((after-bullet - (progn (looking-at org-list-full-item-re) - (let ((bul (or (match-end 3) (match-end 1)))) - (if (= (char-after bul) ? ) (1+ bul) bul))))) + (and (looking-at org-list-full-item-re) + (let ((box (match-end 3))) + (if (not box) (match-end 1) + (let ((after (char-after box))) + (if (and after (= after ? )) (1+ box) box))))))) ;; Special case: Move point to special position when ;; currently after it or at beginning of line. (if (eq special t) |