summary refs log tree commit diff stats
path: root/tag-emacs
diff options
context:
space:
mode:
authorAlan Pearce2015-10-05 09:25:12 +0200
committerAlan Pearce2015-10-05 09:25:12 +0200
commitadc5820c63ebcfd39ae16b3625e374a75e51eb8c (patch)
tree478c39473ccecc664217cc05549cfc7bca886679 /tag-emacs
parent7175d1e6b248a6011a1847d7f7f041d7409a4dd9 (diff)
downloadnixfiles-adc5820c63ebcfd39ae16b3625e374a75e51eb8c.tar.lz
nixfiles-adc5820c63ebcfd39ae16b3625e374a75e51eb8c.tar.zst
nixfiles-adc5820c63ebcfd39ae16b3625e374a75e51eb8c.zip
Use Cyphejor to rename major mode lighters
Diffstat (limited to 'tag-emacs')
-rw-r--r--tag-emacs/emacs.d/Cask1
-rw-r--r--tag-emacs/emacs.d/init.org33
2 files changed, 23 insertions, 11 deletions
diff --git a/tag-emacs/emacs.d/Cask b/tag-emacs/emacs.d/Cask
index 8f04e0be..ba75ee8a 100644
--- a/tag-emacs/emacs.d/Cask
+++ b/tag-emacs/emacs.d/Cask
@@ -22,6 +22,7 @@
 (depends-on "company-tern")
 (depends-on "counsel")
 (depends-on "csv-mode")
+(depends-on "cyphejor")
 (depends-on "dash")
 (depends-on "dash-functional")
 (depends-on "deferred")
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index 39bedb64..4482f8cf 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -111,14 +111,6 @@ pass =:noerror= to =load=
   (load custom-file :noerror :nomessage)
 #+END_SRC
 
-* Helpers
-   I like to rename modeline lighters.  This macro works for major modes.
-#+BEGIN_SRC emacs-lisp
-(defmacro rename-modeline (mode new-name)
-  `(defadvice ,mode (after rename-modeline activate)
-     (setq mode-name ,new-name)))
-#+END_SRC
-
 * Projects
 
    #+BEGIN_SRC emacs-lisp
@@ -241,8 +233,7 @@ time.  Make sure to set it up with a nice =completing-read-function=
   (req-package magit
     :defer 5
     :commands (magit-status)
-    :config (progn (rename-modeline magit-status-mode (char-to-string (-find #'char-displayable-p '(11942 5848 177))))
-                   (setq magit-last-seen-setup-instructions "1.4.0"
+    :config (progn (setq magit-last-seen-setup-instructions "1.4.0"
                          magit-completing-read-function #'magit-builtin-completing-read
                          magit-wip-after-save-mode t
                          magit-wip-after-apply-mode t
@@ -1384,6 +1375,27 @@ I put some of it in the frame-line at the top.
                    "%b"))))
 #+END_SRC
 
+** Renaming major modes
+
+Diminishing major modes does not happen in the same manner as minor
+modes.
+
+#+BEGIN_SRC emacs-lisp
+  (req-package cyphejor
+    :init (progn
+            (setq cyphejor-rules `(("emacs"       "ε")
+                                   ("diff"        "Δ")
+                                   ("js2"         "js")
+                                   ("magit-status" ,(char-to-string (-find #'char-displayable-p '(11942 5848 177))))
+                                   ("inferior"    "i" :prefix)
+                                   ("interaction" "i" :prefix)
+                                   ("interactive" "i" :prefix)
+                                   ("menu"        "▤" :postfix)
+                                   ("mode"        "")
+                                   ("shell"       "sh" :postfix)))
+            (cyphejor-mode 1)))
+#+END_SRC
+
 * Modes
 
 Setup some modes for systemd files
@@ -1739,7 +1751,6 @@ Customise the modeline-display of =emacs-lisp-mode=. Then make sure
 it runs the common lisp hooks.
 
 #+BEGIN_SRC emacs-lisp
-(rename-modeline emacs-lisp-mode "ξ")
 (add-to-list 'auto-mode-alist '("/Cask\\'" . emacs-lisp-mode))
 (add-hook 'emacs-lisp-mode-hook #'ap/lisp-setup)
 (add-hook 'emacs-lisp-mode-hook #'eldoc-mode)