emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-26 a5b0a4e: * lisp/net/shr.el (shr-string-pixel-widt


From: Katsumi Yamaoka
Subject: [Emacs-diffs] emacs-26 a5b0a4e: * lisp/net/shr.el (shr-string-pixel-width): Return pixel-width,
Date: Sun, 17 Dec 2017 21:53:52 -0500 (EST)

branch: emacs-26
commit a5b0a4e29243d3cf91e2b5cd365ae9ce0ae48726
Author: Katsumi Yamaoka <address@hidden>
Commit: Katsumi Yamaoka <address@hidden>

    * lisp/net/shr.el (shr-string-pixel-width): Return pixel-width,
    not position (bug#29734).
---
 lisp/net/shr.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index c505f25..23f2ff7 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -595,10 +595,11 @@ size, and full-buffer size."
     ;; shr-pixel-column uses save-window-excursion, which can reset
     ;; point to 1.
     (let ((pt (point)))
-      (with-temp-buffer
-        (insert string)
-        (shr-pixel-column))
-      (goto-char pt))))
+      (prog1
+         (with-temp-buffer
+           (insert string)
+           (shr-pixel-column))
+       (goto-char pt)))))
 
 (defsubst shr--translate-insertion-chars ()
   ;; Remove soft hyphens.



reply via email to

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