diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 4 | ||||
-rw-r--r-- | lisp/gnus/ChangeLog | 11 | ||||
-rw-r--r-- | lisp/gnus/gnus-start.el | 5 | ||||
-rw-r--r-- | lisp/gnus/gnus-sum.el | 10 | ||||
-rw-r--r-- | lisp/net/netrc.el | 22 |
5 files changed, 46 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9728bea7414..b2a63275c44 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * net/netrc.el (netrc-credentials): New conveniency function. + 2010-09-10 Stefan Monnier <monnier@iro.umontreal.ca> * textmodes/texinfo.el (texinfo-syntax-propertize-function): New fun diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index afc84de020a..7dca7730828 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,14 @@ +2010-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * 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 <yamaoka@jpl.org> * gnus-start.el (gnus-read-active-for-groups): Check only subscribed diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index b2b47afe2d7..1c06a774203 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -2048,8 +2048,9 @@ If SCAN, request a scan of that group as well." (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) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index a99426ad83f..df20456b278 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -985,8 +985,7 @@ This hook is not called from the non-updating exit commands like `Q'." :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 @@ buffer that was in action when the last article was fetched." (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 @@ buffer that was in action when the last article was fetched." '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 @@ or a straight list of headers." '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 @@ If NO-EXPIRE, auto-expiry will be inhibited." (t gnus-no-mark)) 'replied) (when (gnus-visual-p 'summary-highlight 'highlight) + (gnus-summary-highlight-line) (gnus-run-hooks 'gnus-summary-update-hook)) t) diff --git a/lisp/net/netrc.el b/lisp/net/netrc.el index 2306927f080..408eca9bac7 100644 --- a/lisp/net/netrc.el +++ b/lisp/net/netrc.el @@ -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 @@ MODE can be \"login\" or \"password\", suitable for passing to (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 |