diff options
author | Bastien Guerry <bzg@altern.org> | 2011-02-15 05:30:00 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2011-02-15 05:30:00 +0100 |
commit | 8ee7408edb111c579b719fc42edf2f40dab5dc10 (patch) | |
tree | 4c95e263a42bfdfeb25a5da629ecc9e09f022bb3 | |
parent | 846a2d13d33718f08ca281aef50ca7289980eef8 (diff) | |
download | org-mode-8ee7408edb111c579b719fc42edf2f40dab5dc10.tar.gz |
`org-export-ascii-underline' is now order from level 1 to n.
* org-ascii.el (org-export-ascii-underline): Put the level's
characters in the right order, as documented by the docstring.
(org-ascii-level-start): select the right char for underlining
headlines.
-rw-r--r-- | lisp/org-ascii.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/org-ascii.el b/lisp/org-ascii.el index 08d94d2..3cc95e6 100644 --- a/lisp/org-ascii.el +++ b/lisp/org-ascii.el @@ -38,7 +38,7 @@ :tag "Org Export ASCII" :group 'org-export) -(defcustom org-export-ascii-underline '(?\$ ?\# ?^ ?\~ ?\= ?\-) +(defcustom org-export-ascii-underline '(?\- ?\= ?\~ ?^ ?\# ?\$) "Characters for underlining headings in ASCII export. In the given sequence, these characters will be used for level 1, 2, ..." :group 'org-export-ascii @@ -652,9 +652,8 @@ publishing directory." (if (or (not (equal (char-before) ?\n)) (not (equal (char-before (1- (point))) ?\n))) (insert "\n")) - (setq char (or (nth (max (- umax level) 0) - (reverse org-export-ascii-underline)) - (car (last org-export-ascii-underline)))) + (setq char (or (nth (1- level) org-export-ascii-underline) + (last org-export-ascii-underline))) (unless org-export-with-tags (if (string-match (org-re "[ \t]+\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$") title) (setq title (replace-match "" t t title)))) |