]> git.eshelyaron.com Git - emacs.git/commitdiff
(mouse-delete-max-match): Set len properly.
authorRichard M. Stallman <rms@gnu.org>
Fri, 18 Feb 1994 23:51:12 +0000 (23:51 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 18 Feb 1994 23:51:12 +0000 (23:51 +0000)
lisp/mouse.el

index 64f188928c84ee576316b39a09703da21959e5f7..c3f69340c85e3813b0afd5d90e465d0cdb23dd23 100644 (file)
@@ -1175,9 +1175,10 @@ and selects that window."
 ;; 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))))