aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-04-26 04:09:09 +0000
committerRichard M. Stallman1998-04-26 04:09:09 +0000
commit7f9fcc0f575acde4bbbfd696274784d8db17912e (patch)
tree24b06fe11c9d93b3555043c8902fa37aca110ee7
parent929e120a17db7124f0da3320bfd491e5ad71c1f5 (diff)
downloademacs-7f9fcc0f575acde4bbbfd696274784d8db17912e.tar.gz
emacs-7f9fcc0f575acde4bbbfd696274784d8db17912e.zip
(view-mode-exit): Don't alter view-return-to-alist.
(view-mode-enter, view-mode-exit): Doc fixes.
-rw-r--r--lisp/view.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/view.el b/lisp/view.el
index f2ee76f2e22..1f6c8f42ac2 100644
--- a/lisp/view.el
+++ b/lisp/view.el
@@ -461,7 +461,7 @@ Entry to view-mode runs the normal hook `view-mode-hook'."
461(defun view-mode-enter (&optional return-to exit-action) "\ 461(defun view-mode-enter (&optional return-to exit-action) "\
462Enter View mode and set up exit from view mode depending on optional arguments. 462Enter View mode and set up exit from view mode depending on optional arguments.
463If RETURN-TO is non-nil it is added as an element to the buffer local alist 463If RETURN-TO is non-nil it is added as an element to the buffer local alist
464view-return-to-alist. 464`view-return-to-alist'.
465Save EXIT-ACTION in buffer local variable `view-exit-action'. 465Save EXIT-ACTION in buffer local variable `view-exit-action'.
466It should be either nil or a function that takes a buffer as argument. 466It should be either nil or a function that takes a buffer as argument.
467This function will be called by `view-mode-exit'. 467This function will be called by `view-mode-exit'.
@@ -493,7 +493,7 @@ This function runs the normal hook `view-mode-hook'."
493Type \\[help-command] for help, \\[describe-mode] for commands, \\[View-quit] to quit.")))) 493Type \\[help-command] for help, \\[describe-mode] for commands, \\[View-quit] to quit."))))
494 494
495(defun view-mode-exit (&optional return-to-alist exit-action all-win) 495(defun view-mode-exit (&optional return-to-alist exit-action all-win)
496 "Exit view-mode in various ways, depending on optional arguments. 496 "Exit View mode in various ways, depending on optional arguments.
497RETURN-TO-ALIST, EXIT-ACTION and ALL-WIN determine what to do after exit. 497RETURN-TO-ALIST, EXIT-ACTION and ALL-WIN determine what to do after exit.
498EXIT-ACTION is nil or a function that is called with current buffer as 498EXIT-ACTION is nil or a function that is called with current buffer as
499argument. 499argument.
@@ -560,7 +560,11 @@ corresponding OLD-WINDOW is a live window, then select OLD-WINDOW."
560 (if view-remove-frame-by-deleting 560 (if view-remove-frame-by-deleting
561 (delete-frame frame) 561 (delete-frame frame)
562 (iconify-frame frame)))))) 562 (iconify-frame frame))))))
563 (setq view-return-to-alist (delete (car alist) view-return-to-alist)) 563 ;; Altering view-return-to-alist causes trouble when
564 ;; the user deiconifies the frame, then types q again.
565 ;; If we leave view-return-to-alist unchanged, that
566 ;; iconifies the frame again, as expected.
567;;; (setq view-return-to-alist (delete (car alist) view-return-to-alist))
564 (setq alist (cdr alist))) 568 (setq alist (cdr alist)))
565 (if (window-live-p old-window) ; still existing window 569 (if (window-live-p old-window) ; still existing window
566 (select-window old-window)) 570 (select-window old-window))