Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
e82134b1
Commit
e82134b1
authored
Dec 18, 2013
by
Le Wang
Committed by
Chong Yidong
Dec 18, 2013
Browse files
* comint.el (comint-previous-matching-input-from-input): Retain point.
Fixes: debbugs:13404
parent
33f5d4c1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/comint.el
lisp/comint.el
+7
-5
No files found.
lisp/ChangeLog
View file @
e82134b1
2013-12-18 Le Wang <l26wang@gmail.com>
* comint.el (comint-previous-matching-input-from-input): Retain
point (Bug#13404).
2013-12-18 Chong Yidong <cyd@gnu.org>
* simple.el (append-next-kill): Doc fix (Bug#15995, Bug#16016).
...
...
lisp/comint.el
View file @
e82134b1
...
...
@@ -1210,8 +1210,9 @@ If N is negative, find the previous or Nth previous match."
With prefix argument N, search for Nth previous match.
If N is negative, search forwards for the -Nth following match."
(interactive "p")
(if (not (memq last-command '(comint-previous-matching-input-from-input
comint-next-matching-input-from-input)))
(let ((opoint (point)))
(unless (memq last-command '(comint-previous-matching-input-from-input
comint-next-matching-input-from-input))
;; Starting a new search
(setq comint-matching-input-from-input-string
(buffer-substring
...
...
@@ -1221,7 +1222,8 @@ If N is negative, search forwards for the -Nth following match."
comint-input-ring-index nil))
(comint-previous-matching-input
(concat "^" (regexp-quote comint-matching-input-from-input-string))
n))
n)
(goto-char opoint)))
(defun comint-next-matching-input-from-input (n)
"Search forwards through input history for match for current input.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment