From 1cf6c63830e07c5131ca7d8889c2561ac7d6cd91 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Thu, 8 May 2025 22:18:07 -0700 Subject: yoshi-mode-line: Fix getting original value for mode-line-format Now the ‘setq-default’ form can be called multiple times without duplicating the elements added to the mode line. --- yoshi-mode-line.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yoshi-mode-line.el b/yoshi-mode-line.el index 0113765..6089013 100644 --- a/yoshi-mode-line.el +++ b/yoshi-mode-line.el @@ -60,7 +60,7 @@ (propertize "read-write" 'display `(image :type svg :file ,(expand-file-name "file-solid.svg" yoshi-mode-line-icons-dir) :ascent center :height ,(window-default-font-height)))))) (setq-default mode-line-format - `("%e" mode-line-front-space (:eval (yoshi-mode-line-buffer-status-display)) ,@(cdr (default-value 'mode-line-format)))) + `("%e" mode-line-front-space (:eval (yoshi-mode-line-buffer-status-display)) ,@(cdadr (car (get 'mode-line-format 'standard-value))))) (provide 'yoshi-mode-line) ;;; yoshi-mode-line.el ends here -- cgit v1.3-2-g0d8e