Commit 10bedb75 authored by Juri Linkov's avatar Juri Linkov

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)
parent 57f5a63d
Pipeline #5094 passed with stage
in 57 minutes and 21 seconds
......@@ -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).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment