From 41701df12a9a0a72b0f68dffdcd69c8ab8f40f7c Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 9 Nov 2025 20:48:19 +0200 Subject: [PATCH] * 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. --- lisp/progmodes/flymake.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 60a6bacf640..460969dd9a4 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -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