From 3e26a4a28c6ad382f3bea07a1a6e0175ed8acdc6 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 10 Aug 2011 15:03:56 -0400 Subject: 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. --- lisp/emacs-lisp/tabulated-list.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lisp/emacs-lisp') 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))) -- cgit v1.2.3