improve docstrings and documentation

This commit is contained in:
deb0ch 2016-12-17 13:59:18 +01:00
parent 36358cc8c2
commit a9d4cfb414
2 changed files with 21 additions and 4 deletions

View file

@ -162,7 +162,8 @@ Several options are available through Emacs' Customize interface under
automatic assignment begins. The function should return a number to have it
assigned to the current-window, =nil= otherwise.
Default: =nil=
This function along with `winum-auto-assign-0-to-minibuffer' are the only ways
to have 0 assigned to a window.
Example: always assign *Calculator* the number 9 and *NeoTree* the number 0:
@ -179,6 +180,8 @@ Several options are available through Emacs' Customize interface under
(setq winum-assign-func 'my-winum-assign-func)
#+END_SRC
Default: =nil=
- =winum-auto-setup-mode-line=
When nil, =winum-mode= will not display window numbers in the mode-line. You
@ -195,7 +198,7 @@ Several options are available through Emacs' Customize interface under
- =winum-ignored-buffers=
List of buffers to ignore when selecting window.
List of buffers to ignore when assigning numbers.
Default: '(" *which-key*")

View file

@ -77,8 +77,22 @@ Has effect only when `winum-scope' is not 'frame-local."
"Function called for each window by `winum-mode'.
This is called before automatic assignment begins. The function should
return a number to have it assigned to the current-window, nil otherwise.
This function along with `winum-auto-assign-0-to-minibuffer' are the only
ways to have 0 assigned to a window."
ways to have 0 assigned to a window.
Example: always assign *Calculator* the number 9 and *NeoTree* the number 0:
(defun my-winum-assign-func ()
(cond
((equal (buffer-name) \"*Calculator*\")
9)
((string-match-p (buffer-name) \".*\\*NeoTree\\*.*\")
0)
(t
nil)))
(setq winum-assign-func 'my-winum-assign-func)"
:group 'winum
:type 'function)
@ -93,7 +107,7 @@ numbers in the mode-line.")
:type 'integer)
(defcustom winum-ignored-buffers '(" *which-key*")
"List of buffers to ignore when selecting window."
"List of buffers to ignore when assigning numbers."
:group 'winum
:type '(repeat string))