improve docs for winum-ignored-buffers-regexp

This commit is contained in:
deb0ch 2019-09-11 13:40:18 +02:00
parent 23d1ecce94
commit e571c320f1
2 changed files with 9 additions and 6 deletions

View file

@ -268,9 +268,10 @@ Several options are available through Emacs' Customize interface under
Default: '(" *which-key*")
- =winum-ignored-buffers-regex=
- =winum-ignored-buffers-regexp=
List of regexes. Matching buffers will be ignored when assigning numbers.
List of regexps for buffer names. Matching buffers will be ignored when
assigning numbers. See [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Regexps.html][Emacs' documentation on regexps]] for syntax.
Default: '()
@ -320,7 +321,8 @@ available winum options.
winum-auto-setup-mode-line t
winum-format " %s "
winum-mode-line-position 1
winum-ignored-buffers '(" *which-key*"))
winum-ignored-buffers '(" *which-key*")
winum-ignored-buffers-regexp '(" \\*Treemacs-.*"))
(winum-mode)
#+END_SRC

View file

@ -155,8 +155,9 @@ result of `winum-get-number-string'."
:group 'winum
:type '(repeat string))
(defcustom winum-ignored-buffers-regex '()
"List of regex for buffers to ignore when assigning numbers."
(defcustom winum-ignored-buffers-regexp '()
"List of regexps for buffer names to ignore when assigning numbers.
See Info node `(emacs) Regexps' or Info node `(elisp) Regular Expressions'"
:group 'winum
:type '(repeat string)
:risky t)
@ -547,7 +548,7 @@ windows, however a higher number can be reserved by the user-defined
(member (buffer-name (window-buffer window)) winum-ignored-buffers)
(cl-some
(lambda (regex) (string-match regex (buffer-name (window-buffer window))))
winum-ignored-buffers-regex))))
winum-ignored-buffers-regexp))))
(defun winum--list-windows-in-frame (&optional f)
"List windows in frame F using natural Emacs ordering."