aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2016-01-19 19:09:45 -0500
committerGlenn Morris2016-01-19 19:09:45 -0500
commit96f6cace6bd088c8a49892502354272eb9d1a702 (patch)
treec19b4552b0258ace2b5f739337260c88ee31bbb9
parent833d53b98bb3ea037fb15d2bac855a47fa00639d (diff)
downloademacs-96f6cace6bd088c8a49892502354272eb9d1a702.tar.gz
emacs-96f6cace6bd088c8a49892502354272eb9d1a702.zip
Don't hard-code 1 as point-min.
* lisp/image-mode.el (image-display-size): * lisp/xwidget.el (xwidget-webkit-last-session) (xwidget-webkit-current-session): Don't hard-code 1 as point-min.
-rw-r--r--lisp/image-mode.el2
-rw-r--r--lisp/xwidget.el6
2 files changed, 3 insertions, 5 deletions
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 38a25d2b7a6..e549b49001e 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -169,7 +169,7 @@ return the display size taking the slice property into account. If the list
169contains `image' but not `slice', return the `image-size' of the specified 169contains `image' but not `slice', return the `image-size' of the specified
170image." 170image."
171 (cond ((eq (car spec) 'xwidget) 171 (cond ((eq (car spec) 'xwidget)
172 (let ((xwi (xwidget-info (xwidget-at 1)))) ; FIXME point-min? 172 (let ((xwi (xwidget-info (xwidget-at (point-min)))))
173 (cons (aref xwi 2) (aref xwi 3)))) 173 (cons (aref xwi 2) (aref xwi 3))))
174 ((eq (car spec) 'image) 174 ((eq (car spec) 'image)
175 (image-size spec pixels frame)) 175 (image-size spec pixels frame))
diff --git a/lisp/xwidget.el b/lisp/xwidget.el
index 223f4f290b2..0fb90c4573c 100644
--- a/lisp/xwidget.el
+++ b/lisp/xwidget.el
@@ -245,15 +245,13 @@ XWIDGET instance, XWIDGET-EVENT-TYPE depends on the originating xwidget."
245 "Last active webkit, or nil." 245 "Last active webkit, or nil."
246 (if (buffer-live-p xwidget-webkit-last-session-buffer) 246 (if (buffer-live-p xwidget-webkit-last-session-buffer)
247 (with-current-buffer xwidget-webkit-last-session-buffer 247 (with-current-buffer xwidget-webkit-last-session-buffer
248 (xwidget-at 1)) 248 (xwidget-at (point-min)))
249 nil)) 249 nil))
250 250
251(defun xwidget-webkit-current-session () 251(defun xwidget-webkit-current-session ()
252 "Either the webkit in the current buffer, or the last one used. 252 "Either the webkit in the current buffer, or the last one used.
253The latter might be nil." 253The latter might be nil."
254 (if (xwidget-at 1) 254 (or (xwidget-at (point-min)) (xwidget-webkit-last-session)))
255 (xwidget-at 1)
256 (xwidget-webkit-last-session)))
257 255
258(defun xwidget-adjust-size-to-content (xw) 256(defun xwidget-adjust-size-to-content (xw)
259 "Resize XW to content." 257 "Resize XW to content."