emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/gnus/gnus-spec.el,v


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/gnus/gnus-spec.el,v
Date: Sun, 28 Oct 2007 09:19:18 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Miles Bader <miles>     07/10/28 09:18:40

Index: lisp/gnus/gnus-spec.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/gnus-spec.el,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- lisp/gnus/gnus-spec.el      26 Jul 2007 05:26:59 -0000      1.19
+++ lisp/gnus/gnus-spec.el      28 Oct 2007 09:18:31 -0000      1.20
@@ -140,7 +140,7 @@
 (defvar gnus-format-specs
   `((version . ,emacs-version)
     (gnus-version . ,(gnus-continuum-version))
-    (group "%M\%S\%p\%P\%5y: %(%g%)%l\n" ,gnus-group-line-format-spec)
+    (group "%M\%S\%p\%P\%5y: %(%g%)\n" ,gnus-group-line-format-spec)
     (summary-dummy "*  %(:                          :%) %S\n"
                   ,gnus-summary-dummy-line-format-spec)
     (summary "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n"
@@ -198,12 +198,13 @@
            (not (equal emacs-version
                        (cdr (assq 'version gnus-format-specs)))))
     (setq gnus-format-specs nil))
-  ;; Flush the group format spec cache if it doesn't support decoded
-  ;; group names.
+  ;; Flush the group format spec cache if there's the grouplens stuff
+  ;; or it doesn't support decoded group names.
   (when (memq 'group types)
-    (let ((spec (assq 'group gnus-format-specs)))
-      (unless (string-match " gnus-tmp-decoded-group[ )]"
-                           (gnus-prin1-to-string (nth 2 spec)))
+    (let* ((spec (assq 'group gnus-format-specs))
+          (sspec (gnus-prin1-to-string (nth 2 spec))))
+      (when (or (string-match " gnus-tmp-grouplens[ )]" sspec)
+               (not (string-match " gnus-tmp-decoded-group[ )]" sspec)))
        (setq gnus-format-specs (delq spec gnus-format-specs)))))
 
   ;; Go through all the formats and see whether they need updating.
@@ -296,9 +297,7 @@
 
 (defun gnus-correct-length (string)
   "Return the correct width of STRING."
-  (let ((length 0))
-    (mapcar (lambda (char) (incf length (gnus-char-width char))) string)
-    length))
+  (apply #'+ (mapcar #'char-width string)))
 
 (defun gnus-correct-substring (string start &optional end)
   (let ((wstart 0)
@@ -310,14 +309,14 @@
     ;; Find the start position.
     (while (and (< seek length)
                (< wseek start))
-      (incf wseek (gnus-char-width (aref string seek)))
+      (incf wseek (char-width (aref string seek)))
       (incf seek))
     (setq wstart seek)
     ;; Find the end position.
     (while (and (<= seek length)
                (or (not end)
                    (<= wseek end)))
-      (incf wseek (gnus-char-width (aref string seek)))
+      (incf wseek (char-width (aref string seek)))
       (incf seek))
     (setq wend seek)
     (substring string wstart (1- wend))))
@@ -622,6 +621,9 @@
                   ?s)))
           ;; Find the specification from `spec-alist'.
           ((setq elem (cdr (assq (or extended-spec spec) spec-alist))))
+          ;; We used to use "%l" for displaying the grouplens score.
+          ((eq spec ?l)
+           (setq elem '("" ?s)))
           (t
            (setq elem '("*" ?s))))
          (setq elem-type (cadr elem))
@@ -672,7 +674,7 @@
        (list (car flist)))
       ;; A single number.
       ((string= fstring "%d")
-       (setq dontinsert)
+       (setq dontinsert t)
        (if insert
           (list `(princ ,(car flist)))
         (list `(int-to-string ,(car flist)))))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]