[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [STUMP] [PATCH] Renumbering windows to remove gaps.
From: |
Shawn |
Subject: |
Re: [STUMP] [PATCH] Renumbering windows to remove gaps. |
Date: |
Thu, 28 Aug 2008 12:27:51 -0700 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
38a938c2 <address@hidden> writes:
> +(defun make-window-numbers-contiguous (preserved)
> + "Ensure that used window numbers do not have gaps; possibly ignore
> preserved window numbers"
> + (let* ((group (current-group))
> + (windows (sort-windows group)))
> + (loop for w in windows
> + do (unless (find (window-number w) preserved)
> + (setf
> + (window-number w)
> + (find-free-number
> + (remove
> + (window-number w)
> + (mapcar 'window-number windows))
> + 0))))))
> +(defcommand make-all-window-numbers-contiguous () ()
> + "Make all window numbers contiguous with no exceptions"
> + (make-window-numbers-contiguous '()))
> +
This looks like a fine patch, except since commands are also
functions, can you merge the two together? So that the command can be
called with 0 arguments, you'd have to make preserved an optional
argument which probably makes sense when calling it as a function, as
well.
-Shawn