1 new commit in XEmacs:
https://bitbucket.org/xemacs/xemacs/commits/d58b1c68ec10/
Changeset: d58b1c68ec10
User: stephen_at_xemacs
Date: 2017-11-14 05:14:25+00:00
Summary: Sort buffers-tab list before truncating it.
Affected #: 2 files
diff -r 9947c027739a4cb6c5b3d39b4a25e20dff653557 -r
d58b1c68ec10a5f5c29361ec82f9376a4073662d lisp/ChangeLog
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2017-11-14 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * gutter-items.el (buffers-tab-items):
+ Sort list before truncating it. Clarify logic, remove comment.
+
2017-11-13 Aidan Kehoe <kehoea(a)parhasard.net>
* unicode.el (decode-char):
diff -r 9947c027739a4cb6c5b3d39b4a25e20dff653557 -r
d58b1c68ec10a5f5c29361ec82f9376a4073662d lisp/gutter-items.el
--- a/lisp/gutter-items.el
+++ b/lisp/gutter-items.el
@@ -268,8 +268,7 @@
;; context buffer before they get run.
(let* ((buffers (delete-if
buffers-tab-omit-function (buffer-list frame)))
- (first-buf (car buffers))
- tail)
+ (first-buf (car buffers)))
;; maybe force the selected window
(when (and force-selection
(not in-deletion)
@@ -290,16 +289,16 @@
buffers-tab-filter-functions)
(list buffer)))
buffers)))
- ;; maybe shorten list of buffers
- (let ((n (1-
- ;; Error on non-number, non-nil buffers-tab-max-size
- (or buffers-tab-max-size most-positive-fixnum))))
- (and (> n 0)
- (setf tail (nthcdr n buffers)) ;; Length greater than (1+ n)?
- (setf (cdr tail) nil)))
;; sort buffers in group (default is most-recently-selected)
(when buffers-tab-sort-function
(setq buffers (funcall buffers-tab-sort-function buffers)))
+ ;; maybe shorten list of buffers
+ (when (fixnump buffers-tab-max-size)
+ (let ((n (1- buffers-tab-max-size))
+ tail)
+ (and (> n 0)
+ (setf tail (nthcdr n buffers)) ;; Length greater than (1+ n)?
+ (setf (cdr tail) nil)))
(labels
((build-buffers-tab-internal (buffers)
"Convert BUFFERS to a list of structures used by the tab widget."
Repository URL:
https://bitbucket.org/xemacs/xemacs/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.