* lisp/progmodes/compile.el (compilation--set-up-margin): Fix.

Call 'set-window-margins' only on the compilation buffer where the
hook 'window-buffer-change-functions' is set buffer-locally (bug#79640).
This commit is contained in:
Juri Linkov 2025-10-19 20:56:30 +03:00
parent 3212bdc464
commit 7df7a90e2c

View file

@ -3062,7 +3062,8 @@ Actual value is never used, only the text property.")
(defun compilation--set-up-margin (w)
"Setup the margin for \"=>\" in window W if it isn't already set up."
(set-window-margins w (+ (or (car (window-margins w)) 0) 2)))
(when (eq (window-buffer w) (current-buffer))
(set-window-margins w (+ (or (car (window-margins w)) 0) 2))))
(defun compilation--tear-down-margin (w)
"Remove the margin for \"=>\" if it is setup in window W."