summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2021-08-07 16:59:56 -0500
committerCase Duckworth2021-08-07 16:59:56 -0500
commite2f167fbc59b75d13e1e47e1738d61ac9b862c50 (patch)
tree2440b7a10f7c362b9ef19df12df3f545b5e2a41d /lisp
parentMerge branch 'main' of https://tildegit.org/acdw/emacs (diff)
downloademacs-e2f167fbc59b75d13e1e47e1738d61ac9b862c50.tar.gz
emacs-e2f167fbc59b75d13e1e47e1738d61ac9b862c50.zip
Show narrowed status in mode-line
Diffstat (limited to 'lisp')
-rw-r--r--lisp/acdw-modeline.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/lisp/acdw-modeline.el b/lisp/acdw-modeline.el index 6131484..c073992 100644 --- a/lisp/acdw-modeline.el +++ b/lisp/acdw-modeline.el
@@ -80,6 +80,20 @@ indicator in the mode-line."
80 (minions-minor-modes-menu))))) 80 (minions-minor-modes-menu)))))
81 'mouse-face 'mode-line-highlight))) 81 'mouse-face 'mode-line-highlight)))
82 82
83(defun acdw-modeline/narrowed ()
84 "Display an indication if the buffer is narrowed."
85 (when (buffer-narrowed-p)
86 (concat
87 ""
88 (propertize
89 "N"
90 'help-echo (format "%s\n%s"
91 "Buffer is narrowed"
92 "mouse-2: widen buffer.")
93 'local-map (purecopy (simple-modeline-make-mouse-map
94 'mouse-2 #'mode-line-widen))
95 'mouse-face 'mode-line-highlight))))
96
83(defun acdw-modeline/text-scale () 97(defun acdw-modeline/text-scale ()
84 ;; adapted from https://github.com/seagle0128/doom-modeline 98 ;; adapted from https://github.com/seagle0128/doom-modeline
85 (when (and (boundp 'text-scale-mode-amount) 99 (when (and (boundp 'text-scale-mode-amount)