* gnus-spec.el (gnus-correct-substring): Take optional END.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 24 Aug 2001 19:15:14 +0000 (19:15 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 24 Aug 2001 19:15:14 +0000 (19:15 +0000)
lisp/ChangeLog
lisp/gnus-spec.el

index c366099..228ecfb 100644 (file)
@@ -1,5 +1,7 @@
 2001-08-24 12:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
+       * gnus-spec.el (gnus-correct-substring): Take optional END.
+
        * nnrss.el (nnrss-request-article): Remove \n.
 
 2001-08-24  Simon Josefsson  <jas@extundo.com>
index 781823e..6906f5d 100644 (file)
     (mapcar (lambda (char) (incf length (gnus-char-width char))) string)
     length))
 
-(defun gnus-correct-substring (string start end)
+(defun gnus-correct-substring (string start &optional end)
   (let ((wstart 0)
        (wend 0)
        (seek 0)
          wstart seek)
     ;; Find the end position.
     (while (and (< seek length)
-               (<= wend end))
+               (or (not end)
+                   (<= wend end)))
       (incf wend (gnus-char-width (aref string seek)))
       (incf seek))
     (setq wend seek)