summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2017-12-10 17:11:24 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-12-10 17:11:24 +0100
commita34431f6ea57a361020660f83fcbcc41c81dc4b6 (patch)
treee4e3179c2c2cb8938e04e297e669b5c9c2411d57
parent3efb0007393624b555d1f1b4858e7523d8d4c4b1 (diff)
downloadorg-mode-a34431f6ea57a361020660f83fcbcc41c81dc4b6.tar.gz
org-tempo: Tiny refactoring
* lisp/org-tempo.el (org-tempo--include-file): Tiny refactoring.
-rw-r--r--lisp/org-tempo.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/org-tempo.el b/lisp/org-tempo.el
index 6f823ba..6c24b2b 100644
--- a/lisp/org-tempo.el
+++ b/lisp/org-tempo.el
@@ -126,12 +126,13 @@ Goes through `org-structure-template-alist' and
(defun org-tempo--include-file ()
"Ask for file name and take care of quit"
- (let* ((inhibit-quit t))
+ (let ((inhibit-quit t))
(unless (with-local-quit
(prog1 t
(insert
- (format "#+include: \"%s\" " (file-relative-name
- (read-file-name "Include file: "))))))
+ (format "#+include: %S "
+ (file-relative-name
+ (read-file-name "Include file: "))))))
(insert "<I")
(setq quit-flag nil))))
@@ -156,9 +157,8 @@ Goes through `org-structure-template-alist' and
'tempo-complete-tag)
;; Enable Org Tempo in all open Org buffers.
-(mapc (lambda (buf) (with-current-buffer buf
- (when (eq major-mode 'org-mode) (org-tempo-setup))))
- (buffer-list))
+(dolist (b (org-buffer-list))
+ (with-current-buffer b (org-tempo-setup)))
(eval-after-load 'org
'(org-tempo-add-templates))