emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r101407: Merge changes made in Gnus t


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101407: Merge changes made in Gnus trunk.
Date: Sat, 11 Sep 2010 00:36:27 +0000
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101407
author: Lars Magne Ingebrigtsen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Sat 2010-09-11 00:36:27 +0000
message:
  Merge changes made in Gnus trunk.
  
  gnus-sum.el: Avoid calling a hook function per summary line;
  Call `gnus-summary-highlight-line' directly from all places that used to call 
it indirectly.
  
  netrc.el (netrc-credentials): New conveniency function.
  
  gnus-start.el (gnus-read-active-file-1): If gnus-agent isn't set, then do 
request scans from the backends.
modified:
  lisp/ChangeLog
  lisp/gnus/ChangeLog
  lisp/gnus/gnus-start.el
  lisp/gnus/gnus-sum.el
  lisp/net/netrc.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-09-10 23:13:42 +0000
+++ b/lisp/ChangeLog    2010-09-11 00:36:27 +0000
@@ -1,3 +1,7 @@
+2010-09-10  Lars Magne Ingebrigtsen  <address@hidden>
+
+       * net/netrc.el (netrc-credentials): New conveniency function.
+
 2010-09-10  Stefan Monnier  <address@hidden>
 
        * textmodes/texinfo.el (texinfo-syntax-propertize-function): New fun

=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2010-09-10 05:32:25 +0000
+++ b/lisp/gnus/ChangeLog       2010-09-11 00:36:27 +0000
@@ -1,3 +1,14 @@
+2010-09-10  Lars Magne Ingebrigtsen  <address@hidden>
+
+       * gnus-start.el (gnus-read-active-file-1): If gnus-agent isn't set,
+       then do request scans from the backends.
+
+       * gnus-sum.el (gnus-summary-update-hook): Change default to nil, to
+       avoid running a hook per line, since this takes a lot of time,
+       profiling shows.
+       (gnus-summary-prepare-threads): Call `gnus-summary-highlight-line'
+       directly if gnus-visual-p is true.
+
 2010-09-10  Katsumi Yamaoka  <address@hidden>
 
        * gnus-start.el (gnus-read-active-for-groups): Check only subscribed

=== modified file 'lisp/gnus/gnus-start.el'
--- a/lisp/gnus/gnus-start.el   2010-09-10 05:32:25 +0000
+++ b/lisp/gnus/gnus-start.el   2010-09-11 00:36:27 +0000
@@ -2048,8 +2048,9 @@
     (gnus-message 5 mesg)
     (when (gnus-check-server method)
       ;; Request that the backend scan its incoming messages.
-      (when (and gnus-agent
-                (gnus-online method)
+      (when (and (or (and gnus-agent
+                         (gnus-online method))
+                    (not gnus-agent))
                 (gnus-check-backend-function 'request-scan (car method)))
        (if infos
            (dolist (info infos)

=== modified file 'lisp/gnus/gnus-sum.el'
--- a/lisp/gnus/gnus-sum.el     2010-09-06 00:37:02 +0000
+++ b/lisp/gnus/gnus-sum.el     2010-09-11 00:36:27 +0000
@@ -985,8 +985,7 @@
   :group 'gnus-various
   :type 'hook)
 
-(defcustom gnus-summary-update-hook
-  (list 'gnus-summary-highlight-line)
+(defcustom gnus-summary-update-hook nil
   "*A hook called when a summary line is changed.
 The hook will not be called if `gnus-visual' is nil.
 
@@ -3753,6 +3752,7 @@
       (error (gnus-message 5 "Error updating the summary line")))
     (when (gnus-visual-p 'summary-highlight 'highlight)
       (forward-line -1)
+      (gnus-summary-highlight-line)
       (gnus-run-hooks 'gnus-summary-update-hook)
       (forward-line 1))))
 
@@ -3785,6 +3785,7 @@
         'score))
       ;; Do visual highlighting.
       (when (gnus-visual-p 'summary-highlight 'highlight)
+       (gnus-summary-highlight-line)
        (gnus-run-hooks 'gnus-summary-update-hook)))))
 
 (defvar gnus-tmp-new-adopts nil)
@@ -5363,7 +5364,9 @@
                'gnus-number number)
              (when gnus-visual-p
                (forward-line -1)
-               (gnus-run-hooks 'gnus-summary-update-hook)
+               (gnus-summary-highlight-line)
+               (when gnus-summary-update-hook
+                 (gnus-run-hooks 'gnus-summary-update-hook))
                (forward-line 1))
 
              (setq gnus-tmp-prev-subject simp-subject)))
@@ -10734,6 +10737,7 @@
         (t gnus-no-mark))
    'replied)
   (when (gnus-visual-p 'summary-highlight 'highlight)
+    (gnus-summary-highlight-line)
     (gnus-run-hooks 'gnus-summary-update-hook))
   t)
 

=== modified file 'lisp/net/netrc.el'
--- a/lisp/net/netrc.el 2010-09-02 01:42:32 +0000
+++ b/lisp/net/netrc.el 2010-09-11 00:36:27 +0000
@@ -54,12 +54,19 @@
  "Netrc configuration."
  :group 'comm)
 
+(defcustom netrc-file "~/.authinfo"
+  "File where user credentials are stored."
+  :type 'file
+  :group 'netrc)
+
 (defvar netrc-services-file "/etc/services"
   "The name of the services file.")
 
-(defun netrc-parse (file)
+(defun netrc-parse (&optional file)
   (interactive "fFile to Parse: ")
   "Parse FILE and return a list of all entries in the file."
+  (unless file
+    (setq file netrc-file))
   (if (listp file)
       file
     (when (file-exists-p file)
@@ -221,6 +228,19 @@
                          (eq type (car (cddr service)))))))
     (cadr service)))
 
+(defun netrc-credentials (machine &rest ports)
+  "Return a user name/password pair.
+Port specifications will be prioritised in the order they are
+listed in the PORTS list."
+  (let ((list (netrc-parse))
+       found)
+    (while (and ports
+               (not found))
+      (setq found (netrc-machine list machine (pop ports))))
+    (when found
+      (list (cdr (assoc "login" found))
+           (cdr (assoc "password" found))))))
+
 (provide 'netrc)
 
 ;;; netrc.el ends here


reply via email to

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