Mercurial > hg > xemacs-beta
comparison lisp/prim/help.el @ 116:9f59509498e1 r20-1b10
Import from CVS: tag r20-1b10
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:23:06 +0200 |
parents | 8619ce7e4c50 |
children | 7d55a9ba150c |
comparison
equal
deleted
inserted
replaced
115:f109f7dabbe2 | 116:9f59509498e1 |
---|---|
342 (defvar help-selects-help-window t | 342 (defvar help-selects-help-window t |
343 "*If nil, use the \"old Emacs\" behavior for Help buffers. | 343 "*If nil, use the \"old Emacs\" behavior for Help buffers. |
344 This just displays the buffer in another window, rather than selecting | 344 This just displays the buffer in another window, rather than selecting |
345 the window.") | 345 the window.") |
346 | 346 |
347 (defvar help-window-max-height .5 | |
348 "*Proportion of frame to use for help windows.") | |
349 ;; Use this function for displaying help when C-h something is pressed | 347 ;; Use this function for displaying help when C-h something is pressed |
350 ;; or in similar situations. Do *not* use it when you are displaying | 348 ;; or in similar situations. Do *not* use it when you are displaying |
351 ;; a help message and then prompting for input in the minibuffer -- | 349 ;; a help message and then prompting for input in the minibuffer -- |
352 ;; this macro usually selects the help buffer, which is not what you | 350 ;; this macro usually selects the help buffer, which is not what you |
353 ;; want in those situations. | 351 ;; want in those situations. |
385 (was-one-window | 383 (was-one-window |
386 (message | 384 (message |
387 (substitute-command-keys "Type \\[delete-other-windows] to remove help window, \\[scroll-other-window] to scroll the help."))) | 385 (substitute-command-keys "Type \\[delete-other-windows] to remove help window, \\[scroll-other-window] to scroll the help."))) |
388 (t | 386 (t |
389 (message | 387 (message |
390 (substitute-command-keys "Type \\[switch-to-buffer-other-window] to restore the other window, \\[scroll-other-window] to scroll the help.")))) | 388 (substitute-command-keys "Type \\[switch-to-buffer-other-window] to restore the other window, \\[scroll-other-window] to scroll the help.")))))))))) |
391 (when temp-buffer-shrink-to-fit | |
392 (let* ((help-window-size (round (* help-window-max-height | |
393 (frame-height (window-frame helpwin))))) | |
394 (size (window-displayed-height helpwin))) | |
395 (if (< size help-window-size) | |
396 (enlarge-window (- help-window-size size) nil helpwin))) | |
397 (shrink-window-if-larger-than-buffer helpwin)))))))) | |
398 | 389 |
399 (defun describe-key (key) | 390 (defun describe-key (key) |
400 "Display documentation of the function invoked by KEY. | 391 "Display documentation of the function invoked by KEY. |
401 KEY is a string, or vector of events. | 392 KEY is a string, or vector of events. |
402 When called interactively, KEY may also be a menu selection." | 393 When called interactively, KEY may also be a menu selection." |