# HG changeset patch # User Richard M. Stallman # Date 829762251 0 # Node ID 04f81516b6e050746bf1588f30e2a9c4a561f751 # Parent 43c846d45f79baff2aed74136821d2901823805a (occur): Fix up interactive code. Strip text properties from regexp. diff -r 43c846d45f79 -r 04f81516b6e0 lisp/replace.el --- a/lisp/replace.el Wed Apr 17 16:43:16 1996 +0000 +++ b/lisp/replace.el Wed Apr 17 17:30:51 1996 +0000 @@ -330,20 +330,24 @@ The lines are shown in a buffer named `*Occur*'. It serves as a menu to find any of the occurrences in this buffer. \\[describe-mode] in that buffer will explain how." - (interactive (list (let* ((default (car regexp-history)) - (input - (read-from-minibuffer - (if default - (format "List lines matching regexp (default `%s'): " default) - "List lines matching regexp: ") - nil nil nil - 'regexp-history))) - (if (> (length input) 0) input - (setcar regexp-history default))) - current-prefix-arg)) - (setq nlines (if nlines (prefix-numeric-value nlines) - list-matching-lines-default-context-lines)) - (let ((first t) + (interactive + (list (let* ((default (car regexp-history)) + (input + (read-from-minibuffer + (if default + (format "List lines matching regexp (default `%s'): " + default) + "List lines matching regexp: ") + nil nil nil 'regexp-history))) + (if (string-equal input "") + default + (set-text-properties 0 (length input) nil input) + input)) + current-prefix-arg)) + (let ((nlines (if nlines + (prefix-numeric-value nlines) + list-matching-lines-default-context-lines)) + (first t) (buffer (current-buffer)) (dir default-directory) (linenum 1)