]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't enable minor modes in diff-add-log-current-defuns
authorStefan Kangas <stefankangas@gmail.com>
Wed, 26 Feb 2025 03:36:51 +0000 (04:36 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 26 Feb 2025 09:42:32 +0000 (10:42 +0100)
* lisp/vc/diff-mode.el (diff-add-log-current-defuns): Don't run mode
hooks when enabling major mode hooks.  That fails if, for example,
paredit-mode is on emacs-lisp-mode-hook and it signaled due to
unbalanced parens.

(cherry picked from commit 539772135222755255a3c8ca0cdda73dc4d742b2)

lisp/vc/diff-mode.el

index 6d176b46f75f712efd198abf22c3a59759901b03..6a38ce3addd1e5284115e9b83123c76e363ad685 100644 (file)
@@ -2625,7 +2625,8 @@ are relative to the root directory of the VC repository."
                         (if other-buf (set-buffer other-buf)
                           (set-buffer (generate-new-buffer " *diff-other-text*"))
                           (insert (if applied old-text new-text))
-                          (funcall (buffer-local-value 'major-mode buf))
+                          (let ((delay-mode-hooks t))
+                            (funcall (buffer-local-value 'major-mode buf)))
                           (setq other-buf (current-buffer)))
                         (goto-char (point-min))
                         (forward-line (+ =lines -1