[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH] Don't call org-footnote-unique label if using random labels
From: |
Matt Lundin |
Subject: |
[O] [PATCH] Don't call org-footnote-unique label if using random labels |
Date: |
Sat, 5 May 2012 11:58:22 -0500 |
* 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.
---
lisp/org-footnote.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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
--
1.7.10.1
- [O] [PATCH] Don't call org-footnote-unique label if using random labels,
Matt Lundin <=