branch: elpa/hyperdrive commit 081513c89a072f159a351e3de51352575c3f4114 Author: Adam Porter <a...@alphapapa.net> Commit: Adam Porter <a...@alphapapa.net>
Tidy: (hyperdrive-handler-default) Use save-excursion --- hyperdrive-lib.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el index a982ce7bf1..62edca6ec7 100644 --- a/hyperdrive-lib.el +++ b/hyperdrive-lib.el @@ -1150,15 +1150,14 @@ If then, then call THEN with no arguments. Default handler." ;; same page (but ensure that reverting still works). (if (buffer-modified-p) (hyperdrive-message "Buffer modified: %S" (current-buffer)) - (let ((old-point (point))) + (save-excursion (with-silent-modifications (erase-buffer) (insert-buffer-substring response-buffer)) (setf buffer-undo-list nil buffer-read-only (or (not (hyperdrive-writablep hyperdrive)) version)) (set-buffer-modified-p nil) - (set-visited-file-modtime (current-time)) - (goto-char old-point))) + (set-visited-file-modtime (current-time)))) ;; TODO: Option to defer showing buffer. ;; It seems that `pop-to-buffer' is moving point, even ;; though it shouldn't, so we call it here, before going