|
|
|
|
@ -181,6 +181,46 @@ |
|
|
|
|
mode-line-modes |
|
|
|
|
mode-line-misc-info |
|
|
|
|
mode-line-end-spaces)) |
|
|
|
|
#+END_SRC |
|
|
|
|
The following has been found in [[https://www.masteringemacs.org/article/hiding-replacing-modeline-strings][here]] to clean up the modeline |
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
(defvar mode-line-cleaner-alist |
|
|
|
|
`((auto-complete-mode . " α") |
|
|
|
|
(yas/minor-mode . " υ") |
|
|
|
|
(paredit-mode . " π") |
|
|
|
|
(eldoc-mode . "") |
|
|
|
|
(abbrev-mode . "") |
|
|
|
|
(auto-fill-function . "") |
|
|
|
|
(global-disable-mouse-mode . "") |
|
|
|
|
;; Major modes |
|
|
|
|
(lisp-interaction-mode . "λ |") |
|
|
|
|
(hi-lock-mode . "") |
|
|
|
|
(python-mode . "Py") |
|
|
|
|
(emacs-lisp-mode . "EL |") |
|
|
|
|
(org-mode . "Ω |") |
|
|
|
|
(org-agenda-mode . "Ω:Agenda |")) |
|
|
|
|
"Alist for `clean-mode-line'. |
|
|
|
|
|
|
|
|
|
When you add a new element to the alist, keep in mind that you |
|
|
|
|
must pass the correct minor/major mode symbol and a string you |
|
|
|
|
want to use in the modeline *in lieu of* the original.") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun clean-mode-line () |
|
|
|
|
(interactive) |
|
|
|
|
(loop for cleaner in mode-line-cleaner-alist |
|
|
|
|
do (let* ((mode (car cleaner)) |
|
|
|
|
(mode-str (cdr cleaner)) |
|
|
|
|
(old-mode-str (cdr (assq mode minor-mode-alist)))) |
|
|
|
|
(when old-mode-str |
|
|
|
|
(setcar old-mode-str mode-str)) |
|
|
|
|
;; major mode |
|
|
|
|
(when (eq mode major-mode) |
|
|
|
|
(setq mode-name mode-str))))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(add-hook 'after-change-major-mode-hook 'clean-mode-line) |
|
|
|
|
|
|
|
|
|
#+END_SRC |
|
|
|
|
** Coding system |
|
|
|
|
Prefer the utf-8 coding system globally. This helps with the issue of |
|
|
|
|
|