summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2020-03-11 21:53:25 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2020-03-11 21:53:25 +0100
commit7e38f6917865866fb30439167c17c1fc693427d3 (patch)
treea8dac74aaa5565d18b60c346bd2bdf417a95a62f
parent260a8c92c0216d5b93c3f90d85ee233aeab63b29 (diff)
parent685b2c441008c4fe3b083d9f11b1123af6f37183 (diff)
downloadorg-mode-7e38f6917865866fb30439167c17c1fc693427d3.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/org-macro.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/org-macro.el b/lisp/org-macro.el
index c8241ad..2f78a01 100644
--- a/lisp/org-macro.el
+++ b/lisp/org-macro.el
@@ -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
templates. Return the updated list."
(let ((old-definition (assoc name templates)))
- (if (and value old-definition)
- (setcdr old-definition value)
- (push (cons name (or value "")) templates)))
+ (cond ((and value old-definition) (setcdr old-definition value))
+ (old-definition)
+ (t (push (cons name (or value "")) templates))))
templates)
(defun org-macro--collect-macros (&optional files templates)