aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJuri Linkov2025-11-09 20:48:19 +0200
committerJuri Linkov2025-11-09 20:48:19 +0200
commit41701df12a9a0a72b0f68dffdcd69c8ab8f40f7c (patch)
tree7114facdcc2729e8107ca192c9859aa6644ad0fe /lisp
parente2531721b45868398369ef738641e5fb8ddd59fc (diff)
downloademacs-41701df12a9a0a72b0f68dffdcd69c8ab8f40f7c.tar.gz
emacs-41701df12a9a0a72b0f68dffdcd69c8ab8f40f7c.zip
* 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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/flymake.el9
1 files 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."
1420 (flymake-mode 1420 (flymake-mode
1421 ;; The buffer about to be annotated is visible. Check 1421 ;; The buffer about to be annotated is visible. Check
1422 ;; necessary conditions to auto-set margins here (bug#77313) 1422 ;; necessary conditions to auto-set margins here (bug#77313)
1423 (let* ((w (and (eq flymake-indicator-type 'auto) 1423 (when-let* ((w (and (eq flymake-indicator-type 'auto)
1424 flymake-autoresize-margins 1424 flymake-autoresize-margins
1425 (visible-buffer-window)))) 1425 (visible-buffer-window))))
1426 (unless (flymake--suitably-fringed-p w) (flymake--resize-margins))) 1426 (unless (flymake--suitably-fringed-p w)
1427 (flymake--resize-margins)))
1427 (setq flymake-check-start-time (float-time)) 1428 (setq flymake-check-start-time (float-time))
1428 (let ((backend-args 1429 (let ((backend-args
1429 (and 1430 (and