Mercurial > hg > xemacs-beta
comparison lisp/prim/help.el @ 36:c53a95d3c46d r19-15b101
Import from CVS: tag r19-15b101
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:53:38 +0200 |
parents | e04119814345 |
children | 1a767b41a199 |
comparison
equal
deleted
inserted
replaced
35:279432d5c479 | 36:c53a95d3c46d |
---|---|
347 "*If nil, use the \"old Emacs\" behavior for Help buffers. | 347 "*If nil, use the \"old Emacs\" behavior for Help buffers. |
348 This just displays the buffer in another window, rather than selecting | 348 This just displays the buffer in another window, rather than selecting |
349 the window.") | 349 the window.") |
350 | 350 |
351 (defvar help-window-config nil) | 351 (defvar help-window-config nil) |
352 | 352 (defvar help-window-max-height .5 |
353 "*Proportion of frame to use for help windows.") | |
353 ;; Use this function for displaying help when C-h something is pressed | 354 ;; Use this function for displaying help when C-h something is pressed |
354 ;; or in similar situations. Do *not* use it when you are displaying | 355 ;; or in similar situations. Do *not* use it when you are displaying |
355 ;; a help message and then prompting for input in the minibuffer -- | 356 ;; a help message and then prompting for input in the minibuffer -- |
356 ;; this macro usually selects the help buffer, which is not what you | 357 ;; this macro usually selects the help buffer, which is not what you |
357 ;; want in those situations. | 358 ;; want in those situations. |
382 (substitute-command-keys "Type \\[delete-other-windows] to remove help window, \\[scroll-other-window] to scroll the help."))) | 383 (substitute-command-keys "Type \\[delete-other-windows] to remove help window, \\[scroll-other-window] to scroll the help."))) |
383 (t | 384 (t |
384 (message | 385 (message |
385 (substitute-command-keys "Type \\[switch-to-buffer-other-window] to restore the other window, \\[scroll-other-window] to scroll the help.")))) | 386 (substitute-command-keys "Type \\[switch-to-buffer-other-window] to restore the other window, \\[scroll-other-window] to scroll the help.")))) |
386 (when temp-buffer-shrink-to-fit | 387 (when temp-buffer-shrink-to-fit |
388 (let* ((help-window-size (round (* help-window-max-height | |
389 (frame-height (window-frame helpwin))))) | |
390 (size (window-displayed-height helpwin))) | |
391 (if (< size help-window-size) | |
392 (enlarge-window (- help-window-size size) nil helpwin))) | |
387 (shrink-window-if-larger-than-buffer helpwin)))))))) | 393 (shrink-window-if-larger-than-buffer helpwin)))))))) |
388 | 394 |
389 (defun describe-key (key) | 395 (defun describe-key (key) |
390 "Display documentation of the function invoked by KEY. | 396 "Display documentation of the function invoked by KEY. |
391 KEY is a string, or vector of events. | 397 KEY is a string, or vector of events. |