comparison lisp/comint.el @ 87786:4889ff88791b

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