emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 a725592: Avoid errors in shr-pixel-column due to


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-25 a725592: Avoid errors in shr-pixel-column due to dedicated windows
Date: Sun, 20 Nov 2016 19:09:42 +0000 (UTC)

branch: emacs-25
commit a725592db8824bb97d07e3897e800eee946757a3
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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)
---
 lisp/net/shr.el |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 2c8ff79..18bc7b8 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -518,6 +518,9 @@ size, and full-buffer size."
       (current-column)
     (if (not (get-buffer-window (current-buffer)))
        (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 (line-beginning-position) (point))))
       (car (window-text-pixel-size nil (line-beginning-position) (point))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]