From: Richard M. Stallman Date: Fri, 18 Feb 1994 23:51:12 +0000 (+0000) Subject: (mouse-delete-max-match): Set len properly. X-Git-Tag: emacs-19.34~9849 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=313558ae3149dd51c79cfa86ce65c138ed65e267;p=emacs.git (mouse-delete-max-match): Set len properly. --- diff --git a/lisp/mouse.el b/lisp/mouse.el index 64f188928c8..c3f69340c85 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -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))))