update comments
This commit is contained in:
parent
9db55dc5ea
commit
ed2e4722a3
|
@ -27,23 +27,25 @@
|
||||||
;;
|
;;
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;
|
;;
|
||||||
;; An extended and actively maintained version of the window-numbering package
|
;; Window numbers for Emacs: Navigate your windows and frames using numbers.
|
||||||
;; written by Nikolaj Schumacher
|
|
||||||
;;
|
;;
|
||||||
;; Bla bla bla disclaimer, links & credits to original project, ace-window
|
;; This package is an extended and actively maintained version of the
|
||||||
;; etc...
|
;; https://github.com/nschum/window-numbering.el package by Nikolaj Schumacher,
|
||||||
|
;; with some ideas and code taken from https://github.com/abo-abo/ace-window.
|
||||||
;;
|
;;
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(eval-when-compile (require 'cl))
|
(eval-when-compile (require 'cl))
|
||||||
|
|
||||||
|
;; TODO rename to 'winum.el' and keep backward compatibility
|
||||||
|
|
||||||
(defgroup window-numbering nil
|
(defgroup window-numbering nil
|
||||||
"Navigate and manage windows using numbers."
|
"Navigate and manage windows using numbers."
|
||||||
:group 'convenience)
|
:group 'convenience)
|
||||||
|
|
||||||
;; TODO when changed from frame-local to non-local in customize, need to force
|
;; TODO bug: when changed from frame-local to non-local in customize, need to
|
||||||
;; update, or `window-numbering-get-number' fails and crashes the modeline
|
;; force update or `window-numbering-get-number' fails and messes the
|
||||||
;; until next update.
|
;; modeline until next update.
|
||||||
(defcustom window-numbering-scope 'global
|
(defcustom window-numbering-scope 'global
|
||||||
"The scope of number sets."
|
"The scope of number sets."
|
||||||
:group 'window-numbering
|
:group 'window-numbering
|
||||||
|
@ -84,6 +86,7 @@ return a number to have it assigned to the current-window, nil otherwise."
|
||||||
:group 'window-numbering
|
:group 'window-numbering
|
||||||
:type 'integer)
|
:type 'integer)
|
||||||
|
|
||||||
|
|
||||||
(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)
|
||||||
|
@ -105,9 +108,9 @@ return a number to have it assigned to the current-window, nil otherwise."
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(define-minor-mode window-numbering-mode
|
(define-minor-mode window-numbering-mode
|
||||||
"A minor mode that allows for managing windows based on window numbers."
|
"A minor mode that allows for managing windows based on window numbers."
|
||||||
nil ; initial value of the mode variable
|
nil
|
||||||
nil ; lighter (appearance in mode-line)
|
nil
|
||||||
window-numbering-keymap ; keymap
|
window-numbering-keymap
|
||||||
:global t
|
:global t
|
||||||
(if window-numbering-mode
|
(if window-numbering-mode
|
||||||
(window-numbering--init)
|
(window-numbering--init)
|
||||||
|
@ -257,7 +260,6 @@ Such a structure allows for per-frame bidirectional fast access.")
|
||||||
'window-numbering--update)
|
'window-numbering--update)
|
||||||
(setq window-numbering--frames-table nil))
|
(setq window-numbering--frames-table nil))
|
||||||
|
|
||||||
;; TODO bug: mode-line is sometimes not updated in all visible frames
|
|
||||||
(defun window-numbering--update ()
|
(defun window-numbering--update ()
|
||||||
"Update window numbers."
|
"Update window numbers."
|
||||||
(setq window-numbering--remaining (window-numbering--get-available-numbers))
|
(setq window-numbering--remaining (window-numbering--get-available-numbers))
|
||||||
|
|
Loading…
Reference in a new issue