Fix issues with dedicated windows in shr.el
* lisp/net/shr.el (shr-pixel-buffer-width, shr-render-td-1): Make the window not dedicated, to avoid errors if it was, before setting its buffer temporarily. (Bug#25828) Copyright-paperwork-exempt: yes
This commit is contained in:
parent
69dde0c54c
commit
43e792cd7f
1 changed files with 6 additions and 0 deletions
|
@ -2228,6 +2228,9 @@ flags that control whether to collect or render objects."
|
|||
(if (get-buffer-window)
|
||||
(car (window-text-pixel-size nil (point-min) (point-max)))
|
||||
(save-window-excursion
|
||||
;; Avoid errors if the selected window is a dedicated one,
|
||||
;; and they just want to insert a document into it.
|
||||
(set-window-dedicated-p nil nil)
|
||||
(set-window-buffer nil (current-buffer))
|
||||
(car (window-text-pixel-size nil (point-min) (point-max)))))))
|
||||
|
||||
|
@ -2271,6 +2274,9 @@ flags that control whether to collect or render objects."
|
|||
(shr-indentation 0))
|
||||
(shr-descend dom))
|
||||
(save-window-excursion
|
||||
;; Avoid errors if the selected window is a dedicated one,
|
||||
;; and they just want to insert a document into it.
|
||||
(set-window-dedicated-p nil nil)
|
||||
(set-window-buffer nil (current-buffer))
|
||||
(unless fill
|
||||
(setq natural-width
|
||||
|
|
Loading…
Add table
Reference in a new issue