* gnus-spec.el (gnus-compile): Don't compile gnus-version.
[gnus] / lisp / gnus-spec.el
index 604b0ef..340801c 100644 (file)
 
 (defvar gnus-format-specs
   `((version . ,emacs-version)
-    (gnus-version . ,(gnus-continuum-version)
+    (gnus-version . ,(gnus-continuum-version))
     (group "%M\%S\%p\%P\%5y: %(%g%)%l\n" ,gnus-group-line-format-spec)
     (summary-dummy "*  %(:                          :%) %S\n"
                   ,gnus-summary-dummy-line-format-spec)
     (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)
     (goto-char (point-min))
     (let ((form (read (current-buffer))))
       ;; If the first element is '(point), we just remove it.
-      (when (equalp (car form) '(point))
+      (when (equal (car form) '(point))
        (pop form))
       (cons 'progn (gnus-complex-form-to-spec form spec-alist)))))
 
@@ -626,7 +627,7 @@ If PROPS, insert the result."
 
       (while entries
        (setq entry (pop entries))
-       (if (eq (car entry) 'version)
+       (if (memq (car entry) '(gnus-version version))
            (setq gnus-format-specs (delq entry gnus-format-specs))
          (let ((form (caddr entry)))
            (when (and (listp form)