comparison lisp/prim/help.el @ 153:25f70ba0133c r20-3b3

Import from CVS: tag r20-3b3
author cvs
date Mon, 13 Aug 2007 09:38:25 +0200
parents cca96a509cfe
children 43dd3413c7c7
comparison
equal deleted inserted replaced
152:4c132ee2d62b 153:25f70ba0133c
600 (save-window-excursion 600 (save-window-excursion
601 (info) 601 (info)
602 (Info-find-node "xemacs-faq" "Top")) 602 (Info-find-node "xemacs-faq" "Top"))
603 (switch-to-buffer "*info*")) 603 (switch-to-buffer "*info*"))
604 604
605 (defcustom view-lossage-key-count 100
606 "*Number of keys `view-lossage' shows.
607 The maximum number of available keys is governed by `recent-keys-ring-size'."
608 :type 'integer
609 :group 'help)
610
611 (defcustom view-lossage-message-count 100
612 "*Number of minibuffer messages `view-lossage' shows."
613 :type 'integer
614 :group 'help)
615
605 (defun view-lossage () 616 (defun view-lossage ()
606 "Display last 100 input keystrokes and last 100 or so minibuffer messages." 617 "Display recent input keystrokes and recent minibuffer messages.
618 The number of keys shown is controlled by `view-lossage-key-count'.
619 The number of messages shown is controlled by `view-lossage-message-count'."
607 (interactive) 620 (interactive)
608 (with-displaying-help-buffer 621 (with-displaying-help-buffer
609 (lambda () 622 (lambda ()
610 (princ (key-description (recent-keys))) 623 (princ (key-description (recent-keys view-lossage-key-count)))
611 (save-excursion 624 (save-excursion
612 (set-buffer standard-output) 625 (set-buffer standard-output)
613 (goto-char (point-min)) 626 (goto-char (point-min))
614 (insert "Recent keystrokes:\n\n") 627 (insert "Recent keystrokes:\n\n")
615 (while (progn (move-to-column 50) (not (eobp))) 628 (while (progn (move-to-column 50) (not (eobp)))
623 oldpoint) 636 oldpoint)
624 (set-buffer buffer) 637 (set-buffer buffer)
625 (goto-char (point-max)) 638 (goto-char (point-max))
626 (set-buffer standard-output) 639 (set-buffer standard-output)
627 (while (and (> (point buffer) (point-min buffer)) 640 (while (and (> (point buffer) (point-min buffer))
628 (< count 100)) 641 (< count view-lossage-message-count))
629 (setq oldpoint (point buffer)) 642 (setq oldpoint (point buffer))
630 (forward-line -1 buffer) 643 (forward-line -1 buffer)
631 (insert-buffer-substring buffer (point buffer) oldpoint) 644 (insert-buffer-substring buffer (point buffer) oldpoint)
632 (setq count (1+ count)))))))) 645 (setq count (1+ count))))))))
633 646
669 it displays the variable's documentation and value. 682 it displays the variable's documentation and value.
670 \\[where-is] Type command name; 683 \\[where-is] Type command name;
671 it prints which keystrokes invoke that command. 684 it prints which keystrokes invoke that command.
672 \\[describe-distribution] XEmacs ordering information. 685 \\[describe-distribution] XEmacs ordering information.
673 \\[describe-copying] print XEmacs copying permission (General Public License). 686 \\[describe-copying] print XEmacs copying permission (General Public License).
674 \\[view-emacs-news] print print news of recent XEmacs changes. 687 \\[view-emacs-news] print news of recent XEmacs changes.
675 \\[describe-no-warranty] print information on absence of warranty for XEmacs." 688 \\[describe-no-warranty] print information on absence of warranty for XEmacs."
676 (interactive) 689 (interactive)
677 (let ((help-key (copy-event last-command-event)) 690 (let ((help-key (copy-event last-command-event))
678 event char) 691 event char)
679 (message (gettext "A B C F I K L M N P S T V W C-c C-d C-n C-w. Type %s again for more help: ") 692 (message (gettext "A B C F I K L M N P S T V W C-c C-d C-n C-w. Type %s again for more help: ")