Mercurial > emacs
comparison lisp/help.el @ 67279:8cf27ba1d450
(print-help-return-message): If pop-up-frames is non-nil, set up
help-return-method to delete the help window and, possibly, its frame as well. Doc fix.
(help-return-method): Doc fix.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 03 Dec 2005 11:51:39 +0000 |
parents | 1a4439fe2adc |
children | 409eae14f7d9 |
comparison
equal
deleted
inserted
replaced
67278:cf00aa89f148 | 67279:8cf27ba1d450 |
---|---|
109 nil) | 109 nil) |
110 | 110 |
111 (defvar help-return-method nil | 111 (defvar help-return-method nil |
112 "What to do to \"exit\" the help buffer. | 112 "What to do to \"exit\" the help buffer. |
113 This is a list | 113 This is a list |
114 (WINDOW . t) delete the selected window, go to WINDOW. | 114 (WINDOW . t) delete the selected window (and possibly its frame, |
115 see `quit-window' and `View-quit'), go to WINDOW. | |
115 (WINDOW . quit-window) do quit-window, then select WINDOW. | 116 (WINDOW . quit-window) do quit-window, then select WINDOW. |
116 (WINDOW BUF START POINT) display BUF at START, POINT, then select WINDOW.") | 117 (WINDOW BUF START POINT) display BUF at START, POINT, then select WINDOW.") |
117 | 118 |
118 (defun print-help-return-message (&optional function) | 119 (defun print-help-return-message (&optional function) |
119 "Display or return message saying how to restore windows after help command. | 120 "Display or return message saying how to restore windows after help command. |
120 This function assumes that `standard-output' is the help buffer. | 121 This function assumes that `standard-output' is the help buffer. |
121 It computes a message, and applies the optional argument FUNCTION to it. | 122 It computes a message, and applies the optional argument FUNCTION to it. |
122 If FUNCTION is nil, it applies `message', thus displaying the message." | 123 If FUNCTION is nil, it applies `message', thus displaying the message. |
124 In addition, this function sets up `help-return-method', which see, that | |
125 specifies what to do when the user exits the help buffer." | |
123 (and (not (get-buffer-window standard-output)) | 126 (and (not (get-buffer-window standard-output)) |
124 (let ((first-message | 127 (let ((first-message |
125 (cond ((special-display-p (buffer-name standard-output)) | 128 (cond ((or |
129 pop-up-frames | |
130 (special-display-p (buffer-name standard-output))) | |
126 (setq help-return-method (cons (selected-window) t)) | 131 (setq help-return-method (cons (selected-window) t)) |
127 ;; If the help output buffer is a special display buffer, | 132 ;; If the help output buffer is a special display buffer, |
128 ;; don't say anything about how to get rid of it. | 133 ;; don't say anything about how to get rid of it. |
129 ;; First of all, the user will do that with the window | 134 ;; First of all, the user will do that with the window |
130 ;; manager, not with Emacs. | 135 ;; manager, not with Emacs. |