changeset 6003:f9706301b805

(mouse-delete-max-match): Set len properly.
author Richard M. Stallman <rms@gnu.org>
date Fri, 18 Feb 1994 23:51:12 +0000
parents 7507f44b1e5e
children 4fa3d631dae8
files lisp/mouse.el
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mouse.el	Fri Feb 18 22:50:05 1994 +0000
+++ b/lisp/mouse.el	Fri Feb 18 23:51:12 1994 +0000
@@ -1175,9 +1175,10 @@
 ;; Delete the longest partial match for STRING
 ;; that can be found before POINT.
 (defun mouse-delete-max-match (string)
-  (let ((len (min (length string)
-		  (- (point-max) (point-min)))))
-    (goto-char (max (point-min) (- (point) (length string))))
+  (let ((opoint (point))
+	(len (min (length string)
+		  (- (point) (point-min)))))
+    (goto-char (- (point) (length string)))
     (while (and (> len 0)
 		(let ((tail (buffer-substring (point)
 					      (+ (point) len))))