+2003-07-09 Kai Gro\e,A_\e(Bjohann <kai.grossjohann@gmx.net>
+ From Gaute B Strokkenes <gs234@cam.ac.uk> (tiny patch).
+
+ * imap.el (imap-wait-for-tag): Clarify comment. Use timeout zero
+ for second, after-process-has-died, accept-process-output.
+ (imap-arrival-filter): If PROC has no buffer, do nothing.
+
2003-07-09 Jesper Harder <harder@ifa.au.dk>
+ * flow-fill.el: Docstring and message fixes.
+
+ * deuglify.el: do.
+
+ * gnus-int.el: do.
+
+ * gnus-msg.el: do.
+
+ * gnus-util.el: do.
+
+ * gnus-draft.el: do.
+
+ * gnus-start.el: do.
+
+ * gnus.el: do.
+
+ * gnus-group.el: do.
+
+ * gnus-art.el: do.
+
+ * gnus-sum.el: do.
+
* mail-source.el (mail-source-movemail): Handle non-numerical
return values.
* imap.el (imap-wait-for-tag): After the process has died, look
for more output still pending. From Gaute B Strokkenes
- <gs234@cam.ac.uk>.
+ <gs234@cam.ac.uk> (tiny patch).
2003-07-07 Teodor Zlatanov <tzz@lifelogs.com>
;; Renamed `gnus-outlook-deuglify-article' to
;; `gnus-article-outlook-deuglify-article'.
;; Made it easier to deuglify the article while being in Gnus' Article
-;; Edit Mode. (suggested by Phil Nitschke)
+;; Edit Mode. (suggested by Phil Nitschke)
;;
;;
;; Revision 1.3 2002/01/02 23:35:54 rscholz
;;;###autoload
(defun gnus-article-outlook-unwrap-lines (&optional nodisplay)
- "Unwrap lines that appear to be wrapped citation lines.
+ "Unwrap lines that appear to be wrapped citation lines.
You can control what lines will be unwrapped by frobbing
`gnus-outlook-deuglify-unwrap-min' and `gnus-outlook-deuglify-unwrap-max',
-indicating the miminum and maximum length of an unwrapped citation line. If
+indicating the minimum and maximum length of an unwrapped citation line. If
NODISPLAY is non-nil, don't redisplay the article buffer."
(interactive "P")
(save-excursion
(unless nodisplay (gnus-outlook-display-article-buffer)))
(defun gnus-outlook-rearrange-article (attr-start)
- "Put the text from `attr-start' to the end of buffer at the top of the article buffer."
+ "Put the text from ATTR-START to the end of buffer at the top of the article buffer."
(save-excursion
(let ((inhibit-read-only t)
(cite-marks gnus-outlook-deuglify-cite-marks))
(defcustom fill-flowed-display-column 'fill-column
"Column beyond which format=flowed lines are wrapped, when displayed.
-This can be a lisp expression or an integer."
+This can be a Lisp expression or an integer."
:type '(choice (const :tag "Standard `fill-column'" fill-column)
(const :tag "Fit Window" (- (window-width) 5))
(sexp)
(defcustom fill-flowed-encode-column 66
"Column beyond which format=flowed lines are wrapped, in outgoing messages.
-This can be a lisp expression or an integer.
+This can be a Lisp expression or an integer.
RFC 2646 suggests 66 characters for readability."
:type '(choice (const :tag "Standard fill-column" fill-column)
(const :tag "RFC 2646 default (66)" 66)
"*Integer that says how many TeX-related buttons Gnus will show.
The higher the number, the more buttons will appear and the more false
positives are possible. Note that you can set this variable local to
-specifific groups. Setting it higher in TeX groups is probably a good idea.
+specific groups. Setting it higher in TeX groups is probably a good idea.
See Info node `(gnus)Group Parameters' and the variable `gnus-parameters' on
how to set variables in specific groups."
:group 'gnus-article-buttons
"*Integer that says how many man-related buttons Gnus will show.
The higher the number, the more buttons will appear and the more false
positives are possible. Note that you can set this variable local to
-specifific groups. Setting it higher in Unix groups is probably a good idea.
+specific groups. Setting it higher in Unix groups is probably a good idea.
See Info node `(gnus)Group Parameters' and the variable `gnus-parameters' on
how to set variables in specific groups."
:group 'gnus-article-buttons
"*Integer that says how many emacs-related buttons Gnus will show.
The higher the number, the more buttons will appear and the more false
positives are possible. Note that you can set this variable local to
-specifific groups. Setting it higher in Emacs or Gnus related groups is
+specific groups. Setting it higher in Emacs or Gnus related groups is
probably a good idea. See Info node `(gnus)Group Parameters' and the variable
`gnus-parameters' on how to set variables in specific groups."
:group 'gnus-article-buttons
Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where
REGEXP: is the string (case insensitive) matching text around the button (can
-also be lisp expression evaluating to a string),
+also be Lisp expression evaluating to a string),
BUTTON: is the number of the regexp grouping actually matching the button,
-FORM: is a lisp expression which must eval to true for the button to
+FORM: is a Lisp expression which must eval to true for the button to
be added,
CALLBACK: is the function to call when the user push this button, and each
PAR: is a number of a regexp grouping whose text will be passed to CALLBACK.
This variable is a list of FUNCTION or (REGEXP . FUNCTION). If item
is FUNCTION, FUNCTION will be apply to all newsgroups. If item is a
-\(REGEXP . FUNCTION), FUNCTION will be only apply to thes newsgroups
+\(REGEXP . FUNCTION), FUNCTION will be only apply to the newsgroups
whose names match REGEXP.
For example:
(dolist (group '("nndraft:drafts" "nndraft:queue"))
(setq active (gnus-activate-group group))
(if (and active (>= (cdr active) (car active)))
- (if (y-or-n-p "There are unsent drafts. Confirm to exit?")
+ (if (y-or-n-p "There are unsent drafts. Confirm to exit? ")
(throw 'continue t)
(error "Stop!"))))))))
%E Icon as defined by `gnus-group-icon-list'.
%u User defined specifier. The next character in the format string should
be a letter. Gnus will call the function gnus-user-format-function-X,
- where X is the letter following %u. The function will be passed a
- single dummy parameter as argument.. The function should return a
+ where X is the letter following %u. The function will be passed a
+ single dummy parameter as argument. The function should return a
string, which will be inserted into the buffer just like information
from any other group specifier.
(defun gnus-topic-mode-p ()
"Return non-nil in `gnus-topic-mode'."
- (and (boundp 'gnus-topic-mode)
+ (and (boundp 'gnus-topic-mode)
(symbol-value 'gnus-topic-mode)))
(defun gnus-group-make-menu-bar ()
["Select" gnus-group-select-group
:included (not (gnus-topic-mode-p))
:active (gnus-group-group-name)]
- ["Select " gnus-topic-select-group
+ ["Select " gnus-topic-select-group
:included (gnus-topic-mode-p)]
["See old articles" (gnus-group-select-group 'all)
:keys "C-u SPC" :active (gnus-group-group-name)]
:active (gnus-group-group-name)
,@(if (featurep 'xemacs) nil
'(:help "Mark unread articles in the current group as read"))]
- ["Catch up " gnus-topic-catchup-articles
+ ["Catch up " gnus-topic-catchup-articles
:included (gnus-topic-mode-p)
,@(if (featurep 'xemacs) nil
'(:help "Mark unread articles in the current group or topic as read"))]
'(:help "Display the archived control message for the current group"))]
;; Actually one should check, if any of the marked groups gives t for
;; (gnus-check-backend-function 'request-expire-articles ...)
- ["Expire articles" gnus-group-expire-articles
+ ["Expire articles" gnus-group-expire-articles
:included (not (gnus-topic-mode-p))
:active (or (and (gnus-group-group-name)
(gnus-check-backend-function
'request-expire-articles
(gnus-group-group-name))) gnus-group-marked)]
- ["Expire articles " gnus-topic-expire-articles
+ ["Expire articles " gnus-topic-expire-articles
:included (gnus-topic-mode-p)]
["Set group level..." gnus-group-set-current-level
(gnus-group-group-name)]
(gnus-tmp-qualified-group
(gnus-group-name-decode (gnus-group-real-name gnus-tmp-group)
group-name-charset))
- (gnus-tmp-comment
+ (gnus-tmp-comment
(or (gnus-group-get-parameter gnus-tmp-group 'comment t)
gnus-tmp-group))
(gnus-tmp-newsgroup-description
(forward-line -1)
(gnus-group-position-point)
- ;; Load the backend and try to make the backend create
+ ;; Load the back end and try to make the back end create
;; the group as well.
(when (assoc (symbol-name (setq backend (car (gnus-server-get-method
nil meth))))
(unless group
(error "No group to delete"))
(unless (gnus-check-backend-function 'request-delete-group group)
- (error "This backend does not support group deletion"))
+ (error "This back end does not support group deletion"))
(prog1
(if (and (not no-prompt)
(not (gnus-yes-or-no-p
(progn
(unless (gnus-check-backend-function
'request-rename-group (gnus-group-group-name))
- (error "This backend does not support renaming groups"))
+ (error "This back end does not support renaming groups"))
(gnus-read-group "Rename group to: "
(gnus-group-real-name (gnus-group-group-name))))))
(unless (gnus-check-backend-function 'request-rename-group group)
- (error "This backend does not support renaming groups"))
+ (error "This back end does not support renaming groups"))
(unless group
(error "No group to rename"))
(when (equal (gnus-group-real-name group) new-name)
(defun nnrss-discover-feed (arg))
(defun nnrss-save-server-data (arg)))
(defun gnus-group-make-rss-group (&optional url)
- "Given a URL, discover if there is an RSS feed. If there is,
-use Gnus' to create an nnrss group"
+ "Given a URL, discover if there is an RSS feed.
+If there is, use Gnus to create an nnrss group"
(interactive)
(require 'nnrss)
(if (not url)
(setq url (read-from-minibuffer "URL to Search for RSS: ")))
(let ((feedinfo (nnrss-discover-feed url)))
(if feedinfo
- (let ((title (read-from-minibuffer "Title: "
- (cdr (assoc 'title
+ (let ((title (read-from-minibuffer "Title: "
+ (cdr (assoc 'title
feedinfo))))
- (desc (read-from-minibuffer "Description: "
+ (desc (read-from-minibuffer "Description: "
(cdr (assoc 'description
feedinfo))))
(href (cdr (assoc 'href feedinfo))))
(gnus-group-sort-groups 'gnus-group-sort-by-rank reverse))
(defun gnus-group-sort-groups-by-method (&optional reverse)
- "Sort the group buffer alphabetically by backend name.
+ "Sort the group buffer alphabetically by back end name.
If REVERSE, sort in reverse order."
(interactive "P")
(gnus-group-sort-groups 'gnus-group-sort-by-method reverse))
(gnus-group-sort-selected-groups n 'gnus-group-sort-by-rank reverse))
(defun gnus-group-sort-selected-groups-by-method (&optional n reverse)
- "Sort the group buffer alphabetically by backend name.
+ "Sort the group buffer alphabetically by back end name.
Obeys the process/prefix convention. If REVERSE (the symbolic prefix),
sort in reverse order."
(interactive (gnus-interactive "P\ny"))
(< (gnus-info-level info1) (gnus-info-level info2)))
(defun gnus-group-sort-by-method (info1 info2)
- "Sort alphabetically by backend name."
+ "Sort alphabetically by back end name."
(string< (car (gnus-find-method-for-group
(gnus-info-group info1) info1))
(car (gnus-find-method-for-group
(defun gnus-group-list-all-groups (&optional arg)
"List all newsgroups with level ARG or lower.
-Default is gnus-level-unsubscribed, which lists all subscribed and most
+Default is `gnus-level-unsubscribed', which lists all subscribed and most
unsubscribed groups."
(interactive "P")
(gnus-group-list-groups (or arg gnus-level-unsubscribed) t))
(browse-url (eval url))
(setq url (concat "http://" hierarchy
".news-admin.org/charters/" name))
- (if (and (fboundp 'url-http-file-exists-p)
+ (if (and (fboundp 'url-http-file-exists-p)
(url-http-file-exists-p url))
(browse-url url)
(gnus-group-fetch-control group))))))
(let ((enable-local-variables nil))
(gnus-group-read-ephemeral-group
group
- `(nndoc ,group (nndoc-address
+ `(nndoc ,group (nndoc-address
,(find-file-noselect
- (concat "/ftp@ftp.isc.org:/usenet/control/"
+ (concat "/ftp@ftp.isc.org:/usenet/control/"
hierarchy "/" name ".Z")))
(nndoc-article-type mbox)) t nil nil))))))
(pop-to-buffer obuf)))
(defun gnus-group-description-apropos (regexp)
- "List all newsgroups that have names or descriptions that match a regexp."
+ "List all newsgroups that have names or descriptions that match REGEXP."
(interactive "sGnus description apropos (regexp): ")
(when (not (or gnus-description-hashtb
(gnus-read-all-descriptions-files)))
(defun gnus-group-suspend ()
"Suspend the current Gnus session.
In fact, cleanup buffers except for group mode buffer.
-The hook gnus-suspend-gnus-hook is called before actually suspending."
+The hook `gnus-suspend-gnus-hook' is called before actually suspending."
(interactive)
(gnus-run-hooks 'gnus-suspend-gnus-hook)
(gnus-offer-save-summaries)
and the second element is the address."
(interactive
(list (let ((how (completing-read
- "Which backend: "
+ "Which back end: "
(append gnus-valid-select-methods gnus-server-alist)
nil t (cons "nntp" 0) 'gnus-method-history)))
- ;; We either got a backend name or a virtual server name.
+ ;; We either got a back end name or a virtual server name.
;; If the first, we also need an address.
(if (assoc how gnus-valid-select-methods)
(list (intern how)
(funcall (gnus-get-function gnus-command-method 'open-server)
(nth 1 gnus-command-method)
(nthcdr 2 gnus-command-method))
- (error
- (gnus-message 1 (format
+ (error
+ (gnus-message 1 (format
"Unable to open server due to: %s"
(error-message-string err)))
nil)
(defun gnus-status-message (gnus-command-method)
"Return the status message from GNUS-COMMAND-METHOD.
-If GNUS-COMMAND-METHOD is a string, it is interpreted as a group name. The method
-this group uses will be queried."
+If GNUS-COMMAND-METHOD is a string, it is interpreted as a group
+name. The method this group uses will be queried."
(let ((gnus-command-method
(if (stringp gnus-command-method)
(gnus-find-method-for-group gnus-command-method)
(gnus-group-real-name group) article))))
(defun gnus-request-set-mark (group action)
- "Set marks on articles in the backend."
+ "Set marks on articles in the back end."
(let ((gnus-command-method (gnus-find-method-for-group group)))
(if (not (gnus-check-backend-function
'request-set-mark (car gnus-command-method)))
(nth 1 gnus-command-method)))))
(defun gnus-request-update-mark (group article mark)
- "Allow the backend to change the mark the user tries to put on an article."
+ "Allow the back end to change the mark the user tries to put on an article."
(let ((gnus-command-method (gnus-find-method-for-group group)))
(if (not (gnus-check-backend-function
'request-update-mark (car gnus-command-method)))
(defcustom gnus-message-replysignencrypted
t
- "Setting this causes automatically encryped messages to also be signed."
+ "Setting this causes automatically encrypted messages to also be signed."
:group 'gnus-message
:type 'boolean)
This function prepares a news even when using mail groups. This is useful
for posting messages to mail groups without actually sending them over the
-network. The corresponding backend must have a 'request-post method."
+network. The corresponding back end must have a 'request-post method."
(interactive "P")
;; We can't `let' gnus-newsgroup-name here, since that leads
;; to local variables leaking.
This function prepares a news even when using mail groups. This is useful
for posting messages to mail groups without actually sending them over the
-network. The corresponding backend must have a 'request-post method."
+network. The corresponding back end must have a 'request-post method."
(interactive "P")
;; We can't `let' gnus-newsgroup-name here, since that leads
;; to local variables leaking.
(gnus-summary-work-articles 1))))
;; Allow user to require confirmation before replying by mail to the
;; author of a news article (or mail message).
- (when (or
+ (when (or
(not (or (gnus-news-group-p gnus-newsgroup-name)
gnus-confirm-treat-mail-like-news))
(not (cond ((stringp gnus-confirm-mail-reply-to-news)
;; This mail group doesn't have a `to-list', so we add one
;; here. Magic!
(when (gnus-y-or-n-p
- (format "Do you want to add this as `to-list': %s " to-address))
+ (format "Do you want to add this as `to-list': %s? " to-address))
(gnus-group-add-parameter group (cons 'to-list to-address))))))
(defun gnus-put-message ()
(repeat function)))
(defcustom gnus-subscribe-newsgroup-hooks nil
- "*Hooks run after you subscribe to a new group. The hooks will be called
-with new group's name as argument."
+ "*Hooks run after you subscribe to a new group.
+The hooks will be called with new group's name as argument."
:group 'gnus-group-new
:type 'hook)
:group 'gnus-start
:type 'hook)
-(defcustom gnus-setup-news-hook
+(defcustom gnus-setup-news-hook
'(gnus-fixup-nnimap-unread-after-getting-new-news)
"A hook after reading the .newsrc file, but before generating the buffer."
:group 'gnus-start
(gnus-subscribe-newsgroup newsgroup))
(defun gnus-subscribe-alphabetically (newgroup)
- "Subscribe new NEWSGROUP and insert it in alphabetical order."
+ "Subscribe new NEWGROUP and insert it in alphabetical order."
(let ((groups (cdr gnus-newsrc-alist))
before)
(while (and (not before) groups)
(gnus-subscribe-newsgroup newgroup before)))
(defun gnus-subscribe-hierarchically (newgroup)
- "Subscribe new NEWSGROUP and insert it in hierarchical newsgroup order."
+ "Subscribe new NEWGROUP and insert it in hierarchical newsgroup order."
;; Basic ideas by mike-w@cs.aukuni.ac.nz (Mike Williams)
(save-excursion
(set-buffer (nnheader-find-file-noselect gnus-current-startup-file))
(gnus-message 7 "`A k' to list killed groups"))))))
(defun gnus-subscribe-group (group &optional previous method)
- "Subcribe GROUP and put it after PREVIOUS."
+ "Subscribe GROUP and put it after PREVIOUS."
(gnus-group-change-level
(if method
(list t group gnus-level-default-subscribed nil nil method)
(gnus-message 5 "%sdone" mesg)))))))
(defun gnus-read-active-file-2 (groups method)
- "Read an active file for GROUPS in METHOD using gnus-retrieve-groups."
+ "Read an active file for GROUPS in METHOD using `gnus-retrieve-groups'."
(when groups
(save-excursion
(set-buffer nntp-server-buffer)
(gnus-save-newsrc-file)))
(defun gnus-gnus-to-quick-newsrc-format (&optional minimal name &rest specific-variables)
- "Print Gnus variables such as gnus-newsrc-alist in lisp format."
+ "Print Gnus variables such as `gnus-newsrc-alist' in Lisp format."
(princ ";; -*- emacs-lisp -*-\n")
(if name
(princ (format ";; %s\n" name))
(stringp gnus-save-killed-list))
(gnus-strip-killed-list)
gnus-killed-list))
- (variables
+ (variables
(or specific-variables
(if gnus-save-killed-list gnus-variable-list
;; Remove the `gnus-killed-list' from the list of variables
;;;###autoload
(defun gnus-declare-backend (name &rest abilities)
- "Declare backend NAME with ABILITIES as a Gnus backend."
+ "Declare back end NAME with ABILITIES as a Gnus back end."
(setq gnus-valid-select-methods
(nconc gnus-valid-select-methods
(list (apply 'list name abilities))))
default-directory)))
(eval-and-compile
-(defalias 'gnus-display-time-event-handler
+(defalias 'gnus-display-time-event-handler
(if (gnus-boundp 'display-time-timer)
'display-time-event-handler
(lambda () "Does nothing as `display-time-timer' is not bound.
(defcustom gnus-read-all-available-headers nil
"Whether Gnus should parse all headers made available to it.
-This is mostly relevant for slow backends where the user may
+This is mostly relevant for slow back ends where the user may
wish to widen the summary buffer to include all headers
that were fetched. Say, for nnultimate groups."
:group 'gnus-summary
gnus-unseen-mark)
(t gnus-no-mark)))
(gnus-tmp-downloaded
- (cond (undownloaded
+ (cond (undownloaded
gnus-undownloaded-mark)
(gnus-newsgroup-agentized
gnus-downloaded-mark)
(gnus-run-hooks 'gnus-summary-prepare-hook)))
(defsubst gnus-general-simplify-subject (subject)
- "Simply subject by the same rules as gnus-gather-threads-by-subject."
+ "Simplify subject by the same rules as `gnus-gather-threads-by-subject'."
(setq subject
(cond
;; Truncate the subject.
(forward-line 1)))))))
(defun gnus-summary-update-article-line (article header)
- "Update the line for ARTICLE using HEADERS."
+ "Update the line for ARTICLE using HEADER."
(let* ((id (mail-header-id header))
(thread (gnus-id-to-thread id)))
(unless thread
(let ((inserted (- (point)
(progn
(gnus-summary-insert-line
- header level nil
+ header level nil
(memq article gnus-newsgroup-undownloaded)
(gnus-article-mark article)
(memq article gnus-newsgroup-replied)
(point)))))
(when (cdr datal)
(gnus-data-update-list
- (cdr datal)
+ (cdr datal)
(- (gnus-data-pos data) (gnus-data-pos (cadr datal)) inserted)))))))
(defun gnus-summary-update-article (article &optional iheader)
gnus-unseen-mark)
(t gnus-no-mark))
gnus-tmp-downloaded
- (cond ((memq number gnus-newsgroup-undownloaded)
+ (cond ((memq number gnus-newsgroup-undownloaded)
gnus-undownloaded-mark)
(gnus-newsgroup-agentized
gnus-downloaded-mark)
(gnus-set-active group (cons (caar alist) (cdr active)))))
(setq gnus-summary-use-undownloaded-faces
- (not (gnus-agent-find-parameter
+ (not (gnus-agent-find-parameter
group
'agent-disable-undownloaded-faces))))
'list))
(defun gnus-article-unpropagatable-p (mark)
- "Return whether MARK should be propagated to backend."
+ "Return whether MARK should be propagated to back end."
(memq mark gnus-article-unpropagated-mark-lists))
(defun gnus-adjust-marked-articles (info)
(if unread
(progn
(while data
- (unless (memq (gnus-data-number (car data))
+ (unless (memq (gnus-data-number (car data))
(cond
((eq gnus-auto-goto-ignores
'always-undownloaded)
(defun gnus-summary-toggle-truncation (&optional arg)
"Toggle truncation of summary lines.
-With arg, turn line truncation on if arg is positive."
+With ARG, turn line truncation on if ARG is positive."
(interactive "P")
(setq truncate-lines
(if (null arg) (not truncate-lines)
"Go to the first subject satisfying any non-nil constraint.
If UNREAD is non-nil, the article should be unread.
If UNDOWNLOADED is non-nil, the article should be undownloaded.
-If UNSEED is non-nil, the article should be unseen.
+If UNSEEN is non-nil, the article should be unseen.
Returns the article selected or nil if there are no matching articles."
(interactive "P")
(cond
(and unseen
(memq num gnus-newsgroup-unseen)))))))
(setq data (cdr data)))
- (prog1
+ (prog1
(if data
(progn
(goto-char (gnus-data-pos (car data)))
(gnus-summary-position-point))))
(defun gnus-summary-insert-dormant-articles ()
- "Insert all the dormat articles for this group into the current buffer."
+ "Insert all the dormant articles for this group into the current buffer."
(interactive)
(let ((gnus-verbose (max 6 gnus-verbose)))
(if (not gnus-newsgroup-dormant)
thread)
(defun gnus-cut-threads (threads)
- "Cut off all uninteresting articles from the beginning of threads."
+ "Cut off all uninteresting articles from the beginning of THREADS."
(when (or (eq gnus-fetch-old-headers 'some)
(eq gnus-fetch-old-headers 'invisible)
(numberp gnus-fetch-old-headers)
gnus-newsgroup-name limit))
'nov)
(gnus-build-all-threads)
- (error "Can't fetch thread from backends that don't support NOV"))
+ (error "Can't fetch thread from back ends that don't support NOV"))
(gnus-message 5 "Fetching headers for %s...done" gnus-newsgroup-name))
(gnus-summary-limit-include-thread id)))
article gnus-newsgroup-name (current-buffer))))
;; run the move/copy/crosspost/respool hook
- (run-hook-with-args 'gnus-summary-article-move-hook
+ (run-hook-with-args 'gnus-summary-article-move-hook
action
- (gnus-data-header
+ (gnus-data-header
(assoc article (gnus-data-list nil)))
gnus-newsgroup-name
to-newsgroup
(unless (memq (car articles) not-deleted)
(gnus-summary-mark-article (car articles) gnus-canceled-mark))
(let* ((article (car articles))
- (id (mail-header-id (gnus-data-header
+ (id (mail-header-id (gnus-data-header
(assoc article (gnus-data-list nil))))))
(run-hook-with-args 'gnus-summary-article-delete-hook
'delete id gnus-newsgroup-name nil
(defun gnus-summary-update-download-mark (article)
"Update the download mark."
(gnus-summary-update-mark
- (cond ((memq article gnus-newsgroup-undownloaded)
+ (cond ((memq article gnus-newsgroup-undownloaded)
gnus-undownloaded-mark)
(gnus-newsgroup-agentized
gnus-downloaded-mark)
(defvar gnus-summary-highlight-line-trigger nil)
(defun gnus-summary-highlight-line-0 ()
- (if (and (eq gnus-summary-highlight-line-trigger
+ (if (and (eq gnus-summary-highlight-line-trigger
gnus-summary-highlight)
gnus-summary-highlight-line-cached)
gnus-summary-highlight-line-cached
;; It's harmless, though, so the main purpose of this alias is to shut
;; up the byte compiler.
(defalias 'gnus-make-local-hook
- (if (eq (get 'make-local-hook 'byte-compile)
+ (if (eq (get 'make-local-hook 'byte-compile)
'byte-compile-obsolete)
'ignore ; Emacs
'make-local-hook)) ; XEmacs
;; the full date if it's older)
(defun gnus-seconds-today ()
- "Returns the number of seconds passed today"
+ "Return the number of seconds passed today."
(let ((now (decode-time (current-time))))
(+ (car now) (* (car (cdr now)) 60) (* (car (nthcdr 2 now)) 3600))))
(defun gnus-seconds-month ()
- "Returns the number of seconds passed this month"
+ "Return the number of seconds passed this month."
(let ((now (decode-time (current-time))))
(+ (car now) (* (car (cdr now)) 60) (* (car (nthcdr 2 now)) 3600)
(* (- (car (nthcdr 3 now)) 1) 3600 24))))
(defun gnus-seconds-year ()
- "Returns the number of seconds passed this year"
+ "Return the number of seconds passed this year."
(let ((now (decode-time (current-time)))
(days (format-time-string "%j" (current-time))))
(+ (car now) (* (car (cdr now)) 60) (* (car (nthcdr 2 now)) 3600)
respectively.")
(defun gnus-user-date (messy-date)
- "Format the messy-date acording to gnus-user-date-format-alist.
+ "Format the messy-date according to gnus-user-date-format-alist.
Returns \" ? \" if there's bad input or if an other error occurs.
Input should look like this: \"Sun, 14 Oct 2001 13:34:39 +0200\"."
(condition-case ()
gname)))
(defun gnus-make-sort-function (funs)
- "Return a composite sort condition based on the functions in FUNC."
+ "Return a composite sort condition based on the functions in FUNS."
(cond
;; Just a simple function.
((functionp funs) funs)
(car funs))))
(defun gnus-make-sort-function-1 (funs)
- "Return a composite sort condition based on the functions in FUNC."
+ "Return a composite sort condition based on the functions in FUNS."
(let ((function (car funs))
(first 't1)
(last 't2))
(insert "\^_")))
(defun gnus-map-function (funs arg)
- "Applies the result of the first function in FUNS to the second, and so on.
+ "Apply the result of the first function in FUNS to the second, and so on.
ARG is passed to the first function."
(while funs
(setq arg (funcall (pop funs) arg)))
`(setq ,alist (delq (,fun ,key ,alist) ,alist))))
(defun gnus-globalify-regexp (re)
- "Returns a regexp that matches a whole line, iff RE matches a part of it."
+ "Return a regexp that matches a whole line, iff RE matches a part of it."
(concat (unless (string-match "^\\^" re) "^.*")
re
(unless (string-match "\\$$" re) ".*$")))
(t
(list 'local-map map))))
-(defmacro gnus-completing-read-maybe-default (prompt table &optional predicate
- require-match initial-contents
+(defmacro gnus-completing-read-maybe-default (prompt table &optional predicate
+ require-match initial-contents
history default)
"Like `completing-read', allowing for non-existent 7th arg in older XEmacsen."
`(completing-read ,prompt ,table ,predicate ,require-match
("dk" . (concat "http://www.usenet.dk/grupper.pl?get=" name))
("england" . (concat "http://england.news-admin.org/charters/" name))
("fr" . (concat "http://www.usenet-fr.net/fur/chartes/" name ".html"))
- ("europa" . (concat "http://www.europa.usenet.eu.org/chartas/charta-en-"
+ ("europa" . (concat "http://www.europa.usenet.eu.org/chartas/charta-en-"
(gnus-replace-in-string name "europa\\." "") ".html"))
("nl" . (concat "http://www.xs4all.nl/~sister/usenet/charters/" name))
("aus" . (concat "http://aus.news-admin.org/groupinfo.php/" name))
("uk" . (concat "http://www.usenet.org.uk/" name ".html"))
("wales" . (concat "http://www.wales-usenet.org/english/groups/" name ".html"))
("dfw" . (concat "http://www.cirr.com/dfw/charters/" name ".html"))
- ("se" . (concat "http://www.usenet-se.net/Reglementen/"
+ ("se" . (concat "http://www.usenet-se.net/Reglementen/"
(gnus-replace-in-string name "\\." "_") ".html"))
- ("milw" . (concat "http://usenet.mil.wi.us/"
+ ("milw" . (concat "http://usenet.mil.wi.us/"
(gnus-replace-in-string name "milw\\." "") "-charter"))
("ca" . (concat "http://www.sbay.org/ca/charter-" name ".html"))
- ("netins" . (concat "http://www.netins.net/usenet/charter/"
+ ("netins" . (concat "http://www.netins.net/usenet/charter/"
(gnus-replace-in-string name "\\." "-") "-charter.html")))
"*An alist of (HIERARCHY . FORM) pairs used to construct the URL of a charter.
When FORM is evaluated `name' is bound to the name of the group."
:type 'hook)
(defcustom gnus-novice-user t
- "*Non-nil means that you are a usenet novice.
+ "*Non-nil means that you are a Usenet novice.
If non-nil, verbose messages may be displayed and confirmations may be
required."
:group 'gnus-meta
(defcustom gnus-mode-non-string-length nil
"*Max length of mode-line non-string contents.
If this is nil, Gnus will take space as is needed, leaving the rest
-of the modeline intact. Note that the default of nil is unlikely
+of the mode line intact. Note that the default of nil is unlikely
to be desirable; see the manual for further details."
:group 'gnus-various
:type '(choice (const nil)
;; group parameters for spam processing added by Ted Zlatanov <tzz@lifelogs.com>
(defcustom gnus-install-group-spam-parameters t
- "*Disable the group parameters for spam detection.
+ "*Disable the group parameters for spam detection.
Enable if `G c' in XEmacs is giving you trouble, and make sure to submit a bug report."
:type 'boolean
:group 'gnus-start)
tagging, associated with a classification (spam, ham, or neither).
This only makes sense for mail groups."
:variable-group spam
- :variable-type '(repeat
+ :variable-type '(repeat
(list :tag "Group contents spam/ham classification"
(regexp :tag "Group")
(choice
Only applicable to non-spam (unclassified and ham) groups.")
(defvar gnus-group-ham-exit-processor-spamoracle "spamoracle-ham"
- "The spamoracle summary exit ham processor.
+ "The spamoracle summary exit ham processor.
Only applicable to non-spam (unclassified and ham) groups.")
(gnus-define-group-parameter
:parameter-type '(choice :tag "Spam Summary Exit Processor"
:value nil
(list :tag "Spam Summary Exit Processor Choices"
- (set
+ (set
(variable-item gnus-group-spam-exit-processor-ifile)
(variable-item gnus-group-spam-exit-processor-stat)
(variable-item gnus-group-spam-exit-processor-bogofilter)
name regexps that should match all groups in which to do automatic
spam processing, associated with the appropriate processor."
:variable-group spam
- :variable-type '(repeat :tag "Spam/Ham Processors"
+ :variable-type '(repeat :tag "Spam/Ham Processors"
(list :tag "Spam Summary Exit Processor Choices"
- (regexp :tag "Group Regexp")
+ (regexp :tag "Group Regexp")
(set :tag "Spam/Ham Summary Exit Processor"
(variable-item gnus-group-spam-exit-processor-ifile)
(variable-item gnus-group-spam-exit-processor-stat)
group or nil for explicit expiration. This only makes sense for
mail groups."
:variable-group spam
- :variable-type '(repeat
- :tag "Spam-processed articles destination"
+ :variable-type '(repeat
+ :tag "Spam-processed articles destination"
(list
- (regexp :tag "Group Regexp")
- (choice
+ (regexp :tag "Group Regexp")
+ (choice
:tag "Destination for spam-processed articles at summary exit"
(string :tag "Move to a group")
(const :tag "Expire" nil))))
(gnus-define-group-parameter
ham-process-destination
- :parameter-type '(choice
+ :parameter-type '(choice
:tag "Destination for ham articles at summary exit from a spam group"
(string :tag "Move to a group")
(const :tag "Do nothing" nil))
group or nil for explicit ignoring. This only makes sense for
mail groups, and only works in spam groups."
:variable-group spam
- :variable-type '(repeat
- :tag "Ham articles destination"
+ :variable-type '(repeat
+ :tag "Ham articles destination"
(list
- (regexp :tag "Group Regexp")
- (choice
+ (regexp :tag "Group Regexp")
+ (choice
:tag "Destination for ham articles at summary exit from spam group"
(string :tag "Move to a group")
(const :tag "Expire" nil))))
:parameter-document
"Where ham articles will go at summary exit from a spam group.")
- (gnus-define-group-parameter
+ (gnus-define-group-parameter
ham-marks
:type 'list
:parameter-type '(list :tag "Ham mark choices"
- (set
+ (set
(variable-item gnus-del-mark)
(variable-item gnus-read-mark)
(variable-item gnus-killed-mark)
"Marks considered ham (positively not spam). Such articles will be
processed as ham (non-spam) on group exit. When nil, the global
spam-ham-marks variable takes precedence."
- :variable-default '((".*" ((gnus-del-mark
+ :variable-default '((".*" ((gnus-del-mark
gnus-read-mark
- gnus-killed-mark
+ gnus-killed-mark
gnus-kill-file-mark
gnus-low-score-mark))))
:variable-group spam
:variable-document
"*Groups in which to explicitly set the ham marks to some value.")
- (gnus-define-group-parameter
+ (gnus-define-group-parameter
spam-marks
:type 'list
:parameter-type '(list :tag "Spam mark choices"
- (set
+ (set
(variable-item gnus-spam-mark)
(variable-item gnus-killed-mark)
(variable-item gnus-kill-file-mark)
"Whether we want to use the Gnus agent or not.
You may customize gnus-agent to disable its use. However, some
-backends have started to use the agent as a client-side cache.
-Disabling the agent may result in noticable loss of performance."
+back ends have started to use the agent as a client-side cache.
+Disabling the agent may result in noticeable loss of performance."
:version "21.3"
:group 'gnus-agent
:type 'boolean)
(defvar gnus-newsrc-alist nil
"Assoc list of read articles.
-gnus-newsrc-hashtb should be kept so that both hold the same information.")
+`gnus-newsrc-hashtb' should be kept so that both hold the same information.")
(defvar gnus-registry-alist nil
"Assoc list of registry data.
gnus-registry.el will populate this if it's loaded.")
(defvar gnus-newsrc-hashtb nil
- "Hashtable of gnus-newsrc-alist.")
+ "Hashtable of `gnus-newsrc-alist'.")
(defvar gnus-killed-list nil
"List of killed newsgroups.")
(defvar gnus-killed-hashtb nil
- "Hash table equivalent of gnus-killed-list.")
+ "Hash table equivalent of `gnus-killed-list'.")
(defvar gnus-zombie-list nil
"List of almost dead newsgroups.")
group)))
(defun gnus-group-full-name (group method)
- "Return the full name from GROUP and METHOD, even if the method is
-native."
+ "Return the full name from GROUP and METHOD, even if the method is native."
(gnus-group-prefixed-name group method t))
(defun gnus-group-guess-full-name (group)
(setcdr alist (imap-remassoc key (cdr alist)))
alist)))
+(defmacro imap-disable-multibyte ()
+ "Enable multibyte in the current buffer."
+ '(set-buffer-multibyte nil))
+
(defsubst imap-utf7-encode (string)
(if imap-use-utf7
(and string
(sit-for 1))
(and imap-log
(with-current-buffer (get-buffer-create imap-log-buffer)
+ (imap-disable-multibyte)
(buffer-disable-undo)
(goto-char (point-max))
(insert-buffer-substring buffer)))
(sit-for 1))
(and imap-log
(with-current-buffer (get-buffer-create imap-log-buffer)
+ (imap-disable-multibyte)
(buffer-disable-undo)
(goto-char (point-max))
(insert-buffer-substring buffer)))
(sit-for 1))
(and imap-log
(with-current-buffer (get-buffer-create imap-log-buffer)
+ (imap-disable-multibyte)
(buffer-disable-undo)
(goto-char (point-max))
(insert-buffer-substring buffer)))
(sit-for 1))
(and imap-log
(with-current-buffer (get-buffer-create imap-log-buffer)
- (set-buffer-multibyte nil)
+ (imap-disable-multibyte)
(buffer-disable-undo)
(goto-char (point-max))
(insert-buffer-substring buffer)))
(sit-for 1))
(and imap-log
(with-current-buffer (get-buffer-create imap-log-buffer)
+ (imap-disable-multibyte)
(buffer-disable-undo)
(goto-char (point-max))
(insert-buffer-substring buffer)))
(sit-for 1))
(and imap-log
(with-current-buffer (get-buffer-create imap-log-buffer)
+ (imap-disable-multibyte)
(buffer-disable-undo)
(goto-char (point-max))
(insert-buffer-substring buffer)))
(if (imap-opened buffer)
(imap-close buffer))
(mapcar 'make-local-variable imap-local-variables)
- (set-buffer-multibyte nil)
+ (imap-disable-multibyte)
(buffer-disable-undo)
(setq imap-server (or server imap-server))
(setq imap-port (or port imap-port))
(with-current-buffer (get-buffer-create
(generate-new-buffer-name " *temp*"))
(mapcar 'make-local-variable imap-local-variables)
- (set-buffer-multibyte nil)
+ (imap-disable-multibyte)
(buffer-disable-undo)
(setq imap-server (or server imap-server))
(setq imap-port (or port imap-port))
(setq cmdstr (concat cmdstr imap-client-eol))
(and imap-log
(with-current-buffer (get-buffer-create imap-log-buffer)
+ (imap-disable-multibyte)
(buffer-disable-undo)
(goto-char (point-max))
(insert cmdstr)))
(imap-send-command-1 cmdstr)
(setq cmdstr nil)
(if (not (eq (imap-wait-for-tag tag) 'INCOMPLETE))
- (setq command nil);; abort command if no cont-req
+ (setq command nil) ;; abort command if no cont-req
(let ((process imap-process)
(stream imap-stream)
(eol imap-client-eol))
(and imap-log
(with-current-buffer (get-buffer-create
imap-log-buffer)
+ (imap-disable-multibyte)
(buffer-disable-undo)
(goto-char (point-max))
(insert-buffer-substring cmd)))
(setq cmdstr nil)
(unwind-protect
(if (not (eq (imap-wait-for-tag tag) 'INCOMPLETE))
- (setq command nil);; abort command if no cont-req
+ (setq command nil) ;; abort command if no cont-req
(setq command (cons (funcall cmd imap-continuation)
command)))
(setq imap-continuation nil)))
(truncate (* (- imap-read-timeout
(truncate imap-read-timeout))
1000)))))
- ;; Maybe the process has died, but the remote end wants to send
- ;; some more stuff.
+ ;; A process can die _before_ we have processed everything it
+ ;; has to say. Moreover, this can happen in between the call to
+ ;; accept-process-output and the call to process-status in an
+ ;; iteration of the loop above.
(when (and (null imap-continuation)
(< imap-reached-tag tag))
- (accept-process-output imap-process
- (truncate imap-read-timeout)
- (truncate (* (- imap-read-timeout
- (truncate imap-read-timeout))
- 1000))))
+ (accept-process-output imap-process 0 0))
(when imap-have-messaged
(message ""))
(and (memq (process-status imap-process) '(open run))
(defun imap-arrival-filter (proc string)
"IMAP process filter."
- (with-current-buffer (process-buffer proc)
- (goto-char (point-max))
- (insert string)
- (and imap-log
- (with-current-buffer (get-buffer-create imap-log-buffer)
- (buffer-disable-undo)
- (goto-char (point-max))
- (insert string)))
- (let (end)
- (goto-char (point-min))
- (while (setq end (imap-find-next-line))
- (save-restriction
- (narrow-to-region (point-min) end)
- (delete-backward-char (length imap-server-eol))
- (goto-char (point-min))
- (unwind-protect
- (cond ((eq imap-state 'initial)
- (imap-parse-greeting))
- ((or (eq imap-state 'auth)
- (eq imap-state 'nonauth)
- (eq imap-state 'selected)
- (eq imap-state 'examine))
- (imap-parse-response))
- (t
- (message "Unknown state %s in arrival filter"
- imap-state)))
- (delete-region (point-min) (point-max))))))))
+ ;; Sometimes, we are called even though the process has died.
+ ;; Better abstain from doing stuff in that case.
+ (when (process-buffer proc)
+ (with-current-buffer (process-buffer proc)
+ (goto-char (point-max))
+ (insert string)
+ (and imap-log
+ (with-current-buffer (get-buffer-create imap-log-buffer)
+ (imap-disable-multibyte)
+ (buffer-disable-undo)
+ (goto-char (point-max))
+ (insert string)))
+ (let (end)
+ (goto-char (point-min))
+ (while (setq end (imap-find-next-line))
+ (save-restriction
+ (narrow-to-region (point-min) end)
+ (delete-backward-char (length imap-server-eol))
+ (goto-char (point-min))
+ (unwind-protect
+ (cond ((eq imap-state 'initial)
+ (imap-parse-greeting))
+ ((or (eq imap-state 'auth)
+ (eq imap-state 'nonauth)
+ (eq imap-state 'selected)
+ (eq imap-state 'examine))
+ (imap-parse-response))
+ (t
+ (message "Unknown state %s in arrival filter"
+ imap-state)))
+ (delete-region (point-min) (point-max)))))))))
\f
;; Imap parser.
(defun imap-parse-envelope ()
(when (eq (char-after) ?\()
(imap-forward)
- (vector (prog1 (imap-parse-nstring);; date
+ (vector (prog1 (imap-parse-nstring) ;; date
(imap-forward))
- (prog1 (imap-parse-nstring);; subject
+ (prog1 (imap-parse-nstring) ;; subject
(imap-forward))
- (prog1 (imap-parse-address-list);; from
+ (prog1 (imap-parse-address-list) ;; from
(imap-forward))
- (prog1 (imap-parse-address-list);; sender
+ (prog1 (imap-parse-address-list) ;; sender
(imap-forward))
- (prog1 (imap-parse-address-list);; reply-to
+ (prog1 (imap-parse-address-list) ;; reply-to
(imap-forward))
- (prog1 (imap-parse-address-list);; to
+ (prog1 (imap-parse-address-list) ;; to
(imap-forward))
- (prog1 (imap-parse-address-list);; cc
+ (prog1 (imap-parse-address-list) ;; cc
(imap-forward))
- (prog1 (imap-parse-address-list);; bcc
+ (prog1 (imap-parse-address-list) ;; bcc
(imap-forward))
- (prog1 (imap-parse-nstring);; in-reply-to
+ (prog1 (imap-parse-nstring) ;; in-reply-to
(imap-forward))
- (prog1 (imap-parse-nstring);; message-id
+ (prog1 (imap-parse-nstring) ;; message-id
(imap-forward)))))
;; body-fld-param = "(" string SP string *(SP string SP string) ")" / nil
(defsubst imap-parse-string-list ()
- (cond ((eq (char-after) ?\();; body-fld-param
+ (cond ((eq (char-after) ?\() ;; body-fld-param
(let (strlist str)
(imap-forward)
(while (setq str (imap-parse-string))
(defsubst imap-parse-body-ext ()
(let (ext)
- (when (eq (char-after) ?\ );; body-fld-dsp
+ (when (eq (char-after) ?\ ) ;; body-fld-dsp
(imap-forward)
(let (dsp)
(if (eq (char-after) ?\()
(imap-forward))
(assert (imap-parse-nil) t "In imap-parse-body-ext"))
(push (nreverse dsp) ext))
- (when (eq (char-after) ?\ );; body-fld-lang
+ (when (eq (char-after) ?\ ) ;; body-fld-lang
(imap-forward)
(if (eq (char-after) ?\()
(push (imap-parse-string-list) ext)
(push (imap-parse-nstring) ext))
- (while (eq (char-after) ?\ );; body-extension
+ (while (eq (char-after) ?\ ) ;; body-extension
(imap-forward)
(setq ext (append (imap-parse-body-extension) ext)))))
ext))
(imap-forward))
(push subbody body))
(imap-forward)
- (push (imap-parse-string) body);; media-subtype
- (when (eq (char-after) ?\ );; body-ext-mpart:
+ (push (imap-parse-string) body) ;; media-subtype
+ (when (eq (char-after) ?\ ) ;; body-ext-mpart:
(imap-forward)
- (if (eq (char-after) ?\();; body-fld-param
+ (if (eq (char-after) ?\() ;; body-fld-param
(push (imap-parse-string-list) body)
(push (and (imap-parse-nil) nil) body))
(setq body
- (append (imap-parse-body-ext) body)));; body-ext-...
+ (append (imap-parse-body-ext) body))) ;; body-ext-...
(assert (eq (char-after) ?\)) t "In imap-parse-body")
(imap-forward)
(nreverse body))
- (push (imap-parse-string) body);; media-type
+ (push (imap-parse-string) body) ;; media-type
(imap-forward)
- (push (imap-parse-string) body);; media-subtype
+ (push (imap-parse-string) body) ;; media-subtype
(imap-forward)
;; next line for Sun SIMS bug
(and (eq (char-after) ? ) (imap-forward))
- (if (eq (char-after) ?\();; body-fld-param
+ (if (eq (char-after) ?\() ;; body-fld-param
(push (imap-parse-string-list) body)
(push (and (imap-parse-nil) nil) body))
(imap-forward)
- (push (imap-parse-nstring) body);; body-fld-id
+ (push (imap-parse-nstring) body) ;; body-fld-id
(imap-forward)
- (push (imap-parse-nstring) body);; body-fld-desc
+ (push (imap-parse-nstring) body) ;; body-fld-desc
(imap-forward)
;; next `or' for Sun SIMS bug, it regard body-fld-enc as a
;; nstring and return nil instead of defaulting back to 7BIT
;; as the standard says.
- (push (or (imap-parse-nstring) "7BIT") body);; body-fld-enc
+ (push (or (imap-parse-nstring) "7BIT") body) ;; body-fld-enc
(imap-forward)
- (push (imap-parse-number) body);; body-fld-octets
+ (push (imap-parse-number) body) ;; body-fld-octets
;; ok, we're done parsing the required parts, what comes now is one
;; of three things:
(when (eq (char-after) ?\ )
(imap-forward)
(let (lines)
- (cond ((eq (char-after) ?\();; body-type-msg:
- (push (imap-parse-envelope) body);; envelope
+ (cond ((eq (char-after) ?\() ;; body-type-msg:
+ (push (imap-parse-envelope) body) ;; envelope
(imap-forward)
- (push (imap-parse-body) body);; body
+ (push (imap-parse-body) body) ;; body
;; buggy stalker communigate pro 3.0 doesn't print
;; number of lines in message/rfc822 attachment
(if (eq (char-after) ?\))
(push 0 body)
(imap-forward)
(push (imap-parse-number) body))) ;; body-fld-lines
- ((setq lines (imap-parse-number)) ;; body-type-text:
- (push lines body)) ;; body-fld-lines
+ ((setq lines (imap-parse-number)) ;; body-type-text:
+ (push lines body)) ;; body-fld-lines
(t
- (backward-char))))) ;; no match...
+ (backward-char))))) ;; no match...
;; ...and then parse the third one here...
- (when (eq (char-after) ?\ );; body-ext-1part:
+ (when (eq (char-after) ?\ ) ;; body-ext-1part:
(imap-forward)
- (push (imap-parse-nstring) body);; body-fld-md5
- (setq body (append (imap-parse-body-ext) body)));; body-ext-1part..
+ (push (imap-parse-nstring) body) ;; body-fld-md5
+ (setq body (append (imap-parse-body-ext) body))) ;; body-ext-1part..
(assert (eq (char-after) ?\)) t "In imap-parse-body 2")
(imap-forward)