Browse Source

Minor refactoring.

Nicolas Goaziou 14 years ago
parent
commit
030fc40b1d
2 changed files with 4 additions and 5 deletions
  1. 3 2
      lisp/org-list.el
  2. 1 3
      lisp/org.el

+ 3 - 2
lisp/org-list.el

@@ -991,8 +991,9 @@ after being demoted.  Assume cursor in item line."
 ;;; Bullets
 
 (defun org-get-bullet ()
-  (and (org-at-item-p)
-       (org-trim (match-string 1))))
+  "Return the bullet of the item at point.
+Assume cursor is at an item."
+  (and (looking-at "[ \t]*\\(\\S-+\\)") (match-string 1)))
 
 (defun org-list-bullet-string (bullet)
   "Concatenate BULLET with an appropriate number of whitespaces.

+ 1 - 3
lisp/org.el

@@ -18241,9 +18241,7 @@ returning a string.
 An optional third argument bounds the search for START-RE. It
 defaults to previous heading or `point-min'."
   (let ((pos (point))
-	(limit (or bound
-		   (save-excursion (outline-previous-heading))
-		   (point-min))))
+	(limit (or bound (save-excursion (outline-previous-heading)))))
     (save-excursion
       ;; we're on a block when point is on start-re...
       (or (org-at-regexp-p start-re)