2016-12-08 13:53:34 -05:00
|
|
|
;;; winum.el --- Window numbers
|
2008-04-11 16:06:14 -04:00
|
|
|
;;
|
2016-12-08 13:53:34 -05:00
|
|
|
;; Copyright (c) 2006-2015 Nikolaj Schumacher
|
|
|
|
;; Copyright (c) 2016 Thomas Chauvot de Beauchêne
|
2008-04-11 16:06:14 -04:00
|
|
|
;;
|
2016-12-08 13:53:34 -05:00
|
|
|
;; This program is free software: you can redistribute it and/or modify
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
2008-04-11 16:06:14 -04:00
|
|
|
;;
|
2008-04-11 15:22:15 -04:00
|
|
|
;; This program is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;; GNU General Public License for more details.
|
2008-04-11 16:06:14 -04:00
|
|
|
;;
|
2008-04-11 15:22:15 -04:00
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
|
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2008-04-11 16:06:14 -04:00
|
|
|
;;
|
2016-12-08 13:53:34 -05:00
|
|
|
;; Author: Thomas de Beauchêne <thomas.de.beauchene@gmail.com>
|
|
|
|
;; Version: 1.0
|
|
|
|
;; Keywords: windows, window management, numbers
|
|
|
|
;; URL: http://github.com/deb0ch/winum.el
|
|
|
|
;; Created: 2016
|
|
|
|
;; Compatibility: GNU Emacs 24.x
|
2008-04-11 15:24:04 -04:00
|
|
|
;;
|
2016-12-08 13:53:34 -05:00
|
|
|
;; This file is NOT part of GNU Emacs.
|
2015-02-28 15:46:53 -05:00
|
|
|
;;
|
2016-12-08 13:53:34 -05:00
|
|
|
;;; Commentary:
|
2013-01-27 06:49:51 -05:00
|
|
|
;;
|
2016-12-08 13:53:34 -05:00
|
|
|
;; This project is an extended and actively maintained version of
|
|
|
|
;; window-numbering.el
|
2008-04-11 16:06:14 -04:00
|
|
|
;;
|
2016-12-08 13:53:34 -05:00
|
|
|
;; Bla bla bla disclaimer, links & credits to original project, ace-window
|
|
|
|
;; etc...
|
2008-04-11 16:06:14 -04:00
|
|
|
;;
|
|
|
|
;;; Code:
|
2008-04-11 15:24:04 -04:00
|
|
|
|
2008-04-11 16:06:14 -04:00
|
|
|
(eval-when-compile (require 'cl))
|
2008-04-11 15:22:15 -04:00
|
|
|
|
2008-04-11 16:06:14 -04:00
|
|
|
(defgroup window-numbering nil
|
2016-12-08 13:36:57 -05:00
|
|
|
"Navigate and manage windows using numbers."
|
2008-04-11 16:06:14 -04:00
|
|
|
:group 'convenience)
|
2008-04-11 15:22:15 -04:00
|
|
|
|
2008-04-11 16:06:14 -04:00
|
|
|
(defcustom window-numbering-auto-assign-0-to-minibuffer t
|
2016-12-08 13:36:57 -05:00
|
|
|
"If non-nil, `window-numbering-mode' assigns 0 to the minibuffer if active."
|
2008-04-11 16:06:14 -04:00
|
|
|
:group 'window-numbering
|
2016-12-08 13:46:30 -05:00
|
|
|
:type 'boolean)
|
2008-04-11 15:24:04 -04:00
|
|
|
|
2008-04-11 16:06:14 -04:00
|
|
|
(defcustom window-numbering-before-hook nil
|
2016-12-08 13:36:57 -05:00
|
|
|
"Hook called before `window-numbering-mode' starts assigning numbers.
|
|
|
|
The list of windows to be numbered is passed as a parameter.
|
2016-11-28 16:01:35 -05:00
|
|
|
Use `window-numbering--assign' to manually assign some of them a number.
|
2008-04-11 15:24:04 -04:00
|
|
|
If you want to assign a number to just one buffer, use
|
2008-04-11 16:06:14 -04:00
|
|
|
`window-numbering-assign-func' instead."
|
|
|
|
:group 'window-numbering
|
|
|
|
:type 'hook)
|
2008-04-11 15:24:04 -04:00
|
|
|
|
2008-04-11 16:06:14 -04:00
|
|
|
(defcustom window-numbering-assign-func nil
|
2016-12-08 13:36:57 -05:00
|
|
|
"Function called for each window by `window-numbering-mode'.
|
2008-04-11 16:06:14 -04:00
|
|
|
This is called before automatic assignment begins. The function should
|
|
|
|
return a number to have it assigned to the current-window, nil otherwise."
|
|
|
|
:group 'window-numbering
|
|
|
|
:type 'function)
|
2008-04-11 15:24:04 -04:00
|
|
|
|
2016-12-08 13:46:30 -05:00
|
|
|
(defcustom window-numbering-mode-line-position 1
|
|
|
|
"The position in the mode-line `window-numbering-mode' displays the number."
|
|
|
|
:group 'window-numbering
|
|
|
|
:type 'integer)
|
2008-04-11 15:24:04 -04:00
|
|
|
|
2016-12-08 13:42:43 -05:00
|
|
|
;; 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
|
|
|
|
;; until next update.
|
2016-11-28 16:01:35 -05:00
|
|
|
(defcustom window-numbering-scope 'global
|
2016-12-08 09:51:24 -05:00
|
|
|
"The scope of number sets."
|
|
|
|
:group 'window-numbering
|
|
|
|
:type '(choice
|
|
|
|
(const :tag "frame local" frame-local)
|
|
|
|
(const :tag "visible frames" visible)
|
|
|
|
(const :tag "global" global)))
|
|
|
|
|
|
|
|
(defcustom window-numbering-reverse-frame-list nil
|
|
|
|
"If t, order frames by reverse order of creation.
|
2016-11-28 16:01:35 -05:00
|
|
|
Has effect only when `window-numbering-scope' is not 'frame-local."
|
2016-12-08 09:51:24 -05:00
|
|
|
:group 'window-numbering
|
|
|
|
:type 'boolean)
|
|
|
|
|
2016-12-08 13:46:30 -05:00
|
|
|
(defface window-numbering-face '()
|
2013-01-27 06:49:51 -05:00
|
|
|
"Face used for the number in the mode-line."
|
|
|
|
:group 'window-numbering)
|
|
|
|
|
2016-12-08 13:51:47 -05:00
|
|
|
(defvar window-numbering-keymap (let ((map (make-sparse-keymap)))
|
|
|
|
(define-key map "\M-0" 'select-window-0)
|
|
|
|
(define-key map "\M-1" 'select-window-1)
|
|
|
|
(define-key map "\M-2" 'select-window-2)
|
|
|
|
(define-key map "\M-3" 'select-window-3)
|
|
|
|
(define-key map "\M-4" 'select-window-4)
|
|
|
|
(define-key map "\M-5" 'select-window-5)
|
|
|
|
(define-key map "\M-6" 'select-window-6)
|
|
|
|
(define-key map "\M-7" 'select-window-7)
|
|
|
|
(define-key map "\M-8" 'select-window-8)
|
|
|
|
(define-key map "\M-9" 'select-window-9)
|
|
|
|
map)
|
|
|
|
"Keymap used in by `window-numbering-mode'.")
|
|
|
|
|
2016-11-28 16:01:35 -05:00
|
|
|
;;;###autoload
|
|
|
|
(define-minor-mode window-numbering-mode
|
|
|
|
"A minor mode that allows for managing windows based on window numbers."
|
|
|
|
nil ; initial value of the mode variable
|
|
|
|
nil ; lighter (name in mode-line)
|
|
|
|
window-numbering-keymap ; keymap
|
|
|
|
:global t
|
|
|
|
(if window-numbering-mode
|
|
|
|
(window-numbering--init)
|
|
|
|
(window-numbering--deinit)))
|
|
|
|
|
|
|
|
;; define interactive functions window-numbering-select-window-[0..n]
|
|
|
|
(dotimes (i 10)
|
|
|
|
(eval `(defun ,(intern (format "select-window-%s" i)) (&optional arg)
|
|
|
|
,(format "Jump to window %d.\nIf prefix ARG is given, delete the\
|
|
|
|
window instead of selecting it." i)
|
|
|
|
(interactive "P")
|
|
|
|
(select-window-by-number ,i arg))))
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun select-window-by-number (i &optional arg)
|
|
|
|
"Select window given number I by `window-numbering-mode'.
|
|
|
|
If prefix ARG is given, delete the window instead of selecting it."
|
|
|
|
(interactive "P")
|
|
|
|
(let ((w (window-numbering-get-window-by-number i)))
|
|
|
|
(if arg
|
|
|
|
(delete-window w)
|
|
|
|
(window-numbering--switch-to-window w))))
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun window-numbering-get-window-by-number (i)
|
|
|
|
"Return window numbered I if exists."
|
|
|
|
(let ((windows (if (eq window-numbering-scope 'frame-local)
|
|
|
|
(car (gethash (selected-frame)
|
|
|
|
window-numbering--frames-table))
|
|
|
|
window-numbering--window-vector))
|
|
|
|
window)
|
|
|
|
(if (and (>= i 0) (< i 10)
|
|
|
|
(setq window (aref windows i)))
|
|
|
|
window
|
|
|
|
(error "No window numbered %s" i))))
|
|
|
|
|
|
|
|
;; TODO function to select window of unlimited input number:
|
|
|
|
;; - prefix argument
|
|
|
|
;; - read-from-minibuffer
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun window-numbering-install-mode-line (&optional position)
|
|
|
|
"Install the window number from `window-numbering-mode' to the mode-line.
|
|
|
|
POSITION: position in the mode-line."
|
|
|
|
(let ((mode-line (default-value 'mode-line-format))
|
|
|
|
(res))
|
|
|
|
(dotimes (i (min (or position window-numbering-mode-line-position 1)
|
|
|
|
(length mode-line)))
|
|
|
|
(push (car mode-line) res)
|
|
|
|
(pop mode-line))
|
|
|
|
(push '(:eval (window-numbering-get-number-string)) res)
|
|
|
|
(while mode-line
|
|
|
|
(push (car mode-line) res)
|
|
|
|
(pop mode-line))
|
|
|
|
(setq-default mode-line-format (nreverse res)))
|
|
|
|
(force-mode-line-update t))
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun window-numbering-clear-mode-line ()
|
|
|
|
"Remove the window number of `window-numbering-mode' from the mode-line."
|
|
|
|
(let ((mode-line (default-value 'mode-line-format))
|
|
|
|
(res))
|
|
|
|
(while mode-line
|
|
|
|
(let ((item (car mode-line)))
|
|
|
|
(unless (equal item '(:eval (window-numbering-get-number-string)))
|
|
|
|
(push item res)))
|
|
|
|
(pop mode-line))
|
|
|
|
(setq-default mode-line-format (nreverse res)))
|
|
|
|
(force-mode-line-update t))
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun window-numbering-get-number-string (&optional window)
|
|
|
|
"Get the current or specified window's current number as a propertized string.
|
|
|
|
WINDOW: if specified, the window of which we want to know the number.
|
|
|
|
If not specified, the number of the currently selected window is
|
|
|
|
returned."
|
|
|
|
(let ((s (int-to-string (window-numbering-get-number window))))
|
|
|
|
(propertize s 'face 'window-numbering-face)))
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun window-numbering-get-number (&optional window)
|
|
|
|
"Get the current or specified window's current number.
|
|
|
|
WINDOW: if specified, the window of which we want to know the number.
|
|
|
|
If not specified, the number of the currently selected window is
|
|
|
|
returned."
|
|
|
|
(let ((w (or window (selected-window))))
|
|
|
|
(if (eq window-numbering-scope 'frame-local)
|
|
|
|
(gethash w (cdr (gethash (selected-frame)
|
|
|
|
window-numbering--frames-table)))
|
|
|
|
(gethash w window-numbering--numbers-table))))
|
|
|
|
|
|
|
|
;; Internal variables
|
|
|
|
|
|
|
|
(defvar window-numbering--window-number-max 10 ;; TODO replace hard-coded values
|
|
|
|
;; by this var
|
|
|
|
"Max number of windows that can be numbered.")
|
|
|
|
|
|
|
|
(defvar window-numbering--max-frames-count 16
|
|
|
|
"Maximum number of frames that can be numbered.")
|
|
|
|
|
|
|
|
(defvar window-numbering--window-vector nil
|
2016-12-08 13:51:47 -05:00
|
|
|
"Vector of windows indexed by their number.
|
|
|
|
Used internally by window-numbering to get a window provided a number.")
|
|
|
|
|
2016-11-28 16:01:35 -05:00
|
|
|
(defvar window-numbering--numbers-table nil
|
2016-12-08 13:51:47 -05:00
|
|
|
"Hash table of numbers indexed by their window.
|
|
|
|
Used internally by window-numbering to get a number provided a window.")
|
|
|
|
|
2016-12-08 13:11:02 -05:00
|
|
|
(defvar window-numbering--frames-table nil
|
2016-11-28 16:01:35 -05:00
|
|
|
"Table linking windows to numbers and numbers to windows for each frame.
|
2016-12-08 13:36:57 -05:00
|
|
|
|
2016-11-28 16:01:35 -05:00
|
|
|
Used only when `window-numbering-scope' is 'frame-local to keep track of
|
|
|
|
separate window numbers sets in every frame.
|
2016-12-08 13:36:57 -05:00
|
|
|
|
2016-11-28 16:01:35 -05:00
|
|
|
It is a hash table using Emacs frames as keys and cons of the form
|
|
|
|
\(`window-numbering--window-vector' . `window-numbering--numbers-table')
|
|
|
|
as values.
|
2016-12-08 13:36:57 -05:00
|
|
|
|
|
|
|
To get a window given a number, use the `car' of a value.
|
|
|
|
To get a number given a window, use the `cdr' of a value.
|
|
|
|
|
|
|
|
Such a structure allows for per-frame bidirectional fast access.")
|
2013-09-02 12:13:43 -04:00
|
|
|
|
2016-11-28 16:01:35 -05:00
|
|
|
(defvar window-numbering--remaining nil
|
|
|
|
"A list of available window numbers.")
|
2008-04-11 15:24:04 -04:00
|
|
|
|
2016-11-28 16:01:35 -05:00
|
|
|
(defun window-numbering--init ()
|
|
|
|
"Initialize window-numbering-mode."
|
|
|
|
(unless window-numbering--frames-table
|
|
|
|
(save-excursion ;; TODO is this really needed ?
|
|
|
|
(if (eq window-numbering-scope 'frame-local)
|
|
|
|
(setq window-numbering--frames-table (make-hash-table :size 16))
|
|
|
|
(setq window-numbering--numbers-table (make-hash-table :size 10)))
|
|
|
|
(window-numbering-install-mode-line)
|
|
|
|
(add-hook 'minibuffer-setup-hook 'window-numbering--update)
|
|
|
|
(add-hook 'window-configuration-change-hook
|
|
|
|
'window-numbering--update)
|
|
|
|
(dolist (frame (frame-list))
|
|
|
|
(select-frame frame)
|
|
|
|
(window-numbering--update)))))
|
|
|
|
|
|
|
|
(defun window-numbering--deinit ()
|
|
|
|
"Actions performed when turning off window-numbering-mode."
|
|
|
|
(window-numbering-clear-mode-line)
|
|
|
|
(remove-hook 'minibuffer-setup-hook 'window-numbering--update)
|
|
|
|
(remove-hook 'window-configuration-change-hook
|
|
|
|
'window-numbering--update)
|
|
|
|
(setq window-numbering--frames-table nil))
|
|
|
|
|
|
|
|
(defun window-numbering--list-windows-in-frame (&optional f)
|
2016-12-08 13:51:47 -05:00
|
|
|
"List windows in frame F using natural Emacs ordering."
|
|
|
|
(window-list f 0 (frame-first-window f)))
|
2016-12-08 13:11:02 -05:00
|
|
|
|
2016-11-28 16:01:35 -05:00
|
|
|
(defun window-numbering--get-window-vector ()
|
|
|
|
"Return the window vector used to get a window given a number.
|
|
|
|
This vector is not stored the same way depending on the value of
|
|
|
|
`window-numbering-scope'."
|
|
|
|
(if (eq window-numbering-scope 'frame-local)
|
|
|
|
(car (gethash (selected-frame)
|
|
|
|
window-numbering--frames-table))
|
|
|
|
window-numbering--window-vector))
|
|
|
|
|
|
|
|
(defun window-numbering--get-numbers-table ()
|
|
|
|
"Return the numbers hashtable used to get a number given a window.
|
|
|
|
This hashtable is not stored the same way depending on the value of
|
|
|
|
`window-numbering-scope'"
|
|
|
|
(if (eq window-numbering-scope 'frame-local)
|
|
|
|
(cdr (gethash (selected-frame)
|
|
|
|
window-numbering--frames-table))
|
|
|
|
window-numbering--numbers-table))
|
|
|
|
|
|
|
|
(defun window-numbering--window-list ()
|
2016-12-08 13:51:47 -05:00
|
|
|
"Return a list of interesting windows."
|
|
|
|
(cl-remove-if
|
|
|
|
(lambda (w)
|
|
|
|
(let ((f (window-frame w)))
|
|
|
|
(or (not (and (frame-live-p f)
|
|
|
|
(frame-visible-p f)))
|
|
|
|
(string= "initial_terminal" (terminal-name f))
|
|
|
|
;; (window-numbering-ignored-p w) ;; TODO implement
|
|
|
|
)))
|
2016-11-28 16:01:35 -05:00
|
|
|
(cl-case window-numbering-scope
|
2016-12-08 13:51:47 -05:00
|
|
|
(global
|
2016-11-28 16:01:35 -05:00
|
|
|
(cl-mapcan 'window-numbering--list-windows-in-frame
|
2016-12-08 13:51:47 -05:00
|
|
|
(if window-numbering-reverse-frame-list
|
|
|
|
(frame-list)
|
|
|
|
(nreverse (frame-list)))))
|
|
|
|
(visible
|
2016-11-28 16:01:35 -05:00
|
|
|
(cl-mapcan 'window-numbering--list-windows-in-frame
|
2016-12-08 13:51:47 -05:00
|
|
|
(if window-numbering-reverse-frame-list
|
|
|
|
(visible-frame-list)
|
|
|
|
(nreverse (visible-frame-list)))))
|
|
|
|
(frame-local
|
2016-11-28 16:01:35 -05:00
|
|
|
(window-numbering--list-windows-in-frame))
|
2016-12-08 13:51:47 -05:00
|
|
|
(t
|
2016-11-28 16:01:35 -05:00
|
|
|
(error "Invalid `window-numbering-scope': %S" window-numbering-scope)))))
|
2008-04-11 15:24:04 -04:00
|
|
|
|
2016-11-28 16:01:35 -05:00
|
|
|
(defun window-numbering--assign (window &optional number)
|
2016-12-08 13:36:57 -05:00
|
|
|
"Assign to window WINDOW the number NUMBER.
|
|
|
|
If NUMBER is not specified, determine it first based on
|
2016-11-28 16:01:35 -05:00
|
|
|
`window-numbering--remaining'.
|
2016-12-08 13:36:57 -05:00
|
|
|
Returns the assigned number, or nil on error."
|
2008-04-11 15:24:04 -04:00
|
|
|
(if number
|
2016-11-28 16:01:35 -05:00
|
|
|
(if (aref (window-numbering--get-window-vector) number)
|
2008-04-11 15:24:04 -04:00
|
|
|
(progn (message "Number %s assigned to two buffers (%s and %s)"
|
2016-11-28 16:01:35 -05:00
|
|
|
number window (aref window-numbering--window-vector number))
|
2008-04-11 15:24:04 -04:00
|
|
|
nil)
|
2016-11-28 16:01:35 -05:00
|
|
|
(setf (aref (window-numbering--get-window-vector) number) window)
|
|
|
|
(puthash window number (window-numbering--get-numbers-table))
|
|
|
|
(setq window-numbering--remaining (delq number window-numbering--remaining))
|
2016-12-08 09:51:24 -05:00
|
|
|
number)
|
|
|
|
;; else determine number and assign
|
2016-11-28 16:01:35 -05:00
|
|
|
(when window-numbering--remaining
|
|
|
|
(unless (gethash window (window-numbering--get-numbers-table))
|
|
|
|
(let ((number (car window-numbering--remaining)))
|
|
|
|
(window-numbering--assign window number))))))
|
|
|
|
|
|
|
|
(defun window-numbering--get-available-numbers (&optional windows)
|
|
|
|
"Return a list of numbers currently available for assignment.
|
|
|
|
WINDOWS: a vector of currently assigned windows."
|
|
|
|
;; TODO simplify, the WINDOWS argument is not needed in the current
|
|
|
|
;; implementation.
|
|
|
|
(let ((i 9)
|
|
|
|
left)
|
|
|
|
(while (>= i 0)
|
|
|
|
(let ((window (when windows (aref windows i))))
|
|
|
|
(unless window
|
|
|
|
(push (% (1+ i) 10) left)))
|
|
|
|
(decf i))
|
|
|
|
left))
|
2008-04-11 15:24:04 -04:00
|
|
|
|
2016-11-28 16:01:35 -05:00
|
|
|
;; TODO bug: mode-line is sometimes not updated in all visible frames
|
|
|
|
(defun window-numbering--update ()
|
2016-12-08 09:51:24 -05:00
|
|
|
"Update window numbers."
|
2016-11-28 16:01:35 -05:00
|
|
|
(setq window-numbering--remaining (window-numbering--get-available-numbers))
|
|
|
|
(if (eq window-numbering-scope 'frame-local)
|
|
|
|
(puthash (selected-frame)
|
|
|
|
(cons (make-vector 10 nil) (make-hash-table :size 10))
|
|
|
|
window-numbering--frames-table)
|
|
|
|
(setq window-numbering--window-vector (make-vector 10 nil))
|
|
|
|
(clrhash window-numbering--numbers-table))
|
2008-04-11 16:06:14 -04:00
|
|
|
(when (and window-numbering-auto-assign-0-to-minibuffer
|
|
|
|
(active-minibuffer-window))
|
2016-11-28 16:01:35 -05:00
|
|
|
(window-numbering--assign (active-minibuffer-window) 0))
|
|
|
|
(let ((windows (window-numbering--window-list)))
|
2008-04-11 16:06:14 -04:00
|
|
|
(run-hook-with-args 'window-numbering-before-hook windows)
|
|
|
|
(when window-numbering-assign-func
|
2016-11-28 16:01:35 -05:00
|
|
|
(mapc (lambda (w)
|
|
|
|
(with-selected-window w
|
|
|
|
(with-current-buffer (window-buffer w)
|
2016-08-09 14:09:53 -04:00
|
|
|
(let ((num (funcall window-numbering-assign-func)))
|
|
|
|
(when num
|
2016-11-28 16:01:35 -05:00
|
|
|
(window-numbering--assign w num))))))
|
2008-04-11 16:06:14 -04:00
|
|
|
windows))
|
2016-11-28 16:01:35 -05:00
|
|
|
(dolist (w windows)
|
|
|
|
(window-numbering--assign w))))
|
2008-04-11 15:22:15 -04:00
|
|
|
|
2016-11-28 16:01:35 -05:00
|
|
|
(defun window-numbering--switch-to-window (window)
|
2016-12-08 09:51:24 -05:00
|
|
|
"Switch to the window WINDOW and switch input focus if on a different frame."
|
|
|
|
(let ((frame (window-frame window)))
|
|
|
|
(when (and (frame-live-p frame)
|
|
|
|
(not (eq frame (selected-frame))))
|
|
|
|
(select-frame-set-input-focus frame))
|
|
|
|
(if (window-live-p window)
|
|
|
|
(select-window window)
|
|
|
|
(error "Got a dead window %S" window))))
|
|
|
|
|
2016-12-08 13:51:47 -05:00
|
|
|
(push "^No window numbered .$" debug-ignored-errors)
|
2016-12-08 13:42:43 -05:00
|
|
|
|
2008-04-11 15:22:15 -04:00
|
|
|
(provide 'window-numbering)
|
2008-04-11 16:06:14 -04:00
|
|
|
|
|
|
|
;;; window-numbering.el ends here
|