summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2010-08-27 11:48:51 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2010-09-01 19:05:56 +0200
commit421ba3a1872b0e5952a4a68e2220dc3e07ab6dd2 (patch)
tree6e34906d9b563be5262beba6d437f05a82568acd
parentbfce8dd35724a4f4f4082901db67e9409bd34025 (diff)
downloadorg-mode-421ba3a1872b0e5952a4a68e2220dc3e07ab6dd2.tar.gz
Correctly get bullet when point is not at bol.
-rw-r--r--lisp/org-list.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/org-list.el b/lisp/org-list.el
index 83ee590..99dc419 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -1513,7 +1513,9 @@ The item must be empty."
(defun org-get-bullet ()
"Return the bullet of the item at point.
Assume cursor is at an item."
- (and (looking-at "[ \t]*\\(\\S-+\\)") (match-string 1)))
+ (save-excursion
+ (beginning-of-line)
+ (and (looking-at "[ \t]*\\(\\S-+\\)") (match-string 1))))
(defun org-list-bullet-string (bullet)
"Return BULLET with the correct number of whitespaces.