Mercurial > hg > xemacs-beta
comparison lisp/help.el @ 863:42375619fa45
[xemacs-hg @ 2002-06-04 06:03:59 by andyp]
merge 21.4 windows changes, minimally tested
author | andyp |
---|---|
date | Tue, 04 Jun 2002 06:05:53 +0000 |
parents | e38acbeb1cae |
children | 4bc5bb3ea5ad |
comparison
equal
deleted
inserted
replaced
862:278c743f1578 | 863:42375619fa45 |
---|---|
485 (if help-buffer-prefix-string | 485 (if help-buffer-prefix-string |
486 (format "*%s: %s*" help-buffer-prefix-string name) | 486 (format "*%s: %s*" help-buffer-prefix-string name) |
487 (format "*%s*" name)) | 487 (format "*%s*" name)) |
488 (format "*%s*" help-buffer-prefix-string))) | 488 (format "*%s*" help-buffer-prefix-string))) |
489 | 489 |
490 ;; Use this function for displaying help when C-h something is pressed | 490 ;; with-displaying-help-buffer |
491 ;; or in similar situations. Do *not* use it when you are displaying | |
492 ;; a help message and then prompting for input in the minibuffer -- | |
493 ;; this macro usually selects the help buffer, which is not what you | |
494 ;; want in those situations. | |
495 | 491 |
496 ;; #### Should really be a macro to eliminate the requirement of | 492 ;; #### Should really be a macro to eliminate the requirement of |
497 ;; caller to code a lambda form in THUNK -- mrb | 493 ;; caller to code a lambda form in THUNK -- mrb |
498 | 494 |
499 ;; #### BEFORE you rush to make this a macro, think about backward | 495 ;; #### BEFORE you rush to make this a macro, think about backward |
516 (make-variable-buffer-local 'help-window-config) | 512 (make-variable-buffer-local 'help-window-config) |
517 (put 'help-window-config 'permanent-local t) | 513 (put 'help-window-config 'permanent-local t) |
518 | 514 |
519 (defun with-displaying-help-buffer (thunk &optional name) | 515 (defun with-displaying-help-buffer (thunk &optional name) |
520 "Form which makes a help buffer with given NAME and evaluates BODY there. | 516 "Form which makes a help buffer with given NAME and evaluates BODY there. |
521 The actual name of the buffer is generated by the function `help-buffer-name'." | 517 The actual name of the buffer is generated by the function `help-buffer-name'. |
518 | |
519 Use this function for displaying help when C-h something is pressed or | |
520 in similar situations. Do *not* use it when you are displaying a help | |
521 message and then prompting for input in the minibuffer -- this macro | |
522 usually selects the help buffer, which is not what you want in those | |
523 situations." | |
522 (let* ((winconfig (current-window-configuration)) | 524 (let* ((winconfig (current-window-configuration)) |
523 (was-one-window (one-window-p)) | 525 (was-one-window (one-window-p)) |
524 (buffer-name (help-buffer-name name)) | 526 (buffer-name (help-buffer-name name)) |
525 (help-not-visible | 527 (help-not-visible |
526 (not (and (windows-of-buffer buffer-name) ;shortcut | 528 (not (and (windows-of-buffer buffer-name) ;shortcut |