# HG changeset patch # User Richard M. Stallman # Date 761615472 0 # Node ID f9706301b8059ec0dd534584f7455d50adcbca16 # Parent 7507f44b1e5e96ee07da736a7d7cbc5a183f64e0 (mouse-delete-max-match): Set len properly. diff -r 7507f44b1e5e -r f9706301b805 lisp/mouse.el --- 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))))