diff --git a/lisp/org-list.el b/lisp/org-list.el old mode 100644 new mode 100755 index cdfd2c5..61e1e88 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -227,11 +227,11 @@ If GENERAL is non-nil, return the general regexp independent of the value of `org-plain-list-ordered-item-terminator'." (cond ((or general (eq org-plain-list-ordered-item-terminator t)) - "\\([ \t]*\\([-+]\\|\\([0-9]+[.)]\\)\\)\\|[ \t]+\\*\\)\\( \\|$\\)") + "\\([ \t]*\\([-+]\\|\\([0-9A-Za-z]+[.)]\\)\\)\\|[ \t]+\\*\\)\\( \\|$\\)") ((= org-plain-list-ordered-item-terminator ?.) - "\\([ \t]*\\([-+]\\|\\([0-9]+\\.\\)\\)\\|[ \t]+\\*\\)\\( \\|$\\)") + "\\([ \t]*\\([-+]\\|\\([0-9A-Za-z]+\\.\\)\\)\\|[ \t]+\\*\\)\\( \\|$\\)") ((= org-plain-list-ordered-item-terminator ?\)) - "\\([ \t]*\\([-+]\\|\\([0-9]+)\\)\\)\\|[ \t]+\\*\\)\\( \\|$\\)") + "\\([ \t]*\\([-+]\\|\\([0-9A-Za-z]+)\\)\\)\\|[ \t]+\\*\\)\\( \\|$\\)") (t (error "Invalid value of `org-plain-list-ordered-item-terminator'")))) (defun org-at-item-p () @@ -298,7 +298,7 @@ Return t when things worked, nil when we are not in an item." (cond ((and (org-at-item-p) (<= (point) eow)) ;; before the bullet - (beginning-of-line 1) + (beginning-of-line ) (open-line (if blank 2 1))) ((<= (point) eow) (beginning-of-line 1)) @@ -864,14 +864,13 @@ with something like \"1.\" or \"2)\"." ;; find where this list begins (org-beginning-of-item-list) (setq bobp (bobp)) - (looking-at "[ \t]*[0-9]+\\([.)]\\)") - (setq fmt (concat "%d" (or (match-string 1) "."))) - (save-excursion - (goto-char (match-end 0)) - (if (looking-at "[ \t]*\\[@start:\\([0-9]+\\)") - (setq n (1- (string-to-number (match-string 1)))))) - (beginning-of-line 0) - ;; walk forward and replace these numbers + (looking-at "[ \t]*\\([0-9A-Za-z]+\\)\\([.)]\\)") + (let* ((n (if (string-equal (match-string 1) "1") 0 (1- ?a))) + (fmt (if (= n 0) + (concat "%d" (or (match-string 2) ".")) + (concat "%c" (or (match-string 2) "."))))) + (beginning-of-line 0) + ;; walk forward and replace these numbers (catch 'exit (while t (catch 'next @@ -890,7 +889,8 @@ with something like \"1.\" or \"2)\"." (org-shift-item-indentation delta) (if (= (org-current-line) line) (setq col (+ col delta)))))) (org-goto-line line) - (org-move-to-column col))) + (org-move-to-column col)))) + (defvar org-suppress-item-indentation) ; dynamically scoped parameter (defun org-fix-bullet-type (&optional force-bullet)