Add option to disable major mode segment
This commit is contained in:
parent
ade4f40518
commit
2f9f5f37f5
14
mood-line.el
14
mood-line.el
@ -198,6 +198,11 @@
|
|||||||
:group 'mood-line
|
:group 'mood-line
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
|
||||||
|
(defcustom mood-line-show-major-mode t
|
||||||
|
"When non-nil, show the name of the major mode of the current buffer."
|
||||||
|
:group 'mood-line
|
||||||
|
:type 'boolean)
|
||||||
|
|
||||||
(defcustom mood-line-glyph-alist mood-line-glyphs-ascii
|
(defcustom mood-line-glyph-alist mood-line-glyphs-ascii
|
||||||
"Alist mapping glyph names to characters used to draw some mode line segments.
|
"Alist mapping glyph names to characters used to draw some mode line segments.
|
||||||
|
|
||||||
@ -812,10 +817,11 @@ Checkers checked, in order: `flycheck', `flymake'."
|
|||||||
;; ---------------------------------- ;;
|
;; ---------------------------------- ;;
|
||||||
|
|
||||||
(defun mood-line-segment-major-mode ()
|
(defun mood-line-segment-major-mode ()
|
||||||
"Display the name of the current major mode."
|
"Display the name of the major mode of the current buffer."
|
||||||
(concat (propertize (substring-no-properties (format-mode-line mode-name))
|
(when mood-line-show-major-mode
|
||||||
'face 'mood-line-major-mode)
|
(concat (propertize (substring-no-properties (format-mode-line mode-name))
|
||||||
" "))
|
'face 'mood-line-major-mode)
|
||||||
|
" ")))
|
||||||
|
|
||||||
;; ---------------------------------- ;;
|
;; ---------------------------------- ;;
|
||||||
;; Misc. info segment
|
;; Misc. info segment
|
||||||
|
Loading…
Reference in New Issue
Block a user