aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2010-09-11 00:36:27 +0000
committerKatsumi Yamaoka2010-09-11 00:36:27 +0000
commita9ec34f4c483f5d501c2f6db16e3423b22385cc9 (patch)
treeacd5321b814d4e0df9cc358239808bbbde62b93e
parentcf38dd429888fc992408716922ecab1c39242944 (diff)
downloademacs-a9ec34f4c483f5d501c2f6db16e3423b22385cc9.tar.gz
emacs-a9ec34f4c483f5d501c2f6db16e3423b22385cc9.zip
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.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/gnus/ChangeLog11
-rw-r--r--lisp/gnus/gnus-start.el5
-rw-r--r--lisp/gnus/gnus-sum.el10
-rw-r--r--lisp/net/netrc.el22
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 @@
12010-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * net/netrc.el (netrc-credentials): New conveniency function.
4
12010-09-10 Stefan Monnier <monnier@iro.umontreal.ca> 52010-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
2 6
3 * textmodes/texinfo.el (texinfo-syntax-propertize-function): New fun 7 * 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 @@
12010-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * gnus-start.el (gnus-read-active-file-1): If gnus-agent isn't set,
4 then do request scans from the backends.
5
6 * gnus-sum.el (gnus-summary-update-hook): Change default to nil, to
7 avoid running a hook per line, since this takes a lot of time,
8 profiling shows.
9 (gnus-summary-prepare-threads): Call `gnus-summary-highlight-line'
10 directly if gnus-visual-p is true.
11
12010-09-10 Katsumi Yamaoka <yamaoka@jpl.org> 122010-09-10 Katsumi Yamaoka <yamaoka@jpl.org>
2 13
3 * gnus-start.el (gnus-read-active-for-groups): Check only subscribed 14 * 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."
2048 (gnus-message 5 mesg) 2048 (gnus-message 5 mesg)
2049 (when (gnus-check-server method) 2049 (when (gnus-check-server method)
2050 ;; Request that the backend scan its incoming messages. 2050 ;; Request that the backend scan its incoming messages.
2051 (when (and gnus-agent 2051 (when (and (or (and gnus-agent
2052 (gnus-online method) 2052 (gnus-online method))
2053 (not gnus-agent))
2053 (gnus-check-backend-function 'request-scan (car method))) 2054 (gnus-check-backend-function 'request-scan (car method)))
2054 (if infos 2055 (if infos
2055 (dolist (info infos) 2056 (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'."
985 :group 'gnus-various 985 :group 'gnus-various
986 :type 'hook) 986 :type 'hook)
987 987
988(defcustom gnus-summary-update-hook 988(defcustom gnus-summary-update-hook nil
989 (list 'gnus-summary-highlight-line)
990 "*A hook called when a summary line is changed. 989 "*A hook called when a summary line is changed.
991The hook will not be called if `gnus-visual' is nil. 990The hook will not be called if `gnus-visual' is nil.
992 991
@@ -3753,6 +3752,7 @@ buffer that was in action when the last article was fetched."
3753 (error (gnus-message 5 "Error updating the summary line"))) 3752 (error (gnus-message 5 "Error updating the summary line")))
3754 (when (gnus-visual-p 'summary-highlight 'highlight) 3753 (when (gnus-visual-p 'summary-highlight 'highlight)
3755 (forward-line -1) 3754 (forward-line -1)
3755 (gnus-summary-highlight-line)
3756 (gnus-run-hooks 'gnus-summary-update-hook) 3756 (gnus-run-hooks 'gnus-summary-update-hook)
3757 (forward-line 1)))) 3757 (forward-line 1))))
3758 3758
@@ -3785,6 +3785,7 @@ buffer that was in action when the last article was fetched."
3785 'score)) 3785 'score))
3786 ;; Do visual highlighting. 3786 ;; Do visual highlighting.
3787 (when (gnus-visual-p 'summary-highlight 'highlight) 3787 (when (gnus-visual-p 'summary-highlight 'highlight)
3788 (gnus-summary-highlight-line)
3788 (gnus-run-hooks 'gnus-summary-update-hook))))) 3789 (gnus-run-hooks 'gnus-summary-update-hook)))))
3789 3790
3790(defvar gnus-tmp-new-adopts nil) 3791(defvar gnus-tmp-new-adopts nil)
@@ -5363,7 +5364,9 @@ or a straight list of headers."
5363 'gnus-number number) 5364 'gnus-number number)
5364 (when gnus-visual-p 5365 (when gnus-visual-p
5365 (forward-line -1) 5366 (forward-line -1)
5366 (gnus-run-hooks 'gnus-summary-update-hook) 5367 (gnus-summary-highlight-line)
5368 (when gnus-summary-update-hook
5369 (gnus-run-hooks 'gnus-summary-update-hook))
5367 (forward-line 1)) 5370 (forward-line 1))
5368 5371
5369 (setq gnus-tmp-prev-subject simp-subject))) 5372 (setq gnus-tmp-prev-subject simp-subject)))
@@ -10734,6 +10737,7 @@ If NO-EXPIRE, auto-expiry will be inhibited."
10734 (t gnus-no-mark)) 10737 (t gnus-no-mark))
10735 'replied) 10738 'replied)
10736 (when (gnus-visual-p 'summary-highlight 'highlight) 10739 (when (gnus-visual-p 'summary-highlight 'highlight)
10740 (gnus-summary-highlight-line)
10737 (gnus-run-hooks 'gnus-summary-update-hook)) 10741 (gnus-run-hooks 'gnus-summary-update-hook))
10738 t) 10742 t)
10739 10743
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 @@
54 "Netrc configuration." 54 "Netrc configuration."
55 :group 'comm) 55 :group 'comm)
56 56
57(defcustom netrc-file "~/.authinfo"
58 "File where user credentials are stored."
59 :type 'file
60 :group 'netrc)
61
57(defvar netrc-services-file "/etc/services" 62(defvar netrc-services-file "/etc/services"
58 "The name of the services file.") 63 "The name of the services file.")
59 64
60(defun netrc-parse (file) 65(defun netrc-parse (&optional file)
61 (interactive "fFile to Parse: ") 66 (interactive "fFile to Parse: ")
62 "Parse FILE and return a list of all entries in the file." 67 "Parse FILE and return a list of all entries in the file."
68 (unless file
69 (setq file netrc-file))
63 (if (listp file) 70 (if (listp file)
64 file 71 file
65 (when (file-exists-p file) 72 (when (file-exists-p file)
@@ -221,6 +228,19 @@ MODE can be \"login\" or \"password\", suitable for passing to
221 (eq type (car (cddr service))))))) 228 (eq type (car (cddr service)))))))
222 (cadr service))) 229 (cadr service)))
223 230
231(defun netrc-credentials (machine &rest ports)
232 "Return a user name/password pair.
233Port specifications will be prioritised in the order they are
234listed in the PORTS list."
235 (let ((list (netrc-parse))
236 found)
237 (while (and ports
238 (not found))
239 (setq found (netrc-machine list machine (pop ports))))
240 (when found
241 (list (cdr (assoc "login" found))
242 (cdr (assoc "password" found))))))
243
224(provide 'netrc) 244(provide 'netrc)
225 245
226;;; netrc.el ends here 246;;; netrc.el ends here