aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-03-14 16:02:05 +0000
committerRichard M. Stallman1994-03-14 16:02:05 +0000
commitbd0d2c58e1b6ed25aed108e820abd9e60256cf13 (patch)
tree91b3df988dcd01275b6631facc0b0ffccd60a561
parenta1ba17616db0131c4e7d7eca746532fe03b86620 (diff)
downloademacs-bd0d2c58e1b6ed25aed108e820abd9e60256cf13.tar.gz
emacs-bd0d2c58e1b6ed25aed108e820abd9e60256cf13.zip
(view-mode): Run view-mode-hook as well as view-hook.
(view-mode-hook): New defvar.
-rw-r--r--lisp/view.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/view.el b/lisp/view.el
index 1ecd68728dd..35e6223875d 100644
--- a/lisp/view.el
+++ b/lisp/view.el
@@ -106,7 +106,7 @@ are defined for moving around in the buffer.
106Space scrolls forward, Delete scrolls backward. 106Space scrolls forward, Delete scrolls backward.
107For list of all View commands, type ? or h while viewing. 107For list of all View commands, type ? or h while viewing.
108 108
109This command runs the normal hook `view-hook'." 109This command runs the normal hook `view-mode-hook'."
110 (interactive "fView file: ") 110 (interactive "fView file: ")
111 (let ((old-buf (current-buffer)) 111 (let ((old-buf (current-buffer))
112 (had-a-buf (get-file-buffer file-name)) 112 (had-a-buf (get-file-buffer file-name))
@@ -126,7 +126,7 @@ are defined for moving around in the buffer.
126Space scrolls forward, Delete scrolls backward. 126Space scrolls forward, Delete scrolls backward.
127For list of all View commands, type ? or h while viewing. 127For list of all View commands, type ? or h while viewing.
128 128
129This command runs the normal hook `view-hook'." 129This command runs the normal hook `view-mode-hook'."
130 (interactive "fView file: ") 130 (interactive "fView file: ")
131 (let ((old-arrangement (current-window-configuration)) 131 (let ((old-arrangement (current-window-configuration))
132 (had-a-buf (get-file-buffer file-name)) 132 (had-a-buf (get-file-buffer file-name))
@@ -145,7 +145,7 @@ are defined for moving around in the buffer.
145Space scrolls forward, Delete scrolls backward. 145Space scrolls forward, Delete scrolls backward.
146For list of all View commands, type ? or h while viewing. 146For list of all View commands, type ? or h while viewing.
147 147
148This command runs the normal hook `view-hook'." 148This command runs the normal hook `view-mode-hook'."
149 (interactive "bView buffer: ") 149 (interactive "bView buffer: ")
150 (let ((old-buf (current-buffer))) 150 (let ((old-buf (current-buffer)))
151 (switch-to-buffer buffer-name t) 151 (switch-to-buffer buffer-name t)
@@ -163,7 +163,7 @@ are defined for moving around in the buffer.
163Space scrolls forward, Delete scrolls backward. 163Space scrolls forward, Delete scrolls backward.
164For list of all View commands, type ? or h while viewing. 164For list of all View commands, type ? or h while viewing.
165 165
166This command runs the normal hook `view-hook'." 166This command runs the normal hook `view-mode-hook'."
167 (interactive "bView buffer:\nP") 167 (interactive "bView buffer:\nP")
168 (let ((return-to (and not-return (current-window-configuration)))) 168 (let ((return-to (and not-return (current-window-configuration))))
169 (switch-to-buffer-other-window buffer-name) 169 (switch-to-buffer-other-window buffer-name)
@@ -205,7 +205,7 @@ C-p moves upward lines vertically.
205C-l recenters the screen. 205C-l recenters the screen.
206q or C-c exit view-mode and return to previous buffer. 206q or C-c exit view-mode and return to previous buffer.
207 207
208Entry to this mode runs the normal hook `view-hook'. 208Entry to this mode runs the normal hook `view-mode-hook'.
209 209
210\\{view-mode-map}" 210\\{view-mode-map}"
211; Not interactive because dangerous things happen 211; Not interactive because dangerous things happen
@@ -257,7 +257,7 @@ Entry to this mode runs the normal hook `view-hook'.
257 (setq goal-column nil) 257 (setq goal-column nil)
258 258
259 (use-local-map view-mode-map) 259 (use-local-map view-mode-map)
260 (run-hooks 'view-hook) 260 (run-hooks 'view-hook 'view-mode-hook)
261 (view-helpful-message)) 261 (view-helpful-message))
262 262
263 263
@@ -305,6 +305,9 @@ If you viewed a file that was not present in Emacs, its buffer is killed."
305(defvar view-hook nil 305(defvar view-hook nil
306 "Normal hook run when starting to view a buffer or file.") 306 "Normal hook run when starting to view a buffer or file.")
307 307
308(defvar view-mode-hook nil
309 "Normal hook run when starting to view a buffer or file.")
310
308;(defun view-last-command (&optional who what) 311;(defun view-last-command (&optional who what)
309; (setq view-last-command-entry this-command) 312; (setq view-last-command-entry this-command)
310; (setq view-last-command who) 313; (setq view-last-command who)