comparison lisp/prim/help.el @ 76:c0c698873ce1 r20-0b33

Import from CVS: tag r20-0b33
author cvs
date Mon, 13 Aug 2007 09:05:10 +0200
parents b9518feda344
children 1ce6082ce73f
comparison
equal deleted inserted replaced
75:a4e0195b387b 76:c0c698873ce1
378 (was-one-window 378 (was-one-window
379 (message 379 (message
380 (substitute-command-keys "Type \\[delete-other-windows] to remove help window, \\[scroll-other-window] to scroll the help."))) 380 (substitute-command-keys "Type \\[delete-other-windows] to remove help window, \\[scroll-other-window] to scroll the help.")))
381 (t 381 (t
382 (message 382 (message
383 (substitute-command-keys "Type \\[switch-to-buffer-other-window] to restore the other window, \\[scroll-other-window] to scroll the help.")))))))))) 383 (substitute-command-keys "Type \\[switch-to-buffer-other-window] to restore the other window, \\[scroll-other-window] to scroll the help."))))
384 (shrink-window-if-larger-than-buffer helpwin)))))))
384 385
385 (defun describe-key (key) 386 (defun describe-key (key)
386 "Display documentation of the function invoked by KEY. 387 "Display documentation of the function invoked by KEY.
387 KEY is a string, or vector of events. 388 KEY is a string, or vector of events.
388 When called interactvely, KEY may also be a menu selection." 389 When called interactvely, KEY may also be a menu selection."
678 (eq char ??) 679 (eq char ??)
679 (eq 'help-command (key-binding event)) 680 (eq 'help-command (key-binding event))
680 (eq char ? ) 681 (eq char ? )
681 (eq 'scroll-up (key-binding event)) 682 (eq 'scroll-up (key-binding event))
682 (eq char ?\177) 683 (eq char ?\177)
683 (eq 'scroll-down (key-binding event))) 684 (and (not (eq char ?b))
685 (eq 'scroll-down (key-binding event))))
684 (if (or (eq char ? ) 686 (if (or (eq char ? )
685 (eq 'scroll-up (key-binding event))) 687 (eq 'scroll-up (key-binding event)))
686 (scroll-up)) 688 (scroll-up))
687 (if (or (eq char ?\177) 689 (if (or (eq char ?\177)
688 (eq 'scroll-down (key-binding event))) 690 (and (not (eq char ?b))
691 (eq 'scroll-down (key-binding event))))
689 (scroll-down)) 692 (scroll-down))
690 ;; write this way for I18N3 snarfing 693 ;; write this way for I18N3 snarfing
691 (if (pos-visible-in-window-p (point-max)) 694 (if (pos-visible-in-window-p (point-max))
692 (message "A B C F I K L M N P S T V W C-c C-d C-n C-w C-i C-k C-f: ") 695 (message "A B C F I K L M N P S T V W C-c C-d C-n C-w C-i C-k C-f: ")
693 (message "A B C F I K L M N P S T V W C-c C-d C-n C-w C-i C-k C-f or Space to scroll: ")) 696 (message "A B C F I K L M N P S T V W C-c C-d C-n C-w C-i C-k C-f or Space to scroll: "))