From d290f64bd09177b8a3722e493f5391908fd1c079 Mon Sep 17 00:00:00 2001 From: Benson Chu Date: Mon, 29 Apr 2024 11:35:12 -0500 Subject: [PATCH] Don't double indent the last time, just once --- lisp/make-cf-map.el | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/lisp/make-cf-map.el b/lisp/make-cf-map.el index 51e67db..f4ed0c5 100644 --- a/lisp/make-cf-map.el +++ b/lisp/make-cf-map.el @@ -227,16 +227,24 @@ (overwrite-mode -1) - (let ((start (save-excursion - (goto-line super-start) - (line-beginning-position))) - (end (save-excursion - (goto-line super-end) - (line-beginning-position)))) - (string-rectangle start end " ")) - (setq remaining (reverse new-list) - arrow-length (+ 2 arrow-length))) + arrow-length (+ 2 arrow-length)) + + (when (not (zerop (length remaining))) + (let ((start (save-excursion + (goto-line super-start) + (line-beginning-position))) + (end (save-excursion + (goto-line super-end) + (line-beginning-position)))) + (string-rectangle start end " ")))) + (let ((start (save-excursion + (goto-line super-start) + (line-beginning-position))) + (end (save-excursion + (goto-line super-end) + (line-beginning-position)))) + (string-rectangle start end " ")) (setq cfmap-width arrow-length)))) (provide 'make-cf-map)