summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2010-07-20 12:01:10 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2010-09-01 19:05:49 +0200
commit3a084384f4f83e32cb4d16d67ee0b98624248535 (patch)
tree8f7aba8ba24d656725d15af5a21ca093210c2bd9
parenteebd8eb022d1760a392e911fd4c50c366a8b783d (diff)
downloadorg-mode-3a084384f4f83e32cb4d16d67ee0b98624248535.tar.gz
Refactoring.
-rw-r--r--lisp/org-list.el21
1 files changed, 7 insertions, 14 deletions
diff --git a/lisp/org-list.el b/lisp/org-list.el
index f533f58..c0c7767 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -989,26 +989,19 @@ is an integer, 0 means `-', 1 means `+' etc."
((string-match "\\." bullet) "1.")
((string-match ")" bullet) "1)")
(t bullet)))
- ;; Description items cannot be numbered
- (bullet-list (if (org-at-description-p)
- '("-" "+" "*")
- '("-" "+" "*" "1." "1)")))
- ;; *-bullets are not allowed at column 0
- (bullet-list (if (looking-at "\\S-")
- (remove "*" bullet-list)
- bullet-list))
+ (bullet-list (append '("-" "+" )
+ ;; *-bullets are not allowed at column 0
+ (unless (looking-at "\\S-") '("*"))
+ ;; Description items cannot be numbered
+ (unless (org-at-description-p) '("1." "1)"))))
(item-pos (member current bullet-list))
(new (cond
((and (numberp which)
(nth (mod which (length bullet-list)) bullet-list)))
((member which bullet-list) which)
((and item-pos (cdr item-pos)) (cadr item-pos))
- (t "-")))
- (old (and (looking-at "\\([ \t]*\\)\\(\\S-+\\)")
- (match-string 2))))
- (replace-match (concat "\\1" new))
- (org-shift-item-indentation (- (length new) (length old)))
- (org-fix-bullet-type))))
+ (t "-"))))
+ (org-fix-bullet-type new))))
;;; Checkboxes