(goto-char (point-min))
(let ((i 0)
(prefix
- (buffer-substring
- (progn (beginning-of-line)(point))
- (progn (end-of-line)(point))))
+ (buffer-substring (line-beginning-position)
+ (line-end-position)))
str ret)
(while (and (= (forward-line) 0)
(setq str (buffer-substring
(if (stringp ret)
ret
(cadr ret)))
- (incf i))
+ (setq i (1+ i)))
(cond ((> i 1) prefix)
((> i 0)
(goto-char (point-min))
c1 c2)
(while (and (< p len)
(progn
- (setq c1 (aref str1 p)
- c2 (aref str2 p))
+ (setq c1 (sref str1 p)
+ c2 (sref str2 p))
(eq c1 c2)))
- (setq p (+ p (char-length c1))))
+ (setq p (char-next-index c1 p)))
(and (> p 0)
(let ((matched (substring str1 0 p))
(r1 (and (< p len1)(substring str1 p)))