bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-


From: Juri Linkov
Subject: bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props)
Date: Thu, 30 Jan 2020 01:07:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.60 (x86_64-pc-linux-gnu)

>> Since it will take much time when the fix in Emacs will appear in a released
>> version, a workaround needs to be added to Eglot immediately.
>
> OK, but this feature ("Better syntax highlighting of Diff hunks") will
> first appear in Emacs 27.

Right, so it needs to be fixed in Emacs 27.

Could you please try to reproduce the issue using Eglot with the
following minimal patch.  If it really fixes the bug then it
should be committed to Emacs 27 immediately, and more changes
could be added later.

diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 2dbab80208..9035f7643a 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -2719,7 +2719,7 @@ diff-syntax-fontify-props
     (cl-assert (null buffer-file-name))
     (let ((enable-local-variables :safe) ;; to find `mode:'
           (buffer-file-name file))
-      (set-auto-mode)
+      (delay-mode-hooks (set-auto-mode))
       ;; FIXME: Is this really worth the trouble?
       (when (and (fboundp 'generic-mode-find-file-hook)
                  (memq #'generic-mode-find-file-hook







reply via email to

[Prev in Thread] Current Thread [Next in Thread]