diff options
| author | Eli Zaretskii | 2008-08-28 20:05:54 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2008-08-28 20:05:54 +0000 |
| commit | 236086405572017a5f71331550a8a94fd5751fbe (patch) | |
| tree | 6a6dfc6d4c73ccc7dcf02c44ee452b5f4ad9452a | |
| parent | f412b18032222efa50ea2af198e9e5ab7c859054 (diff) | |
| download | emacs-236086405572017a5f71331550a8a94fd5751fbe.tar.gz emacs-236086405572017a5f71331550a8a94fd5751fbe.zip | |
(msdos-previous-message): New variable.
(msdos-show-help): New function.
(msdos-initialize-window-system): Set show-help-function to msdos-show-help.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/term/pc-win.el | 27 |
2 files changed, 34 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bb130c2f1e0..e8c93592c02 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2008-08-28 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * term/pc-win.el (msdos-previous-message): New variable. | ||
| 4 | (msdos-show-help): New function. | ||
| 5 | (msdos-initialize-window-system): Set show-help-function to | ||
| 6 | msdos-show-help. | ||
| 7 | x | ||
| 1 | 2008-04-09 Lennart Borgman <lennart.borgman@gmail.com> | 8 | 2008-04-09 Lennart Borgman <lennart.borgman@gmail.com> |
| 2 | 9 | ||
| 3 | * emacs-lisp/debug.el (debug): When killing a noninteractive | 10 | * emacs-lisp/debug.el (debug): When killing a noninteractive |
diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el index 87a37f31d88..2e9ce0d27a6 100644 --- a/lisp/term/pc-win.el +++ b/lisp/term/pc-win.el | |||
| @@ -255,6 +255,31 @@ are fixed-pitch." | |||
| 255 | (fset 'set-cursor-color 'ignore) ; Hardware determined by char under. | 255 | (fset 'set-cursor-color 'ignore) ; Hardware determined by char under. |
| 256 | (fset 'set-border-color 'ignore) ; Not useful. | 256 | (fset 'set-border-color 'ignore) ; Not useful. |
| 257 | 257 | ||
| 258 | (defvar msdos-previous-message nil | ||
| 259 | "The content of the echo area before help echo was displayed.") | ||
| 260 | |||
| 261 | (defun msdos-show-help (help) | ||
| 262 | "Function installed as `show-help-function' on MSDOS frames." | ||
| 263 | (when (and (not (window-minibuffer-p)) ;Don't overwrite minibuffer contents. | ||
| 264 | ;; Don't know how to reproduce it in Elisp: | ||
| 265 | ;; Don't overwrite a keystroke echo. | ||
| 266 | ;; (NILP (echo_message_buffer) || ok_to_overwrite_keystroke_echo) | ||
| 267 | (not cursor-in-echo-area)) ;Don't overwrite a prompt. | ||
| 268 | (cond | ||
| 269 | ((stringp help) | ||
| 270 | (unless msdos-previous-message | ||
| 271 | (setq msdos-previous-message (current-message))) | ||
| 272 | (let ((message-truncate-lines t) | ||
| 273 | (message-log-max nil)) | ||
| 274 | (message "%s" (replace-regexp-in-string "\n" ", " help)))) | ||
| 275 | ((stringp msdos-previous-message) | ||
| 276 | (let ((message-log-max nil)) | ||
| 277 | (message "%s" msdos-previous-message) | ||
| 278 | (setq msdos-previous-message nil))) | ||
| 279 | (t | ||
| 280 | (message nil))))) | ||
| 281 | |||
| 282 | |||
| 258 | ;; Initialization. | 283 | ;; Initialization. |
| 259 | ;; --------------------------------------------------------------------------- | 284 | ;; --------------------------------------------------------------------------- |
| 260 | ;; This function is run, by faces.el:tty-create-frame-with-faces, only | 285 | ;; This function is run, by faces.el:tty-create-frame-with-faces, only |
| @@ -297,6 +322,8 @@ Errors out because it is not supposed to be called, ever." | |||
| 297 | (msdos-face-setup) | 322 | (msdos-face-setup) |
| 298 | ;; Set up the initial frame. | 323 | ;; Set up the initial frame. |
| 299 | (msdos-setup-initial-frame) | 324 | (msdos-setup-initial-frame) |
| 325 | ;; Help echo is displayed in the echo area. | ||
| 326 | (setq show-help-function 'msdos-show-help) | ||
| 300 | ;; We want to delay the codepage-related setup until after user's | 327 | ;; We want to delay the codepage-related setup until after user's |
| 301 | ;; .emacs is processed, because people might define their | 328 | ;; .emacs is processed, because people might define their |
| 302 | ;; `dos-codepage-setup-hook' there. | 329 | ;; `dos-codepage-setup-hook' there. |