aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKatsumi Yamaoka2017-12-18 02:53:26 +0000
committerKatsumi Yamaoka2017-12-18 02:53:26 +0000
commita5b0a4e29243d3cf91e2b5cd365ae9ce0ae48726 (patch)
tree003dced04c4862237f097b78ad46df5a2bd75c96 /lisp
parentc51e797bbace83181a3c778ba610560e236ee62b (diff)
downloademacs-a5b0a4e29243d3cf91e2b5cd365ae9ce0ae48726.tar.gz
emacs-a5b0a4e29243d3cf91e2b5cd365ae9ce0ae48726.zip
* lisp/net/shr.el (shr-string-pixel-width): Return pixel-width,
not position (bug#29734).
Diffstat (limited to 'lisp')
-rw-r--r--lisp/net/shr.el9
1 files changed, 5 insertions, 4 deletions
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."
595 ;; shr-pixel-column uses save-window-excursion, which can reset 595 ;; shr-pixel-column uses save-window-excursion, which can reset
596 ;; point to 1. 596 ;; point to 1.
597 (let ((pt (point))) 597 (let ((pt (point)))
598 (with-temp-buffer 598 (prog1
599 (insert string) 599 (with-temp-buffer
600 (shr-pixel-column)) 600 (insert string)
601 (goto-char pt)))) 601 (shr-pixel-column))
602 (goto-char pt)))))
602 603
603(defsubst shr--translate-insertion-chars () 604(defsubst shr--translate-insertion-chars ()
604 ;; Remove soft hyphens. 605 ;; Remove soft hyphens.