mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-29 11:02:01 +00:00
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.
This commit is contained in:
parent
cf38dd4298
commit
a9ec34f4c4
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user