summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/tabulated-list.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2011-08-10 15:03:56 -0400
committerChong Yidong <cyd@stupidchicken.com>2011-08-10 15:03:56 -0400
commit3e26a4a28c6ad382f3bea07a1a6e0175ed8acdc6 (patch)
treee5b61892f81417d3af99a4b28e2153e55b0f8b7d /lisp/emacs-lisp/tabulated-list.el
parentac8cf6e698c4612dc3ed195dbf1348db67f59fe5 (diff)
downloademacs-3e26a4a28c6ad382f3bea07a1a6e0175ed8acdc6.tar.gz
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.
Diffstat (limited to 'lisp/emacs-lisp/tabulated-list.el')
-rw-r--r--lisp/emacs-lisp/tabulated-list.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index 2fdfa9525b1..9b485b58608 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -258,7 +258,8 @@ to the entry with the same ID element as the current line."
;; If REMEMBER-POS was specified, move to the "old" location.
(if saved-pt
(progn (goto-char saved-pt)
- (move-to-column saved-col))
+ (move-to-column saved-col)
+ (recenter))
(goto-char (point-min)))))
(defun tabulated-list-print-entry (id cols)
@@ -282,6 +283,7 @@ of column descriptors."
(> (length label) width)
(setq label (concat (substring label 0 (- width 3))
"...")))
+ (setq label (string-mark-left-to-right label))
(if (stringp desc)
(insert (propertize label 'help-echo help-echo))
(apply 'insert-text-button label (cdr desc)))