[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 10bedb7: Disable enable-local-variables for hunk-only in diff-syn
From: |
Juri Linkov |
Subject: |
master 10bedb7: Disable enable-local-variables for hunk-only in diff-syntax-fontify-props |
Date: |
Thu, 26 Mar 2020 19:44:26 -0400 (EDT) |
branch: master
commit 10bedb75c915158b7662d4dfa4afa3a231714268
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>
Disable enable-local-variables for hunk-only in diff-syntax-fontify-props
* lisp/vc/diff-mode.el (diff-syntax-fontify-props): Let-bind
enable-local-variables to nil when hunk-only is non-nil (bug#39190)
---
lisp/vc/diff-mode.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 8171a58..da2d5ed 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -2720,7 +2720,9 @@ hunk text is not found in the source file."
;; When initialization is requested, we should be in a brand new
;; temp buffer.
(cl-assert (null buffer-file-name))
- (let ((enable-local-variables :safe) ;; to find `mode:'
+ ;; Use `:safe' to find `mode:'. In case of hunk-only, use nil because
+ ;; Local Variables list might be incomplete when context is truncated.
+ (let ((enable-local-variables (unless hunk-only :safe))
(buffer-file-name file))
;; Don't run hooks that might assume buffer-file-name
;; really associates buffer with a file (bug#39190).
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 10bedb7: Disable enable-local-variables for hunk-only in diff-syntax-fontify-props,
Juri Linkov <=