diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2010-11-03 22:52:54 +0100 |
---|---|---|
committer | David Maus <dmaus@ictsoc.de> | 2010-11-04 19:05:10 +0100 |
commit | e652a1ed85bc365778eec463f44931fd496c0d69 (patch) | |
tree | cda3bae99f028ca16d7f20a25dfd729e61999e57 | |
parent | e1d10a7429c7cd97440b633e2fddc1a6a23c90dc (diff) | |
download | org-mode-e652a1ed85bc365778eec463f44931fd496c0d69.tar.gz |
Simplify and fix indentation code in lists
* org.el (org-indent-line-function): simplify code and remove bug that
would insert a tab at the beginning of the line when trying to
indent the item.
-rw-r--r-- | lisp/org.el | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/lisp/org.el b/lisp/org.el index 1b7b225..201dd87 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -18665,7 +18665,7 @@ which make use of the date at the cursor." (org-drawer-regexp (or org-drawer-regexp "\000")) (inline-task-p (and (featurep 'org-inlinetask) (org-inlinetask-in-task-p))) - column bpos bcol tpos tcol bullet btype bullet-type) + column bpos bcol tpos tcol) ;; Find the previous relevant line (beginning-of-line 1) (cond @@ -18700,22 +18700,11 @@ which make use of the date at the cursor." (looking-at "[ \t]*\\(\\S-+\\)[ \t]*\\(\\(:?\\[@\\(:?start:\\)?[0-9]+\\][ \t]*\\)?\\[[- X]\\][ \t]*\\|.*? :: \\)?") (setq bpos (match-beginning 1) tpos (match-end 0) bcol (progn (goto-char bpos) (current-column)) - tcol (progn (goto-char tpos) (current-column)) - bullet (match-string 1) - bullet-type (if (string-match "[0-9]" bullet) "n" bullet)) + tcol (progn (goto-char tpos) (current-column))) (if (> tcol (+ bcol org-description-max-indent)) (setq tcol (+ bcol 5))) - (if (not itemp) - (setq column tcol) - (beginning-of-line 1) - (goto-char pos) - (if (looking-at "\\S-") - (progn - (looking-at "[ \t]*\\(\\S-+\\)[ \t]*") - (setq bullet (match-string 1) - btype (if (string-match "[0-9]" bullet) "n" bullet)) - (setq column (if (equal btype bullet-type) bcol tcol))) - (setq column (org-get-indentation))))) + (goto-char pos) + (setq column (if itemp (org-get-indentation) tcol))) ;; This line has nothing special, look upside to get a clue about ;; what to do. (t |