]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/net/shr.el (shr-string-pixel-width): Return pixel-width,
authorKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 18 Dec 2017 02:53:26 +0000 (02:53 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 18 Dec 2017 02:53:26 +0000 (02:53 +0000)
not position (bug#29734).

lisp/net/shr.el

index c505f25a5a945bd4ea1070f2ab9a46af1223ed82..23f2ff75fabc6698da3e33398d6c67c53ceb1c27 100644 (file)
@@ -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.