[Emacs] Put use-package around custom org-export-get-reference

This prevents it from getting clobbered when org-export is loaded.
This commit is contained in:
Ivan Malison 2016-10-25 12:21:30 -07:00
parent 21f59c1d54
commit 766c6338e1
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -3111,7 +3111,10 @@ as its link target.
This function replaces the default naming scheme with a call to This function replaces the default naming scheme with a call to
~imalison:generate-name~, and uses a slightly different uniquify approach. ~imalison:generate-name~, and uses a slightly different uniquify approach.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defun org-export-get-reference (datum info) (use-package org-export
:ensure nil
:config
(defun org-export-get-reference (datum info)
"Return a unique reference for DATUM, as a string. "Return a unique reference for DATUM, as a string.
DATUM is either an element or an object. INFO is the current DATUM is either an element or an object. INFO is the current
export state, as a plist. Returned reference consists of export state, as a plist. Returned reference consists of
@ -3131,7 +3134,7 @@ alphanumeric characters only."
(new-name (format "%s%s" name (if (< 0 number) number "")))) (new-name (format "%s%s" name (if (< 0 number) number ""))))
(puthash name number reverse-cache) (puthash name number reverse-cache)
(puthash datum new-name cache) (puthash datum new-name cache)
new-name)))) new-name)))))
#+END_SRC #+END_SRC
**** org-projectile **** org-projectile
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp