Browse Source

Correctly get bullet when point is not at bol.

Nicolas Goaziou 14 years ago
parent
commit
421ba3a187
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lisp/org-list.el

+ 3 - 1
lisp/org-list.el

@@ -1513,7 +1513,9 @@ The item must be empty."
 (defun org-get-bullet ()
 (defun org-get-bullet ()
   "Return the bullet of the item at point.
   "Return the bullet of the item at point.
 Assume cursor is at an item."
 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)
 (defun org-list-bullet-string (bullet)
   "Return BULLET with the correct number of whitespaces.
   "Return BULLET with the correct number of whitespaces.