/[emacs]/emacs/lisp/simple.el
ViewVC logotype

Diff of /emacs/lisp/simple.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.558 by rms, Tue Jul 16 13:38:19 2002 UTC revision 1.559 by rms, Thu Jul 18 14:57:46 2002 UTC
# Line 3782  With prefix argument N, move N items (ne Line 3782  With prefix argument N, move N items (ne
3782  ;; that can be found before POINT.  ;; that can be found before POINT.
3783  (defun choose-completion-delete-max-match (string)  (defun choose-completion-delete-max-match (string)
3784    (let ((opoint (point))    (let ((opoint (point))
3785          (len (min (length string)          len)
3786                    (- (point) (point-min)))))      ;; Try moving back by the length of the string.
3787      (goto-char (- (point) (length string)))      (goto-char (max (- (point) (length string))
3788                        (minibuffer-prompt-end)))
3789        ;; See how far back we were actually able to move.  That is the
3790        ;; upper bound on how much we can match and delete.
3791        (setq len (- opoint (point)))
3792      (if completion-ignore-case      (if completion-ignore-case
3793          (setq string (downcase string)))          (setq string (downcase string)))
3794      (while (and (> len 0)      (while (and (> len 0)
3795                  (let ((tail (buffer-substring (point)                  (let ((tail (buffer-substring (point) opoint)))
                                               (+ (point) len))))  
3796                    (if completion-ignore-case                    (if completion-ignore-case
3797                        (setq tail (downcase tail)))                        (setq tail (downcase tail)))
3798                    (not (string= tail (substring string 0 len)))))                    (not (string= tail (substring string 0 len)))))

Legend:
Removed from v.1.558  
changed lines
  Added in v.1.559

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26