comparison lisp/packages/chistory.el @ 2:ac2d302a0011 r19-15b2

Import from CVS: tag r19-15b2
author cvs
date Mon, 13 Aug 2007 08:46:35 +0200
parents 376386a54a3c
children 0293115a14e9
comparison
equal deleted inserted replaced
1:c0c6a60d29db 2:ac2d302a0011
19 19
20 ;; You should have received a copy of the GNU General Public License 20 ;; You should have received a copy of the GNU General Public License
21 ;; along with XEmacs; see the file COPYING. If not, write to the Free 21 ;; along with XEmacs; see the file COPYING. If not, write to the Free
22 ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 22 ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
23 23
24 ;;; Synched up with: FSF 19.30. 24 ;;; Synched up with: FSF 19.34.
25 25
26 ;;; Commentary: 26 ;;; Commentary:
27 27
28 ;; This really has nothing to do with list-command-history per se, but 28 ;; This really has nothing to do with list-command-history per se, but
29 ;; its a nice alternative to C-x ESC ESC (repeat-complex-command) and 29 ;; its a nice alternative to C-x ESC ESC (repeat-complex-command) and
38 "If non-nil, its value is called on entry to `command-history-mode'.") 38 "If non-nil, its value is called on entry to `command-history-mode'.")
39 39
40 ;;;###autoload 40 ;;;###autoload
41 (defun repeat-matching-complex-command (&optional pattern) 41 (defun repeat-matching-complex-command (&optional pattern)
42 "Edit and re-evaluate complex command with name matching PATTERN. 42 "Edit and re-evaluate complex command with name matching PATTERN.
43 Matching occurrences are displayed, most recent first, until you 43 Matching occurrences are displayed, most recent first, until you select
44 select a form for evaluation. If PATTERN is empty (or nil), every form 44 a form for evaluation. If PATTERN is empty (or nil), every form in the
45 in the command history is offered. The form is placed in the minibuffer 45 command history is offered. The form is placed in the minibuffer for
46 for editing and the result is evaluated." 46 editing and the result is evaluated."
47 (interactive "sRedo Command (regexp): ") 47 (interactive "sRedo Command (regexp): ")
48 (if pattern 48 (if pattern
49 (if (string-match "[^ \t]" pattern) 49 (if (string-match "[^ \t]" pattern)
50 (setq pattern (substring pattern (match-beginning 0))) 50 (setq pattern (substring pattern (match-beginning 0)))
51 (setq pattern nil))) 51 (setq pattern nil)))