Commit 313558ae authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(mouse-delete-max-match): Set len properly.

parent acd622cc
...@@ -1175,9 +1175,10 @@ and selects that window." ...@@ -1175,9 +1175,10 @@ and selects that window."
;; Delete the longest partial match for STRING ;; Delete the longest partial match for STRING
;; that can be found before POINT. ;; that can be found before POINT.
(defun mouse-delete-max-match (string) (defun mouse-delete-max-match (string)
(let ((len (min (length string) (let ((opoint (point))
(- (point-max) (point-min))))) (len (min (length string)
(goto-char (max (point-min) (- (point) (length string)))) (- (point) (point-min)))))
(goto-char (- (point) (length string)))
(while (and (> len 0) (while (and (> len 0)
(let ((tail (buffer-substring (point) (let ((tail (buffer-substring (point)
(+ (point) len)))) (+ (point) len))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment