diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-12-12 09:39:39 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-12-12 09:39:39 -0500 |
commit | c003b5d7e29f2b7c3c340d4aa851a61cfa481ec8 (patch) | |
tree | 28b8a55913e35354ef32b9b8e7a9d762444561af | |
parent | a5181e2ad4f6ea6a9b5fd0adbab16131eeb75a7c (diff) | |
download | emacs-lost+found/c003b5d7e29f2b7c3c340d4aa851a61cfa481ec8.tar.gz |
* lisp/mpc.el (mpc-format): Use truncate-string-to-width.lost+found/c003b5d7e29f2b7c3c340d4aa851a61cfa481ec8
-rw-r--r-- | lisp/ChangeLog | 4 | ||||
-rw-r--r-- | lisp/mpc.el | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 516ec667aa6..92f4138b643 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-12-12 Stefan Monnier <monnier@iro.umontreal.ca> + + * mpc.el (mpc-format): Use truncate-string-to-width (bug#13143). + 2012-12-12 Jonas Bernoulli <jonas@bernoul.li> * lisp/emacs-lisp/eieio.el: Prettier object pretty-printing (bug#13115). diff --git a/lisp/mpc.el b/lisp/mpc.el index e8b5c50e561..65363de40f3 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -1034,11 +1034,8 @@ If PLAYLIST is t or nil or missing, use the main playlist." (let ((display (if (and size (> (+ postwidth textwidth) size)) - ;; This doesn't even obey double-width chars :-( (propertize - (if (zerop (- size postwidth 1)) - (substring text 0 1) - (concat (substring text 0 (- size postwidth textwidth 1)) "…")) + (truncate-string-to-width text size nil nil "…") 'help-echo text) text))) (when (memq tag '(Artist Album Composer)) ;FIXME: wrong list. |