summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1993-01-25 16:59:48 +0000
committerRoland McGrath <roland@gnu.org>1993-01-25 16:59:48 +0000
commitc7e69876999c3beb7b8af55e48935d8094884ae9 (patch)
treeb67e38dd23d5f9a18725a473a838285f5eb0d064
parentd0678801de6f32bcf2541e7b78e1ade6d3c3045b (diff)
downloademacs-c7e69876999c3beb7b8af55e48935d8094884ae9.tar.gz
(next-complete-history-element): Use only buffer contents before point
to match history elements.
-rw-r--r--lisp/simple.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index abd57753245..e0a027c660d 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -536,8 +536,8 @@ If N is negative, find the previous or Nth previous match."
"\
Get previous element of history which is a completion of minibuffer contents."
(interactive "p")
- (next-matching-history-element (concat "^" (regexp-quote (buffer-string)))
- n))
+ (next-matching-history-element
+ (concat "^" (regexp-quote (buffer-substring (point-min) (point)))) n))
(defun previous-complete-history-element (n)
"Get next element of history which is a completion of minibuffer contents."