improve customize integration

This commit is contained in:
deb0ch 2016-12-08 19:46:30 +01:00
parent 9d887c538f
commit f671f75c0f

View file

@ -63,8 +63,7 @@
(defcustom window-numbering-auto-assign-0-to-minibuffer t (defcustom window-numbering-auto-assign-0-to-minibuffer t
"If non-nil, `window-numbering-mode' assigns 0 to the minibuffer if active." "If non-nil, `window-numbering-mode' assigns 0 to the minibuffer if active."
:group 'window-numbering :group 'window-numbering
:type '(choice (const :tag "Off" nil) :type 'boolean)
(const :tag "On" t)))
(defcustom window-numbering-before-hook nil (defcustom window-numbering-before-hook nil
"Hook called before `window-numbering-mode' starts assigning numbers. "Hook called before `window-numbering-mode' starts assigning numbers.
@ -82,8 +81,10 @@ return a number to have it assigned to the current-window, nil otherwise."
:group 'window-numbering :group 'window-numbering
:type 'function) :type 'function)
(defconst window-numbering-mode-line-position 1 (defcustom window-numbering-mode-line-position 1
"The position in the mode-line `window-numbering-mode' displays the number.") "The position in the mode-line `window-numbering-mode' displays the number."
:group 'window-numbering
:type 'integer)
;; TODO when changed from frame-local to non-local in customize, need to force ;; TODO when changed from frame-local to non-local in customize, need to force
;; update, or `window-numbering-get-number' fails and crashes the modeline ;; update, or `window-numbering-get-number' fails and crashes the modeline
@ -102,8 +103,7 @@ Has effect only when `window-numbering-frame-scope' is not 'frame-local."
:group 'window-numbering :group 'window-numbering
:type 'boolean) :type 'boolean)
(defface window-numbering-face (defface window-numbering-face '()
'()
"Face used for the number in the mode-line." "Face used for the number in the mode-line."
:group 'window-numbering) :group 'window-numbering)