diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-02-04 08:56:15 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-02-04 08:56:15 +0100 |
commit | 878f2ae68bd2150de21a0f5cc0d21c82355e4d4b (patch) | |
tree | 3bcb332e7cd735585772063ac32d319f011cb08a | |
parent | a2471b1bb65e781a3bacb45961a301eac0b01578 (diff) | |
download | org-mode-878f2ae68bd2150de21a0f5cc0d21c82355e4d4b.tar.gz |
org-tempo: Small refactoring
* lisp/org-tempo.el (org-tempo-add-templates): Small refactoring.
-rw-r--r-- | lisp/org-tempo.el | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lisp/org-tempo.el b/lisp/org-tempo.el index 37c849c..42bf44d 100644 --- a/lisp/org-tempo.el +++ b/lisp/org-tempo.el @@ -94,12 +94,8 @@ Goes through `org-structure-template-alist' and "Duplicated keys in `org-structure-template-alist' and `org-tempo-keywords-alist'")) ;; Remove any keys already defined in case they have been updated. - (mapc (lambda (key) - (if (assoc-string key org-tempo-tags) - (setq org-tempo-tags - (delete (assoc-string key org-tempo-tags) - org-tempo-tags)))) - keys) + (setq org-tempo-tags + (cl-remove-if (lambda (tag) (member (car tag) keys)) org-tempo-tags)) (mapc #'org-tempo-add-block org-structure-template-alist) (mapc #'org-tempo-add-keyword org-tempo-keywords-alist))) |