Add face for window number.
This commit is contained in:
parent
3adf4e1444
commit
5464fe4e4c
|
@ -37,6 +37,8 @@
|
||||||
;;
|
;;
|
||||||
;;; Changes Log:
|
;;; Changes Log:
|
||||||
;;
|
;;
|
||||||
|
;; Add face for window number. (thanks to Chen Bin)
|
||||||
|
;;
|
||||||
;; 2008-04-11 (1.1.1)
|
;; 2008-04-11 (1.1.1)
|
||||||
;; Added possibility to delete window with prefix arg.
|
;; Added possibility to delete window with prefix arg.
|
||||||
;; Cleaned up code and migrated to `defcustom'.
|
;; Cleaned up code and migrated to `defcustom'.
|
||||||
|
@ -79,6 +81,11 @@ return a number to have it assigned to the current-window, nil otherwise."
|
||||||
(defconst window-numbering-mode-line-position 1
|
(defconst 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.")
|
||||||
|
|
||||||
|
(defface window-numbering-face
|
||||||
|
'((t :inherit mode-line))
|
||||||
|
"Face used for the number in the mode-line."
|
||||||
|
:group 'window-numbering)
|
||||||
|
|
||||||
(defun select-window-by-number (i &optional arg)
|
(defun select-window-by-number (i &optional arg)
|
||||||
"Select window given number I by `window-numbering-mode'.
|
"Select window given number I by `window-numbering-mode'.
|
||||||
If prefix ARG is given, delete the window instead of selecting it."
|
If prefix ARG is given, delete the window instead of selecting it."
|
||||||
|
@ -163,7 +170,8 @@ windows to numbers."
|
||||||
(window-numbering-assign window))))
|
(window-numbering-assign window))))
|
||||||
|
|
||||||
(defun window-numbering-get-number-string (&optional window)
|
(defun window-numbering-get-number-string (&optional window)
|
||||||
(int-to-string (window-numbering-get-number window)))
|
(let ((s (int-to-string (window-numbering-get-number window))))
|
||||||
|
(propertize s 'face 'window-numbering-face)))
|
||||||
|
|
||||||
(defun window-numbering-get-number (&optional window)
|
(defun window-numbering-get-number (&optional window)
|
||||||
(gethash (or window (selected-window))
|
(gethash (or window (selected-window))
|
||||||
|
|
Loading…
Reference in a new issue