From: Katsumi Yamaoka Date: Mon, 18 Dec 2017 02:53:26 +0000 (+0000) Subject: * lisp/net/shr.el (shr-string-pixel-width): Return pixel-width, X-Git-Tag: emacs-26.0.91~114 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a5b0a4e;p=emacs.git * lisp/net/shr.el (shr-string-pixel-width): Return pixel-width, not position (bug#29734). --- diff --git a/lisp/net/shr.el b/lisp/net/shr.el index c505f25a5a9..23f2ff75fab 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.