* lisp/buff-menu.el: Convert to Tabulated List mode.
(Buffer-menu-buffer+size-width): Make obsolete. (Buffer-menu-name-width, Buffer-menu-size-width): New variables. (Buffer-menu-mode-map): Inherit from tabulated-list-mode-map. (Buffer-menu-mode): Derive from tabulated-list-mode. Move command documentation into docstring of buffer-menu. (Buffer-menu-toggle-files-only): Add an informative message. (Buffer-menu-sort): Convert to alias for tabulated-list-sort. (Buffer-menu-buffer, Buffer-menu-beginning, Buffer-menu-mark) (Buffer-menu-unmark, Buffer-menu-backup-unmark) (Buffer-menu-delete, Buffer-menu-save, Buffer-menu-not-modified) (Buffer-menu-execute, Buffer-menu-select) (Buffer-menu-marked-buffers, Buffer-menu-toggle-read-only) (Buffer-menu-bury): Use Tabulated List machinery. (Buffer-menu-mouse-select, Buffer-menu-sort-by-column) (Buffer-menu-sort-button-map, Buffer-menu-make-sort-button): Deleted. (list-buffers--refresh): New function. (list-buffers-noselect): Use it. (tabulated-list-entry-size->, Buffer-menu--pretty-name) (Buffer-menu--pretty-file-name): New helper functions. * lisp/loadup.el: Preload tabulated-list. * lisp/emacs-lisp/tabulated-list.el (tabulated-list-sort): Rename from tabulated-list-sort-column. (tabulated-list-init-header): Add the initial aligning space even if tabulated-list-padding is zero. * src/lisp.mk (lisp): Update.
This commit is contained in:
parent
e129292c44
commit
e5f9458fe8
8 changed files with 370 additions and 642 deletions
2
etc/NEWS
2
etc/NEWS
|
@ -163,7 +163,7 @@ server properties.
|
|||
|
||||
** Tabulated List and packages derived from it
|
||||
|
||||
*** New command `tabulated-list-sort-column' bound to `S' sorts column
|
||||
*** New command `tabulated-list-sort', bound to `S', sorts the column
|
||||
at point, or the Nth column if a numeric prefix argument is given.
|
||||
|
||||
** Obsolete packages:
|
||||
|
|
|
@ -1,3 +1,34 @@
|
|||
2012-05-06 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* buff-menu.el: Convert to Tabulated List mode.
|
||||
(Buffer-menu-buffer+size-width): Make obsolete.
|
||||
(Buffer-menu-name-width, Buffer-menu-size-width): New variables.
|
||||
(Buffer-menu-mode-map): Inherit from tabulated-list-mode-map.
|
||||
(Buffer-menu-mode): Derive from tabulated-list-mode. Move command
|
||||
documentation into docstring of buffer-menu.
|
||||
(Buffer-menu-toggle-files-only): Add an informative message.
|
||||
(Buffer-menu-sort): Convert to alias for tabulated-list-sort.
|
||||
(Buffer-menu-buffer, Buffer-menu-beginning, Buffer-menu-mark)
|
||||
(Buffer-menu-unmark, Buffer-menu-backup-unmark)
|
||||
(Buffer-menu-delete, Buffer-menu-save, Buffer-menu-not-modified)
|
||||
(Buffer-menu-execute, Buffer-menu-select)
|
||||
(Buffer-menu-marked-buffers, Buffer-menu-toggle-read-only)
|
||||
(Buffer-menu-bury): Use Tabulated List machinery.
|
||||
(Buffer-menu-mouse-select, Buffer-menu-sort-by-column)
|
||||
(Buffer-menu-sort-button-map, Buffer-menu-make-sort-button):
|
||||
Deleted.
|
||||
(list-buffers--refresh): New function.
|
||||
(list-buffers-noselect): Use it.
|
||||
(tabulated-list-entry-size->, Buffer-menu--pretty-name)
|
||||
(Buffer-menu--pretty-file-name): New helper functions.
|
||||
|
||||
* loadup.el: Preload tabulated-list.
|
||||
|
||||
* emacs-lisp/tabulated-list.el (tabulated-list-sort): Rename from
|
||||
tabulated-list-sort-column.
|
||||
(tabulated-list-init-header): Add the initial aligning space even
|
||||
if tabulated-list-padding is zero.
|
||||
|
||||
2012-05-06 Christopher Schmidt <christopher@ch.ristopher.com>
|
||||
|
||||
* emacs-lisp/cl-macs.el (cl-expr-contains): Handle cons cells
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -286,7 +286,7 @@ This also does some trivial optimizations to make the form prettier.
|
|||
;;;;;; flet progv psetq do-all-symbols do-symbols dotimes dolist
|
||||
;;;;;; do* do loop return-from return block etypecase typecase ecase
|
||||
;;;;;; case load-time-value eval-when destructuring-bind function*
|
||||
;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "abb2e33c6f61539d69ddbe7c4046261b")
|
||||
;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "e10ebd95224fcfbe6a5edc59f40d695a")
|
||||
;;; Generated autoloads from cl-macs.el
|
||||
|
||||
(autoload 'gensym "cl-macs" "\
|
||||
|
|
|
@ -144,7 +144,7 @@ If ADVANCE is non-nil, move forward by one line afterwards."
|
|||
(set-keymap-parent map button-buffer-map)
|
||||
(define-key map "n" 'next-line)
|
||||
(define-key map "p" 'previous-line)
|
||||
(define-key map "S" 'tabulated-list-sort-column)
|
||||
(define-key map "S" 'tabulated-list-sort)
|
||||
(define-key map [follow-link] 'mouse-face)
|
||||
(define-key map [mouse-2] 'mouse-select-window)
|
||||
map)
|
||||
|
@ -174,8 +174,7 @@ If ADVANCE is non-nil, move forward by one line afterwards."
|
|||
mouse-face highlight
|
||||
keymap ,tabulated-list-sort-button-map))
|
||||
(cols nil))
|
||||
(if (> tabulated-list-padding 0)
|
||||
(push (propertize " " 'display `(space :align-to ,x)) cols))
|
||||
(push (propertize " " 'display `(space :align-to ,x)) cols)
|
||||
(dotimes (n (length tabulated-list-format))
|
||||
(let* ((col (aref tabulated-list-format n))
|
||||
(label (nth 0 col))
|
||||
|
@ -183,9 +182,6 @@ If ADVANCE is non-nil, move forward by one line afterwards."
|
|||
(props (nthcdr 3 col))
|
||||
(pad-right (or (plist-get props :pad-right) 1)))
|
||||
(setq x (+ x pad-right width))
|
||||
(and (<= tabulated-list-padding 0)
|
||||
(= n 0)
|
||||
(setq label (concat " " label)))
|
||||
(push
|
||||
(cond
|
||||
;; An unsortable column
|
||||
|
@ -402,7 +398,7 @@ this is the vector stored within it."
|
|||
(with-current-buffer (window-buffer (posn-window pos))
|
||||
(tabulated-list--sort-by-column-name name))))
|
||||
|
||||
(defun tabulated-list-sort-column (&optional n)
|
||||
(defun tabulated-list-sort (&optional n)
|
||||
"Sort Tabulated List entries by the column at point.
|
||||
With a numeric prefix argument N, sort the Nth column."
|
||||
(interactive "P")
|
||||
|
@ -424,7 +420,6 @@ With a numeric prefix argument N, sort the Nth column."
|
|||
|
||||
;;; The mode definition:
|
||||
|
||||
;;;###autoload
|
||||
(define-derived-mode tabulated-list-mode special-mode "Tabulated"
|
||||
"Generic major mode for browsing a list of items.
|
||||
This mode is usually not used directly; instead, other major
|
||||
|
|
|
@ -188,6 +188,7 @@
|
|||
(load "textmodes/fill")
|
||||
|
||||
(load "replace")
|
||||
(load "emacs-lisp/tabulated-list")
|
||||
(load "buff-menu")
|
||||
|
||||
(if (fboundp 'x-create-frame)
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2012-05-06 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* lisp.mk (lisp): Update.
|
||||
|
||||
2012-05-05 Jim Meyering <meyering@redhat.com>
|
||||
|
||||
* w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
|
||||
|
|
|
@ -129,6 +129,7 @@ lisp = \
|
|||
$(lispsource)/textmodes/text-mode.elc \
|
||||
$(lispsource)/textmodes/fill.elc \
|
||||
$(lispsource)/replace.elc \
|
||||
$(lispsource)/emacs-lisp/tabulated-list.elc \
|
||||
$(lispsource)/buff-menu.elc \
|
||||
$(lispsource)/fringe.elc \
|
||||
$(lispsource)/emacs-lisp/regexp-opt.elc \
|
||||
|
|
Loading…
Add table
Reference in a new issue