emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111201: * lisp/mpc.el (mpc-format):


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111201: * lisp/mpc.el (mpc-format): Use truncate-string-to-width.
Date: Wed, 12 Dec 2012 09:42:03 -0500
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111201
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13143
author: David Cadé <address@hidden>
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Wed 2012-12-12 09:42:03 -0500
message:
  * lisp/mpc.el (mpc-format): Use truncate-string-to-width.
modified:
  lisp/ChangeLog
  lisp/mpc.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-12-12 02:16:05 +0000
+++ b/lisp/ChangeLog    2012-12-12 14:42:03 +0000
@@ -1,3 +1,7 @@
+2012-12-12  David Cadé  <address@hidden>
+
+       * mpc.el (mpc-format): Use truncate-string-to-width (bug#13143).
+
 2012-12-12  Jonas Bernoulli  <address@hidden>
 
        * lisp/emacs-lisp/eieio.el: Prettier object pretty-printing (bug#13115).

=== modified file 'lisp/mpc.el'
--- a/lisp/mpc.el       2012-08-15 16:29:11 +0000
+++ b/lisp/mpc.el       2012-12-12 14:42:03 +0000
@@ -1034,11 +1034,8 @@
             (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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]