浏览代码

`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.
Bastien Guerry 15 年之前
父节点
当前提交
8ee7408edb
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 3 4
      lisp/org-ascii.el

+ 3 - 4
lisp/org-ascii.el

@@ -38,7 +38,7 @@
   :tag "Org Export ASCII"
   :tag "Org Export ASCII"
   :group 'org-export)
   :group 'org-export)
 
 
-(defcustom org-export-ascii-underline '(?\$ ?\# ?^ ?\~ ?\= ?\-)
+(defcustom org-export-ascii-underline '(?\- ?\= ?\~ ?^ ?\# ?\$)
   "Characters for underlining headings in ASCII export.
   "Characters for underlining headings in ASCII export.
 In the given sequence, these characters will be used for level 1, 2, ..."
 In the given sequence, these characters will be used for level 1, 2, ..."
   :group 'org-export-ascii
   :group 'org-export-ascii
@@ -652,9 +652,8 @@ publishing directory."
       (if (or (not (equal (char-before) ?\n))
       (if (or (not (equal (char-before) ?\n))
 	      (not (equal (char-before (1- (point))) ?\n)))
 	      (not (equal (char-before (1- (point))) ?\n)))
 	  (insert "\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
       (unless org-export-with-tags
 	(if (string-match (org-re "[ \t]+\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$") title)
 	(if (string-match (org-re "[ \t]+\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$") title)
 	    (setq title (replace-match "" t t title))))
 	    (setq title (replace-match "" t t title))))