forked from mirrors/org-mode
org-macro: Fix last commit
* lisp/org-macro.el (org-macro--set-template): Do not override value
with an empty one.
This is a followup to 965cdbfd4b
.
This commit is contained in:
parent
965cdbfd4b
commit
685b2c4410
|
@ -89,9 +89,9 @@ VALUE is the template of the macro. The new value override the
|
||||||
previous one, unless VALUE is nil. TEMPLATES is the list of
|
previous one, unless VALUE is nil. TEMPLATES is the list of
|
||||||
templates. Return the updated list."
|
templates. Return the updated list."
|
||||||
(let ((old-definition (assoc name templates)))
|
(let ((old-definition (assoc name templates)))
|
||||||
(if (and value old-definition)
|
(cond ((and value old-definition) (setcdr old-definition value))
|
||||||
(setcdr old-definition value)
|
(old-definition)
|
||||||
(push (cons name (or value "")) templates)))
|
(t (push (cons name (or value "")) templates))))
|
||||||
templates)
|
templates)
|
||||||
|
|
||||||
(defun org-macro--collect-macros (&optional files templates)
|
(defun org-macro--collect-macros (&optional files templates)
|
||||||
|
|
Loading…
Reference in New Issue