diff options
| author | Richard M. Stallman | 1996-04-17 17:30:51 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-04-17 17:30:51 +0000 |
| commit | a5dfed3e36d1cb86af1ff83ab76d802d34620431 (patch) | |
| tree | c1fab0d558ae0e549b6acc4a19c07a363aa5116b | |
| parent | db50afc09f10adb8bb0f7d0ec6a2ec1f9c439410 (diff) | |
| download | emacs-a5dfed3e36d1cb86af1ff83ab76d802d34620431.tar.gz emacs-a5dfed3e36d1cb86af1ff83ab76d802d34620431.zip | |
(occur): Fix up interactive code.
Strip text properties from regexp.
| -rw-r--r-- | lisp/replace.el | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index 7af54ccefc6..747adbe27e4 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -330,20 +330,24 @@ Interactively it is the prefix arg. | |||
| 330 | The lines are shown in a buffer named `*Occur*'. | 330 | The lines are shown in a buffer named `*Occur*'. |
| 331 | It serves as a menu to find any of the occurrences in this buffer. | 331 | It serves as a menu to find any of the occurrences in this buffer. |
| 332 | \\[describe-mode] in that buffer will explain how." | 332 | \\[describe-mode] in that buffer will explain how." |
| 333 | (interactive (list (let* ((default (car regexp-history)) | 333 | (interactive |
| 334 | (input | 334 | (list (let* ((default (car regexp-history)) |
| 335 | (read-from-minibuffer | 335 | (input |
| 336 | (if default | 336 | (read-from-minibuffer |
| 337 | (format "List lines matching regexp (default `%s'): " default) | 337 | (if default |
| 338 | "List lines matching regexp: ") | 338 | (format "List lines matching regexp (default `%s'): " |
| 339 | nil nil nil | 339 | default) |
| 340 | 'regexp-history))) | 340 | "List lines matching regexp: ") |
| 341 | (if (> (length input) 0) input | 341 | nil nil nil 'regexp-history))) |
| 342 | (setcar regexp-history default))) | 342 | (if (string-equal input "") |
| 343 | current-prefix-arg)) | 343 | default |
| 344 | (setq nlines (if nlines (prefix-numeric-value nlines) | 344 | (set-text-properties 0 (length input) nil input) |
| 345 | list-matching-lines-default-context-lines)) | 345 | input)) |
| 346 | (let ((first t) | 346 | current-prefix-arg)) |
| 347 | (let ((nlines (if nlines | ||
| 348 | (prefix-numeric-value nlines) | ||
| 349 | list-matching-lines-default-context-lines)) | ||
| 350 | (first t) | ||
| 347 | (buffer (current-buffer)) | 351 | (buffer (current-buffer)) |
| 348 | (dir default-directory) | 352 | (dir default-directory) |
| 349 | (linenum 1) | 353 | (linenum 1) |