add custom variable winum-format
This commit is contained in:
parent
8bafa66f80
commit
b27b8f4db7
2 changed files with 39 additions and 19 deletions
13
winum.el
13
winum.el
|
|
@ -143,6 +143,13 @@ numbers in the mode-line."
|
|||
:group 'winum
|
||||
:type 'integer)
|
||||
|
||||
(defcustom winum-format " %s "
|
||||
"Format string defining how the window number looks like in the mode-line.
|
||||
This string is passed to the `format' function along with the
|
||||
result of `winum-get-number-string'."
|
||||
:group 'winum
|
||||
:type 'string)
|
||||
|
||||
(defcustom winum-ignored-buffers '(" *which-key*")
|
||||
"List of buffers to ignore when assigning numbers."
|
||||
:group 'winum
|
||||
|
|
@ -208,6 +215,10 @@ To get a number given a window, use the `cdr' of a value.
|
|||
|
||||
Such a structure allows for per-frame bidirectional fast access.")
|
||||
|
||||
(defvar winum--mode-line-segment
|
||||
'(:eval (format winum-format (winum-get-number-string)))
|
||||
"What is pushed into `mode-line-format' when setting it up automatically.")
|
||||
|
||||
(defvar winum--last-used-scope winum-scope
|
||||
"Tracks the last used `winum-scope'.
|
||||
Needed to detect scope changes at runtime.")
|
||||
|
|
@ -404,8 +415,6 @@ WINDOW: if specified, the window of which we want to know the number.
|
|||
(remove-hook 'window-configuration-change-hook 'winum--update)
|
||||
(setq winum--frames-table nil))
|
||||
|
||||
(defvar winum--mode-line-segment '(:eval (winum-get-number-string)))
|
||||
|
||||
(defun winum--install-mode-line (&optional position)
|
||||
"Install the window number from `winum-mode' to the mode-line.
|
||||
POSITION: position in the mode-line."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue