minor code improvement
This commit is contained in:
parent
a096da2881
commit
8bafa66f80
7
winum.el
7
winum.el
|
@ -426,12 +426,11 @@ POSITION: position in the mode-line."
|
||||||
(defun winum--clear-mode-line ()
|
(defun winum--clear-mode-line ()
|
||||||
"Remove the window number of `winum-mode' from the mode-line."
|
"Remove the window number of `winum-mode' from the mode-line."
|
||||||
(let ((mode-line (default-value 'mode-line-format))
|
(let ((mode-line (default-value 'mode-line-format))
|
||||||
(res))
|
res)
|
||||||
(while mode-line
|
(while mode-line
|
||||||
(let ((item (car mode-line)))
|
(let ((item (pop mode-line)))
|
||||||
(unless (equal item winum--mode-line-segment)
|
(unless (equal item winum--mode-line-segment)
|
||||||
(push item res)))
|
(push item res))))
|
||||||
(pop mode-line))
|
|
||||||
(let ((nres (nreverse res)))
|
(let ((nres (nreverse res)))
|
||||||
(setq mode-line-format nres)
|
(setq mode-line-format nres)
|
||||||
(setq-default mode-line-format nres)))
|
(setq-default mode-line-format nres)))
|
||||||
|
|
Loading…
Reference in a new issue