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: Stefan Monnier
Subject: bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props)
Date: Sun, 02 Feb 2020 08:50:07 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> vc-find-revision-no-save also calls set-auto-mode.  So, I don't know if
> the following patch is correct, but together with your patch it does
> solve the original issue.
>
> diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
> index f64b6c0631..c50ba132e7 100644
> --- a/lisp/vc/vc.el
> +++ b/lisp/vc/vc.el
> @@ -2098,7 +2098,7 @@ vc-find-revision-no-save
>                      ;; For non-interactive, skip any questions
>                      (let ((enable-local-variables :safe) ;; to find `mode:'
>                            (buffer-file-name file))
> -                      (ignore-errors (set-auto-mode)))
> +                      (ignore-errors (delay-mode-hooks (set-auto-mode))))
>                    (normal-mode))
>               (set-buffer-modified-p nil)
>                  (setq buffer-read-only t))

How 'bout we first consolidate the two cases into one by introducing
a new function `set-auto-mode-for-filename` that both
vc-find-revision-no-save and diff-mode can use?


        Stefan






reply via email to

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