Commit graph

29 commits

Author SHA1 Message Date
Paul Eggert
7e09ef09a4 Update copyright year to 2015
Run admin/update-copyright.
2015-01-01 14:26:41 -08:00
Glenn Morris
924a09e916 Merge from emacs-24; up to 2014-07-27T09:41:59Z!ttn@gnu.org 2014-10-14 19:42:58 -07:00
Eli Zaretskii
1d4795e866 Fix display of R2L entries in tabulated-list-mode.
lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode): Force
 bidi-paragraph-direction to 'left-to-right'.  This fixes
 buffer-menu display when the first buffer happens to start with
 R2L letter.
2014-10-14 22:29:47 +03:00
Mario Lang
4a81602043 * emacs-lisp/tabulated-list.el (tabulated-list-print): Only call
`recenter' if `current-buffer' is equal to `window-buffer'.
2014-06-06 02:39:22 +02:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Juanma Barranquero
18bb9e21f3 lisp/emacs-lisp/tabulated-list.el: Fix alignment problem with :pad-right = 0.
(tabulated-list-init-header): Don't skip aligning the next header field when
padding is 0; otherwise, field width is not respected unless the title is as
wide as the field.
2013-06-23 15:23:49 +02:00
Juanma Barranquero
4719912369 lisp/emacs-lisp/tabulated-list.el: Use defvar-local, setq-local.
(tabulated-list-format): Fix typo.  Declare with `defvar-local'.
(tabulated-list-use-header-line, tabulated-list-entries)
(tabulated-list-padding, tabulated-list-printer)
(tabulated-list-sort-key): Declare with `defvar-local'.
(tabulated-list-init-header, tabulated-list-print-fake-header):
Use `setq-local'.
2013-06-20 13:57:33 +02:00
Yann Hodique
469bfed936 * lisp/emacs-lisp/tabulated-list.el: Set a version number.
* lisp/emacs-lisp/package.el: Explicitly depend on a tabulated-list version.

Fixes: debbugs:14137
2013-05-14 00:35:21 -07:00
Stefan Monnier
140ef50c04 * lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode): Disable undo.
Fixes: debbugs:14274
2013-04-26 10:47:07 -04:00
Jonas Bernoulli
6b6d804b1e * emacs-lisp/tabulated-list.el (tabulated-list-print-col):
If col-desc already has help-echo, use it.

Fixes: debbugs:13563
2013-02-15 18:50:44 -08:00
Paul Eggert
ab422c4d68 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
Glenn Morris
267b82ff23 Standardize some more license notices 2012-09-24 09:36:42 -07:00
Chong Yidong
0ae03b6aae Adapt Electric Buffer Menu to recent Buffer Menu changes.
* lisp/ebuff-menu.el (electric-buffer-list): Put electric buffer menu
command descriptions in this docstring, instead of the docstring
of electric-buffer-menu-mode.  Code cleanups.
(electric-buffer-menu-mode): Use define-derived-mode.  Rename from
Electric-buffer-menu-mode.
(electric-buffer-update-highlight): Minor code cleanup.

* lisp/emacs-lisp/tabulated-list.el (tabulated-list-format)
(tabulated-list-entries, tabulated-list-padding)
(tabulated-list-sort-key): Make permanent-local.

Fixes: debbugs:11455
2012-05-13 22:23:45 +08:00
Stefan Monnier
f0809a9d05 * lisp/buff-menu.el (list-buffers--refresh): Mark `size' as right-align.
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header):
Handle new :right-align column property.
(tabulated-list-print-col): Idem, plus use `display' text-property to
try and preserve alignment for variable pitch fonts.
2012-05-07 12:29:55 -04:00
Chong Yidong
1241b724c8 Restore Buffer-menu-use-header-line functionality.
* lisp/emacs-lisp/tabulated-list.el: Add no-header-line alternative.
(tabulated-list-use-header-line): New var.
(tabulated-list-init-header): Use it.
(tabulated-list-print-fake-header): New function.
(tabulated-list-print): Use it.
(tabulated-list-sort-button-map): Add non-header-line commands.
(tabulated-list-init-header): Add column name property to basic
labels as well.
(tabulated-list-col-sort): Handle non-header-line button case.
(tabulated-list--sort-by-column-name): Fix a corner case.

* lisp/buff-menu.el (list-buffers--refresh): Handle
Buffer-menu-use-header-line.
2012-05-07 13:37:38 +08:00
Chong Yidong
e5f9458fe8 * 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
Chong Yidong
6632d36111 Improvements for Tabulated List mode.
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-format): Accept
additional plist in column descriptors.
(tabulated-list-init-header): Obey it.
(tabulated-list-get-entry): New function.
(tabulated-list-put-tag): Use it.  Use string-width instead of
length.
(tabulated-list--column-number): New function.
(tabulated-list-print): Use it.
(tabulated-list-print-col): New function.  Set
`tabulated-list-column-name' property on each column's text.
(tabulated-list-print-entry): Use it.
(tabulated-list-delete-entry, tabulated-list-set-col): New
functions.
(tabulated-list-sort-column): New command.

