Browse Source

org-footnote: Fix error on 32 bits system

* lisp/org-footnote.el (org-footnote-new): Use a value in the 32-bit range.

Reported-by: Sam Halliday <sam.halliday@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/103184>
Nicolas Goaziou 5 years ago
parent
commit
54c5847385
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org-footnote.el

+ 1 - 1
lisp/org-footnote.el

@@ -533,7 +533,7 @@ or new, let the user edit the definition of the footnote."
 	 (label
 	  (org-footnote-normalize-label
 	   (if (eq org-footnote-auto-label 'random)
-	       (format "fn:%x" (random #x100000000))
+	       (format "fn:%x" (random most-positive-fixnum))
 	     (let ((propose (org-footnote-unique-label all)))
 	       (if (memq org-footnote-auto-label '(t plain)) propose
 		 (org-icompleting-read