dotemacs

My Emacs configuration
git clone git://git.entf.net/dotemacs
Log | Files | Refs | LICENSE

README.md (2467B)


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