aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2021-10-30 21:56:06 -0700
committerGravatar Tom Willemse2021-10-30 21:56:06 -0700
commit787bb0a13c6e1b28e904e1b7f18564d5e97c9c93 (patch)
treebffd2319c25786dd8ad443c3ed36561b04b68d2d
parent06a6bcfc58d1f1cd8815c674c9fcbbf193bba0a9 (diff)
downloadyoshi-theme-787bb0a13c6e1b28e904e1b7f18564d5e97c9c93.tar.gz
yoshi-theme-787bb0a13c6e1b28e904e1b7f18564d5e97c9c93.zip
Add spaces around the Current info node in the mode-line
This puts it in line with the buffer identification for all other buffers that I’ve seen.
-rw-r--r--yoshi-theme.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/yoshi-theme.el b/yoshi-theme.el
index 7963137..ead85b9 100644
--- a/yoshi-theme.el
+++ b/yoshi-theme.el
@@ -36,9 +36,16 @@
"Return ARGS with the car modified to contain 2 spaces."
(cons (format " %s " (car args)) (cdr args)))
+(defun yoshi-theme-add-spaces-around-current-info-node (func &rest args)
+ (let ((Info-current-node (format " %s " Info-current-node)))
+ (apply func args)))
+
(advice-add 'propertized-buffer-identification
:filter-args #'yoshi-theme-add-space-to-first-arg)
+(advice-add 'Info-set-mode-line
+ :around #'yoshi-theme-add-spaces-around-current-info-node)
+
(defun yoshi-theme--make-inline-box (border-color)
"Return a list representing a box specification using BORDER-COLOR."
(let ((line-width (if (> emacs-major-version 27)