diff options
| author | Eli Zaretskii | 2016-11-20 21:08:47 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2016-11-20 21:08:47 +0200 |
| commit | a725592db8824bb97d07e3897e800eee946757a3 (patch) | |
| tree | c6dc53965caa449070bcff430e395d017dcc68a1 | |
| parent | 3138598dd87d3578cee220436d1c7857a9aca896 (diff) | |
| download | emacs-a725592db8824bb97d07e3897e800eee946757a3.tar.gz emacs-a725592db8824bb97d07e3897e800eee946757a3.zip | |
Avoid errors in shr-pixel-column due to dedicated windows
* lisp/net/shr.el (shr-pixel-column): If we are switching to
another buffer in the selected window, make that window
temporarily non-dedicated. (Bug#24950)
| -rw-r--r-- | lisp/net/shr.el | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 2c8ff79763f..18bc7b86715 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el | |||
| @@ -518,6 +518,9 @@ size, and full-buffer size." | |||
| 518 | (current-column) | 518 | (current-column) |
| 519 | (if (not (get-buffer-window (current-buffer))) | 519 | (if (not (get-buffer-window (current-buffer))) |
| 520 | (save-window-excursion | 520 | (save-window-excursion |
| 521 | ;; Avoid errors if the selected window is a dedicated one, | ||
| 522 | ;; and they just want to insert a document into it. | ||
| 523 | (set-window-dedicated-p nil nil) | ||
| 521 | (set-window-buffer nil (current-buffer)) | 524 | (set-window-buffer nil (current-buffer)) |
| 522 | (car (window-text-pixel-size nil (line-beginning-position) (point)))) | 525 | (car (window-text-pixel-size nil (line-beginning-position) (point)))) |
| 523 | (car (window-text-pixel-size nil (line-beginning-position) (point)))))) | 526 | (car (window-text-pixel-size nil (line-beginning-position) (point)))))) |