]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix last change in subr-x.el
authorEli Zaretskii <eliz@gnu.org>
Sat, 31 Aug 2024 11:59:46 +0000 (14:59 +0300)
committerEshel Yaron <me@eshelyaron.com>
Wed, 4 Sep 2024 07:51:55 +0000 (09:51 +0200)
* lisp/emacs-lisp/subr-x.el (string-pixel-width): Remove
unnecessary call to 'erase-buffer'.  (Bug#72689)

(cherry picked from commit a9889b8eeceb4f1f7835be04f66d3c91c6f36621)

lisp/emacs-lisp/subr-x.el

index 83528f5c5dd4d23a2caa9d2e2e84f68206e9aa86..4cdb065feeb21f14295aad8187d7132ed5c91b1b 100644 (file)
@@ -405,7 +405,6 @@ determining the width."
                       (with-current-buffer buffer
                         face-remapping-alist))
         (kill-local-variable 'face-remapping-alist))
-      (erase-buffer)
       (insert string)
       ;; Prefer `remove-text-properties' to `propertize' to avoid
       ;; creating a new string on each call.