emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] emacs-26 f274cbd: Avoid reordering of output in 'shr-i


From: Eli Zaretskii
Subject: Re: [Emacs-diffs] emacs-26 f274cbd: Avoid reordering of output in 'shr-insert-document'
Date: Sun, 17 Dec 2017 22:22:34 +0200

> Date: Sun, 17 Dec 2017 18:54:05 +0100
> From: martin rudalics <address@hidden>
> Cc: address@hidden
> 
>      (if (not (get-buffer-window (current-buffer)))
>          (let ((window-point (window-point)))
>            (prog1
>                (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))))
>              (set-window-point nil window-point)))

If we do that, then why use save-window-excursion in the first place?
That's what it's supposed to preserve (among other things), right?
If it doesn't do that much, let's do its job by hand altogether.  (And
then, of course, a few years down the line someone will come and ask
herself why don't they just use save-window-excursion.)



reply via email to

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