* lisp/net/shr.el (shr-string-pixel-width): Return pixel-width,

not position (bug#29734).
This commit is contained in:
Katsumi Yamaoka 2017-12-18 02:53:26 +00:00
parent c51e797bba
commit a5b0a4e292

View file

@ -595,10 +595,11 @@ size, and full-buffer size."
;; shr-pixel-column uses save-window-excursion, which can reset ;; shr-pixel-column uses save-window-excursion, which can reset
;; point to 1. ;; point to 1.
(let ((pt (point))) (let ((pt (point)))
(prog1
(with-temp-buffer (with-temp-buffer
(insert string) (insert string)
(shr-pixel-column)) (shr-pixel-column))
(goto-char pt)))) (goto-char pt)))))
(defsubst shr--translate-insertion-chars () (defsubst shr--translate-insertion-chars ()
;; Remove soft hyphens. ;; Remove soft hyphens.