]> git.eshelyaron.com Git - emacs.git/commitdiff
; Revert "Make `so-long' restore `view-mode'"
authorPhil Sainty <psainty@orcon.net.nz>
Fri, 30 Jul 2021 01:46:00 +0000 (13:46 +1200)
committerPhil Sainty <psainty@orcon.net.nz>
Tue, 3 Aug 2021 11:20:07 +0000 (23:20 +1200)
This reverts commit 3c2db0c541491fceb7081d5b54de5abec25e2f4b.

A more general solution to bug#45084 has been implemented via
new user options `so-long-mode-preserved-variables' and
`so-long-mode-preserved-minor-modes'.

See the previous commit (before this revert) for details.

lisp/so-long.el

index a74a9200dec9837d5742c1297105eea413edad22..5b7086d78f5b7fbac8613155396426db44d6647a 100644 (file)
@@ -1758,8 +1758,7 @@ invoking the new action."
     (when so-long--active
       (so-long-revert))
     ;; Invoke the new action.
-    (let ((so-long--calling t)
-          (view-mode-active view-mode))
+    (let ((so-long--calling t))
       (so-long--ensure-enabled)
       ;; ACTION takes precedence if supplied.
       (when action
@@ -1788,10 +1787,7 @@ invoking the new action."
       ;; functions need to modify the buffer.  We use `inhibit-read-only' to
       ;; side-step the issue (and likewise in `so-long-revert').
       (let ((inhibit-read-only t))
-        (run-hooks 'so-long-hook))
-      ;; Restore `view-mode'.
-      (when view-mode-active
-        (view-mode)))))
+        (run-hooks 'so-long-hook)))))
 
 (defun so-long-revert ()
   "Revert the active `so-long-action' and run `so-long-revert-hook'.