diff options
| author | Richard M. Stallman | 1999-01-11 15:25:41 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1999-01-11 15:25:41 +0000 |
| commit | e48143f0fd269fca8332f0207549bf12ae9b95b2 (patch) | |
| tree | 2b0f216e34236c9d946328ecd1dede325b417161 | |
| parent | 49464a309baebea75b0688602f0600eea927aa24 (diff) | |
| download | emacs-e48143f0fd269fca8332f0207549bf12ae9b95b2.tar.gz emacs-e48143f0fd269fca8332f0207549bf12ae9b95b2.zip | |
(help-mode-finish): Renamed from help-mode-maybe.
Don't switch to Help mode here.
(temp-buffer-setup-hook): Use help-mode-finish.
(help-mode-setup): New function.
(temp-buffer-setup-hook): Use help-mode-setup.
| -rw-r--r-- | lisp/help.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/help.el b/lisp/help.el index 2aef6283042..821e8e7e078 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -154,9 +154,13 @@ Commands: | |||
| 154 | ;; `help-mode-maybe'. | 154 | ;; `help-mode-maybe'. |
| 155 | (run-hooks 'help-mode-hook)) | 155 | (run-hooks 'help-mode-hook)) |
| 156 | 156 | ||
| 157 | (defun help-mode-maybe () | 157 | (defun help-mode-setup () |
| 158 | (if (eq major-mode 'fundamental-mode) | 158 | (help-mode) |
| 159 | (help-mode)) | 159 | (setq buffer-read-only nil)) |
| 160 | |||
| 161 | (add-hook 'temp-buffer-setup-hook 'help-mode-setup) | ||
| 162 | |||
| 163 | (defun help-mode-finish () | ||
| 160 | (when (eq major-mode 'help-mode) | 164 | (when (eq major-mode 'help-mode) |
| 161 | ;; View mode's read-only status of existing *Help* buffer is lost | 165 | ;; View mode's read-only status of existing *Help* buffer is lost |
| 162 | ;; by with-output-to-temp-buffer. | 166 | ;; by with-output-to-temp-buffer. |
| @@ -165,7 +169,7 @@ Commands: | |||
| 165 | (setq view-return-to-alist | 169 | (setq view-return-to-alist |
| 166 | (list (cons (selected-window) help-return-method)))) | 170 | (list (cons (selected-window) help-return-method)))) |
| 167 | 171 | ||
| 168 | (add-hook 'temp-buffer-show-hook 'help-mode-maybe) | 172 | (add-hook 'temp-buffer-show-hook 'help-mode-finish) |
| 169 | 173 | ||
| 170 | (defun help-quit () | 174 | (defun help-quit () |
| 171 | "Just exit from the Help command's command loop." | 175 | "Just exit from the Help command's command loop." |