瀏覽代碼

Footnotes: Introduce S action as a shortcut for r and s

Carsten Dominik 16 年之前
父節點
當前提交
840c74162c
共有 2 個文件被更改,包括 5 次插入1 次删除
  1. 1 0
      doc/org.texi
  2. 4 1
      lisp/org-footnote.el

+ 1 - 0
doc/org.texi

@@ -1570,6 +1570,7 @@ s   @r{Sort the footnote definitions by reference sequence.  During editing,}
     @r{sequence.  If you want them sorted, use this command, which will}
     @r{also move entries according to @code{org-footnote-section}.}
 r   @r{Renumber the simple @code{fn:N} footnotes.}
+S   @r{Short for first @code{r}, then @code{s} action.}
 n   @r{Normalize the footnotes by collecting all definitions (including}
     @r{inline definitions) into a special section, and then numbering them}
     @r{in sequence.  The references will then also be numbers.  This is}

+ 4 - 1
lisp/org-footnote.el

@@ -296,13 +296,16 @@ With prefix arg SPECIAL, offer additional commands in a menu."
   (let (tmp c)
     (cond
      (special
-      (message "Footnotes: [s]ort  |  [r]enumber fn:N  |  convert to [n]umeric  |  [d]elete")
+      (message "Footnotes: [s]ort  |  [r]enumber fn:N  |  [S]=r+s |->[n]umeric  |  [d]elete")
       (setq c (read-char-exclusive))
       (cond
        ((equal c ?s)
 	(org-footnote-normalize 'sort))
        ((equal c ?r)
 	(org-footnote-renumber-fn:N))
+       ((equal c ?S)
+	(org-footnote-renumber-fn:N)
+	(org-footnote-normalize 'sort))
        ((equal c ?n)
 	(org-footnote-normalize))
        ((equal c ?d)