diff options
| author | Richard M. Stallman | 1994-02-18 23:51:12 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-02-18 23:51:12 +0000 |
| commit | 313558ae3149dd51c79cfa86ce65c138ed65e267 (patch) | |
| tree | c26343e47f10a399ee78875b4456199902cdb68e | |
| parent | acd622ccdb64d9dba93385a2c9f8cbc1aacd8253 (diff) | |
| download | emacs-313558ae3149dd51c79cfa86ce65c138ed65e267.tar.gz emacs-313558ae3149dd51c79cfa86ce65c138ed65e267.zip | |
(mouse-delete-max-match): Set len properly.
| -rw-r--r-- | lisp/mouse.el | 7 |
1 files changed, 4 insertions, 3 deletions
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." | |||
| 1175 | ;; Delete the longest partial match for STRING | 1175 | ;; Delete the longest partial match for STRING |
| 1176 | ;; that can be found before POINT. | 1176 | ;; that can be found before POINT. |
| 1177 | (defun mouse-delete-max-match (string) | 1177 | (defun mouse-delete-max-match (string) |
| 1178 | (let ((len (min (length string) | 1178 | (let ((opoint (point)) |
| 1179 | (- (point-max) (point-min))))) | 1179 | (len (min (length string) |
| 1180 | (goto-char (max (point-min) (- (point) (length string)))) | 1180 | (- (point) (point-min))))) |
| 1181 | (goto-char (- (point) (length string))) | ||
| 1181 | (while (and (> len 0) | 1182 | (while (and (> len 0) |
| 1182 | (let ((tail (buffer-substring (point) | 1183 | (let ((tail (buffer-substring (point) |
| 1183 | (+ (point) len)))) | 1184 | (+ (point) len)))) |