aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config/emacs
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2020-08-14 23:51:31 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2020-08-14 23:51:31 +0100
commit8034383cc6eabee7eaff222f870afaaa2e4b4a3a (patch)
tree882ebecf1ceac5b51f9aeb70ce2a2db0b963ddff /Emacs/.config/emacs
parenta560d1d6f7d5578b433723f0573627cdb2f406f3 (diff)
downloaddotfiles-8034383cc6eabee7eaff222f870afaaa2e4b4a3a.tar.gz
dotfiles-8034383cc6eabee7eaff222f870afaaa2e4b4a3a.tar.bz2
dotfiles-8034383cc6eabee7eaff222f870afaaa2e4b4a3a.zip
~made modeline config separator agnostic
Now I can use any separator for the modeline, like dashes.
Diffstat (limited to 'Emacs/.config/emacs')
-rw-r--r--Emacs/.config/emacs/config.org11
1 files changed, 8 insertions, 3 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org
index b04710c..c73670c 100644
--- a/Emacs/.config/emacs/config.org
+++ b/Emacs/.config/emacs/config.org
@@ -49,10 +49,15 @@ Load my custom "Grayscale" theme (look at [[file:Grayscale-theme.el][this file]]
ring-bell-function 'ignore)
#+END_SRC
* Emacs Mode-line
-Firstly, declare a variable for the number of spaces between each
+Firstly, declare a variable for the separator between each module
+#+BEGIN_SRC emacs-lisp
+(defconst +modeline/separator " " "Separator between modules.")
+#+END_SRC
+
+Then declare a variable for the number of separators between each
module in the modeline.
#+BEGIN_SRC emacs-lisp
-(defconst +modeline/sep-spaces 4 "Number of spaces separating modules.")
+(defconst +modeline/sep-count 4 "Number of +modline/separator instances separating modules.")
#+END_SRC
Then, declare a list of reserved characters for which the previously
@@ -71,7 +76,7 @@ reserved characters to any one string.
(progn
(string-blank-p STR)
(cond ((cl-member (car (last (split-string STR "" t))) +modeline/reserved-chars :test #'string=) STR)
- (t (concat STR (cl-reduce #'concat (cl-loop for i from 1 to +modeline/sep-spaces collect " "))))))
+ (t (concat STR (cl-reduce #'concat (cl-loop for i from 1 to +modeline/sep-count collect +modeline/separator))))))
(error STR)))
#+END_SRC