4.3BSD/usr/contrib/emacs/lisp/chistory.elc
(provide (quote chistory))
(defun repeat-matching-complex-command (&optional pattern) "\
Edit and re-evaluate complex command with name matching PATTERN.
Matching occurrences are displayed, most recent first, until you
select a form for evaluation. If PATTERN is empty (or nil), every form
in the command history is offered. The form is placed in the minibuffer
for editing and the result is evaluated." (interactive "sRedo Command (regexp): ") (byte-code "ม$ ฦวศ\" GมOษ\" ! ม% ม
2
?
e
@?F วส@!\"
S หฬอฮ!\"!]
@a
A,
?q ฯะ!u ัา
\"+" [pattern nil history command-history temp what equal string-match "[ ]*[^ ]" "" symbol-name y-or-n-p format "Redo %s? " prin1-to-string error "Command history exhausted." edit-and-eval-command "Redo: "] 11))
(defvar default-command-history-filter-garbage (quote (command-history-mode list-command-history electric-command-history)) "*A list of symbols. If default-list-command-history-filter is
given a list whose car is an element of this list, then it will return
non-nil (indicating the list should be discarded from the history).
Initially, all commands related to the command history are discarded.")
(defvar list-command-history-filter (quote default-command-history-filter) "If non-nil, should be the name of a function of one argument.
It is passed each element of the command history when
\\[list-command-history] is called. If the filter returns non-nil for
some element, that element is excluded from the history listing. The
default filter removes commands associated with the command-history.")
(defun default-command-history-filter (frob) "\
Filter commands matching default-command-history-filter-garbage list
from the command history." (byte-code ":?
@ >" [frob default-command-history-filter-garbage] 2))
(defvar list-command-history-max 32 "*If non-nil, should be a positive number which specifies the maximum
length of the Command History listing produced by list-command-history.")
(defun list-command-history nil "\
List history of commands typed to minibuffer.
The number of commands listed is controlled by list-command-history-max.
Calls value of list-command-history-filter (if non-nil) on each history
element to judge if that element should be excluded from the list.
The buffer is left in Command History mode." (interactive) (byte-code "รว
ศษส\"
F หฦ!
*
* ฬ@\"1 = Sอ@!ฮ A +ebmU ฯะ!W ั " [history command-history buffer-read-only nil count list-command-history-max list-command-history-filter "*Command History*" -1 /= 0 boundp funcall prin1 terpri error "No command history." Command-history-setup] 9))
(defun Command-history-setup (&optional majormode modename keymap) (byte-code "ษqส !ห ฬ
!ส !$ อ- ฮ" [keymap command-history-map lisp-mode-syntax-table buffer-read-only t major-mode majormode mode-name modename "*Command History*" use-local-map lisp-mode-variables set-syntax-table command-history-mode "Command History"] 6))
(defvar command-history-hook nil "If non-nil, its value is called on entry to command-history-mode.")
(defvar command-history-map nil)
(if command-history-map nil (setq command-history-map (make-keymap)) (lisp-mode-commands command-history-map) (suppress-keymap command-history-map) (define-key command-history-map "
" (quote next-line)) (define-key command-history-map "
" (quote next-line)) (define-key command-history-map "" (quote previous-line)))
(defun command-history-mode nil "\
Major mode for examining commands from command-history.
The number of commands listed is controlled by list-command-history-max.
The command history is filtered by list-command-history-filter if non-nil.
Like Emacs-Lisp Mode except that characters do not insert themselves and
Digits provide prefix arguments. Tab does not indent.
\\{command-history-map}
Calls the value of command-history-hook if that is non-nil
The Command History listing is recomputed each time this mode is
invoked." (interactive) (byte-code "ภม ยร!ฤล!" [nil list-command-history pop-to-buffer "*Command History*" run-hooks command-history-hook] 4))