Mercurial > emacs
comparison lisp/view.el @ 19229:e272bd93c93c
(view-just-bury): New variable.
(view-mode-exit): Obey it.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 08 Aug 1997 22:26:02 +0000 |
parents | 7cf9cdba062d |
children | d7a4b38557f3 |
comparison
equal
deleted
inserted
replaced
19228:3e0e9b7e2307 | 19229:e272bd93c93c |
---|---|
117 "nil or a function with one argument (a buffer) called when finished viewing. | 117 "nil or a function with one argument (a buffer) called when finished viewing. |
118 This is local in each buffer being viewed. | 118 This is local in each buffer being viewed. |
119 The \\[view-file] and \\[view-file-other-window] commands may set this to | 119 The \\[view-file] and \\[view-file-other-window] commands may set this to |
120 `kill-buffer'.") | 120 `kill-buffer'.") |
121 (make-variable-buffer-local 'view-exit-action) | 121 (make-variable-buffer-local 'view-exit-action) |
122 | |
123 (defvar view-no-disable-on-exit nil | |
124 "If non-nil, View mode \"exit\" commands don't actually disable View mode. | |
125 Instead, these commands just switch buffers or windows. | |
126 This is set in certain buffers by specialized features such as help commands | |
127 that use View mode automatically.") | |
122 | 128 |
123 (defvar view-overlay nil | 129 (defvar view-overlay nil |
124 "Overlay used to display where a search operation found its match. | 130 "Overlay used to display where a search operation found its match. |
125 This is local in each buffer, once it is used.") | 131 This is local in each buffer, once it is used.") |
126 (make-variable-buffer-local 'view-overlay) | 132 (make-variable-buffer-local 'view-overlay) |
505 (setq a (assq old-window alist))) | 511 (setq a (assq old-window alist))) |
506 (setq c (1- c)) | 512 (setq c (1- c)) |
507 (setq old-window (car (cdr a)))) | 513 (setq old-window (car (cdr a)))) |
508 (if (or (zerop c) (not (window-live-p old-window))) | 514 (if (or (zerop c) (not (window-live-p old-window))) |
509 (setq old-window (selected-window))))) | 515 (setq old-window (selected-window))))) |
510 (view-mode-disable) | 516 (or view-no-disable-on-exit |
517 (view-mode-disable)) | |
511 (while alist ; Restore windows with info. | 518 (while alist ; Restore windows with info. |
512 (if (and (window-live-p (setq window (car (car alist)))) | 519 (if (and (window-live-p (setq window (car (car alist)))) |
513 (eq buffer (window-buffer window))) | 520 (eq buffer (window-buffer window))) |
514 (let ((frame (window-frame window)) | 521 (let ((frame (window-frame window)) |
515 (old-buf-info (cdr (cdr (car alist))))) | 522 (old-buf-info (cdr (cdr (car alist))))) |