diff options
author | Matt Lundin <mdl@imapmail.org> | 2012-05-05 21:58:22 +0000 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-05-06 10:10:25 +0200 |
commit | d59762b6fa00bd9acdf67eef4f47af10bf00363c (patch) | |
tree | 932a754df1a824253bbb7d83b17dc0b356f663f3 | |
parent | 99c97fbffc89e956c9179401187fbc5a69547cf9 (diff) | |
download | org-mode-d59762b6fa00bd9acdf67eef4f47af10bf00363c.tar.gz |
Don't call org-footnote-unique label if using random labels
* lisp/org-footnote.el (org-footnote-new): Don't call
org-footnote-unique-label if org-footnote-auto-label is set to
random.
Calling org-footnote-unique-label calls org-footnote-all-labels, which
can dramatically slow down footnote creation in a buffer with many
footnotes. This is unecessary if org-footnote-auto-label is set to
random.
-rw-r--r-- | lisp/org-footnote.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el index b0472f3..504f633 100644 --- a/lisp/org-footnote.el +++ b/lisp/org-footnote.el @@ -450,7 +450,8 @@ or new, let the user edit the definition of the footnote." (error "Cannot insert a footnote here")) (let* ((lbls (and (not (equal org-footnote-auto-label 'random)) (org-footnote-all-labels))) - (propose (org-footnote-unique-label lbls)) + (propose (and (not (equal org-footnote-auto-label 'random)) + (org-footnote-unique-label lbls))) (label (org-footnote-normalize-label (cond |