diff options
| author | David Cadé | 2012-12-12 09:42:03 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2012-12-12 09:42:03 -0500 |
| commit | fd49a2185ff4f1710bc337168fd15af91064a74e (patch) | |
| tree | 4899e44429ed266148b412cde69321d312712d76 | |
| parent | 4a9a8f1387fc4ed34a042ac9dfa66e79b59c55d7 (diff) | |
| download | emacs-fd49a2185ff4f1710bc337168fd15af91064a74e.tar.gz emacs-fd49a2185ff4f1710bc337168fd15af91064a74e.zip | |
* lisp/mpc.el (mpc-format): Use truncate-string-to-width.
Fixes: debbugs:13143
| -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 49e129cd77a..a5fab65b34f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-12-12 David Cadé <codename68@gmail.com> | ||
| 2 | |||
| 3 | * mpc.el (mpc-format): Use truncate-string-to-width (bug#13143). | ||
| 4 | |||
| 1 | 2012-12-12 Jonas Bernoulli <jonas@bernoul.li> | 5 | 2012-12-12 Jonas Bernoulli <jonas@bernoul.li> |
| 2 | 6 | ||
| 3 | * lisp/emacs-lisp/eieio.el: Prettier object pretty-printing (bug#13115). | 7 | * 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." | |||
| 1034 | (let ((display | 1034 | (let ((display |
| 1035 | (if (and size | 1035 | (if (and size |
| 1036 | (> (+ postwidth textwidth) size)) | 1036 | (> (+ postwidth textwidth) size)) |
| 1037 | ;; This doesn't even obey double-width chars :-( | ||
| 1038 | (propertize | 1037 | (propertize |
| 1039 | (if (zerop (- size postwidth 1)) | 1038 | (truncate-string-to-width text size nil nil "…") |
| 1040 | (substring text 0 1) | ||
| 1041 | (concat (substring text 0 (- size postwidth textwidth 1)) "…")) | ||
| 1042 | 'help-echo text) | 1039 | 'help-echo text) |
| 1043 | text))) | 1040 | text))) |
| 1044 | (when (memq tag '(Artist Album Composer)) ;FIXME: wrong list. | 1041 | (when (memq tag '(Artist Album Composer)) ;FIXME: wrong list. |