Mercurial > emacs
comparison lisp/comint.el @ 79852:32dc15103b58
(comint-regexp-arg): Fix no-input case.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Wed, 16 Jan 2008 08:10:15 +0000 |
parents | cae03603299a |
children | 5d58981e6690 |
comparison
equal
deleted
inserted
replaced
79851:aa48f4550439 | 79852:32dc15103b58 |
---|---|
1019 "Return list of regexp and prefix arg using PROMPT." | 1019 "Return list of regexp and prefix arg using PROMPT." |
1020 (let* (;; Don't clobber this. | 1020 (let* (;; Don't clobber this. |
1021 (last-command last-command) | 1021 (last-command last-command) |
1022 (regexp (read-from-minibuffer prompt nil nil nil | 1022 (regexp (read-from-minibuffer prompt nil nil nil |
1023 'minibuffer-history-search-history))) | 1023 'minibuffer-history-search-history))) |
1024 ;; If the user didn't enter anything, nothing is added to m-h-s-h. | |
1025 ;; Use the previous search regexp, if there is one. | |
1024 (list (if (string-equal regexp "") | 1026 (list (if (string-equal regexp "") |
1025 (setcar minibuffer-history-search-history | 1027 (or (car minibuffer-history-search-history) |
1026 (nth 1 minibuffer-history-search-history)) | 1028 regexp) |
1027 regexp) | 1029 regexp) |
1028 (prefix-numeric-value current-prefix-arg)))) | 1030 (prefix-numeric-value current-prefix-arg)))) |
1029 | 1031 |
1030 (defun comint-search-arg (arg) | 1032 (defun comint-search-arg (arg) |
1031 ;; First make sure there is a ring and that we are after the process mark | 1033 ;; First make sure there is a ring and that we are after the process mark |