emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/replace.el,v


From: Juri Linkov
Subject: [Emacs-diffs] Changes to emacs/lisp/replace.el,v
Date: Tue, 29 Jul 2008 14:44:35 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Juri Linkov <jurta>     08/07/29 14:44:35

Index: replace.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/replace.el,v
retrieving revision 1.274
retrieving revision 1.275
diff -u -b -r1.274 -r1.275
--- replace.el  23 Jul 2008 01:18:39 -0000      1.274
+++ replace.el  29 Jul 2008 14:44:35 -0000      1.275
@@ -522,15 +522,14 @@
 Maximum length of the history list is determined by the value
 of `history-length', which see.")
 
-(defun read-regexp (prompt)
+(defun read-regexp (prompt &optional default)
   "Read regexp as a string using the regexp history and some useful defaults.
-Prompt for a regular expression with PROMPT in the minibuffer.
-Provide the last element of the regexp history as the basic default,
-and return it on typing RET.  Additional defaults are the string
-at point, the last isearch regexp, the last isearch string, and the
-last replacement regexp.  Return the regexp as a string."
-  (let* ((default (car regexp-history))
-        (defaults
+Prompt for a regular expression with PROMPT (without a colon and
+space) in the minibuffer.  The optional string argument DEFAULT
+provides the basic default value, that is returned on typing RET.
+Additional defaults are the string at point, the last isearch regexp,
+the last isearch string, and the last replacement regexp."
+  (let* ((defaults
           (list (regexp-quote
                  (or (funcall (or find-tag-default-function
                                   (get major-mode 'find-tag-default-function)
@@ -1022,7 +1021,8 @@
       (nreverse result))))
 
 (defun occur-read-primary-args ()
-  (list (read-regexp "List lines matching regexp")
+  (list (read-regexp "List lines matching regexp"
+                    (car regexp-history))
        (when current-prefix-arg
          (prefix-numeric-value current-prefix-arg))))
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]