summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2018-05-02 23:35:00 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2018-05-02 23:35:00 +0200
commiteacf40317270a92afcd40c93151832595f99b739 (patch)
tree4ca37186f8f555e86cc5a0d247adfb4bc75addfe
parentc703ee1a238196d389f0d2c4910e2910503e99b3 (diff)
downloadorg-mode-eacf40317270a92afcd40c93151832595f99b739.tar.gz
org-src: Do not use `setq-local' when not necessary
* lisp/org-src.el (org-src--contents-for-write-back): (org-src-mode): (org-src-mode-configure-edit-buffer): Use `setq' instead of `setq-local' on variable automatically buffer-local when set.
-rw-r--r--lisp/org-src.el17
1 files changed, 8 insertions, 9 deletions
diff --git a/lisp/org-src.el b/lisp/org-src.el
index 8d33eaa..01306d3 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -421,8 +421,8 @@ Assume point is in the corresponding edit buffer."
(write-back org-src--allow-write-back))
(with-temp-buffer
;; Reproduce indentation parameters from source buffer.
- (setq-local indent-tabs-mode use-tabs?)
- (when (> source-tab-width 0) (setq-local tab-width source-tab-width))
+ (setq indent-tabs-mode use-tabs?)
+ (when (> source-tab-width 0) (setq tab-width source-tab-width))
;; Apply WRITE-BACK function on edit buffer contents.
(insert (org-no-properties contents))
(goto-char (point-min))
@@ -647,13 +647,12 @@ This minor mode is turned on in two situations:
See also `org-src-mode-hook'."
nil " OrgSrc" nil
(when org-edit-src-persistent-message
- (setq-local
- header-line-format
- (substitute-command-keys
- (if org-src--allow-write-back
- "Edit, then exit with `\\[org-edit-src-exit]' or abort with \
+ (setq header-line-format
+ (substitute-command-keys
+ (if org-src--allow-write-back
+ "Edit, then exit with `\\[org-edit-src-exit]' or abort with \
`\\[org-edit-src-abort]'"
- "Exit with `\\[org-edit-src-exit]' or abort with \
+ "Exit with `\\[org-edit-src-exit]' or abort with \
`\\[org-edit-src-abort]'"))))
;; Possibly activate various auto-save features (for the edit buffer
;; or the source buffer).
@@ -685,7 +684,7 @@ See also `org-src-mode-hook'."
(if (bound-and-true-p org-src--allow-write-back)
(progn
(setq buffer-offer-save t)
- (setq-local write-contents-functions '(org-edit-src-save)))
+ (setq write-contents-functions '(org-edit-src-save)))
(setq buffer-read-only t))))
(add-hook 'org-src-mode-hook #'org-src-mode-configure-edit-buffer)