/ README.md
README.md
1 [](https://elpa.gnu.org/packages/diminish.html) 2 [](https://elpa.gnu.org/devel/diminish.html) 3 [](https://melpa.org/#/diminish) 4 [](http://stable.melpa.org/#/diminish) 5 6 # diminish.el 7 8 Introduction 9 ============ 10 11 > When we diminish a mode, we are saying we want it to continue doing its 12 > work for us, but we no longer want to be reminded of it. It becomes a 13 > night worker, like a janitor; it becomes an invisible man; it remains a 14 > component, perhaps an important one, sometimes an indispensable one, of 15 > the mechanism that maintains the day-people's world, but its place in 16 > their thoughts is diminished, usually to nothing. As we grow old we 17 > diminish more and more such thoughts, such people, usually to nothing. 18 > -- Will Mengarini 19 20 This package implements hiding or abbreviation of the mode line displays 21 (lighters) of minor-modes. 22 23 Quick start 24 =========== 25 26 ```emacs-lisp 27 (require 'diminish) 28 29 (diminish 'rainbow-mode) ; Hide lighter from mode-line 30 (diminish 'rainbow-mode " Rbow") ; Replace rainbow-mode lighter with " Rbow" 31 (diminish 'rainbow-mode 'rainbow-mode-lighter) ; Use raingow-mode-lighter variable value 32 (diminish 'rainbow-mode '(" " "R-" "bow")) ; Replace rainbow-mode lighter with " R-bow" 33 (diminish 'rainbow-mode '((" " "R") "/" "bow")) ; Replace rainbow-mode lighter with " R/bow" 34 (diminish 'rainbow-mode '(:eval (format " Rbow/%s" (+ 2 3)))) ; Replace rainbow-mode lighter with " Rbow/5" 35 (diminish 'rainbow-mode ; Replace rainbow-mode lighter with greened " Rbow" 36 '(:propertize " Rbow" face '(:foreground "green"))) 37 (diminish 'rainbow-mode ; If rainbow-mode-mode-linep is non-nil " Rbow/t" 38 '(rainbow-mode-mode-linep " Rbow/t" " Rbow/nil")) 39 (diminish 'rainbow-mode '(3 " Rbow" "/" "s")) ; Replace rainbow-mode lighter with " Rb" 40 ``` 41 42 Ref: [Emacs manual - The Data Structure of the Mode Line](https://www.gnu.org/software/emacs/manual/html_node/elisp/Mode-Line-Data.html). 43 44 John Wiegley's 45 [use-package](https://github.com/jwiegley/use-package#diminishing-and-delighting-minor-modes) 46 macro also has support for diminish.el. 47 48 Copyright Assignment 49 ==================== 50 51 Diminish is subject to the same [copyright assignment](https://www.fsf.org/licensing/contributor-faq) policy as GNU Emacs. 52 53 Any [legally significant](https://www.gnu.org/prep/maintain/html_node/Legally-Significant.html#Legally-Significant) contributions can only be merged after the author has completed their paperwork. Please ask for the request form, and we'll send it to you. 54 55 Acknowledgments 56 =============== 57 58 diminish.el was created by Will Mengarini on 19th of February 1998 and is now 59 maintained by [Martin Yrjölä](https://github.com/myrjola).