org-tempo: Small refactoring
* lisp/org-tempo.el (org-tempo-add-templates): Small refactoring.
This commit is contained in:
parent
a2471b1bb6
commit
878f2ae68b
|
@ -94,12 +94,8 @@ Goes through `org-structure-template-alist' and
|
||||||
"Duplicated keys in `org-structure-template-alist' and `org-tempo-keywords-alist'"))
|
"Duplicated keys in `org-structure-template-alist' and `org-tempo-keywords-alist'"))
|
||||||
|
|
||||||
;; Remove any keys already defined in case they have been updated.
|
;; Remove any keys already defined in case they have been updated.
|
||||||
(mapc (lambda (key)
|
(setq org-tempo-tags
|
||||||
(if (assoc-string key org-tempo-tags)
|
(cl-remove-if (lambda (tag) (member (car tag) keys)) org-tempo-tags))
|
||||||
(setq org-tempo-tags
|
|
||||||
(delete (assoc-string key org-tempo-tags)
|
|
||||||
org-tempo-tags))))
|
|
||||||
keys)
|
|
||||||
(mapc #'org-tempo-add-block org-structure-template-alist)
|
(mapc #'org-tempo-add-block org-structure-template-alist)
|
||||||
(mapc #'org-tempo-add-keyword org-tempo-keywords-alist)))
|
(mapc #'org-tempo-add-keyword org-tempo-keywords-alist)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue