1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-07 04:10:27 -08:00

* lisp/progmodes/flymake.el (flymake-start): Use 'when-let*' (bug#79796).

This fixes the case when 'flymake-autoresize-margins' is nil, but
'flymake--suitably-fringed-p' returns nil and still resizes margins.
This commit is contained in:
Juri Linkov 2025-11-09 20:48:19 +02:00
parent e2531721b4
commit 41701df12a

View file

@ -1420,10 +1420,11 @@ Interactively, with a prefix arg, FORCE is t."
(flymake-mode
;; The buffer about to be annotated is visible. Check
;; necessary conditions to auto-set margins here (bug#77313)
(let* ((w (and (eq flymake-indicator-type 'auto)
flymake-autoresize-margins
(visible-buffer-window))))
(unless (flymake--suitably-fringed-p w) (flymake--resize-margins)))
(when-let* ((w (and (eq flymake-indicator-type 'auto)
flymake-autoresize-margins
(visible-buffer-window))))
(unless (flymake--suitably-fringed-p w)
(flymake--resize-margins)))
(setq flymake-check-start-time (float-time))
(let ((backend-args
(and