diff options
author | Kenichi Handa <handa@m17n.org> | 2012-03-21 16:43:58 +0900 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2012-03-21 16:43:58 +0900 |
commit | 136220349968063bef3f249baddba30a24b52ec2 (patch) | |
tree | c9da83473ae16e2d2226523d16dfc5555d56b95c /lisp/emacs-lisp/tabulated-list.el | |
parent | 26090a2783518afc82bb907a28e32749542fead6 (diff) | |
parent | fb5b8aca9928223c3fef042f1de4b50cd08fde43 (diff) | |
download | emacs-136220349968063bef3f249baddba30a24b52ec2.tar.gz emacs-136220349968063bef3f249baddba30a24b52ec2.tar.bz2 emacs-136220349968063bef3f249baddba30a24b52ec2.zip |
merge trunk
Diffstat (limited to 'lisp/emacs-lisp/tabulated-list.el')
-rw-r--r-- | lisp/emacs-lisp/tabulated-list.el | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index 8fe514ab551..f17b12da6a0 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -278,11 +278,10 @@ of column descriptors." (width (nth 1 format)) (label (if (stringp desc) desc (car desc))) (help-echo (concat (car format) ": " label))) - ;; Truncate labels if necessary. - (and (> width 6) - (> (length label) width) - (setq label (concat (substring label 0 (- width 3)) - "..."))) + ;; Truncate labels if necessary (except last column). + (and (< (1+ n) len) + (> (string-width label) width) + (setq label (truncate-string-to-width label width nil nil t))) (setq label (bidi-string-mark-left-to-right label)) (if (stringp desc) (insert (propertize label 'help-echo help-echo)) |