Fixes: debbugs:11337
2012-05-06 16:32:37 +08:00
Chong Yidong
2c070447bf * emacs-lisp/tabulated-list.el (tabulated-list-print): Fix typos. 2012-04-17 23:07:21 +08:00
Chong Yidong
f0bcceb995 Improve column width calculation in tabulated-list.el.
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-entry): Use
string-width and truncate-string-width to handle arbitrary
characters.
2012-03-20 23:44:45 +08:00
Glenn Morris
48da739227 Doc fix for lexical-binding being in line one.
Ref http://lists.gnu.org/archive/html/emacs-devel/2012-01/msg00543.html

* doc/lispref/variables.texi (Using Lexical Binding):
Mention that lexical-binding should be set in the first line.

* src/lread.c (syms_of_lread): Doc fix.

* lisp/emacs-lisp/tabulated-list.el, lisp/progmodes/f90.el:
Move lexical-binding file-local to line one.

* etc/NEWS: lexical-binding should be ine the first line.
2012-01-25 22:30:49 -08:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Juanma Barranquero
fe7a3057a3 Fix typos. 2011-11-20 20:35:27 +01:00
Paul Eggert
09e80d9fb9 Spelling fixes. 2011-11-13 22:27:12 -08:00
Chong Yidong
f635daa1e0 Add L and R categories to standard category table, and use them.
* lisp/international/characters.el: Add L and R categories.

* lisp/subr.el (bidi-string-mark-left-to-right): Rename from
string-mark-left-to-right.  Use category search.

* lisp/buff-menu.el (Buffer-menu-buffer+size): Callers changed.
2011-08-18 11:53:29 -04:00
Chong Yidong
3e26a4a28c New function `string-mark-left-to-right' for handling LRMs.
* lisp/subr.el (string-mark-left-to-right): New function.

* lisp/buff-menu.el (Buffer-menu-buffer+size): Remove LRM argument.
Use string-mark-left-to-right.
(list-buffers-noselect): Caller changed.

* lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-entry): Use
string-mark-left-to-right.
(tabulated-list-print): Recenter after moving point.
2011-08-10 15:03:56 -04:00
Chong Yidong
16a43933e8 Allow glyphless-char-display to distinguish between X and text terminals.
Use this for Tabulated List mode.

* lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode): Use a custom
glyphless-char-display table.
(tabulated-list-glyphless-char-display): New var.

* src/term.c (produce_glyphless_glyph): Handle cons cell entry in
glyphless-char-display.

* src/xdisp.c (lookup_glyphless_char_display)
(produce_glyphless_glyph): Handle cons cell entry in
glyphless-char-display.
(Vglyphless_char_display): Document it.
2011-04-18 19:21:31 -04:00
Leo Liu
37f1c9309e Fix typo in tabulated-list-print-entry 2011-04-10 22:21:26 +08:00
Chong Yidong
e67a13abd8 Remove list-processes C function; misc fixes to last change.
* src/process.c (Flist_processes): Removed to Lisp.
(list_processes_1): Deleted.

* lisp/emacs-lisp/cconv.el (cconv--analyse-use): Ignore "ignored" when
issuing unused warnings.

* lisp/emacs-lisp/tabulated-list.el (tabulated-list-print): Use lambda
macro directly.
2011-04-06 17:55:08 -04:00
Chong Yidong
a83ec3c99a * lisp/emacs-lisp/tabulated-list.el: New file. 2011-04-06 16:10:51 -04:00