1
0
Fork 0
mirror of https://git.sr.ht/~ryuslash/yoshi-theme synced 2025-07-10 19:43:06 +02:00

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.
This commit is contained in:
Tom Willemse 2025-05-08 22:18:07 -07:00
parent 384fd8e70e
commit 1cf6c63830

View file

@ -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