2012-01-25 22:30:49 -08:00
|
|
|
;;; tabulated-list.el --- generic major mode for tabulated lists -*- lexical-binding: t -*-
|
2011-04-06 16:10:51 -04:00
|
|
|
|
2021-01-01 01:13:56 -08:00
|
|
|
;; Copyright (C) 2011-2021 Free Software Foundation, Inc.
|
2011-04-06 16:10:51 -04:00
|
|
|
|
|
|
|
;; Author: Chong Yidong <cyd@stupidchicken.com>
|
|
|
|
;; Keywords: extensions, lisp
|
2013-05-14 00:35:21 -07:00
|
|
|
;; Version: 1.0
|
2011-04-06 16:10:51 -04:00
|
|
|
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
2012-09-24 09:36:42 -07:00
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
2011-04-06 16:10:51 -04:00
|
|
|
;; it under the terms of the GNU General Public License as published by
|
2012-09-24 09:36:42 -07:00
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
2011-04-06 16:10:51 -04:00
|
|
|
|
|
|
|
;; GNU Emacs 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.
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
2017-09-13 15:52:52 -07:00
|
|
|
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
2011-04-06 16:10:51 -04:00
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
2012-05-06 16:32:37 +08:00
|
|
|
;; This file defines Tabulated List mode, a generic major mode for
|
|
|
|
;; displaying lists of tabulated data, intended for other major modes
|
|
|
|
;; to inherit from. It provides several utility routines, e.g. for
|
|
|
|
;; pretty-printing lines of tabulated data to fit into the appropriate
|
|
|
|
;; columns.
|
2011-04-06 16:10:51 -04:00
|
|
|
|
|
|
|
;; For usage information, see the documentation of `tabulated-list-mode'.
|
|
|
|
|
2012-05-06 16:32:37 +08:00
|
|
|
;; This package originated from Tom Tromey's Package Menu mode,
|
|
|
|
;; extended and generalized to be used by other modes.
|
2011-04-06 16:10:51 -04:00
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
2019-03-02 20:03:41 +01:00
|
|
|
(defgroup tabulated-list nil
|
|
|
|
"Tabulated-list customization group."
|
|
|
|
:group 'convenience
|
|
|
|
:group 'display)
|
|
|
|
|
|
|
|
(defcustom tabulated-list-gui-sort-indicator-asc ?▼
|
|
|
|
"Indicator for columns sorted in ascending order, for GUI frames.
|
|
|
|
See `tabulated-list-tty-sort-indicator-asc' for the indicator used on
|
|
|
|
text-mode frames."
|
|
|
|
:group 'tabulated-list
|
|
|
|
:type 'character
|
|
|
|
:version "27.1")
|
|
|
|
|
|
|
|
(defcustom tabulated-list-gui-sort-indicator-desc ?▲
|
|
|
|
"Indicator for columns sorted in descending order, for GUI frames.
|
|
|
|
See `tabulated-list-tty-sort-indicator-desc' for the indicator used on
|
|
|
|
text-mode frames."
|
|
|
|
:group 'tabulated-list
|
|
|
|
:type 'character
|
|
|
|
:version "27.1")
|
|
|
|
|
|
|
|
(defcustom tabulated-list-tty-sort-indicator-asc ?v
|
|
|
|
"Indicator for columns sorted in ascending order, for text-mode frames.
|
|
|
|
See `tabulated-list-gui-sort-indicator-asc' for the indicator used on GUI
|
|
|
|
frames."
|
|
|
|
:group 'tabulated-list
|
|
|
|
:type 'character
|
|
|
|
:version "27.1")
|
|
|
|
|
|
|
|
(defcustom tabulated-list-tty-sort-indicator-desc ?^
|
|
|
|
"Indicator for columns sorted in ascending order, for text-mode frames.
|
|
|
|
See `tabulated-list-gui-sort-indicator-asc' for the indicator used on GUI
|
|
|
|
frames."
|
|
|
|
:group 'tabulated-list
|
|
|
|
:type 'character
|
|
|
|
:version "27.1")
|
|
|
|
|
2019-06-25 18:09:54 +02:00
|
|
|
(defface tabulated-list-fake-header
|
|
|
|
'((t :overline t :underline t :weight bold))
|
|
|
|
"Face used on fake header lines."
|
|
|
|
:version "27.1")
|
|
|
|
|
2012-05-13 22:23:45 +08:00
|
|
|
;; The reason `tabulated-list-format' and other variables are
|
|
|
|
;; permanent-local is to make it convenient to switch to a different
|
|
|
|
;; major mode, switch back, and have the original Tabulated List data
|
|
|
|
;; still valid. See, for example, ebuff-menu.el.
|
|
|
|
|
2013-06-20 13:57:33 +02:00
|
|
|
(defvar-local tabulated-list-format nil
|
2011-04-06 16:10:51 -04:00
|
|
|
"The format of the current Tabulated List mode buffer.
|
2012-05-06 16:32:37 +08:00
|
|
|
This should be a vector of elements (NAME WIDTH SORT . PROPS),
|
|
|
|
where:
|
2011-04-06 16:10:51 -04:00
|
|
|
- NAME is a string describing the column.
|
2012-05-06 16:32:37 +08:00
|
|
|
This is the label for the column in the header line.
|
|
|
|
Different columns must have non-`equal' names.
|
2011-04-06 16:10:51 -04:00
|
|
|
- WIDTH is the width to reserve for the column.
|
|
|
|
For the final element, its numerical value is ignored.
|
|
|
|
- SORT specifies how to sort entries by this column.
|
|
|
|
If nil, this column cannot be used for sorting.
|
|
|
|
If t, sort by comparing the string value printed in the column.
|
|
|
|
Otherwise, it should be a predicate function suitable for
|
|
|
|
`sort', accepting arguments with the same form as the elements
|
2012-05-06 16:32:37 +08:00
|
|
|
of `tabulated-list-entries'.
|
|
|
|
- PROPS is a plist of additional column properties.
|
|
|
|
Currently supported properties are:
|
2013-06-20 13:57:33 +02:00
|
|
|
- `:right-align': If non-nil, the column should be right-aligned.
|
2012-05-06 16:32:37 +08:00
|
|
|
- `:pad-right': Number of additional padding spaces to the
|
|
|
|
right of the column (defaults to 1 if omitted).")
|
2012-05-13 22:23:45 +08:00
|
|
|
(put 'tabulated-list-format 'permanent-local t)
|
2011-04-06 16:10:51 -04:00
|
|
|
|
2013-06-20 13:57:33 +02:00
|
|
|
(defvar-local tabulated-list-use-header-line t
|
2012-05-07 13:37:38 +08:00
|
|
|
"Whether the Tabulated List buffer should use a header line.")
|
|
|
|
|
2013-06-20 13:57:33 +02:00
|
|
|
(defvar-local tabulated-list-entries nil
|
2011-04-06 16:10:51 -04:00
|
|
|
"Entries displayed in the current Tabulated List buffer.
|
|
|
|
This should be either a function, or a list.
|
|
|
|
If a list, each element has the form (ID [DESC1 ... DESCN]),
|
|
|
|
where:
|
|
|
|
- ID is nil, or a Lisp object uniquely identifying this entry,
|
|
|
|
which is used to keep the cursor on the \"same\" entry when
|
|
|
|
rearranging the list. Comparison is done with `equal'.
|
|
|
|
|
|
|
|
- Each DESC is a column descriptor, one for each column
|
|
|
|
specified in `tabulated-list-format'. A descriptor is either
|
|
|
|
a string, which is printed as-is, or a list (LABEL . PROPS),
|
|
|
|
which means to use `insert-text-button' to insert a text
|
|
|
|
button with label LABEL and button properties PROPS.
|
|
|
|
The string, or button label, must not contain any newline.
|
|
|
|
|
|
|
|
If `tabulated-list-entries' is a function, it is called with no
|
|
|
|
arguments and must return a list of the above form.")
|
2012-05-13 22:23:45 +08:00
|
|
|
(put 'tabulated-list-entries 'permanent-local t)
|
2011-04-06 16:10:51 -04:00
|
|
|
|
2013-06-20 13:57:33 +02:00
|
|
|
(defvar-local tabulated-list-padding 0
|
2011-04-06 16:10:51 -04:00
|
|
|
"Number of characters preceding each Tabulated List mode entry.
|
|
|
|
By default, lines are padded with spaces, but you can use the
|
|
|
|
function `tabulated-list-put-tag' to change this.")
|
2012-05-13 22:23:45 +08:00
|
|
|
(put 'tabulated-list-padding 'permanent-local t)
|
2011-04-06 16:10:51 -04:00
|
|
|
|
|
|
|
(defvar tabulated-list-revert-hook nil
|
|
|
|
"Hook run before reverting a Tabulated List buffer.
|
|
|
|
This is commonly used to recompute `tabulated-list-entries'.")
|
|
|
|
|
2013-06-20 13:57:33 +02:00
|
|
|
(defvar-local tabulated-list-printer 'tabulated-list-print-entry
|
2011-04-06 16:10:51 -04:00
|
|
|
"Function for inserting a Tabulated List entry at point.
|
2017-10-05 17:57:58 +03:00
|
|
|
It is called with two arguments, ID and COLS. ID is a Lisp
|
|
|
|
object identifying the entry, and COLS is a vector of column
|
|
|
|
descriptors, as documented in `tabulated-list-entries'.")
|
2011-04-06 16:10:51 -04:00
|
|
|
|
2016-11-14 17:31:44 +09:00
|
|
|
(defvar tabulated-list--near-rows)
|
|
|
|
|
2013-06-20 13:57:33 +02:00
|
|
|
(defvar-local tabulated-list-sort-key nil
|
2011-04-06 16:10:51 -04:00
|
|
|
"Sort key for the current Tabulated List mode buffer.
|
|
|
|
If nil, no additional sorting is performed.
|
|
|
|
Otherwise, this should be a cons cell (NAME . FLIP).
|
|
|
|
NAME is a string matching one of the column names in
|
|
|
|
`tabulated-list-format' (the corresponding SORT entry in
|
|
|
|
`tabulated-list-format' then specifies how to sort). FLIP, if
|
|
|
|
non-nil, means to invert the resulting sort.")
|
2012-05-13 22:23:45 +08:00
|
|
|
(put 'tabulated-list-sort-key 'permanent-local t)
|
2011-04-06 16:10:51 -04:00
|
|
|
|
2012-05-06 16:32:37 +08:00
|
|
|
(defsubst tabulated-list-get-id (&optional pos)
|
|
|
|
"Return the entry ID of the Tabulated List entry at POS.
|
|
|
|
The value is an ID object from `tabulated-list-entries', or nil.
|
2011-04-06 16:10:51 -04:00
|
|
|
POS, if omitted or nil, defaults to point."
|
|
|
|
(get-text-property (or pos (point)) 'tabulated-list-id))
|
|
|
|
|
2012-05-06 16:32:37 +08:00
|
|
|
(defsubst tabulated-list-get-entry (&optional pos)
|
|
|
|
"Return the Tabulated List entry at POS.
|
|
|
|
The value is a vector of column descriptors, or nil if there is
|
|
|
|
no entry at POS. POS, if omitted or nil, defaults to point."
|
|
|
|
(get-text-property (or pos (point)) 'tabulated-list-entry))
|
|
|
|
|
2011-04-06 16:10:51 -04:00
|
|
|
(defun tabulated-list-put-tag (tag &optional advance)
|
|
|
|
"Put TAG in the padding area of the current line.
|
|
|
|
TAG should be a string, with length <= `tabulated-list-padding'.
|
|
|
|
If ADVANCE is non-nil, move forward by one line afterwards."
|
|
|
|
(unless (stringp tag)
|
Go back to grave quoting in source-code docstrings etc.
This reverts almost all my recent changes to use curved quotes
in docstrings and/or strings used for error diagnostics.
There are a few exceptions, e.g., Bahá’í proper names.
* admin/unidata/unidata-gen.el (unidata-gen-table):
* lisp/abbrev.el (expand-region-abbrevs):
* lisp/align.el (align-region):
* lisp/allout.el (allout-mode, allout-solicit-alternate-bullet)
(outlineify-sticky):
* lisp/apropos.el (apropos-library):
* lisp/bookmark.el (bookmark-default-annotation-text):
* lisp/button.el (button-category-symbol, button-put)
(make-text-button):
* lisp/calc/calc-aent.el (math-read-if, math-read-factor):
* lisp/calc/calc-embed.el (calc-do-embedded):
* lisp/calc/calc-ext.el (calc-user-function-list):
* lisp/calc/calc-graph.el (calc-graph-show-dumb):
* lisp/calc/calc-help.el (calc-describe-key)
(calc-describe-thing, calc-full-help):
* lisp/calc/calc-lang.el (calc-c-language)
(math-parse-fortran-vector-end, math-parse-tex-sum)
(math-parse-eqn-matrix, math-parse-eqn-prime)
(calc-yacas-language, calc-maxima-language, calc-giac-language)
(math-read-giac-subscr, math-read-math-subscr)
(math-read-big-rec, math-read-big-balance):
* lisp/calc/calc-misc.el (calc-help, report-calc-bug):
* lisp/calc/calc-mode.el (calc-auto-why, calc-save-modes)
(calc-auto-recompute):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-read-parse-table-part, calc-user-define-invocation)
(math-do-arg-check):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-units.el (math-build-units-table-buffer):
* lisp/calc/calc-vec.el (math-read-brackets):
* lisp/calc/calc-yank.el (calc-edit-mode):
* lisp/calc/calc.el (calc, calc-do, calc-user-invocation):
* lisp/calendar/appt.el (appt-display-message):
* lisp/calendar/diary-lib.el (diary-check-diary-file)
(diary-mail-entries, diary-from-outlook):
* lisp/calendar/icalendar.el (icalendar-export-region)
(icalendar--convert-float-to-ical)
(icalendar--convert-date-to-ical)
(icalendar--convert-ical-to-diary)
(icalendar--convert-recurring-to-diary)
(icalendar--add-diary-entry):
* lisp/calendar/time-date.el (format-seconds):
* lisp/calendar/timeclock.el (timeclock-mode-line-display)
(timeclock-make-hours-explicit, timeclock-log-data):
* lisp/calendar/todo-mode.el (todo-prefix, todo-delete-category)
(todo-item-mark, todo-check-format)
(todo-insert-item--next-param, todo-edit-item--next-key)
(todo-mode):
* lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules):
* lisp/cedet/mode-local.el (describe-mode-local-overload)
(mode-local-print-binding, mode-local-describe-bindings-2):
* lisp/cedet/semantic/complete.el (semantic-displayor-show-request):
* lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
* lisp/cus-start.el (standard):
* lisp/cus-theme.el (describe-theme-1):
* lisp/custom.el (custom-add-dependencies, custom-check-theme)
(custom--sort-vars-1, load-theme):
* lisp/descr-text.el (describe-text-properties-1, describe-char):
* lisp/dired-x.el (dired-do-run-mail):
* lisp/dired.el (dired-log):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-enable-advice)
(ad-disable-advice, ad-remove-advice, ad-set-argument)
(ad-set-arguments, ad--defalias-fset, ad-activate)
(ad-deactivate):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand)
(byte-compile-unfold-lambda, byte-optimize-form-code-walker)
(byte-optimize-while, byte-optimize-apply):
* lisp/emacs-lisp/byte-run.el (defun, defsubst):
* lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode)
(byte-compile-log-file, byte-compile-format-warn)
(byte-compile-nogroup-warn, byte-compile-arglist-warn)
(byte-compile-cl-warn)
(byte-compile-warn-about-unresolved-functions)
(byte-compile-file, byte-compile--declare-var)
(byte-compile-file-form-defmumble, byte-compile-form)
(byte-compile-normal-call, byte-compile-check-variable)
(byte-compile-variable-ref, byte-compile-variable-set)
(byte-compile-subr-wrong-args, byte-compile-setq-default)
(byte-compile-negation-optimizer)
(byte-compile-condition-case--old)
(byte-compile-condition-case--new, byte-compile-save-excursion)
(byte-compile-defvar, byte-compile-autoload)
(byte-compile-lambda-form)
(byte-compile-make-variable-buffer-local, display-call-tree)
(batch-byte-compile):
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use):
* lisp/emacs-lisp/chart.el (chart-space-usage):
* lisp/emacs-lisp/check-declare.el (check-declare-scan)
(check-declare-warn, check-declare-file)
(check-declare-directory):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine)
(checkdoc-message-text-engine):
* lisp/emacs-lisp/cl-extra.el (cl-parse-integer)
(cl--describe-class):
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric)
(cl--generic-describe, cl-generic-generalizers):
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause, cl-tagbody)
(cl-symbol-macrolet):
* lisp/emacs-lisp/cl.el (cl-unload-function, flet):
* lisp/emacs-lisp/copyright.el (copyright)
(copyright-update-directory):
* lisp/emacs-lisp/edebug.el (edebug-read-list):
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read):
* lisp/emacs-lisp/eieio-core.el (eieio--slot-override)
(eieio-oref):
* lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor):
* lisp/emacs-lisp/eieio-speedbar.el:
(eieio-speedbar-child-make-tag-lines)
(eieio-speedbar-child-description):
* lisp/emacs-lisp/eieio.el (defclass, change-class):
* lisp/emacs-lisp/elint.el (elint-file, elint-get-top-forms)
(elint-init-form, elint-check-defalias-form)
(elint-check-let-form):
* lisp/emacs-lisp/ert.el (ert-get-test, ert-results-mode-menu)
(ert-results-pop-to-backtrace-for-test-at-point)
(ert-results-pop-to-messages-for-test-at-point)
(ert-results-pop-to-should-forms-for-test-at-point)
(ert-describe-test):
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol)
(find-function-library):
* lisp/emacs-lisp/generator.el (iter-yield):
* lisp/emacs-lisp/gv.el (gv-define-simple-setter):
* lisp/emacs-lisp/lisp-mnt.el (lm-verify):
* lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
* lisp/emacs-lisp/nadvice.el (advice--make-docstring)
(advice--make, define-advice):
* lisp/emacs-lisp/package-x.el (package-upload-file):
* lisp/emacs-lisp/package.el (package-version-join)
(package-disabled-p, package-activate-1, package-activate)
(package--download-one-archive)
(package--download-and-read-archives)
(package-compute-transaction, package-install-from-archive)
(package-install, package-install-selected-packages)
(package-delete, package-autoremove, describe-package-1)
(package-install-button-action, package-delete-button-action)
(package-menu-hide-package, package-menu--list-to-prompt)
(package-menu--perform-transaction)
(package-menu--find-and-notify-upgrades):
* lisp/emacs-lisp/pcase.el (pcase-exhaustive, pcase--u1):
* lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode):
* lisp/emacs-lisp/ring.el (ring-previous, ring-next):
* lisp/emacs-lisp/rx.el (rx-check, rx-anything)
(rx-check-any-string, rx-check-any, rx-check-not, rx-=)
(rx-repeat, rx-check-backref, rx-syntax, rx-check-category)
(rx-form):
* lisp/emacs-lisp/smie.el (smie-config-save):
* lisp/emacs-lisp/subr-x.el (internal--check-binding):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-put-tag):
* lisp/emacs-lisp/testcover.el (testcover-1value):
* lisp/emacs-lisp/timer.el (timer-event-handler):
* lisp/emulation/viper-cmd.el (viper-toggle-parse-sexp-ignore-comments)
(viper-toggle-search-style, viper-kill-buffer)
(viper-brac-function):
* lisp/emulation/viper-macs.el (viper-record-kbd-macro):
* lisp/env.el (setenv):
* lisp/erc/erc-button.el (erc-nick-popup):
* lisp/erc/erc.el (erc-cmd-LOAD, erc-handle-login, english):
* lisp/eshell/em-dirs.el (eshell/cd):
* lisp/eshell/em-glob.el (eshell-glob-regexp)
(eshell-glob-entries):
* lisp/eshell/em-pred.el (eshell-parse-modifiers):
* lisp/eshell/esh-opt.el (eshell-show-usage):
* lisp/facemenu.el (facemenu-add-new-face)
(facemenu-add-new-color):
* lisp/faces.el (read-face-name, read-face-font, describe-face)
(x-resolve-font-name):
* lisp/files-x.el (modify-file-local-variable):
* lisp/files.el (locate-user-emacs-file, find-alternate-file)
(set-auto-mode, hack-one-local-variable--obsolete)
(dir-locals-set-directory-class, write-file, basic-save-buffer)
(delete-directory, copy-directory, recover-session)
(recover-session-finish, insert-directory)
(file-modes-char-to-who, file-modes-symbolic-to-number)
(move-file-to-trash):
* lisp/filesets.el (filesets-add-buffer, filesets-remove-buffer):
* lisp/find-cmd.el (find-generic, find-to-string):
* lisp/finder.el (finder-commentary):
* lisp/font-lock.el (font-lock-fontify-buffer):
* lisp/format.el (format-write-file, format-find-file)
(format-insert-file):
* lisp/frame.el (get-device-terminal, select-frame-by-name):
* lisp/fringe.el (fringe--check-style):
* lisp/gnus/nnmairix.el (nnmairix-widget-create-query):
* lisp/help-fns.el (help-fns--key-bindings)
(help-fns--compiler-macro, help-fns--parent-mode)
(help-fns--obsolete, help-fns--interactive-only)
(describe-function-1, describe-variable):
* lisp/help.el (describe-mode)
(describe-minor-mode-from-indicator):
* lisp/image.el (image-type):
* lisp/international/ccl.el (ccl-dump):
* lisp/international/fontset.el (x-must-resolve-font-name):
* lisp/international/mule-cmds.el (prefer-coding-system)
(select-safe-coding-system-interactively)
(select-safe-coding-system, activate-input-method)
(toggle-input-method, describe-current-input-method)
(describe-language-environment):
* lisp/international/mule-conf.el (code-offset):
* lisp/international/mule-diag.el (describe-character-set)
(list-input-methods-1):
* lisp/mail/feedmail.el (feedmail-run-the-queue):
* lisp/mouse.el (minor-mode-menu-from-indicator):
* lisp/mpc.el (mpc-playlist-rename):
* lisp/msb.el (msb--choose-menu):
* lisp/net/ange-ftp.el (ange-ftp-shell-command):
* lisp/net/imap.el (imap-interactive-login):
* lisp/net/mairix.el (mairix-widget-create-query):
* lisp/net/newst-backend.el (newsticker--sentinel-work):
* lisp/net/newst-treeview.el (newsticker--treeview-load):
* lisp/net/rlogin.el (rlogin):
* lisp/obsolete/iswitchb.el (iswitchb-possible-new-buffer):
* lisp/obsolete/otodo-mode.el (todo-more-important-p):
* lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region):
* lisp/obsolete/pgg-pgp.el (pgg-pgp-process-region):
* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-process-region):
* lisp/org/ob-core.el (org-babel-goto-named-src-block)
(org-babel-goto-named-result):
* lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org/ob-ref.el (org-babel-ref-resolve):
* lisp/org/org-agenda.el (org-agenda-prepare):
* lisp/org/org-clock.el (org-clock-notify-once-if-expired)
(org-clock-resolve):
* lisp/org/org-ctags.el (org-ctags-ask-rebuild-tags-file-then-find-tag):
* lisp/org/org-feed.el (org-feed-parse-atom-entry):
* lisp/org/org-habit.el (org-habit-parse-todo):
* lisp/org/org-mouse.el (org-mouse-popup-global-menu)
(org-mouse-context-menu):
* lisp/org/org-table.el (org-table-edit-formulas):
* lisp/org/ox.el (org-export-async-start):
* lisp/proced.el (proced-log):
* lisp/progmodes/ada-mode.el (ada-get-indent-case)
(ada-check-matching-start, ada-goto-matching-start):
* lisp/progmodes/ada-prj.el (ada-prj-display-page):
* lisp/progmodes/ada-xref.el (ada-find-executable):
* lisp/progmodes/ebrowse.el (ebrowse-tags-apropos):
* lisp/progmodes/etags.el (etags-tags-apropos-additional):
* lisp/progmodes/flymake.el (flymake-parse-err-lines)
(flymake-start-syntax-check-process):
* lisp/progmodes/python.el (python-shell-get-process-or-error)
(python-define-auxiliary-skeleton):
* lisp/progmodes/sql.el (sql-comint):
* lisp/progmodes/verilog-mode.el (verilog-load-file-at-point):
* lisp/progmodes/vhdl-mode.el (vhdl-widget-directory-validate):
* lisp/recentf.el (recentf-open-files):
* lisp/replace.el (query-replace-read-from)
(occur-after-change-function, occur-1):
* lisp/scroll-bar.el (scroll-bar-columns):
* lisp/server.el (server-get-auth-key):
* lisp/simple.el (execute-extended-command)
(undo-outer-limit-truncate, list-processes--refresh)
(compose-mail, set-variable, choose-completion-string)
(define-alternatives):
* lisp/startup.el (site-run-file, tty-handle-args, command-line)
(command-line-1):
* lisp/subr.el (noreturn, define-error, add-to-list)
(read-char-choice, version-to-list):
* lisp/term/common-win.el (x-handle-xrm-switch)
(x-handle-name-switch, x-handle-args):
* lisp/term/x-win.el (x-handle-parent-id, x-handle-smid):
* lisp/textmodes/reftex-ref.el (reftex-label):
* lisp/textmodes/reftex-toc.el (reftex-toc-rename-label):
* lisp/textmodes/two-column.el (2C-split):
* lisp/tutorial.el (tutorial--describe-nonstandard-key)
(tutorial--find-changed-keys):
* lisp/type-break.el (type-break-noninteractive-query):
* lisp/wdired.el (wdired-do-renames, wdired-do-symlink-changes)
(wdired-do-perm-changes):
* lisp/whitespace.el (whitespace-report-region):
Prefer grave quoting in source-code strings used to generate help
and diagnostics.
* lisp/faces.el (face-documentation):
No need to convert quotes, since the result is a docstring.
* lisp/info.el (Info-virtual-index-find-node)
(Info-virtual-index, info-apropos):
Simplify by generating only curved quotes, since info files are
typically that ways nowadays anyway.
* lisp/international/mule-diag.el (list-input-methods):
Don’t assume text quoting style is curved.
* lisp/org/org-bibtex.el (org-bibtex-fields):
Revert my recent changes, going back to the old quoting style.
2015-09-07 08:41:44 -07:00
|
|
|
(error "Invalid argument to `tabulated-list-put-tag'"))
|
2011-04-06 16:10:51 -04:00
|
|
|
(unless (> tabulated-list-padding 0)
|
|
|
|
(error "Unable to tag the current line"))
|
|
|
|
(save-excursion
|
|
|
|
(beginning-of-line)
|
2012-05-06 16:32:37 +08:00
|
|
|
(when (tabulated-list-get-entry)
|
2011-04-06 16:10:51 -04:00
|
|
|
(let ((beg (point))
|
|
|
|
(inhibit-read-only t))
|
|
|
|
(forward-char tabulated-list-padding)
|
|
|
|
(insert-and-inherit
|
2012-05-06 16:32:37 +08:00
|
|
|
(let ((width (string-width tag)))
|
|
|
|
(if (<= width tabulated-list-padding)
|
|
|
|
(concat tag
|
|
|
|
(make-string (- tabulated-list-padding width) ?\s))
|
|
|
|
(truncate-string-to-width tag tabulated-list-padding))))
|
2011-04-06 16:10:51 -04:00
|
|
|
(delete-region beg (+ beg tabulated-list-padding)))))
|
|
|
|
(if advance
|
|
|
|
(forward-line)))
|
|
|
|
|
2019-09-16 03:48:47 +02:00
|
|
|
(defun tabulated-list-clear-all-tags ()
|
|
|
|
"Clear all tags from the padding area in the current buffer."
|
|
|
|
(unless (> tabulated-list-padding 0)
|
|
|
|
(error "There can be no tags in current buffer"))
|
|
|
|
(save-excursion
|
|
|
|
(goto-char (point-min))
|
|
|
|
(let ((inhibit-read-only t)
|
|
|
|
;; Match non-space in the first n characters.
|
|
|
|
(re (format "^ \\{0,%d\\}[^ ]" (1- tabulated-list-padding)))
|
|
|
|
(empty (make-string tabulated-list-padding ? )))
|
|
|
|
(while (re-search-forward re nil 'noerror)
|
|
|
|
(tabulated-list-put-tag empty)))))
|
|
|
|
|
2011-04-06 16:10:51 -04:00
|
|
|
(defvar tabulated-list-mode-map
|
2019-01-21 09:50:11 -06:00
|
|
|
(let ((map (make-sparse-keymap)))
|
|
|
|
(set-keymap-parent map (make-composed-keymap
|
|
|
|
button-buffer-map
|
|
|
|
special-mode-map))
|
2011-04-06 16:10:51 -04:00
|
|
|
(define-key map "n" 'next-line)
|
|
|
|
(define-key map "p" 'previous-line)
|
* 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.
2012-05-07 00:45:46 +08:00
|
|
|
(define-key map "S" 'tabulated-list-sort)
|
2019-06-25 22:34:47 +02:00
|
|
|
(define-key map "}" 'tabulated-list-widen-current-column)
|
|
|
|
(define-key map "{" 'tabulated-list-narrow-current-column)
|
2011-04-06 16:10:51 -04:00
|
|
|
(define-key map [follow-link] 'mouse-face)
|
|
|
|
(define-key map [mouse-2] 'mouse-select-window)
|
|
|
|
map)
|
|
|
|
"Local keymap for `tabulated-list-mode' buffers.")
|
|
|
|
|
|
|
|
(defvar tabulated-list-sort-button-map
|
|
|
|
(let ((map (make-sparse-keymap)))
|
|
|
|
(define-key map [header-line mouse-1] 'tabulated-list-col-sort)
|
|
|
|
(define-key map [header-line mouse-2] 'tabulated-list-col-sort)
|
2012-05-07 13:37:38 +08:00
|
|
|
(define-key map [mouse-1] 'tabulated-list-col-sort)
|
|
|
|
(define-key map [mouse-2] 'tabulated-list-col-sort)
|
|
|
|
(define-key map "\C-m" 'tabulated-list-sort)
|
2011-04-06 16:10:51 -04:00
|
|
|
(define-key map [follow-link] 'mouse-face)
|
|
|
|
map)
|
|
|
|
"Local keymap for `tabulated-list-mode' sort buttons.")
|
|
|
|
|
2019-03-02 20:03:41 +01:00
|
|
|
(defun tabulated-list-make-glyphless-char-display-table ()
|
|
|
|
"Make the `glyphless-char-display' table used for text-mode frames.
|
|
|
|
This table is used for displaying the sorting indicators, see
|
|
|
|
variables `tabulated-list-tty-sort-indicator-asc' and
|
|
|
|
`tabulated-list-tty-sort-indicator-desc' for more information."
|
2011-04-18 19:21:31 -04:00
|
|
|
(let ((table (make-char-table 'glyphless-char-display nil)))
|
|
|
|
(set-char-table-parent table glyphless-char-display)
|
2019-03-02 20:03:41 +01:00
|
|
|
(aset table
|
|
|
|
tabulated-list-gui-sort-indicator-desc
|
|
|
|
(cons nil (char-to-string tabulated-list-tty-sort-indicator-desc)))
|
|
|
|
(aset table
|
|
|
|
tabulated-list-gui-sort-indicator-asc
|
|
|
|
(cons nil (char-to-string tabulated-list-tty-sort-indicator-asc)))
|
|
|
|
table))
|
2011-04-18 19:21:31 -04:00
|
|
|
|
2015-05-16 09:52:53 +01:00
|
|
|
(defvar tabulated-list--header-string nil
|
|
|
|
"Holds the header if `tabulated-list-use-header-line' is nil.
|
|
|
|
Populated by `tabulated-list-init-header'.")
|
2012-05-07 13:37:38 +08:00
|
|
|
(defvar tabulated-list--header-overlay nil)
|
|
|
|
|
2017-08-19 13:37:31 +03:00
|
|
|
(defun tabulated-list-line-number-width ()
|
|
|
|
"Return the width taken by display-line-numbers in the current buffer."
|
|
|
|
;; line-number-display-width returns the value for the selected
|
|
|
|
;; window, which might not be the window in which the current buffer
|
|
|
|
;; is displayed.
|
2017-08-19 14:05:51 +03:00
|
|
|
(if (not display-line-numbers)
|
|
|
|
0
|
2017-10-20 12:36:12 +03:00
|
|
|
(let ((cbuf-window (get-buffer-window (current-buffer) t)))
|
2017-08-19 14:05:51 +03:00
|
|
|
(if (window-live-p cbuf-window)
|
|
|
|
(with-selected-window cbuf-window
|
2017-10-20 12:36:12 +03:00
|
|
|
(line-number-display-width 'columns))
|
2017-08-19 14:05:51 +03:00
|
|
|
4))))
|
2017-08-19 13:37:31 +03:00
|
|
|
|
2011-04-06 16:10:51 -04:00
|
|
|
(defun tabulated-list-init-header ()
|
|
|
|
"Set up header line for the Tabulated List buffer."
|
2012-05-07 12:29:55 -04:00
|
|
|
;; FIXME: Should share code with tabulated-list-print-col!
|
2012-05-06 16:32:37 +08:00
|
|
|
(let ((x (max tabulated-list-padding 0))
|
2011-04-06 16:10:51 -04:00
|
|
|
(button-props `(help-echo "Click to sort by column"
|
2020-11-04 23:52:21 +01:00
|
|
|
mouse-face header-line-highlight
|
|
|
|
keymap ,tabulated-list-sort-button-map))
|
|
|
|
(len (length tabulated-list-format))
|
2011-04-06 16:10:51 -04:00
|
|
|
(cols nil))
|
2017-08-05 14:22:04 +03:00
|
|
|
(if display-line-numbers
|
2017-08-19 13:37:31 +03:00
|
|
|
(setq x (+ x (tabulated-list-line-number-width))))
|
* 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.
2012-05-07 00:45:46 +08:00
|
|
|
(push (propertize " " 'display `(space :align-to ,x)) cols)
|
2020-11-04 23:52:21 +01:00
|
|
|
(dotimes (n len)
|
2011-04-06 16:10:51 -04:00
|
|
|
(let* ((col (aref tabulated-list-format n))
|
2020-11-04 23:52:21 +01:00
|
|
|
(not-last-col (< n (1- len)))
|
2012-05-06 16:32:37 +08:00
|
|
|
(label (nth 0 col))
|
2020-11-04 23:52:21 +01:00
|
|
|
(lablen (length label))
|
|
|
|
(pname label)
|
2011-04-06 16:10:51 -04:00
|
|
|
(width (nth 1 col))
|
2012-05-06 16:32:37 +08:00
|
|
|
(props (nthcdr 3 col))
|
2012-05-07 12:29:55 -04:00
|
|
|
(pad-right (or (plist-get props :pad-right) 1))
|
|
|
|
(right-align (plist-get props :right-align))
|
|
|
|
(next-x (+ x pad-right width)))
|
2020-11-04 23:52:21 +01:00
|
|
|
(when (and (>= lablen 3) (> lablen width) not-last-col)
|
|
|
|
(setq label (truncate-string-to-width label (- lablen 1) nil nil t)))
|
2011-04-06 16:10:51 -04:00
|
|
|
(push
|
|
|
|
(cond
|
|
|
|
;; An unsortable column
|
2012-05-07 13:37:38 +08:00
|
|
|
((not (nth 2 col))
|
2020-11-04 23:52:21 +01:00
|
|
|
(propertize label 'tabulated-list-column-name pname))
|
2011-04-06 16:10:51 -04:00
|
|
|
;; The selected sort column
|
|
|
|
((equal (car col) (car tabulated-list-sort-key))
|
|
|
|
(apply 'propertize
|
2020-11-04 23:52:21 +01:00
|
|
|
(concat label
|
|
|
|
(cond
|
|
|
|
((and (< lablen 3) not-last-col) "")
|
|
|
|
((cdr tabulated-list-sort-key)
|
2019-03-02 20:03:41 +01:00
|
|
|
(format " %c"
|
|
|
|
tabulated-list-gui-sort-indicator-desc))
|
2020-11-04 23:52:21 +01:00
|
|
|
(t (format " %c"
|
2019-03-02 20:03:41 +01:00
|
|
|
tabulated-list-gui-sort-indicator-asc))))
|
2020-11-04 23:52:21 +01:00
|
|
|
'face 'bold
|
|
|
|
'tabulated-list-column-name pname
|
|
|
|
button-props))
|
2011-04-06 16:10:51 -04:00
|
|
|
;; Unselected sortable column.
|
|
|
|
(t (apply 'propertize label
|
2020-11-04 23:52:21 +01:00
|
|
|
'tabulated-list-column-name pname
|
2011-04-06 16:10:51 -04:00
|
|
|
button-props)))
|
2012-05-06 16:32:37 +08:00
|
|
|
cols)
|
2012-05-07 12:29:55 -04:00
|
|
|
(when right-align
|
|
|
|
(let ((shift (- width (string-width (car cols)))))
|
|
|
|
(when (> shift 0)
|
|
|
|
(setq cols
|
|
|
|
(cons (car cols)
|
|
|
|
(cons (propertize (make-string shift ?\s)
|
|
|
|
'display
|
|
|
|
`(space :align-to ,(+ x shift)))
|
|
|
|
(cdr cols))))
|
|
|
|
(setq x (+ x shift)))))
|
2013-06-23 15:23:49 +02:00
|
|
|
(if (>= pad-right 0)
|
2012-05-06 16:32:37 +08:00
|
|
|
(push (propertize " "
|
2012-05-07 12:29:55 -04:00
|
|
|
'display `(space :align-to ,next-x)
|
2012-05-06 16:32:37 +08:00
|
|
|
'face 'fixed-pitch)
|
2012-05-07 12:29:55 -04:00
|
|
|
cols))
|
|
|
|
(setq x next-x)))
|
2012-05-07 13:37:38 +08:00
|
|
|
(setq cols (apply 'concat (nreverse cols)))
|
|
|
|
(if tabulated-list-use-header-line
|
|
|
|
(setq header-line-format cols)
|
2013-06-20 13:57:33 +02:00
|
|
|
(setq-local tabulated-list--header-string cols))))
|
2012-05-07 13:37:38 +08:00
|
|
|
|
|
|
|
(defun tabulated-list-print-fake-header ()
|
2015-05-16 09:52:53 +01:00
|
|
|
"Insert a fake Tabulated List \"header line\" at the start of the buffer.
|
|
|
|
Do nothing if `tabulated-list--header-string' is nil."
|
|
|
|
(when tabulated-list--header-string
|
|
|
|
(goto-char (point-min))
|
|
|
|
(let ((inhibit-read-only t))
|
|
|
|
(insert tabulated-list--header-string "\n")
|
|
|
|
(if tabulated-list--header-overlay
|
|
|
|
(move-overlay tabulated-list--header-overlay (point-min) (point))
|
|
|
|
(setq-local tabulated-list--header-overlay
|
|
|
|
(make-overlay (point-min) (point))))
|
2019-06-25 18:09:54 +02:00
|
|
|
(overlay-put tabulated-list--header-overlay
|
|
|
|
'face 'tabulated-list-fake-header))))
|
2011-04-06 16:10:51 -04:00
|
|
|
|
2016-11-22 15:23:50 +09:00
|
|
|
(defsubst tabulated-list-header-overlay-p (&optional pos)
|
|
|
|
"Return non-nil if there is a fake header.
|
|
|
|
Optional arg POS is a buffer position where to look for a fake header;
|
|
|
|
defaults to `point-min'."
|
|
|
|
(overlays-at (or pos (point-min))))
|
|
|
|
|
2011-04-06 16:10:51 -04:00
|
|
|
(defun tabulated-list-revert (&rest ignored)
|
|
|
|
"The `revert-buffer-function' for `tabulated-list-mode'.
|
|
|
|
It runs `tabulated-list-revert-hook', then calls `tabulated-list-print'."
|
|
|
|
(interactive)
|
|
|
|
(unless (derived-mode-p 'tabulated-list-mode)
|
|
|
|
(error "The current buffer is not in Tabulated List mode"))
|
|
|
|
(run-hooks 'tabulated-list-revert-hook)
|
|
|
|
(tabulated-list-print t))
|
|
|
|
|
2012-05-06 16:32:37 +08:00
|
|
|
(defun tabulated-list--column-number (name)
|
|
|
|
(let ((len (length tabulated-list-format))
|
|
|
|
(n 0)
|
|
|
|
found)
|
|
|
|
(while (and (< n len) (null found))
|
|
|
|
(if (equal (car (aref tabulated-list-format n)) name)
|
|
|
|
(setq found n))
|
|
|
|
(setq n (1+ n)))
|
|
|
|
(or found
|
|
|
|
(error "No column named %s" name))))
|
|
|
|
|
2015-05-24 22:57:24 +01:00
|
|
|
(defun tabulated-list--get-sorter ()
|
|
|
|
"Return a sorting predicate for the current tabulated-list.
|
|
|
|
Return nil if `tabulated-list-sort-key' specifies an unsortable
|
|
|
|
column. Negate the predicate that would be returned if
|
|
|
|
`tabulated-list-sort-key' has a non-nil cdr."
|
|
|
|
(when (and tabulated-list-sort-key
|
|
|
|
(car tabulated-list-sort-key))
|
|
|
|
(let* ((sort-column (car tabulated-list-sort-key))
|
|
|
|
(n (tabulated-list--column-number sort-column))
|
|
|
|
(sorter (nth 2 (aref tabulated-list-format n))))
|
|
|
|
(when (eq sorter t); Default sorter checks column N:
|
|
|
|
(setq sorter (lambda (A B)
|
|
|
|
(let ((a (aref (cadr A) n))
|
|
|
|
(b (aref (cadr B) n)))
|
|
|
|
(string< (if (stringp a) a (car a))
|
|
|
|
(if (stringp b) b (car b)))))))
|
|
|
|
;; Reversed order.
|
|
|
|
(if (cdr tabulated-list-sort-key)
|
2019-09-21 00:06:58 +02:00
|
|
|
(lambda (a b) (funcall sorter b a))
|
2015-05-24 22:57:24 +01:00
|
|
|
sorter))))
|
|
|
|
|
2016-11-14 17:31:44 +09:00
|
|
|
(defsubst tabulated-list--col-local-max-widths (col)
|
|
|
|
"Return maximum entry widths at column COL around current row.
|
|
|
|
Check the current row, the previous one and the next row."
|
|
|
|
(apply #'max (mapcar (lambda (x)
|
|
|
|
(let ((nt (elt x col)))
|
|
|
|
(string-width (if (stringp nt) nt (car nt)))))
|
|
|
|
tabulated-list--near-rows)))
|
|
|
|
|
2015-05-24 23:38:53 +01:00
|
|
|
(defun tabulated-list-print (&optional remember-pos update)
|
2011-04-06 16:10:51 -04:00
|
|
|
"Populate the current Tabulated List mode buffer.
|
|
|
|
This sorts the `tabulated-list-entries' list if sorting is
|
|
|
|
specified by `tabulated-list-sort-key'. It then erases the
|
|
|
|
buffer and inserts the entries with `tabulated-list-printer'.
|
|
|
|
|
|
|
|
Optional argument REMEMBER-POS, if non-nil, means to move point
|
2021-04-09 18:25:08 +02:00
|
|
|
to the entry with the same ID element as the current line.
|
2015-05-24 23:38:53 +01:00
|
|
|
|
|
|
|
Non-nil UPDATE argument means to use an alternative printing
|
|
|
|
method which is faster if most entries haven't changed since the
|
|
|
|
last print. The only difference in outcome is that tags will not
|
|
|
|
be removed from entries that haven't changed (see
|
|
|
|
`tabulated-list-put-tag'). Don't use this immediately after
|
|
|
|
changing `tabulated-list-sort-key'."
|
2011-04-06 16:10:51 -04:00
|
|
|
(let ((inhibit-read-only t)
|
2012-04-17 23:07:21 +08:00
|
|
|
(entries (if (functionp tabulated-list-entries)
|
2011-04-06 16:10:51 -04:00
|
|
|
(funcall tabulated-list-entries)
|
|
|
|
tabulated-list-entries))
|
2015-05-24 22:57:24 +01:00
|
|
|
(sorter (tabulated-list--get-sorter))
|
2021-04-09 18:25:08 +02:00
|
|
|
entry-id saved-pt saved-col)
|
2011-04-06 16:10:51 -04:00
|
|
|
(and remember-pos
|
2015-06-29 10:07:24 +01:00
|
|
|
(setq entry-id (tabulated-list-get-id))
|
2021-04-09 18:25:08 +02:00
|
|
|
(setq saved-col (current-column)))
|
2012-05-07 12:29:55 -04:00
|
|
|
;; Sort the entries, if necessary.
|
2015-05-26 09:32:45 +01:00
|
|
|
(when sorter
|
|
|
|
(setq entries (sort entries sorter)))
|
2015-05-24 22:57:24 +01:00
|
|
|
(unless (functionp tabulated-list-entries)
|
|
|
|
(setq tabulated-list-entries entries))
|
2015-05-24 23:38:53 +01:00
|
|
|
;; Without a sorter, we have no way to just update.
|
|
|
|
(when (and update (not sorter))
|
|
|
|
(setq update nil))
|
|
|
|
(if update (goto-char (point-min))
|
|
|
|
;; Redo the buffer, unless we're just updating.
|
|
|
|
(erase-buffer)
|
|
|
|
(unless tabulated-list-use-header-line
|
|
|
|
(tabulated-list-print-fake-header)))
|
|
|
|
;; Finally, print the resulting list.
|
2016-11-14 17:31:44 +09:00
|
|
|
(while entries
|
|
|
|
(let* ((elt (car entries))
|
|
|
|
(tabulated-list--near-rows
|
|
|
|
(list
|
|
|
|
(or (tabulated-list-get-entry (point-at-bol 0)) (cadr elt))
|
|
|
|
(cadr elt)
|
|
|
|
(or (cadr (cadr entries)) (cadr elt))))
|
|
|
|
(id (car elt)))
|
2015-05-24 23:38:53 +01:00
|
|
|
(and entry-id
|
|
|
|
(equal entry-id id)
|
|
|
|
(setq entry-id nil
|
|
|
|
saved-pt (point)))
|
2017-10-05 12:41:36 +03:00
|
|
|
;; If the buffer is empty, simply print each elt.
|
2015-06-14 14:40:48 +01:00
|
|
|
(if (or (not update) (eobp))
|
2017-10-05 17:57:58 +03:00
|
|
|
(apply tabulated-list-printer elt)
|
2015-05-24 23:38:53 +01:00
|
|
|
(while (let ((local-id (tabulated-list-get-id)))
|
|
|
|
;; If we find id, then nothing to update.
|
|
|
|
(cond ((equal id local-id)
|
|
|
|
(forward-line 1)
|
|
|
|
nil)
|
|
|
|
;; If this entry sorts after id (or it's the
|
|
|
|
;; end), then just insert id and move on.
|
2015-07-31 12:51:04 +01:00
|
|
|
((or (not local-id)
|
|
|
|
(funcall sorter elt
|
|
|
|
;; FIXME: Might be faster if
|
|
|
|
;; don't construct this list.
|
|
|
|
(list local-id (tabulated-list-get-entry))))
|
2017-10-05 17:57:58 +03:00
|
|
|
(apply tabulated-list-printer elt)
|
2015-05-24 23:38:53 +01:00
|
|
|
nil)
|
|
|
|
;; We find an entry that sorts before id,
|
|
|
|
;; it needs to be deleted.
|
|
|
|
(t t)))
|
|
|
|
(let ((old (point)))
|
|
|
|
(forward-line 1)
|
2016-11-14 17:31:44 +09:00
|
|
|
(delete-region old (point))))))
|
|
|
|
(setq entries (cdr entries)))
|
2011-04-06 16:10:51 -04:00
|
|
|
(set-buffer-modified-p nil)
|
|
|
|
;; If REMEMBER-POS was specified, move to the "old" location.
|
|
|
|
(if saved-pt
|
|
|
|
(progn (goto-char saved-pt)
|
2021-04-09 18:25:08 +02:00
|
|
|
(move-to-column saved-col))
|
2011-04-06 16:10:51 -04:00
|
|
|
(goto-char (point-min)))))
|
|
|
|
|
2017-10-05 17:57:58 +03:00
|
|
|
(defun tabulated-list-print-entry (id cols)
|
2011-04-06 16:10:51 -04:00
|
|
|
"Insert a Tabulated List entry at point.
|
|
|
|
This is the default `tabulated-list-printer' function. ID is a
|
|
|
|
Lisp object identifying the entry to print, and COLS is a vector
|
2017-10-05 17:57:58 +03:00
|
|
|
of column descriptors."
|
2012-05-06 16:32:37 +08:00
|
|
|
(let ((beg (point))
|
|
|
|
(x (max tabulated-list-padding 0))
|
|
|
|
(ncols (length tabulated-list-format))
|
|
|
|
(inhibit-read-only t))
|
2011-04-06 16:10:51 -04:00
|
|
|
(if (> tabulated-list-padding 0)
|
2017-10-20 12:36:12 +03:00
|
|
|
(insert (make-string x ?\s)))
|
2017-01-22 14:23:45 +09:00
|
|
|
(let ((tabulated-list--near-rows ; Bind it if not bound yet (Bug#25506).
|
|
|
|
(or (bound-and-true-p tabulated-list--near-rows)
|
|
|
|
(list (or (tabulated-list-get-entry (point-at-bol 0))
|
|
|
|
cols)
|
|
|
|
cols))))
|
|
|
|
(dotimes (n ncols)
|
|
|
|
(setq x (tabulated-list-print-col n (aref cols n) x))))
|
2011-04-06 16:10:51 -04:00
|
|
|
(insert ?\n)
|
2015-04-30 02:27:10 +01:00
|
|
|
;; Ever so slightly faster than calling `put-text-property' twice.
|
|
|
|
(add-text-properties
|
|
|
|
beg (point)
|
|
|
|
`(tabulated-list-id ,id tabulated-list-entry ,cols))))
|
2012-05-06 16:32:37 +08:00
|
|
|
|
|
|
|
(defun tabulated-list-print-col (n col-desc x)
|
|
|
|
"Insert a specified Tabulated List entry at point.
|
2013-06-20 13:57:33 +02:00
|
|
|
N is the column number, COL-DESC is a column descriptor (see
|
2012-05-06 16:32:37 +08:00
|
|
|
`tabulated-list-entries'), and X is the column number at point.
|
|
|
|
Return the column number after insertion."
|
|
|
|
(let* ((format (aref tabulated-list-format n))
|
|
|
|
(name (nth 0 format))
|
|
|
|
(width (nth 1 format))
|
|
|
|
(props (nthcdr 3 format))
|
|
|
|
(pad-right (or (plist-get props :pad-right) 1))
|
2012-05-07 12:29:55 -04:00
|
|
|
(right-align (plist-get props :right-align))
|
2012-05-06 16:32:37 +08:00
|
|
|
(label (if (stringp col-desc) col-desc (car col-desc)))
|
2012-05-07 12:29:55 -04:00
|
|
|
(label-width (string-width label))
|
2012-05-06 16:32:37 +08:00
|
|
|
(help-echo (concat (car format) ": " label))
|
|
|
|
(opoint (point))
|
2016-11-14 17:31:44 +09:00
|
|
|
(not-last-col (< (1+ n) (length tabulated-list-format)))
|
|
|
|
available-space)
|
|
|
|
(when not-last-col
|
|
|
|
(let* ((next-col-format (aref tabulated-list-format (1+ n)))
|
|
|
|
(next-col-right-align (plist-get (nthcdr 3 next-col-format)
|
|
|
|
:right-align))
|
|
|
|
(next-col-width (nth 1 next-col-format)))
|
|
|
|
(setq available-space
|
|
|
|
(if (and (not right-align)
|
|
|
|
next-col-right-align)
|
|
|
|
(-
|
|
|
|
(+ width next-col-width)
|
|
|
|
(min next-col-width
|
|
|
|
(tabulated-list--col-local-max-widths (1+ n))))
|
|
|
|
width))))
|
2012-05-06 16:32:37 +08:00
|
|
|
;; Truncate labels if necessary (except last column).
|
2016-11-14 17:31:44 +09:00
|
|
|
;; Don't truncate to `width' if the next column is align-right
|
|
|
|
;; and has some space left, truncate to `available-space' instead.
|
|
|
|
(when (and not-last-col
|
2020-01-04 11:17:12 -08:00
|
|
|
(> label-width available-space))
|
|
|
|
(setq label (truncate-string-to-width
|
|
|
|
label available-space nil nil t t)
|
|
|
|
label-width available-space))
|
2012-05-06 16:32:37 +08:00
|
|
|
(setq label (bidi-string-mark-left-to-right label))
|
2012-05-07 12:29:55 -04:00
|
|
|
(when (and right-align (> width label-width))
|
|
|
|
(let ((shift (- width label-width)))
|
|
|
|
(insert (propertize (make-string shift ?\s)
|
|
|
|
'display `(space :align-to ,(+ x shift))))
|
|
|
|
(setq width (- width shift))
|
|
|
|
(setq x (+ x shift))))
|
2012-05-06 16:32:37 +08:00
|
|
|
(if (stringp col-desc)
|
2013-02-15 18:50:44 -08:00
|
|
|
(insert (if (get-text-property 0 'help-echo label)
|
|
|
|
label
|
|
|
|
(propertize label 'help-echo help-echo)))
|
2012-05-06 16:32:37 +08:00
|
|
|
(apply 'insert-text-button label (cdr col-desc)))
|
2012-05-07 12:29:55 -04:00
|
|
|
(let ((next-x (+ x pad-right width)))
|
|
|
|
;; No need to append any spaces if this is the last column.
|
|
|
|
(when not-last-col
|
|
|
|
(when (> pad-right 0) (insert (make-string pad-right ?\s)))
|
|
|
|
(insert (propertize
|
2016-11-14 17:31:44 +09:00
|
|
|
(make-string (- width (min width label-width)) ?\s)
|
2012-05-07 12:29:55 -04:00
|
|
|
'display `(space :align-to ,next-x))))
|
|
|
|
(put-text-property opoint (point) 'tabulated-list-column-name name)
|
|
|
|
next-x)))
|
2012-05-06 16:32:37 +08:00
|
|
|
|
|
|
|
(defun tabulated-list-delete-entry ()
|
|
|
|
"Delete the Tabulated List entry at point.
|
|
|
|
Return a list (ID COLS), where ID is the ID of the deleted entry
|
|
|
|
and COLS is a vector of its column descriptors. Move point to
|
|
|
|
the beginning of the deleted entry. Return nil if there is no
|
|
|
|
entry at point.
|
|
|
|
|
|
|
|
This function only changes the buffer contents; it does not alter
|
|
|
|
`tabulated-list-entries'."
|
|
|
|
;; Assume that each entry occupies one line.
|
|
|
|
(let* ((id (tabulated-list-get-id))
|
|
|
|
(cols (tabulated-list-get-entry))
|
|
|
|
(inhibit-read-only t))
|
|
|
|
(when cols
|
|
|
|
(delete-region (line-beginning-position) (1+ (line-end-position)))
|
|
|
|
(list id cols))))
|
|
|
|
|
|
|
|
(defun tabulated-list-set-col (col desc &optional change-entry-data)
|
|
|
|
"Change the Tabulated List entry at point, setting COL to DESC.
|
|
|
|
COL is the column number to change, or the name of the column to change.
|
|
|
|
DESC is the new column descriptor, which is inserted via
|
|
|
|
`tabulated-list-print-col'.
|
|
|
|
|
|
|
|
If CHANGE-ENTRY-DATA is non-nil, modify the underlying entry data
|
|
|
|
by setting the appropriate slot of the vector originally used to
|
|
|
|
print this entry. If `tabulated-list-entries' has a list value,
|
|
|
|
this is the vector stored within it."
|
|
|
|
(let* ((opoint (point))
|
|
|
|
(eol (line-end-position))
|
|
|
|
(pos (line-beginning-position))
|
|
|
|
(id (tabulated-list-get-id pos))
|
|
|
|
(entry (tabulated-list-get-entry pos))
|
|
|
|
(prop 'tabulated-list-column-name)
|
|
|
|
(inhibit-read-only t)
|
|
|
|
name)
|
|
|
|
(cond ((numberp col)
|
|
|
|
(setq name (car (aref tabulated-list-format col))))
|
|
|
|
((stringp col)
|
|
|
|
(setq name col
|
|
|
|
col (tabulated-list--column-number col)))
|
|
|
|
(t
|
|
|
|
(error "Invalid column %s" col)))
|
|
|
|
(unless entry
|
|
|
|
(error "No Tabulated List entry at position %s" opoint))
|
|
|
|
(unless (equal (get-text-property pos prop) name)
|
|
|
|
(while (and (setq pos
|
|
|
|
(next-single-property-change pos prop nil eol))
|
|
|
|
(< pos eol)
|
|
|
|
(not (equal (get-text-property pos prop) name)))))
|
|
|
|
(when (< pos eol)
|
|
|
|
(delete-region pos (next-single-property-change pos prop nil eol))
|
|
|
|
(goto-char pos)
|
2016-11-14 17:31:44 +09:00
|
|
|
(let ((tabulated-list--near-rows
|
|
|
|
(list
|
|
|
|
(tabulated-list-get-entry (point-at-bol 0))
|
|
|
|
entry
|
|
|
|
(or (tabulated-list-get-entry (point-at-bol 2)) entry))))
|
|
|
|
(tabulated-list-print-col col desc (current-column)))
|
2012-05-06 16:32:37 +08:00
|
|
|
(if change-entry-data
|
|
|
|
(aset entry col desc))
|
|
|
|
(put-text-property pos (point) 'tabulated-list-id id)
|
|
|
|
(put-text-property pos (point) 'tabulated-list-entry entry)
|
|
|
|
(goto-char opoint))))
|
2011-04-06 16:10:51 -04:00
|
|
|
|
|
|
|
(defun tabulated-list-col-sort (&optional e)
|
|
|
|
"Sort Tabulated List entries by the column of the mouse click E."
|
|
|
|
(interactive "e")
|
|
|
|
(let* ((pos (event-start e))
|
2012-05-07 13:37:38 +08:00
|
|
|
(obj (posn-object pos)))
|
2011-04-06 16:10:51 -04:00
|
|
|
(with-current-buffer (window-buffer (posn-window pos))
|
2012-05-07 13:37:38 +08:00
|
|
|
(tabulated-list--sort-by-column-name
|
|
|
|
(get-text-property (if obj (cdr obj) (posn-point pos))
|
|
|
|
'tabulated-list-column-name
|
|
|
|
(car obj))))))
|
2012-05-06 16:32:37 +08:00
|
|
|
|
* 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.
2012-05-07 00:45:46 +08:00
|
|
|
(defun tabulated-list-sort (&optional n)
|
2012-05-06 16:32:37 +08:00
|
|
|
"Sort Tabulated List entries by the column at point.
|
|
|
|
With a numeric prefix argument N, sort the Nth column."
|
|
|
|
(interactive "P")
|
|
|
|
(let ((name (if n
|
|
|
|
(car (aref tabulated-list-format n))
|
|
|
|
(get-text-property (point)
|
|
|
|
'tabulated-list-column-name))))
|
2015-10-07 14:09:09 +01:00
|
|
|
(if (nth 2 (assoc name (append tabulated-list-format nil)))
|
|
|
|
(tabulated-list--sort-by-column-name name)
|
|
|
|
(user-error "Cannot sort by %s" name))))
|
2012-05-06 16:32:37 +08:00
|
|
|
|
|
|
|
(defun tabulated-list--sort-by-column-name (name)
|
2012-05-07 13:37:38 +08:00
|
|
|
(when (and name (derived-mode-p 'tabulated-list-mode))
|
2012-05-06 16:32:37 +08:00
|
|
|
;; Flip the sort order on a second click.
|
|
|
|
(if (equal name (car tabulated-list-sort-key))
|
|
|
|
(setcdr tabulated-list-sort-key
|
|
|
|
(not (cdr tabulated-list-sort-key)))
|
|
|
|
(setq tabulated-list-sort-key (cons name nil)))
|
|
|
|
(tabulated-list-init-header)
|
|
|
|
(tabulated-list-print t)))
|
2011-04-06 16:10:51 -04:00
|
|
|
|
2019-06-24 16:35:13 +02:00
|
|
|
(defun tabulated-list-widen-current-column (&optional n)
|
|
|
|
"Widen the current tabulated-list column by N chars.
|
|
|
|
Interactively, N is the prefix numeric argument, and defaults to
|
|
|
|
1."
|
|
|
|
(interactive "p")
|
|
|
|
(let ((start (current-column))
|
|
|
|
(nb-cols (length tabulated-list-format))
|
|
|
|
(col-nb 0)
|
|
|
|
(total-width 0)
|
|
|
|
(found nil)
|
|
|
|
col-width)
|
|
|
|
(while (and (not found)
|
|
|
|
(< col-nb nb-cols))
|
|
|
|
(if (> start
|
|
|
|
(setq total-width
|
|
|
|
(+ total-width
|
|
|
|
(setq col-width
|
|
|
|
(cadr (aref tabulated-list-format
|
|
|
|
col-nb))))))
|
|
|
|
(setq col-nb (1+ col-nb))
|
|
|
|
(setq found t)
|
|
|
|
(setf (cadr (aref tabulated-list-format col-nb))
|
|
|
|
(max 1 (+ col-width n)))
|
|
|
|
(tabulated-list-print t)
|
|
|
|
(tabulated-list-init-header)))))
|
|
|
|
|
|
|
|
(defun tabulated-list-narrow-current-column (&optional n)
|
|
|
|
"Narrow the current tabulated list column by N chars.
|
|
|
|
Interactively, N is the prefix numeric argument, and defaults to
|
|
|
|
1."
|
|
|
|
(interactive "p")
|
|
|
|
(tabulated-list-widen-current-column (- n)))
|
|
|
|
|
2017-10-20 12:36:12 +03:00
|
|
|
(defvar tabulated-list--current-lnum-width nil)
|
|
|
|
(defun tabulated-list-watch-line-number-width (_window)
|
|
|
|
(if display-line-numbers
|
|
|
|
(let ((lnum-width (tabulated-list-line-number-width)))
|
|
|
|
(when (not (= tabulated-list--current-lnum-width lnum-width))
|
|
|
|
(setq-local tabulated-list--current-lnum-width lnum-width)
|
2017-11-04 16:28:25 +02:00
|
|
|
(tabulated-list-init-header)))))
|
|
|
|
|
|
|
|
(defun tabulated-list-window-scroll-function (window _start)
|
|
|
|
(if display-line-numbers
|
|
|
|
(let ((lnum-width
|
|
|
|
(with-selected-window window
|
|
|
|
(line-number-display-width 'columns))))
|
|
|
|
(when (not (= tabulated-list--current-lnum-width lnum-width))
|
|
|
|
(setq-local tabulated-list--current-lnum-width lnum-width)
|
|
|
|
(tabulated-list-init-header)))))
|
2017-10-20 12:36:12 +03:00
|
|
|
|
2011-04-06 16:10:51 -04:00
|
|
|
;;; The mode definition:
|
|
|
|
|
|
|
|
(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
|
|
|
|
modes are derived from it, using `define-derived-mode'.
|
|
|
|
|
|
|
|
In this major mode, the buffer is divided into multiple columns,
|
2011-11-13 22:27:12 -08:00
|
|
|
which are labeled using the header line. Each non-empty line
|
2011-04-06 16:10:51 -04:00
|
|
|
belongs to one \"entry\", and the entries can be sorted according
|
|
|
|
to their column values.
|
|
|
|
|
|
|
|
An inheriting mode should usually do the following in their body:
|
|
|
|
|
|
|
|
- Set `tabulated-list-format', specifying the column format.
|
|
|
|
- Set `tabulated-list-revert-hook', if the buffer contents need
|
|
|
|
to be specially recomputed prior to `revert-buffer'.
|
|
|
|
- Maybe set a `tabulated-list-entries' function (see below).
|
|
|
|
- Maybe set `tabulated-list-printer' (see below).
|
|
|
|
- Maybe set `tabulated-list-padding'.
|
|
|
|
- Call `tabulated-list-init-header' to initialize `header-line-format'
|
|
|
|
according to `tabulated-list-format'.
|
|
|
|
|
|
|
|
An inheriting mode is usually accompanied by a \"list-FOO\"
|
|
|
|
command (e.g. `list-packages', `list-processes'). This command
|
|
|
|
creates or switches to a buffer and enables the major mode in
|
|
|
|
that buffer. If `tabulated-list-entries' is not a function, the
|
|
|
|
command should initialize it to a list of entries for displaying.
|
|
|
|
Finally, it should call `tabulated-list-print'.
|
|
|
|
|
|
|
|
`tabulated-list-print' calls the printer function specified by
|
|
|
|
`tabulated-list-printer', once for each entry. The default
|
|
|
|
printer is `tabulated-list-print-entry', but a mode that keeps
|
|
|
|
data in an ewoc may instead specify a printer function (e.g., one
|
|
|
|
that calls `ewoc-enter-last'), with `tabulated-list-print-entry'
|
|
|
|
as the ewoc pretty-printer."
|
2013-04-26 10:47:07 -04:00
|
|
|
(setq-local truncate-lines t)
|
|
|
|
(setq-local buffer-undo-list t)
|
|
|
|
(setq-local revert-buffer-function #'tabulated-list-revert)
|
2019-03-02 20:03:41 +01:00
|
|
|
(setq-local glyphless-char-display
|
|
|
|
(tabulated-list-make-glyphless-char-display-table))
|
2020-11-25 03:03:48 +01:00
|
|
|
(setq-local text-scale-remap-header-line t)
|
2014-10-14 22:29:47 +03:00
|
|
|
;; Avoid messing up the entries' display just because the first
|
|
|
|
;; column of the first entry happens to begin with a R2L letter.
|
2017-08-12 12:45:05 +03:00
|
|
|
(setq bidi-paragraph-direction 'left-to-right)
|
|
|
|
;; This is for if/when they turn on display-line-numbers
|
2017-10-20 12:36:12 +03:00
|
|
|
(add-hook 'display-line-numbers-mode-hook #'tabulated-list-revert nil t)
|
|
|
|
;; This is for if/when they customize the line-number face or when
|
|
|
|
;; the line-number width needs to change due to scrolling.
|
|
|
|
(setq-local tabulated-list--current-lnum-width 0)
|
|
|
|
(add-hook 'pre-redisplay-functions
|
2017-11-04 16:28:25 +02:00
|
|
|
#'tabulated-list-watch-line-number-width nil t)
|
|
|
|
(add-hook 'window-scroll-functions
|
|
|
|
#'tabulated-list-window-scroll-function nil t))
|
2011-04-06 16:10:51 -04:00
|
|
|
|
|
|
|
(put 'tabulated-list-mode 'mode-class 'special)
|
|
|
|
|
|
|
|
(provide 'tabulated-list)
|
|
|
|
|
|
|
|
;;; tabulated-list.el ends here
|