+2001-07-24 19:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * message.el (message-use-mail-followup-to): `t' is not a
+ documented value.
+
2001-07-24 13:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
* gnus-sum.el (gnus-summary-display-arrow): Test fboundp.
* gnus-start.el (gnus-setup-news): Call
`gnus-check-bogus-newsgroups' just after the native server is
opened.
-
+
2001-07-23 Kai Gro\e,A_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
* nnmail.el (nnmail-do-request-post): Util function to be used by
mm-read-coding-system.
* gnus-art.el (article-de-quoted-unreadable):
- (article-de-base64-unreadable, article-wash-html):
+ (article-de-base64-unreadable, article-wash-html):
(gnus-mime-inline-part, gnus-mime-view-part-as-charset): Ditto.
2001-07-21 Kai Gro\e,A_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
* gnus-sum.el (gnus-summary-display-arrow): New variable.
(gnus-summary-set-article-display-arrow): New function.
(gnus-summary-goto-subject): Use it.
-
+
2001-07-18 12:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
* gnus-sum.el (gnus-summary-import-article): Insert date if
* dgnushack.el (dgnushack-make-auto-load): Advise `make-autoload'
to handle `define-derived-mode'.
-
+
2001-07-16 12:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
From: Stefan Monnier <monnier@cs.yale.edu>
(nnrss-read-server-data): Ditto.
2001-07-13 12:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
-
+
* gnus-setup.el (gnus-use-installed-gnus): Typo.
* Cleanup files.
From Pavel@Janik.cz (Pavel Jan\e,Bm\e(Bk).
2001-07-13 07:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
- * gnus-art.el (gnus-boring-article-headers): Better doc.
+ * gnus-art.el (gnus-boring-article-headers): Better doc.
(article-hide-headers): Better regexp.
Suggested by Matt Swift <swift@alum.mit.edu>.
* gnus-srvr.el (gnus-browse-make-menu-bar): Changed one of the
Browse->Next entries to Browse->Prev
-
+
2001-07-11 22:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
* gnus-msg.el (gnus-inews-do-gcc): Don't test gnus-alive-p.
* gnus-kill.el (gnus-execute): Work with the extra headers.
* gnus-sum.el (gnus-summary-execute-command): Ditto.
-
+
2001-07-09 17:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
* mm-view.el (mm-inline-text): w3-coding-system-for-mime-charset
may not defined. From: Raja R Harinath <harinath@cs.umn.edu>.
* message.el (message-send-mail-real-function): New variable.
- (message-send-mail-partially, message-send-mail):
+ (message-send-mail-partially, message-send-mail):
* nngateway.el (nngateway-request-post): Use it.
- * gnus-agent.el (gnus-agentize): Use it.
+ * gnus-agent.el (gnus-agentize): Use it.
- * nnsoup.el (nnsoup-old-functions, nnsoup-set-variables)
+ * nnsoup.el (nnsoup-old-functions, nnsoup-set-variables)
(nnsoup-revert-variables): Use it.
2001-07-09 Colin Walters <walters@cis.ohio-state.edu>
(mm-display-part): Call `mm-inlinable-p'.
(mm-attachment-override-p): Ditto.
(mm-inlined-p): Doc fix.
-
+
* gnus-art.el (gnus-mime-display-single): Call `mm-inlinable-p' as
well as `mm-inlined-p'.
(nntp-send-command-and-decode): Use gnus-point-at-bol.
2001-07-09 13:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
- From Paul Jarc <prj@po.cwru.edu>
+ From Paul Jarc <prj@po.cwru.edu>
* message.el (message-use-mail-followup-to): New variable.
(message-get-reply-headers): Use it.
* nnheader.el (nnheader-init-server-buffer): Make sure the
*nntpd* buffer is made multibyte instead of a random buffer.
-
+
2001-07-09 12:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
* gnus-sum.el (gnus-get-newsgroup-headers-xover): Get headers only
2001-03-10 Matthias Wiehl <mwiehl@gmx.de>
- * gnus.el (gnus-summary-line-format): Typo.
+ * gnus.el (gnus-summary-line-format): Typo.
2001-03-11 Simon Josefsson <simon@josefsson.org>
(nnml-request-regenerate): Use it. Change to deffoo.
2001-02-14 Katsumi Yamaoka <yamaoka@jpl.org>
- Committed by ShengHuo ZHU <zsh@cs.rochester.edu>
+ Committed by ShengHuo ZHU <zsh@cs.rochester.edu>
* gnus.el (gnus-define-group-parameter): Fix.
2001-01-19 Simon Josefsson <sj@extundo.com>
- * gnus-art.el (gnus-button-alist): Add `?=' to mailto URL regexp.
+ * gnus-art.el (gnus-button-alist): Add `?=' to mailto URL regexp.
2001-01-19 13:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
"Default expressions to highlight in dig mode."
:type 'sexp
:group 'dig)
-
+
(defun dig-invoke (domain &optional
- query-type query-class query-option
+ query-type query-class query-option
dig-option server)
"Call dig with given arguments and return buffer containing output.
DOMAIN is a string with a DNS domain. QUERY-TYPE is an optional string
(save-excursion
(goto-char (point-min))
(if (re-search-forward
- (concat domain "\\.?[\t ]+[0-9wWdDhHmMsS]+[\t ]+"
+ (concat domain "\\.?[\t ]+[0-9wWdDhHmMsS]+[\t ]+"
(upcase (or class "IN")) "[\t ]+" (upcase (or type "A")))
nil t)
(let (b e)
'(dig-font-lock-keywords t)))
(when (featurep 'font-lock)
(font-lock-set-defaults)))
-
+
(defun dig-exit ()
"Quit dig output buffer."
(interactive)
"Query addresses of a DOMAIN using dig, by calling `dig-invoke'.
Optional arguments are passed to `dig-invoke'."
(interactive "sHost: ")
- (switch-to-buffer
+ (switch-to-buffer
(dig-invoke domain query-type query-class query-option dig-option server))
(goto-char (point-min))
(and (search-forward ";; ANSWER SECTION:" nil t)
(interactive "e")
(set-buffer (window-buffer (posn-window (event-start event))))
(let* ((pos (posn-point (event-start event)))
- (data (get-text-property pos 'earcon-data))
+ (data (get-text-property pos 'earcon-data))
(fun (get-text-property pos 'earcon-callback)))
(if fun (funcall fun data))))
(gnus-open-agent)
(add-hook 'gnus-setup-news-hook 'gnus-agent-queue-setup)
(unless gnus-agent-send-mail-function
- (setq gnus-agent-send-mail-function (or
- message-send-mail-real-function
- message-send-mail-function)
+ (setq gnus-agent-send-mail-function (or
+ message-send-mail-real-function
+ message-send-mail-function)
message-send-mail-real-function 'gnus-agent-send-mail))
(unless gnus-agent-covered-methods
(setq gnus-agent-covered-methods (list gnus-select-method))))
(start (point))
(end (point-max))
(orig (buffer-substring start end))
- (trans (babel-as-string orig)))
+ (trans (babel-as-string orig)))
(save-restriction
(narrow-to-region start end)
(delete-region start end)
- (insert trans))))))
+ (insert trans))))))
(defun article-hide-signature (&optional arg)
"Hide the signature in the current article.
visible (nth 2 elem)
face (nth 3 elem))
(while (re-search-forward regexp nil t)
- (when (and (match-beginning visible) (match-beginning invisible))
+ (when (and (match-beginning visible) (match-beginning invisible))
(push 'emphasis gnus-article-wash-types)
- (gnus-article-hide-text
- (match-beginning invisible) (match-end invisible) props)
- (gnus-article-unhide-text-type
- (match-beginning visible) (match-end visible) 'emphasis)
- (gnus-put-text-property-excluding-newlines
- (match-beginning visible) (match-end visible) 'face face)
- (goto-char (match-end invisible)))))))))
+ (gnus-article-hide-text
+ (match-beginning invisible) (match-end invisible) props)
+ (gnus-article-unhide-text-type
+ (match-beginning visible) (match-end visible) 'emphasis)
+ (gnus-put-text-property-excluding-newlines
+ (match-beginning visible) (match-end visible) 'face face)
+ (goto-char (match-end invisible)))))))))
(defun gnus-article-setup-highlight-words (&optional highlight-words)
"Setup newsgroup emphasis alist."
(let ((mbl1 mml-buffer-list))
(setq mml-buffer-list mbl)
(set (make-local-variable 'mml-buffer-list) mbl1))
- ;; LOCAL argument of add-hook differs between GNU Emacs
- ;; and XEmacs. make-local-hook makes sure they are local.
+ ;; LOCAL argument of add-hook differs between GNU Emacs
+ ;; and XEmacs. make-local-hook makes sure they are local.
(make-local-hook 'kill-buffer-hook)
(add-hook 'kill-buffer-hook 'mml-destroy-buffers t t)))
`(lambda (no-highlight)
nil id
(gnus-article-mime-total-parts)
(mm-handle-media-type handle)))))
- (if (window-live-p window)
- (select-window window)))))
+ (if (window-live-p window)
+ (select-window window)))))
(goto-char point)
(delete-region (gnus-point-at-bol) (progn (forward-line 1) (point)))
(gnus-insert-mime-button
(interactive "P")
(gnus-article-check-buffer)
(let ((nosaves
- '("q" "Q" "c" "r" "R" "\C-c\C-f" "m" "a" "f" "F"
- "Zc" "ZC" "ZE" "ZJ" "ZQ" "ZZ" "Zn" "ZR" "ZG" "ZN" "ZP"
- "=" "^" "\M-^" "|"))
- (nosave-but-article
- '("A\r"))
- (nosave-in-article
- '("\C-d"))
- (up-to-top
- '("n" "Gn" "p" "Gp"))
- keys new-sum-point)
+ '("q" "Q" "c" "r" "R" "\C-c\C-f" "m" "a" "f" "F"
+ "Zc" "ZC" "ZE" "ZJ" "ZQ" "ZZ" "Zn" "ZR" "ZG" "ZN" "ZP"
+ "=" "^" "\M-^" "|"))
+ (nosave-but-article
+ '("A\r"))
+ (nosave-in-article
+ '("\C-d"))
+ (up-to-top
+ '("n" "Gn" "p" "Gp"))
+ keys new-sum-point)
(save-excursion
(set-buffer gnus-article-current-summary)
(let (gnus-pick-mode)
- (push (or key last-command-event) unread-command-events)
+ (push (or key last-command-event) unread-command-events)
(setq keys (static-if (featurep 'xemacs)
(events-to-keys (read-key-sequence nil))
(read-key-sequence nil)))))
(message "")
(if (or (member keys nosaves)
- (member keys nosave-but-article)
- (member keys nosave-in-article))
- (let (func)
- (save-window-excursion
- (pop-to-buffer gnus-article-current-summary 'norecord)
- ;; We disable the pick minor mode commands.
- (let (gnus-pick-mode)
- (setq func (lookup-key (current-local-map) keys))))
- (if (or (not func)
+ (member keys nosave-but-article)
+ (member keys nosave-in-article))
+ (let (func)
+ (save-window-excursion
+ (pop-to-buffer gnus-article-current-summary 'norecord)
+ ;; We disable the pick minor mode commands.
+ (let (gnus-pick-mode)
+ (setq func (lookup-key (current-local-map) keys))))
+ (if (or (not func)
(numberp func))
- (ding)
- (unless (member keys nosave-in-article)
- (set-buffer gnus-article-current-summary))
- (call-interactively func)
- (setq new-sum-point (point)))
- (when (member keys nosave-but-article)
- (pop-to-buffer gnus-article-buffer 'norecord)))
+ (ding)
+ (unless (member keys nosave-in-article)
+ (set-buffer gnus-article-current-summary))
+ (call-interactively func)
+ (setq new-sum-point (point)))
+ (when (member keys nosave-but-article)
+ (pop-to-buffer gnus-article-buffer 'norecord)))
;; These commands should restore window configuration.
(let ((obuf (current-buffer))
- (owin (current-window-configuration))
- (opoint (point))
- (summary gnus-article-current-summary)
- func in-buffer selected)
- (if not-restore-window
- (pop-to-buffer summary 'norecord)
- (switch-to-buffer summary 'norecord))
- (setq in-buffer (current-buffer))
- ;; We disable the pick minor mode commands.
- (if (and (setq func (let (gnus-pick-mode)
+ (owin (current-window-configuration))
+ (opoint (point))
+ (summary gnus-article-current-summary)
+ func in-buffer selected)
+ (if not-restore-window
+ (pop-to-buffer summary 'norecord)
+ (switch-to-buffer summary 'norecord))
+ (setq in-buffer (current-buffer))
+ ;; We disable the pick minor mode commands.
+ (if (and (setq func (let (gnus-pick-mode)
(lookup-key (current-local-map) keys)))
(functionp func))
- (progn
- (call-interactively func)
- (setq new-sum-point (point))
+ (progn
+ (call-interactively func)
+ (setq new-sum-point (point))
(when (eq in-buffer (current-buffer))
(setq selected (gnus-summary-select-article))
(set-buffer obuf)
(when win
(set-window-point win new-sum-point)))) )
(switch-to-buffer gnus-article-buffer)
- (ding))))))
+ (ding))))))
(defun gnus-article-describe-key (key)
"Display documentation of the function invoked by KEY. KEY is a string."
(interactive "e")
(set-buffer (window-buffer (posn-window (event-start event))))
(let* ((pos (posn-point (event-start event)))
- (data (get-text-property pos 'gnus-data))
+ (data (get-text-property pos 'gnus-data))
(fun (get-text-property pos 'gnus-callback)))
(goto-char pos)
(when fun
(when (looking-at "//\\([^/]+\\)/")
(setq server (match-string 1))
(goto-char (match-end 0)))
-
+
(cond
((looking-at "\\(.*@.*\\)")
(setq message-id (match-string 1)))
(setq pairs (split-string query "&"))
(while pairs
(setq cur (car pairs)
- pairs (cdr pairs))
+ pairs (cdr pairs))
(if (not (string-match "=" cur))
- nil ; Grace
- (setq key (gnus-url-unhex-string (substring cur 0 (match-beginning 0)))
- val (gnus-url-unhex-string (substring cur (match-end 0) nil)))
- (if downcase
- (setq key (downcase key)))
- (setq cur (assoc key retval))
- (if cur
- (setcdr cur (cons val (cdr cur)))
- (setq retval (cons (list key val) retval)))))
+ nil ; Grace
+ (setq key (gnus-url-unhex-string (substring cur 0 (match-beginning 0)))
+ val (gnus-url-unhex-string (substring cur (match-end 0) nil)))
+ (if downcase
+ (setq key (downcase key)))
+ (setq cur (assoc key retval))
+ (if cur
+ (setcdr cur (cons val (cdr cur)))
+ (setq retval (cons (list key val) retval)))))
retval))
(defun gnus-url-unhex (x)
(if (> x ?9)
(if (>= x ?a)
- (+ 10 (- x ?a))
- (+ 10 (- x ?A)))
+ (+ 10 (- x ?a))
+ (+ 10 (- x ?A)))
(- x ?0)))
(defun gnus-url-unhex-string (str &optional allow-newlines)
forbidden in URL encoding."
(setq str (or str ""))
(let ((tmp "")
- (case-fold-search t))
+ (case-fold-search t))
(while (string-match "%[0-9a-f][0-9a-f]" str)
(let* ((start (match-beginning 0))
- (ch1 (gnus-url-unhex (elt str (+ start 1))))
- (code (+ (* 16 ch1)
- (gnus-url-unhex (elt str (+ start 2))))))
- (setq tmp (concat
- tmp (substring str 0 start)
- (cond
- (allow-newlines
- (char-to-string code))
- ((or (= code ?\n) (= code ?\r))
- " ")
- (t (char-to-string code))))
- str (substring str (match-end 0)))))
+ (ch1 (gnus-url-unhex (elt str (+ start 1))))
+ (code (+ (* 16 ch1)
+ (gnus-url-unhex (elt str (+ start 2))))))
+ (setq tmp (concat
+ tmp (substring str 0 start)
+ (cond
+ (allow-newlines
+ (char-to-string code))
+ ((or (= code ?\n) (= code ?\r))
+ " ")
+ (t (char-to-string code))))
+ str (substring str (match-end 0)))))
(setq tmp (concat tmp str))
tmp))
(setq url (substring url (match-beginning 1) nil)))
(let (to args subject func)
(if (string-match (regexp-quote "?") url)
- (setq to (gnus-url-unhex-string (substring url 0 (match-beginning 0)))
- args (gnus-url-parse-query-string
- (substring url (match-end 0) nil) t))
+ (setq to (gnus-url-unhex-string (substring url 0 (match-beginning 0)))
+ args (gnus-url-parse-query-string
+ (substring url (match-end 0) nil) t))
(setq to (gnus-url-unhex-string url)))
(setq args (cons (list "to" to) args)
- subject (cdr-safe (assoc "subject" args)))
+ subject (cdr-safe (assoc "subject" args)))
(gnus-msg-mail)
(while args
(setq func (intern-soft (concat "message-goto-" (downcase (caar args)))))
(if (fboundp func)
- (funcall func)
- (message-position-on-field (caar args)))
+ (funcall func)
+ (message-position-on-field (caar args)))
(insert (mapconcat 'identity (cdar args) ", "))
(setq args (cdr args)))
(if subject
- (message-goto-body)
+ (message-goto-body)
(message-goto-subject))))
(defun gnus-button-embedded-url (address)
;;;###autoload
(defun gnus-bbdb/annotate-sender (string &optional replace)
- "Add a line to the end of the Notes field of the BBDB record
+ "Add a line to the end of the Notes field of the BBDB record
corresponding to the sender of this message. If REPLACE is non-nil,
replace the existing notes entry (if any)."
(interactive (list (if bbdb-readonly-p
(throw 'done (when rest (cons '& rest))))
(t
(while records
- (when (or (null bbdb-field)
+ (when (or (null bbdb-field)
(and (setq prop (bbdb-record-getprop (car records)
bbdb-field))
(string-match regexp prop)))
(error nil))))
(name (car data))
(net (car (cdr data)))
- (record (and data
- (bbdb-search-simple name
+ (record (and data
+ (bbdb-search-simple name
(if (and net bbdb-canonicalize-net-hook)
(bbdb-canonicalize-address net)
net))))
;; bogon!
(setq record nil))
- (setq name
+ (setq name
(or (and gnus-bbdb/summary-prefer-bbdb-data
(or (and gnus-bbdb/summary-prefer-real-names
(and record (bbdb-record-name record)))
(error nil))))
(name (car data))
(net (car (cdr data)))
- (record (and data
- (bbdb-search-simple name
+ (record (and data
+ (bbdb-search-simple name
(if (and net bbdb-canonicalize-net-hook)
(bbdb-canonicalize-address net)
net)))))
(if (and record name (member (downcase name) (bbdb-record-net record)))
;; bogon!
(setq record nil))
- (setq name
+ (setq name
(or (and gnus-bbdb/summary-prefer-bbdb-data
(or (and gnus-bbdb/summary-prefer-real-names
(and record (bbdb-record-name record)))
(defun gnus-bbdb/extract-address-components (str)
(let* ((ret (std11-extract-address-components str))
- (phrase (car ret))
- (address (car (cdr ret)))
- (methods gnus-bbdb/canonicalize-full-name-methods))
+ (phrase (car ret))
+ (address (car (cdr ret)))
+ (methods gnus-bbdb/canonicalize-full-name-methods))
(while (and phrase methods)
(setq phrase (funcall (car methods) phrase)
- methods (cdr methods)))
+ methods (cdr methods)))
(if (string= address "") (setq address nil))
(if (string= phrase "") (setq phrase nil))
(when (or phrase address)
(setq dest (cons (substring str 0 (match-beginning 0)) dest))
(setq str (substring str (match-end 0))))
(or (string= str "")
- (setq dest (cons str dest)))
+ (setq dest (cons str dest)))
(setq dest (nreverse dest))
(mapconcat 'identity dest " ")))
(setq dest (cons (substring str 0 (match-end 0)) dest))
(setq str (substring str (match-end 0))))
(or (string= str "")
- (setq dest (cons str dest)))
+ (setq dest (cons str dest)))
(setq dest (nreverse dest))
(mapconcat 'identity dest " ")))
Please redefine `gnus-bbdb/summary-user-format-letter' to a different letter."
gnus-bbdb/summary-user-format-letter))
(fset get-author-user-fun 'gnus-bbdb/summary-get-author))))
-
+
; One tick. One tick only, please
(cond (gnus-bbdb/summary-in-bbdb-format-letter
(if (and (fboundp in-bbdb-user-fun)
Redefine `gnus-bbdb/summary-in-bbdb-format-letter' to a different letter."
gnus-bbdb/summary-in-bbdb-format-letter))
(fset in-bbdb-user-fun 'gnus-bbdb/summary-author-in-bbdb)))))
-
+
;; Scoring
(add-hook 'bbdb-after-change-hook 'gnus-bbdb/score-invalidate-alist)
; (setq gnus-score-find-score-files-function
(when (and number
(> number 0) ; Reffed article.
(or force
- (and (or (not gnus-cacheable-groups)
- (string-match gnus-cacheable-groups group))
- (or (not gnus-uncacheable-groups)
+ (and (or (not gnus-cacheable-groups)
+ (string-match gnus-cacheable-groups group))
+ (or (not gnus-uncacheable-groups)
(not (string-match
gnus-uncacheable-groups group)))
(gnus-cache-member-of-class
)
;;(if nhrest
(setcdr hrest (cons cached-header nhrest))
- ;; (setq headers
- ;; (nconc headers (list cached-header)))
+ ;; (setq headers
+ ;; (nconc headers (list cached-header)))
;; (throw 'tag nil)
;;)
)
gnus-hidden-properties))
(point (point-min))
found beg end start)
- (while (setq point
- (text-property-any point (point-max)
+ (while (setq point
+ (text-property-any point (point-max)
'gnus-callback
'gnus-article-toggle-cited-text))
(setq found t)
(and (< arg 0) hidden))
(if hidden
(gnus-remove-text-properties-when
- 'article-type 'cite beg end
+ 'article-type 'cite beg end
(cons 'article-type (cons 'cite
gnus-hidden-properties)))
(gnus-add-text-properties-when
- 'article-type nil beg end
+ 'article-type nil beg end
(cons 'article-type (cons 'cite
gnus-hidden-properties))))
(save-excursion
`immediate'.")
(expiry-target (choice :tag "Expiry Target"
- :value delete
- (const delete)
- (function :format "%v" nnmail-)
- string) "\
+ :value delete
+ (const delete)
+ (function :format "%v" nnmail-)
+ string) "\
Where expired messages end up.
Overrides `nnmail-expiry-target', which see.")
Always display this group, even when there are no unread articles
in it..")
- (highlight-words
+ (highlight-words
(choice :tag "Highlight words"
:value nil
(repeat (list (regexp :tag "Highlight regexp")
(number :tag "Group for entire word" 0)
(number :tag "Group for displayed part" 0)
- (symbol :tag "Face"
+ (symbol :tag "Face"
gnus-emphasis-highlight-words))))
"highlight regexps.
See gnus-emphasis-alist.")
(choice :tag "Posting style"
:value nil
(repeat (list
- (choice :tag "Type"
+ (choice :tag "Type"
:value nil
(const signature)
- (const signature-file)
- (const organization)
- (const address)
- (const name)
- (const body))
+ (const signature-file)
+ (const organization)
+ (const address)
+ (const name)
+ (const body))
(string :format "%v"))))
"post style.
See gnus-posting-styles."))
(defconst gnus-extra-topic-parameters
'((subscribe (regexp :tag "Subscribe") "\
-If `gnus-subscribe-newsgroup-method' or
+If `gnus-subscribe-newsgroup-method' or
`gnus-subscribe-options-newsgroup-method' is set to
`gnus-subscribe-topics', new groups that matches this regexp will
-automatically be subscribed to this topic"))
+automatically be subscribed to this topic"))
"Alist of topic parameters that are not also group parameters.
Each entry has the form (NAME TYPE DOC), where NAME is the parameter
(const :format "" ,(nth 0 entry))
,(nth 1 entry)))
(append (reverse gnus-group-parameters-more)
- gnus-group-parameters
+ gnus-group-parameters
(if group
gnus-extra-group-parameters
gnus-extra-topic-parameters)))))
This can be changed using the `\\[gnus-score-change-score-file]' command."
(interactive (list gnus-current-score-file))
(unless file
- (error (format "No score file for %s"
+ (error (format "No score file for %s"
(gnus-group-decoded-name gnus-newsgroup-name))))
(let ((scores (gnus-score-load file))
(types (mapcar (lambda (entry)
variable `gnus-delay-default-hour', minute and second are zero."
(interactive
(list (read-string
- "Target date (YYYY-MM-DD) or length of delay (units in [mhdwMY]): "
- gnus-delay-default-delay)))
+ "Target date (YYYY-MM-DD) or length of delay (units in [mhdwMY]): "
+ gnus-delay-default-delay)))
(let (num unit days year month day deadline)
(cond ((string-match
- "\\([0-9][0-9][0-9]?[0-9]?\\)-\\([0-9]+\\)-\\([0-9]+\\)"
- delay)
- (setq year (string-to-number (match-string 1 delay))
- month (string-to-number (match-string 2 delay))
- day (string-to-number (match-string 3 delay)))
- (setq deadline
- (message-make-date
- (encode-time 0 0 ; second and minute
- gnus-delay-default-hour
- day month year))))
- ((string-match "\\([0-9]+\\)\\s-*\\([mhdwMY]\\)" delay)
- (setq num (match-string 1 delay))
- (setq unit (match-string 2 delay))
- ;; Start from seconds, then multiply into needed units.
- (setq num (string-to-number num))
- (cond ((string= unit "Y")
- (setq delay (* num 60 60 24 365)))
- ((string= unit "M")
- (setq delay (* num 60 60 24 30)))
- ((string= unit "w")
- (setq delay (* num 60 60 24 7)))
- ((string= unit "d")
- (setq delay (* num 60 60 24)))
- ((string= unit "h")
- (setq delay (* num 60 60)))
- (t
- (setq delay (* num 60))))
- (setq deadline (message-make-date
- (seconds-to-time (+ (time-to-seconds (current-time))
- delay)))))
- (t (error "Malformed delay `%s'" delay)))
+ "\\([0-9][0-9][0-9]?[0-9]?\\)-\\([0-9]+\\)-\\([0-9]+\\)"
+ delay)
+ (setq year (string-to-number (match-string 1 delay))
+ month (string-to-number (match-string 2 delay))
+ day (string-to-number (match-string 3 delay)))
+ (setq deadline
+ (message-make-date
+ (encode-time 0 0 ; second and minute
+ gnus-delay-default-hour
+ day month year))))
+ ((string-match "\\([0-9]+\\)\\s-*\\([mhdwMY]\\)" delay)
+ (setq num (match-string 1 delay))
+ (setq unit (match-string 2 delay))
+ ;; Start from seconds, then multiply into needed units.
+ (setq num (string-to-number num))
+ (cond ((string= unit "Y")
+ (setq delay (* num 60 60 24 365)))
+ ((string= unit "M")
+ (setq delay (* num 60 60 24 30)))
+ ((string= unit "w")
+ (setq delay (* num 60 60 24 7)))
+ ((string= unit "d")
+ (setq delay (* num 60 60 24)))
+ ((string= unit "h")
+ (setq delay (* num 60 60)))
+ (t
+ (setq delay (* num 60))))
+ (setq deadline (message-make-date
+ (seconds-to-time (+ (time-to-seconds (current-time))
+ delay)))))
+ (t (error "Malformed delay `%s'" delay)))
(message-add-header (format "%s: %s" gnus-delay-header deadline)))
(set-buffer-modified-p t)
(nndraft-request-create-group gnus-delay-group)
(interactive)
(save-excursion
(let* ((group (format "nndraft:%s" gnus-delay-group))
- (articles (nndraft-articles))
- article deadline)
+ (articles (nndraft-articles))
+ article deadline)
(gnus-activate-group group)
(while (setq article (pop articles))
- (gnus-request-head article group)
- (set-buffer nntp-server-buffer)
- (unless (re-search-forward
- (concat "^" (regexp-quote gnus-delay-header) ":\\s-+"))
- (error "Couldn't find delay for article %d" article))
- (setq deadline (nnheader-header-value))
- (setq deadline (apply 'encode-time (parse-time-string deadline)))
- (setq deadline (time-since deadline))
- (when (and (>= (nth 0 deadline) 0)
- (>= (nth 1 deadline) 0))
- (message "Sending article %d" article)
- (gnus-draft-send article group)
- (message "Sending article %d...done" article))))))
+ (gnus-request-head article group)
+ (set-buffer nntp-server-buffer)
+ (unless (re-search-forward
+ (concat "^" (regexp-quote gnus-delay-header) ":\\s-+"))
+ (error "Couldn't find delay for article %d" article))
+ (setq deadline (nnheader-header-value))
+ (setq deadline (apply 'encode-time (parse-time-string deadline)))
+ (setq deadline (time-since deadline))
+ (when (and (>= (nth 0 deadline) 0)
+ (>= (nth 1 deadline) 0))
+ (message "Sending article %d" article)
+ (gnus-draft-send article group)
+ (message "Sending article %d...done" article))))))
;;;###autoload
(defun gnus-delay-initialize (&optional no-keymap no-check)
(if (not (stringp time))
time
(let* ((now (current-time))
- ;; obtain NOW as discrete components -- make a vector for speed
- (nowParts (decode-time now))
- ;; obtain THEN as discrete components
- (thenParts (parse-time-string time))
- (thenHour (elt thenParts 2))
- (thenMin (elt thenParts 1))
- ;; convert time as elements into number of seconds since EPOCH.
- (then (encode-time 0
- thenMin
- thenHour
- ;; If THEN is earlier than NOW, make it
- ;; same time tomorrow. Doc for encode-time
- ;; says that this is OK.
- (+ (elt nowParts 3)
- (if (or (< thenHour (elt nowParts 2))
- (and (= thenHour (elt nowParts 2))
- (<= thenMin (elt nowParts 1))))
- 1 0))
- (elt nowParts 4)
- (elt nowParts 5)
- (elt nowParts 6)
- (elt nowParts 7)
- (elt nowParts 8)))
- ;; calculate number of seconds between NOW and THEN
- (diff (+ (* 65536 (- (car then) (car now)))
- (- (cadr then) (cadr now)))))
+ ;; obtain NOW as discrete components -- make a vector for speed
+ (nowParts (decode-time now))
+ ;; obtain THEN as discrete components
+ (thenParts (parse-time-string time))
+ (thenHour (elt thenParts 2))
+ (thenMin (elt thenParts 1))
+ ;; convert time as elements into number of seconds since EPOCH.
+ (then (encode-time 0
+ thenMin
+ thenHour
+ ;; If THEN is earlier than NOW, make it
+ ;; same time tomorrow. Doc for encode-time
+ ;; says that this is OK.
+ (+ (elt nowParts 3)
+ (if (or (< thenHour (elt nowParts 2))
+ (and (= thenHour (elt nowParts 2))
+ (<= thenMin (elt nowParts 1))))
+ 1 0))
+ (elt nowParts 4)
+ (elt nowParts 5)
+ (elt nowParts 6)
+ (elt nowParts 7)
+ (elt nowParts 8)))
+ ;; calculate number of seconds between NOW and THEN
+ (diff (+ (* 65536 (- (car then) (car now)))
+ (- (cadr then) (cadr now)))))
;; return number of timesteps in the number of seconds
(round (/ diff gnus-demon-timestep)))))
(gnus-dup-open))
(setq gnus-dup-list-dirty t) ; mark list for saving
(let ((data gnus-newsgroup-data)
- datum msgid)
+ datum msgid)
;; Enter the Message-IDs of all read articles into the list
;; and hash table.
(while (setq datum (pop data))
(> (gnus-data-number datum) 0)
(not (memq (gnus-data-number datum) gnus-newsgroup-unreads))
(not (= (gnus-data-mark datum) gnus-canceled-mark))
- (setq msgid (mail-header-id (gnus-data-header datum)))
- (not (nnheader-fake-message-id-p msgid))
- (not (intern-soft msgid gnus-dup-hashtb)))
+ (setq msgid (mail-header-id (gnus-data-header datum)))
+ (not (nnheader-fake-message-id-p msgid))
+ (not (intern-soft msgid gnus-dup-hashtb)))
(push msgid gnus-dup-list)
- (intern msgid gnus-dup-hashtb))))
+ (intern msgid gnus-dup-hashtb))))
;; Chop off excess Message-IDs from the list.
(let ((end (nthcdr gnus-duplicate-list-length gnus-dup-list)))
(when end
(interactive)
(goto-char (point-min))
(let ((form (condition-case nil
- (read (current-buffer))
- (end-of-file nil)))
+ (read (current-buffer))
+ (end-of-file nil)))
(func gnus-edit-form-done-function))
(gnus-edit-form-exit)
(funcall func form)))
;; Return an empty string
""
(let* ((rate-string (make-string 12 ?\ ))
- (mid (mail-header-id header))
- (hashent (gnus-gethash mid grouplens-current-hashtable))
- (pred (or (nth 0 hashent) 0))
- (low (nth 1 hashent))
- (high (nth 2 hashent)))
+ (mid (mail-header-id header))
+ (hashent (gnus-gethash mid grouplens-current-hashtable))
+ (pred (or (nth 0 hashent) 0))
+ (low (nth 1 hashent))
+ (high (nth 2 hashent)))
;; Init rate-string
(aset rate-string 0 ?|)
(aset rate-string 11 ?|)
in the minibuffer prompt."
:group 'gnus-group-various
:type '(choice (string :tag "Prompt string")
- (const :tag "Empty" nil)))
+ (const :tag "Empty" nil)))
(defvar gnus-group-listing-limit 1000
"*A limit of the number of groups when listing.
(?l gnus-tmp-grouplens ?s)
(?z gnus-tmp-news-method-string ?s)
(?m (gnus-group-new-mail gnus-tmp-group) ?c)
- (?w (if (gnus-news-group-p gnus-tmp-group)
+ (?w (if (gnus-news-group-p gnus-tmp-group)
""
- (int-to-string
- (length
+ (int-to-string
+ (length
(nnmail-new-mail-numbers (gnus-group-real-name gnus-tmp-group))
)))
?s)
(method (gnus-server-get-method group (gnus-info-method info)))
(marked (gnus-info-marks info))
(mailp (apply 'append
- (mapcar
- (lambda (x)
- (memq x (assoc (symbol-name
- (car (or method gnus-select-method)))
- gnus-valid-select-methods)))
- '(mail post-mail))))
- (level (or (gnus-info-level info) gnus-level-killed))
- (score (or (gnus-info-score info) 0))
- (ticked (gnus-range-length (cdr (assq 'tick marked))))
- (group-age (gnus-group-timestamp-delta group))
- (inhibit-read-only t))
+ (mapcar
+ (lambda (x)
+ (memq x (assoc (symbol-name
+ (car (or method gnus-select-method)))
+ gnus-valid-select-methods)))
+ '(mail post-mail))))
+ (level (or (gnus-info-level info) gnus-level-killed))
+ (score (or (gnus-info-score info) 0))
+ (ticked (gnus-range-length (cdr (assq 'tick marked))))
+ (group-age (gnus-group-timestamp-delta group))
+ (inhibit-read-only t))
;; Eval the cars of the lists until we find a match.
(while (and list
(not (eval (caar list))))
"Return the offset in seconds from the timestamp for GROUP to the current time, as a floating point number."
(let* ((time (or (gnus-group-timestamp group)
(list 0 0)))
- (delta (subtract-time (current-time) time)))
+ (delta (subtract-time (current-time) time)))
(+ (* (nth 0 delta) 65536.0)
(nth 1 delta))))
(gnus-group-list-plus args)))
(defun gnus-group-mark-article-read (group article)
- "Mark ARTICLE read."
+ "Mark ARTICLE read."
(gnus-activate-group group)
(let ((buffer (gnus-summary-buffer-name group))
(mark gnus-read-mark))
(setq alist (cdr alist)))
))))
(if charset
- (progn
- (save-excursion
- (set-buffer gnus-summary-buffer)
- (make-local-variable 'default-mime-charset)
- (setq default-mime-charset charset))
- (make-local-variable 'default-mime-charset)
- (setq default-mime-charset charset))
+ (progn
+ (save-excursion
+ (set-buffer gnus-summary-buffer)
+ (make-local-variable 'default-mime-charset)
+ (setq default-mime-charset charset))
+ (make-local-variable 'default-mime-charset)
+ (setq default-mime-charset charset))
(kill-local-variable 'default-mime-charset)))))
(defun gnus-apply-kill-file-unless-scored ()
"Apply .KILL file, unless a .SCORE file for the same newsgroup exists."
(cond ((file-exists-p (gnus-score-file-name gnus-newsgroup-name))
- ;; Ignores global KILL.
- (when (file-exists-p (gnus-newsgroup-kill-file gnus-newsgroup-name))
+ ;; Ignores global KILL.
+ (when (file-exists-p (gnus-newsgroup-kill-file gnus-newsgroup-name))
(gnus-message 3 "Note: Ignoring %s.KILL; preferring .SCORE"
gnus-newsgroup-name))
- 0)
- ((or (file-exists-p (gnus-newsgroup-kill-file nil))
- (file-exists-p (gnus-newsgroup-kill-file gnus-newsgroup-name)))
- (gnus-apply-kill-file-internal))
- (t
- 0)))
+ 0)
+ ((or (file-exists-p (gnus-newsgroup-kill-file nil))
+ (file-exists-p (gnus-newsgroup-kill-file gnus-newsgroup-name)))
+ (gnus-apply-kill-file-internal))
+ (t
+ 0)))
(defun gnus-apply-kill-file-internal ()
"Apply a kill file to the current newsgroup.
gnus-newsgroup-kill-headers))
(setq headers (cdr headers))))
(setq files nil))
- (setq files (cdr files)))))
+ (setq files (cdr files)))))
(if (not gnus-newsgroup-kill-headers)
()
(save-window-excursion
"Text of warning message displayed by `mailcap-maybe-eval'.
Make sure that this text consists only of few text lines. Otherwise,
Gnus might fail to display all of it.")
-
+
(defun mailcap-maybe-eval ()
"Maybe evaluate a buffer of Emacs Lisp code."
(let ((lisp-buffer (current-buffer)))
(cons (cons major (list (cons minor info)))
mailcap-mime-data))
(let ((cur-minor (assoc minor old-major)))
- (cond
- ((or (null cur-minor) ; New minor area, or
- (assq 'test info)) ; Has a test, insert at beginning
- (setcdr old-major (cons (cons minor info) (cdr old-major))))
- ((and (not (assq 'test info)) ; No test info, replace completely
- (not (assq 'test cur-minor))
+ (cond
+ ((or (null cur-minor) ; New minor area, or
+ (assq 'test info)) ; Has a test, insert at beginning
+ (setcdr old-major (cons (cons minor info) (cdr old-major))))
+ ((and (not (assq 'test info)) ; No test info, replace completely
+ (not (assq 'test cur-minor))
(equal (assq 'viewer info) ; Keep alternative viewer
(assq 'viewer cur-minor)))
- (setcdr cur-minor info))
- (t
- (setcdr old-major (cons (cons minor info) (cdr old-major))))))
+ (setcdr cur-minor info))
+ (t
+ (setcdr old-major (cons (cons minor info) (cdr old-major))))))
)))
(defun mailcap-add (type viewer &optional test)
"Setup group parameters from List-Post header.
If FORCE is non-nil, replace the old ones."
(interactive "P")
- (let ((list-post
+ (let ((list-post
(with-current-buffer gnus-original-article-buffer
(gnus-fetch-field "list-post"))))
(if list-post
(gnus-message 1 "to-list is non-nil.")
(if (string-match "<mailto:\\([^>]*\\)>" list-post)
(setq list-post (match-string 1 list-post)))
- (gnus-group-add-parameter gnus-newsgroup-name
+ (gnus-group-add-parameter gnus-newsgroup-name
(cons 'to-list list-post))
(gnus-mailing-list-mode 1))
(gnus-message 1 "no list-post in this message."))))
(defun gnus-mailing-list-help ()
"Get help from mailing list server."
- (interactive)
- (let ((list-help
+ (interactive)
+ (let ((list-help
(with-current-buffer gnus-original-article-buffer
(gnus-fetch-field "list-help"))))
(cond (list-help (gnus-mailing-list-message list-help))
(defun gnus-mailing-list-subscribe ()
"Subscribe"
(interactive)
- (let ((list-subscribe
+ (let ((list-subscribe
(with-current-buffer gnus-original-article-buffer
(gnus-fetch-field "list-subscribe"))))
(cond (list-subscribe (gnus-mailing-list-message list-subscribe))
(defun gnus-mailing-list-unsubscribe ()
"Unsubscribe"
(interactive)
- (let ((list-unsubscribe
+ (let ((list-unsubscribe
(with-current-buffer gnus-original-article-buffer
(gnus-fetch-field "list-unsubscribe"))))
(cond (list-unsubscribe (gnus-mailing-list-message list-unsubscribe))
(defun gnus-mailing-list-post ()
"Post message (really useful ?)"
(interactive)
- (let ((list-post
+ (let ((list-post
(with-current-buffer gnus-original-article-buffer
(gnus-fetch-field "list-post"))))
(cond (list-post (gnus-mailing-list-message list-post))
(defun gnus-mailing-list-owner ()
"Mail to the owner"
(interactive)
- (let ((list-owner
+ (let ((list-owner
(with-current-buffer gnus-original-article-buffer
(gnus-fetch-field "list-owner"))))
(cond (list-owner (gnus-mailing-list-message list-owner))
"Browse archive"
(interactive)
(require 'browse-url)
- (let ((list-archive
+ (let ((list-archive
(with-current-buffer gnus-original-article-buffer
(gnus-fetch-field "list-archive"))))
- (cond (list-archive
+ (cond (list-archive
(if (string-match "<\\(http:[^>]*\\)>" list-archive)
(browse-url (match-string 1 list-archive))
(browse-url list-archive)))
(subject "None")
(body "")
)
- (cond
+ (cond
((string-match "<mailto:\\([^>]*\\)>" address)
(let ((args (match-string 1 address)))
- (cond ; with param
+ (cond ; with param
((string-match "\\(.*\\)\\?\\(.*\\)" args)
(setq mailto (match-string 1 args))
(let ((param (match-string 2 args)))
(setq body (match-string 1 param)))
(if (string-match "to=\\([^&]*\\)" param)
(push (match-string 1 param) to))
- ))
+ ))
(t (setq mailto args))))) ; without param
-
+
; other case <http://... to be done.
(t nil))
(gnus-setup-message 'message (message-mail mailto subject))
\(| (& (any \"\\\\(bar@femail\\\\.com\\\\|.*@femail\\\\.com\\\\)\"
\"mail.bar\")
(any \"\\\\(foo@nowhere\\\\.gov\\\\|foo@localhost\\\\|foo-redist@home\\\\)\"
- - \"bugs-foo\" - \"rambling-foo\" \"mail.foo\"))
+ - \"bugs-foo\" - \"rambling-foo\" \"mail.foo\"))
\"mail.others\")"
(let* ((newsrc (cdr gnus-newsrc-alist))
split)
(list 'any split-regexp)
;; Generate RESTRICTs for SPLIT-EXCLUDEs.
(if (listp split-exclude)
- (apply #'append
- (mapcar (lambda (arg) (list '- arg))
- split-exclude))
+ (apply #'append
+ (mapcar (lambda (arg) (list '- arg))
+ split-exclude))
(list '- split-exclude))
(list group-clean))
split)
method to use when posting."
:group 'gnus-group-foreign
:type `(choice (const nil)
- (const current)
+ (const current)
(const native)
(sexp :tag "Methods" ,gnus-select-method)))
(defun gnus-msg-treat-broken-reply-to (&optional force)
"Remove the Reply-to header iff broken-reply-to."
- (when (or force
- (gnus-group-find-parameter
- gnus-newsgroup-name 'broken-reply-to))
+ (when (or force
+ (gnus-group-find-parameter
+ gnus-newsgroup-name 'broken-reply-to))
(save-restriction
(message-narrow-to-head)
(message-remove-header "reply-to"))))
(when (or name address)
(add-hook 'message-setup-hook
`(lambda ()
- (set (make-local-variable 'user-mail-address)
- ,(or (cdr address) user-mail-address))
+ (set (make-local-variable 'user-mail-address)
+ ,(or (cdr address) user-mail-address))
(let ((user-full-name ,(or (cdr name) (user-full-name)))
(user-mail-address
,(or (cdr address) user-mail-address)))
(defun gnus-maybe-setup-default-charset ()
(let ((charset
(and (boundp 'gnus-summary-buffer)
- (buffer-live-p gnus-summary-buffer)
+ (buffer-live-p gnus-summary-buffer)
(save-excursion
(set-buffer gnus-summary-buffer)
default-mime-charset))))
;;; Note.
;;; This file works only with after version of Emacs 19.30.
;;; This file needs miee.el and SEMI.
-;;; If you set gnus-offline-drafts-queue-type to 'agent , you don't need
+;;; If you set gnus-offline-drafts-queue-type to 'agent , you don't need
;;; miee.el
;;; You must use T-gnus 6.12.0 or later.
;;;
;;
(setenv "MAILHOST" nil))
;;
-;; Hangup line function
+;; Hangup line function
;;
(defun gnus-offline-hangup-line ()
"*Hangup line function."
"(add-hook"
"'gnus-before-startup-hook"
"(lambda () (setq nnmail-spool-file nil)
- (setq mail-sources nil)))")))
+ (setq mail-sources nil)))")))
;; Write stting about mail-source.el
(insert "(setq gnus-offline-mail-source '"
Gnus, you can set a specifier using the kerword :program as shown
below:
- (pop :program \"movemail -pf po:%u %t %p\")
+ (pop :program \"movemail -pf po:%u %t %p\")
If you want to know more about mail source specifiers and keywords,
click the button below.")
(movemail \e$B$J$I\e(B) \e$B$r;H$$$?$$!"$H$$$&>l9g$K$O!"\e(B:program \e$B$r$$$&%-!<%o!<\e(B
\e$B%I$r;XDj$7$F0J2<$NMM$K5-=R$7$^$9!#\e(B
- (pop :program \"movemail -pf po:%u %t %p\")
+ (pop :program \"movemail -pf po:%u %t %p\")
mail source specifier \e$B$H$+>e5-$N$h$&$J%-!<%o!<%I$K$D$$$F$b$C$H$h$/\e(B
\e$BCN$j$?$$>l9g$O!"0J2<$N%\%?%s$r%/%j%C%/$7$F$/$@$5$$!#\e(B(Info \e$B$N3:Ev2U=j\e(B
range item selector)
(while (or item1 item2)
(setq selector
- (cond
+ (cond
((null item1) nil)
((null item2) t)
((and (numberp item1) (numberp item2)) (< item1 item2))
(setq item
(or
(let ((tmp1 item) (tmp2 (if selector item1 item2)))
- (cond
+ (cond
((null tmp1) tmp2)
((null tmp2) tmp1)
((and (numberp tmp1) (numberp tmp2))
- (cond
+ (cond
((eq tmp1 tmp2) tmp1)
((eq (1+ tmp1) tmp2) (cons tmp1 tmp2))
((eq (1+ tmp2) tmp1) (cons tmp2 tmp1))
(t nil)))
((numberp tmp1)
- (cond
+ (cond
((and (>= tmp1 (car tmp2)) (<= tmp1 (cdr tmp2))) tmp2)
((eq (1+ tmp1) (car tmp2)) (cons tmp1 (cdr tmp2)))
((eq (1- tmp1) (cdr tmp2)) (cons (car tmp2) tmp1))
(t nil)))
((numberp tmp2)
- (cond
+ (cond
((and (>= tmp2 (car tmp1)) (<= tmp2 (cdr tmp1))) tmp1)
((eq (1+ tmp2) (car tmp1)) (cons tmp2 (cdr tmp1)))
((eq (1- tmp2) (cdr tmp1)) (cons (car tmp1) tmp2))
(t nil)))
((< (1+ (cdr tmp1)) (car tmp2)) nil)
((< (1+ (cdr tmp2)) (car tmp1)) nil)
- (t (cons (min (car tmp1) (car tmp2))
+ (t (cons (min (car tmp1) (car tmp2))
(max (cdr tmp1) (cdr tmp2))))))
(progn
(if item (push item range))
(interactive "P")
(if gnus-newsgroup-processable
(progn
- (gnus-summary-limit-to-articles nil)
- (when (or catch-up gnus-mark-unpicked-articles-as-read)
+ (gnus-summary-limit-to-articles nil)
+ (when (or catch-up gnus-mark-unpicked-articles-as-read)
(gnus-summary-limit-mark-excluded-as-read))
- (gnus-summary-first-article)
- (gnus-configure-windows
+ (gnus-summary-first-article)
+ (gnus-configure-windows
(if gnus-pick-display-summary 'article 'pick) t))
(if gnus-pick-elegant-flow
(progn
(let* ((echo-keystrokes 0)
(start-posn (event-start start-event))
(start-point (posn-point start-posn))
- (start-line (1+ (count-lines 1 start-point)))
+ (start-line (1+ (count-lines 1 start-point)))
(start-window (posn-window start-posn))
(bounds (gnus-window-edges start-window))
(top (nth 1 bounds))
(setq gnus-global-score-files
'(\"/ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE\"
- \"/ftp.some-where:/pub/score\"))"
+ \"/ftp.some-where:/pub/score\"))"
:group 'gnus-score-files
:type '(repeat file))
(mark-and-expunge (car (gnus-score-get 'mark-and-expunge alist)))
(files (gnus-score-get 'files alist))
(exclude-files (gnus-score-get 'exclude-files alist))
- (orphan (car (gnus-score-get 'orphan alist)))
+ (orphan (car (gnus-score-get 'orphan alist)))
(adapt (gnus-score-get 'adapt alist))
(thread-mark-and-expunge
(car (gnus-score-get 'thread-mark-and-expunge alist)))
;; Insert the unique article headers in the buffer.
(let ((gnus-score-index (nth 1 (assoc header gnus-header-index)))
;; gnus-score-index is used as a free variable.
- (simplify (and gnus-score-thread-simplify
- (string= "subject" header)))
+ (simplify (and gnus-score-thread-simplify
+ (string= "subject" header)))
alike last this art entries alist articles
fuzzies arts words kill)
(dmt (downcase mt))
;; Assume user already simplified regexp and fuzzies
(match (if (and simplify (not (memq dmt '(?f ?r))))
- (gnus-map-function
- gnus-simplify-subject-functions
- (nth 0 kill))
- (nth 0 kill)))
+ (gnus-map-function
+ gnus-simplify-subject-functions
+ (nth 0 kill))
+ (nth 0 kill)))
(search-func
(cond ((= dmt ?r) 're-search-forward)
((or (= dmt ?e) (= dmt ?s) (= dmt ?f)) 'search-forward)
;; we add this score file to the list of score files
;; applicable to this group.
(when (or (and not-match
- (ignore-errors
+ (ignore-errors
(not (string-match regexp group-trans))))
- (and (not not-match)
- (ignore-errors (string-match regexp group-trans))))
+ (and (not not-match)
+ (ignore-errors (string-match regexp group-trans))))
(push (car sfiles) ofiles)))
(setq sfiles (cdr sfiles)))
(kill-buffer (current-buffer))
(while funcs
(when (gnus-functionp (car funcs))
(setq score-files
- (nconc score-files
- (nreverse (funcall (car funcs) group)))))
+ (nconc score-files
+ (nreverse (funcall (car funcs) group)))))
(setq funcs (cdr funcs)))
(when gnus-score-use-all-scores
;; Add any home score files.
(while (and (not found)
(setq elem (pop list)))
(setq found
- (cond
- ;; Simple string.
- ((stringp elem)
- elem)
- ;; Function.
- ((gnus-functionp elem)
- (funcall elem group))
- ;; Regexp-file cons.
- ((consp elem)
- (when (string-match (gnus-globalify-regexp (car elem)) group)
- (replace-match (cadr elem) t nil group))))))
+ (cond
+ ;; Simple string.
+ ((stringp elem)
+ elem)
+ ;; Function.
+ ((gnus-functionp elem)
+ (funcall elem group))
+ ;; Regexp-file cons.
+ ((consp elem)
+ (when (string-match (gnus-globalify-regexp (car elem)) group)
+ (replace-match (cadr elem) t nil group))))))
(when found
(setq found (nnheader-translate-file-chars found))
(if (file-name-absolute-p found)
- found
- (nnheader-concat gnus-kill-files-directory found)))))
+ found
+ (nnheader-concat gnus-kill-files-directory found)))))
(defun gnus-hierarchial-home-score-file (group)
"Return the score file of the top-level hierarchy of GROUP."
(defvar gnus-format-specs-compiled nil
"Alist of compiled format specs. Each element should be the form:
\(TYPE (FORMAT-STRING-1 . COMPILED-FUNCTION-1)
- :
+ :
(FORMAT-STRING-n . COMPILED-FUNCTION-n)).")
(defvar gnus-article-mode-line-format-spec nil)
(setq alist (cdr alist)))
(if alist
(setcdr alist (cons killed (cdr alist)))
- (setq gnus-server-alist (list killed)))))
+ (setq gnus-server-alist (list killed)))))
(gnus-server-update-server (car killed))
(setq gnus-server-killed-servers (cdr gnus-server-killed-servers))
(gnus-server-position-point)))
(unless server
(error "No server on the current line"))
(condition-case ()
- (gnus-get-function (gnus-server-to-method server)
+ (gnus-get-function (gnus-server-to-method server)
'request-regenerate)
(error
(error "This backend doesn't support regeneration")))
group (gnus-info-group info))
(unless (or (gnus-active group) ; Active
(and (gnus-info-method info)
- (not (gnus-secondary-method-p
+ (not (gnus-secondary-method-p
(gnus-info-method info))))) ; Foreign
;; Found a bogus newsgroup.
(push group bogus)))
(not (gnus-secondary-method-p method)))
;; These groups are foreign. Check the level.
(when (and (<= (gnus-info-level info) foreign-level)
- (setq active (gnus-activate-group group 'scan)))
+ (setq active (gnus-activate-group group 'scan)))
;; Let the Gnus agent save the active file.
(when (and gnus-agent gnus-plugged active)
(gnus-agent-save-group-info
(setq active (gnus-activate-group group))
(setq active (gnus-activate-group group 'scan))
(push method scanned-methods))
- (when active
- (gnus-close-group group))))))
+ (when active
+ (gnus-close-group group))))))
;; Get the number of unread articles in the group.
(cond
(let ((method (or (car rg) gnus-select-method))
(groups (cdr rg)))
(when (gnus-check-server method)
- ;; Request that the backend scan its incoming messages.
- (when (gnus-check-backend-function 'request-scan (car method))
- (gnus-request-scan nil method))
- (gnus-read-active-file-2
+ ;; Request that the backend scan its incoming messages.
+ (when (gnus-check-backend-function 'request-scan (car method))
+ (gnus-request-scan nil method))
+ (gnus-read-active-file-2
(mapcar (lambda (group) (gnus-group-real-name group)) groups)
method)
- (dolist (group groups)
- (cond
- ((setq active (gnus-active (gnus-info-group
- (setq info (gnus-get-info group)))))
- (inline (gnus-get-unread-articles-in-group info active t)))
- (t
- ;; The group couldn't be reached, so we nix out the number of
- ;; unread articles and stuff.
- (gnus-set-active group nil)
- (setcar (gnus-gethash group gnus-newsrc-hashtb) t)))))))
+ (dolist (group groups)
+ (cond
+ ((setq active (gnus-active (gnus-info-group
+ (setq info (gnus-get-info group)))))
+ (inline (gnus-get-unread-articles-in-group info active t)))
+ (t
+ ;; The group couldn't be reached, so we nix out the number of
+ ;; unread articles and stuff.
+ (gnus-set-active group nil)
+ (setcar (gnus-gethash group gnus-newsrc-hashtb) t)))))))
(gnus-message 5 "Checking new news...done")))
:function-document
"Return the ignored charsets of GROUP."
:variable gnus-group-ignored-charsets-alist
- :variable-default
+ :variable-default
'(("alt\\.chinese\\.text" iso-8859-1))
:variable-document
"Alist of regexps (to match group names) and charsets that should be ignored.
:variable-group gnus-charset
:variable-type '(repeat (cons (regexp :tag "Group")
(repeat symbol)))
- :parameter-type '(choice :tag "Ignored charsets"
+ :parameter-type '(choice :tag "Ignored charsets"
:value nil
(repeat (symbol)))
:parameter-document "\
;; Multiple spaces.
(while (string-match "[ \t][ \t]+" mystr)
(setq mystr (concat (substring mystr 0 (match-beginning 0))
- " "
- (substring mystr (match-end 0)))))
+ " "
+ (substring mystr (match-end 0)))))
;; Leading spaces.
(when (string-match "^[ \t]+" mystr)
(setq mystr (substring mystr (match-end 0))))
;; Define both the Article menu in the summary buffer and the equivalent
;; Commands menu in the article buffer here for consistency.
(let ((innards
- `(("Hide"
- ["All" gnus-article-hide t]
- ["Headers" gnus-article-toggle-headers t]
- ["Signature" gnus-article-hide-signature t]
- ["Citation" gnus-article-hide-citation t]
+ `(("Hide"
+ ["All" gnus-article-hide t]
+ ["Headers" gnus-article-toggle-headers t]
+ ["Signature" gnus-article-hide-signature t]
+ ["Citation" gnus-article-hide-citation t]
["List identifiers" gnus-article-hide-list-identifiers t]
- ["PGP" gnus-article-hide-pgp t]
+ ["PGP" gnus-article-hide-pgp t]
["Banner" gnus-article-strip-banner t]
- ["Boring headers" gnus-article-hide-boring-headers t])
- ("Highlight"
- ["All" gnus-article-highlight t]
- ["Headers" gnus-article-highlight-headers t]
- ["Signature" gnus-article-highlight-signature t]
- ["Citation" gnus-article-highlight-citation t])
- ("Date"
- ["Local" gnus-article-date-local t]
- ["ISO8601" gnus-article-date-iso8601 t]
- ["UT" gnus-article-date-ut t]
- ["Original" gnus-article-date-original t]
- ["Lapsed" gnus-article-date-lapsed t]
- ["User-defined" gnus-article-date-user t])
- ("Washing"
- ("Remove Blanks"
- ["Leading" gnus-article-strip-leading-blank-lines t]
- ["Multiple" gnus-article-strip-multiple-blank-lines t]
- ["Trailing" gnus-article-remove-trailing-blank-lines t]
- ["All of the above" gnus-article-strip-blank-lines t]
- ["All" gnus-article-strip-all-blank-lines t]
- ["Leading space" gnus-article-strip-leading-space t]
+ ["Boring headers" gnus-article-hide-boring-headers t])
+ ("Highlight"
+ ["All" gnus-article-highlight t]
+ ["Headers" gnus-article-highlight-headers t]
+ ["Signature" gnus-article-highlight-signature t]
+ ["Citation" gnus-article-highlight-citation t])
+ ("Date"
+ ["Local" gnus-article-date-local t]
+ ["ISO8601" gnus-article-date-iso8601 t]
+ ["UT" gnus-article-date-ut t]
+ ["Original" gnus-article-date-original t]
+ ["Lapsed" gnus-article-date-lapsed t]
+ ["User-defined" gnus-article-date-user t])
+ ("Washing"
+ ("Remove Blanks"
+ ["Leading" gnus-article-strip-leading-blank-lines t]
+ ["Multiple" gnus-article-strip-multiple-blank-lines t]
+ ["Trailing" gnus-article-remove-trailing-blank-lines t]
+ ["All of the above" gnus-article-strip-blank-lines t]
+ ["All" gnus-article-strip-all-blank-lines t]
+ ["Leading space" gnus-article-strip-leading-space t]
["Trailing space" gnus-article-strip-trailing-space t]
- ["Leading space in headers"
+ ["Leading space in headers"
gnus-article-remove-leading-whitespace t])
- ["Overstrike" gnus-article-treat-overstrike t]
- ["Dumb quotes" gnus-article-treat-dumbquotes t]
- ["Emphasis" gnus-article-emphasize t]
- ["Word wrap" gnus-article-fill-cited-article t]
+ ["Overstrike" gnus-article-treat-overstrike t]
+ ["Dumb quotes" gnus-article-treat-dumbquotes t]
+ ["Emphasis" gnus-article-emphasize t]
+ ["Word wrap" gnus-article-fill-cited-article t]
["Fill long lines" gnus-article-fill-long-lines t]
["Capitalize sentences" gnus-article-capitalize-sentences t]
- ["CR" gnus-article-remove-cr t]
- ["Show X-Face" gnus-article-display-x-face t]
+ ["CR" gnus-article-remove-cr t]
+ ["Show X-Face" gnus-article-display-x-face t]
["Rot 13" gnus-summary-caesar-message
,@(if (featurep 'xemacs) '(t)
'(:help "\"Caesar rotate\" article by 13"))]
- ["Unix pipe" gnus-summary-pipe-message t]
- ["Add buttons" gnus-article-add-buttons t]
- ["Add buttons to head" gnus-article-add-buttons-to-head t]
- ["Stop page breaking" gnus-summary-stop-page-breaking t]
- ["Toggle MIME" gnus-summary-toggle-mime t]
- ["Verbose header" gnus-summary-verbose-headers t]
- ["Toggle header" gnus-summary-toggle-header t]
+ ["Unix pipe" gnus-summary-pipe-message t]
+ ["Add buttons" gnus-article-add-buttons t]
+ ["Add buttons to head" gnus-article-add-buttons-to-head t]
+ ["Stop page breaking" gnus-summary-stop-page-breaking t]
+ ["Toggle MIME" gnus-summary-toggle-mime t]
+ ["Verbose header" gnus-summary-verbose-headers t]
+ ["Toggle header" gnus-summary-toggle-header t]
["Toggle smileys" gnus-smiley-display t]
["Verify X-PGP-Sig" gnus-article-verify-x-pgp-sig t]
["HZ" gnus-article-decode-HZ t])
- ("Output"
- ["Save in default format" gnus-summary-save-article
+ ("Output"
+ ["Save in default format" gnus-summary-save-article
,@(if (featurep 'xemacs) '(t)
'(:help "Save article using default method"))]
- ["Save in file" gnus-summary-save-article-file
+ ["Save in file" gnus-summary-save-article-file
,@(if (featurep 'xemacs) '(t)
'(:help "Save article in file"))]
- ["Save in Unix mail format" gnus-summary-save-article-mail t]
- ["Save in MH folder" gnus-summary-save-article-folder t]
- ["Save in VM folder" gnus-summary-save-article-vm t]
- ["Save in RMAIL mbox" gnus-summary-save-article-rmail t]
- ["Save body in file" gnus-summary-save-article-body-file t]
- ["Pipe through a filter" gnus-summary-pipe-output t]
- ["Add to SOUP packet" gnus-soup-add-article t]
- ["Print" gnus-summary-print-article t])
- ("Backend"
- ["Respool article..." gnus-summary-respool-article t]
- ["Move article..." gnus-summary-move-article
- (gnus-check-backend-function
- 'request-move-article gnus-newsgroup-name)]
- ["Copy article..." gnus-summary-copy-article t]
- ["Crosspost article..." gnus-summary-crosspost-article
- (gnus-check-backend-function
- 'request-replace-article gnus-newsgroup-name)]
- ["Import file..." gnus-summary-import-article t]
- ["Create article..." gnus-summary-create-article t]
- ["Check if posted" gnus-summary-article-posted-p t]
- ["Edit article" gnus-summary-edit-article
- (not (gnus-group-read-only-p))]
- ["Delete article" gnus-summary-delete-article
- (gnus-check-backend-function
- 'request-expire-articles gnus-newsgroup-name)]
- ["Query respool" gnus-summary-respool-query t]
+ ["Save in Unix mail format" gnus-summary-save-article-mail t]
+ ["Save in MH folder" gnus-summary-save-article-folder t]
+ ["Save in VM folder" gnus-summary-save-article-vm t]
+ ["Save in RMAIL mbox" gnus-summary-save-article-rmail t]
+ ["Save body in file" gnus-summary-save-article-body-file t]
+ ["Pipe through a filter" gnus-summary-pipe-output t]
+ ["Add to SOUP packet" gnus-soup-add-article t]
+ ["Print" gnus-summary-print-article t])
+ ("Backend"
+ ["Respool article..." gnus-summary-respool-article t]
+ ["Move article..." gnus-summary-move-article
+ (gnus-check-backend-function
+ 'request-move-article gnus-newsgroup-name)]
+ ["Copy article..." gnus-summary-copy-article t]
+ ["Crosspost article..." gnus-summary-crosspost-article
+ (gnus-check-backend-function
+ 'request-replace-article gnus-newsgroup-name)]
+ ["Import file..." gnus-summary-import-article t]
+ ["Create article..." gnus-summary-create-article t]
+ ["Check if posted" gnus-summary-article-posted-p t]
+ ["Edit article" gnus-summary-edit-article
+ (not (gnus-group-read-only-p))]
+ ["Delete article" gnus-summary-delete-article
+ (gnus-check-backend-function
+ 'request-expire-articles gnus-newsgroup-name)]
+ ["Query respool" gnus-summary-respool-query t]
["Trace respool" gnus-summary-respool-trace t]
- ["Delete expirable articles" gnus-summary-expire-articles-now
- (gnus-check-backend-function
- 'request-expire-articles gnus-newsgroup-name)])
- ("Extract"
- ["Uudecode" gnus-uu-decode-uu
+ ["Delete expirable articles" gnus-summary-expire-articles-now
+ (gnus-check-backend-function
+ 'request-expire-articles gnus-newsgroup-name)])
+ ("Extract"
+ ["Uudecode" gnus-uu-decode-uu
,@(if (featurep 'xemacs) '(t)
'(:help "Decode uuencoded article(s)"))]
- ["Uudecode and save" gnus-uu-decode-uu-and-save t]
- ["Unshar" gnus-uu-decode-unshar t]
- ["Unshar and save" gnus-uu-decode-unshar-and-save t]
- ["Save" gnus-uu-decode-save t]
- ["Binhex" gnus-uu-decode-binhex t]
- ["Postscript" gnus-uu-decode-postscript t])
- ("Cache"
- ["Enter article" gnus-cache-enter-article t]
- ["Remove article" gnus-cache-remove-article t])
+ ["Uudecode and save" gnus-uu-decode-uu-and-save t]
+ ["Unshar" gnus-uu-decode-unshar t]
+ ["Unshar and save" gnus-uu-decode-unshar-and-save t]
+ ["Save" gnus-uu-decode-save t]
+ ["Binhex" gnus-uu-decode-binhex t]
+ ["Postscript" gnus-uu-decode-postscript t])
+ ("Cache"
+ ["Enter article" gnus-cache-enter-article t]
+ ["Remove article" gnus-cache-remove-article t])
["Translate" gnus-article-babel t]
- ["Select article buffer" gnus-summary-select-article-buffer t]
- ["Enter digest buffer" gnus-summary-enter-digest-group t]
- ["Isearch article..." gnus-summary-isearch-article t]
- ["Beginning of the article" gnus-summary-beginning-of-article t]
- ["End of the article" gnus-summary-end-of-article t]
- ["Fetch parent of article" gnus-summary-refer-parent-article t]
- ["Fetch referenced articles" gnus-summary-refer-references t]
- ["Fetch current thread" gnus-summary-refer-thread t]
- ["Fetch article with id..." gnus-summary-refer-article t]
- ["Setup Mailing List Params" gnus-mailing-list-insinuate t]
- ["Redisplay" gnus-summary-show-article t]
- ["Raw article" gnus-summary-show-raw-article t])))
+ ["Select article buffer" gnus-summary-select-article-buffer t]
+ ["Enter digest buffer" gnus-summary-enter-digest-group t]
+ ["Isearch article..." gnus-summary-isearch-article t]
+ ["Beginning of the article" gnus-summary-beginning-of-article t]
+ ["End of the article" gnus-summary-end-of-article t]
+ ["Fetch parent of article" gnus-summary-refer-parent-article t]
+ ["Fetch referenced articles" gnus-summary-refer-references t]
+ ["Fetch current thread" gnus-summary-refer-thread t]
+ ["Fetch article with id..." gnus-summary-refer-article t]
+ ["Setup Mailing List Params" gnus-mailing-list-insinuate t]
+ ["Redisplay" gnus-summary-show-article t]
+ ["Raw article" gnus-summary-show-raw-article t])))
(easy-menu-define
gnus-summary-article-menu gnus-summary-mode-map ""
(cons "Article" innards))
gnus-article-commands-menu gnus-article-mode-map ""
(cons "Commands" innards))
;; in Emacs, don't share menu.
- (setq gnus-article-commands-menu
+ (setq gnus-article-commands-menu
(copy-keymap gnus-summary-article-menu))
(define-key gnus-article-mode-map [menu-bar commands]
(cons "Commands" gnus-article-commands-menu))))
;;["Send bounced" gnus-resend-bounced-mail t])
))
- (cond
+ (cond
((not (keymapp gnus-summary-post-menu))
(setq gnus-article-post-menu gnus-summary-post-menu))
((not gnus-article-post-menu)
["Mark region" gnus-uu-mark-region t]
["Unmark region" gnus-uu-unmark-region t]
["Mark by regexp..." gnus-uu-mark-by-regexp t]
- ["Unmark by regexp..." gnus-uu-unmark-by-regexp t]
+ ["Unmark by regexp..." gnus-uu-unmark-by-regexp t]
["Mark all" gnus-uu-mark-all t]
["Mark buffer" gnus-uu-mark-buffer t]
["Mark sparse" gnus-uu-mark-sparse t]
(defun gnus-summary-set-local-parameters (group)
"Go through the local params of GROUP and set all variable specs in that list."
(let ((params (gnus-group-find-parameter group))
- (vars '(quit-config)) ; Ignore quit-config.
+ (vars '(quit-config)) ; Ignore quit-config.
elem)
(while params
(setq elem (car params)
(and (consp elem) ; Has to be a cons.
(consp (cdr elem)) ; The cdr has to be a list.
(symbolp (car elem)) ; Has to be a symbol in there.
- (not (memq (car elem) vars))
+ (not (memq (car elem) vars))
(ignore-errors ; So we set it.
- (push (car elem) vars)
+ (push (car elem) vars)
(make-local-variable (car elem))
(set (car elem) (eval (nth 1 elem))))))))
(gnus-group-next-unread-group 1))
(gnus-handle-ephemeral-exit quit-config)))
(let ((grpinfo (gnus-get-info group)))
- (if (null (gnus-info-read grpinfo))
- (gnus-message 3 "Group %s contains no messages"
+ (if (null (gnus-info-read grpinfo))
+ (gnus-message 3 "Group %s contains no messages"
(gnus-group-decoded-name group))
- (gnus-message 3 "Can't select group")))
+ (gnus-message 3 "Can't select group")))
nil)
;; The user did a `C-g' while prompting for number of articles,
;; so we exit this group.
gnus-tmp-dummy gnus-tmp-indentation gnus-tmp-lines gnus-tmp-score
gnus-tmp-score-char gnus-tmp-from gnus-tmp-name
gnus-tmp-number gnus-tmp-opening-bracket gnus-tmp-closing-bracket
- tree-stack)
+ tree-stack)
(setq gnus-tmp-prev-subject nil)
;; the stack.
(setq state (car stack)
gnus-tmp-level (car state)
- tree-stack (cadr state)
+ tree-stack (cadr state)
thread (caddr state)
stack (cdr stack)
gnus-tmp-header (caar thread))))
(substring gnus-tmp-from
(1+ (match-beginning 0)) (1- (match-end 0))))
(t gnus-tmp-from))
- gnus-tmp-thread-tree-header-string
- (if (zerop gnus-tmp-level)
- (if (cdar thread)
- gnus-sum-thread-tree-root
- gnus-sum-thread-tree-single-indent)
- (concat (apply 'concat
- (mapcar (lambda (item)
- (if (= item 1)
- gnus-sum-thread-tree-vertical
- gnus-sum-thread-tree-indent))
- (cdr (reverse tree-stack))))
- (if (nth 1 thread)
- gnus-sum-thread-tree-leaf-with-other
- gnus-sum-thread-tree-single-leaf))))
+ gnus-tmp-thread-tree-header-string
+ (if (zerop gnus-tmp-level)
+ (if (cdar thread)
+ gnus-sum-thread-tree-root
+ gnus-sum-thread-tree-single-indent)
+ (concat (apply 'concat
+ (mapcar (lambda (item)
+ (if (= item 1)
+ gnus-sum-thread-tree-vertical
+ gnus-sum-thread-tree-indent))
+ (cdr (reverse tree-stack))))
+ (if (nth 1 thread)
+ gnus-sum-thread-tree-leaf-with-other
+ gnus-sum-thread-tree-single-leaf))))
(when (string= gnus-tmp-name "")
(setq gnus-tmp-name gnus-tmp-from))
(setq gnus-tmp-prev-subject subject)))
(when (nth 1 thread)
- (push (list (max 0 gnus-tmp-level)
- (copy-list tree-stack)
- (nthcdr 1 thread))
- stack))
- (push (if (nth 1 thread) 1 0) tree-stack)
+ (push (list (max 0 gnus-tmp-level)
+ (copy-list tree-stack)
+ (nthcdr 1 thread))
+ stack))
+ (push (if (nth 1 thread) 1 0) tree-stack)
(incf gnus-tmp-level)
(setq threads (if thread-end nil (cdar thread)))
(unless threads
(let* ((entry (gnus-gethash group gnus-newsrc-hashtb))
;;!!! Dirty hack; should be removed.
(gnus-summary-ignore-duplicates
- (if (eq (car (gnus-find-method-for-group group)) 'nnvirtual)
+ (if (eq (car (gnus-find-method-for-group group)) 'nnvirtual)
t
gnus-summary-ignore-duplicates))
(info (nth 2 entry))
(format "%s %s (%d scored, %d total): "
"How many articles from"
(gnus-group-decoded-name group)
- scored number))))
+ scored number))))
(if (string-match "^[ \t]*$" input)
number input)))
(t number))
(let* ((mformat (symbol-value
(intern
(format "gnus-%s-mode-line-format-spec" where))))
- (gnus-tmp-group-name (gnus-group-decoded-name
+ (gnus-tmp-group-name (gnus-group-decoded-name
gnus-newsgroup-name))
(gnus-tmp-article-number (or gnus-current-article 0))
(gnus-tmp-unread gnus-newsgroup-unreads)
(setq ref
(buffer-substring
(progn
- ;; (end-of-line)
+ ;; (end-of-line)
(search-backward ">" end t)
(1+ (point)))
(progn
(let* ((group gnus-newsgroup-name)
(quit-config (gnus-group-quit-config gnus-newsgroup-name))
(mode major-mode)
- (group-point nil)
+ (group-point nil)
(buf (current-buffer)))
(unless quit-config
;; Do adaptive scoring, and possibly save score files.
(when (equal (gnus-group-group-name) group)
(gnus-group-next-unread-group 1))
(when quit-config
- (gnus-handle-ephemeral-exit quit-config)))))
+ (gnus-handle-ephemeral-exit quit-config)))))
(defun gnus-handle-ephemeral-exit (quit-config)
"Handle movement when leaving an ephemeral group.
(gnus-configure-windows 'group 'force)
(set-buffer (car quit-config))
(cond ((eq major-mode 'gnus-summary-mode)
- (gnus-set-global-variables))
- ((eq major-mode 'gnus-article-mode)
- (save-excursion
- ;; The `gnus-summary-buffer' variable may point
- ;; to the old summary buffer when using a single
- ;; article buffer.
- (unless (gnus-buffer-live-p gnus-summary-buffer)
- (set-buffer gnus-group-buffer))
- (set-buffer gnus-summary-buffer)
- (gnus-set-global-variables))))
+ (gnus-set-global-variables))
+ ((eq major-mode 'gnus-article-mode)
+ (save-excursion
+ ;; The `gnus-summary-buffer' variable may point
+ ;; to the old summary buffer when using a single
+ ;; article buffer.
+ (unless (gnus-buffer-live-p gnus-summary-buffer)
+ (set-buffer gnus-group-buffer))
+ (set-buffer gnus-summary-buffer)
+ (gnus-set-global-variables))))
(if (or (eq (cdr quit-config) 'article)
- (eq (cdr quit-config) 'pick))
- (progn
- ;; The current article may be from the ephemeral group
- ;; thus it is best that we reload this article
- (gnus-summary-show-article)
- (if (and (boundp 'gnus-pick-mode) (symbol-value 'gnus-pick-mode))
- (gnus-configure-windows 'pick 'force)
- (gnus-configure-windows (cdr quit-config) 'force)))
+ (eq (cdr quit-config) 'pick))
+ (progn
+ ;; The current article may be from the ephemeral group
+ ;; thus it is best that we reload this article
+ (gnus-summary-show-article)
+ (if (and (boundp 'gnus-pick-mode) (symbol-value 'gnus-pick-mode))
+ (gnus-configure-windows 'pick 'force)
+ (gnus-configure-windows (cdr quit-config) 'force)))
(gnus-configure-windows (cdr quit-config) 'force))
(when (eq major-mode 'gnus-summary-mode)
(gnus-summary-next-subject 1 nil t)
(delete-matching-lines "^Path:\\|^From ")
(widen))
(unwind-protect
- (if (let ((gnus-newsgroup-ephemeral-charset gnus-newsgroup-charset)
+ (if (let ((gnus-newsgroup-ephemeral-charset gnus-newsgroup-charset)
(gnus-newsgroup-ephemeral-ignored-charsets
gnus-newsgroup-ignored-charsets))
(gnus-group-read-ephemeral-group
(nndoc-article-type
,(if force 'mbox 'guess))) t))
;; Make all postings to this group go to the parent group.
- (nconc (gnus-info-params (gnus-get-info name))
- params)
- ;; Couldn't select this doc group.
- (switch-to-buffer buf)
- (gnus-set-global-variables)
- (gnus-configure-windows 'summary)
- (gnus-message 3 "Article couldn't be entered?"))
+ (nconc (gnus-info-params (gnus-get-info name))
+ params)
+ ;; Couldn't select this doc group.
+ (switch-to-buffer buf)
+ (gnus-set-global-variables)
+ (gnus-configure-windows 'summary)
+ (gnus-message 3 "Article couldn't be entered?"))
(kill-buffer dig)))))
(defun gnus-summary-read-document (n)
(entry
(gnus-gethash pto-group gnus-newsrc-hashtb))
(info (nth 2 entry))
- (to-group (gnus-info-group info))
+ (to-group (gnus-info-group info))
to-marks)
;; Update the group that has been moved to.
(when (and info
(nnheader-insert-file-contents file)
(goto-char (point-min))
(if (nnheader-article-p)
- (save-restriction
- (goto-char (point-min))
- (search-forward "\n\n" nil t)
- (narrow-to-region (point-min) (1- (point)))
- (goto-char (point-min))
- (unless (re-search-forward "^date:" nil t)
- (goto-char (point-max))
- (insert "Date: " (message-make-date (nth 5 atts)) "\n")))
+ (save-restriction
+ (goto-char (point-min))
+ (search-forward "\n\n" nil t)
+ (narrow-to-region (point-min) (1- (point)))
+ (goto-char (point-min))
+ (unless (re-search-forward "^date:" nil t)
+ (goto-char (point-max))
+ (insert "Date: " (message-make-date (nth 5 atts)) "\n")))
;; This doesn't look like an article, so we fudge some headers.
(setq atts (file-attributes file)
lines (count-lines (point-min) (point-max)))
(if (and (not read-only)
(not (gnus-request-replace-article
(cdr gnus-article-current) (car gnus-article-current)
- (current-buffer) t)))
+ (current-buffer) t)))
(error "Couldn't replace article")
;; Update the summary buffer.
(if (and references
(setq mark gnus-del-mark))
(when (and (not no-expire)
gnus-newsgroup-auto-expire
- (memq mark gnus-auto-expirable-marks))
+ (memq mark gnus-auto-expirable-marks))
(setq mark gnus-expirable-mark))
(let ((article (or article (gnus-summary-article-number)))
(old-mark (gnus-summary-article-mark article)))
(defun gnus-summary-update-mark (mark type)
(let ((forward (cdr (assq type gnus-summary-mark-positions)))
- (buffer-read-only nil))
+ (buffer-read-only nil))
(re-search-backward "[\n\r]" (gnus-point-at-bol) 'move-to-limit)
(when forward
(when (looking-at "\r")
(goto-char (point-min))
(push gnus-newsgroup-limit gnus-newsgroup-limits)
(setq gnus-newsgroup-limit (copy-sequence gnus-newsgroup-limit))
- (mapcar (lambda (x) (push (mail-header-number x)
+ (mapcar (lambda (x) (push (mail-header-number x)
gnus-newsgroup-limit))
headers)
(gnus-summary-prepare-unthreaded (nreverse headers))
(let ((gnus-default-article-saver 'gnus-summary-save-in-pipe))
(gnus-summary-save-article arg t))
(let ((buffer (get-buffer "*Shell Command Output*")))
- (if (and buffer
- (with-current-buffer buffer (> (point-max) (point-min))))
- (gnus-configure-windows 'pipe))))
+ (if (and buffer
+ (with-current-buffer buffer (> (point-max) (point-min))))
+ (gnus-configure-windows 'pipe))))
(defun gnus-summary-save-article-mail (&optional arg)
"Append the current article to an mail file.
(let ((mail-header-separator ""))
(gnus-eval-in-buffer-window gnus-article-buffer
(save-restriction
- (widen)
- (let ((start (window-start))
- buffer-read-only)
- (message-pipe-buffer-body program)
- (set-window-start (get-buffer-window (current-buffer)) start))))))
+ (widen)
+ (let ((start (window-start))
+ buffer-read-only)
+ (message-pipe-buffer-body program)
+ (set-window-start (get-buffer-window (current-buffer)) start))))))
(defun gnus-get-split-value (methods)
"Return a value based on the split METHODS."
(nreverse split-name))
nil nil nil
'gnus-group-history))))
- (to-method (gnus-server-to-method (gnus-group-method to-newsgroup))))
+ (to-method (gnus-server-to-method (gnus-group-method to-newsgroup))))
(when to-newsgroup
(if (or (string= to-newsgroup "")
(string= to-newsgroup prefix))
(gnus-set-difference articles
(mapcar (lambda (h) (mail-header-number h))
gnus-newsgroup-headers)))
- (setq gnus-newsgroup-headers
+ (setq gnus-newsgroup-headers
(merge 'list
gnus-newsgroup-headers
(gnus-fetch-headers articles)
;; Suppress duplicates?
(when gnus-suppress-duplicates
(gnus-dup-suppress-articles))
-
+
;; We might want to build some more threads first.
(when (and gnus-fetch-old-headers
(eq gnus-headers-retrieved-by 'nov))
(or (memq i old) (push i older))
(incf i))
(setq len (length older))
- (cond
+ (cond
((null older) nil)
- ((numberp all)
+ ((numberp all)
(if (< all len)
(setq older (subseq older 0 all))))
(all nil)
(read-string
(format
"How many articles from %s (default %d): "
- (gnus-limit-string
+ (gnus-limit-string
(gnus-group-decoded-name gnus-newsgroup-name) 35)
len))))
- (unless (string-match "^[ \t]*$" input)
+ (unless (string-match "^[ \t]*$" input)
(setq all (string-to-number input))
(if (< all len)
(setq older (subseq older 0 all))))))))
(old-active gnus-newsgroup-active)
(nnmail-fetched-sources (list t))
i new)
- (setq gnus-newsgroup-active
+ (setq gnus-newsgroup-active
(gnus-activate-group gnus-newsgroup-name 'scan))
(setq i (1+ (cdr old-active)))
(while (<= i (cdr gnus-newsgroup-active))
(incf i))
(if (not new)
(message "No gnus is bad news.")
- (setq new (nreverse new))
+ (setq new (nreverse new))
(gnus-summary-insert-articles new)
(setq gnus-newsgroup-unreads
(append gnus-newsgroup-unreads new))
"Return entries for all visible groups in TOPIC.
If RECURSIVE is t, return groups in its subtopics too."
(let ((groups (cdr (assoc topic gnus-topic-alist)))
- info clevel unread group params visible-groups entry active)
+ info clevel unread group params visible-groups entry active)
(setq lowest (or lowest 1))
(setq level (or level gnus-level-unsubscribed))
;; We go through the newsrc to look for matches.
If LOWEST is non-nil, list all newsgroups of level LOWEST or higher."
(set-buffer gnus-group-buffer)
(let ((buffer-read-only nil)
- (lowest (or lowest 1))
+ (lowest (or lowest 1))
(not-in-list
(and gnus-group-listed-groups
(copy-sequence gnus-group-listed-groups))))
(when (and (eq major-mode 'gnus-group-mode)
gnus-topic-mode)
(let ((group (gnus-group-group-name))
- (m (point-marker))
+ (m (point-marker))
(buffer-read-only nil))
(when (and group
(gnus-get-info group)
(> (prefix-numeric-value arg) 0)))
;; Infest Gnus with topics.
(if (not gnus-topic-mode)
- (setq gnus-goto-missing-group-function nil)
+ (setq gnus-goto-missing-group-function nil)
(when (gnus-visual-p 'topic-menu 'menu)
(gnus-topic-make-menu-bar))
(gnus-set-format 'topic t)
(defmacro gnus-eval-in-buffer-window (buffer &rest forms)
"Pop to BUFFER, evaluate FORMS, and then return to the original window."
(let ((tempvar (make-symbol "GnusStartBufferWindow"))
- (w (make-symbol "w"))
- (buf (make-symbol "buf"))
+ (w (make-symbol "w"))
+ (buf (make-symbol "buf"))
(frame (make-symbol "frame")))
`(let* ((,tempvar (selected-window))
- (,buf ,buffer)
- (,w (get-buffer-window ,buf 'visible))
+ (,buf ,buffer)
+ (,w (get-buffer-window ,buf 'visible))
,frame)
(unwind-protect
- (progn
- (if ,w
- (progn
- (select-window ,w)
- (set-buffer (window-buffer ,w)))
- (pop-to-buffer ,buf))
- ,@forms)
+ (progn
+ (if ,w
+ (progn
+ (select-window ,w)
+ (set-buffer (window-buffer ,w)))
+ (pop-to-buffer ,buf))
+ ,@forms)
(setq ,frame (selected-frame))
- (select-window ,tempvar)
+ (select-window ,tempvar)
(select-frame ,frame)))))
(put 'gnus-eval-in-buffer-window 'lisp-indent-function 1)
(when msg
(goto-char (point-min))
(widen)
- (search-backward "\n\^_")
- (narrow-to-region (point) (point-max))
- (rmail-count-new-messages t)
- (when (rmail-summary-exists)
+ (search-backward "\n\^_")
+ (narrow-to-region (point) (point-max))
+ (rmail-count-new-messages t)
+ (when (rmail-summary-exists)
(rmail-select-summary
(rmail-update-summary)))
(rmail-count-new-messages t)
Return the modified alist."
(let (entry)
(while (setq entry (assq key alist))
- (setq alist (delq entry alist)))
+ (setq alist (delq entry alist)))
alist)))
(defmacro gnus-pull (key alist &optional assoc-p)
(let ((nnheader-file-name-translation-alist
'((?/ . ?,) (? . ?_) (?* . ?_) (?$ . ?_))))
(nnheader-translate-file-chars (match-string 1))))
- (replace-match (concat "begin 644 " gnus-uu-file-name) t t)
+ (replace-match (concat "begin 644 " gnus-uu-file-name) t t)
;; Remove any non gnus-uu-body-line right after start.
(forward-line 1)
(push (list (aref arg new-pos)) accum)
(setq pos (1+ new-pos)))
(if (= pos 0)
- arg
+ arg
(apply 'concat (nconc (nreverse accum) (list (substring arg pos)))))))
;; Inputs an action and a filename and returns a full command, making sure
(defvar vm-folder-history)
(defvar vm-primary-inbox)
(defvar vm-use-toolbar)
-
+
(defun gnus-vm-make-folder (&optional buffer)
(let ((article (or buffer (current-buffer)))
(tmp-folder (generate-new-buffer " *tmp-folder*"))
(message 1.0 point)))
(display-term
(vertical 1.0
- ("*display*" 1.0))))
+ ("*display*" 1.0))))
"Window configuration for all possible Gnus buffers.
See the Gnus manual for an explanation of the syntax used.")
;; put point in the assigned buffer, and do not touch the
;; winconf.
(select-window all-visible)
-
+
;; Make sure "the other" buffer, nntp-server-buffer, is live.
(unless (gnus-buffer-live-p nntp-server-buffer)
(nnheader-init-server-buffer))
(if (stringp buffer)
nil
(map-extents (lambda (extent ignored)
- (remove-text-properties
- start end
- (list (extent-property extent 'text-prop) nil)
- buffer)
+ (remove-text-properties
+ start end
+ (list (extent-property extent 'text-prop) nil)
+ buffer)
nil)
- buffer start end nil nil 'text-prop)
+ buffer start end nil nil 'text-prop)
(gnus-add-text-properties start end props buffer)))
(defun gnus-xmas-highlight-selected-summary ()
(defun gnus-xmas-appt-select-lowest-window ()
(let* ((lowest-window (selected-window))
(bottom-edge (car (cdr (cdr (cdr (window-pixel-edges))))))
- (last-window (previous-window))
- (window-search t))
+ (last-window (previous-window))
+ (window-search t))
(while window-search
(let* ((this-window (next-window))
- (next-bottom-edge (car (cdr (cdr (cdr
- (window-pixel-edges
+ (next-bottom-edge (car (cdr (cdr (cdr
+ (window-pixel-edges
this-window)))))))
- (when (< bottom-edge next-bottom-edge)
+ (when (< bottom-edge next-bottom-edge)
(setq bottom-edge next-bottom-edge)
(setq lowest-window this-window))
- (select-window this-window)
- (when (eq last-window this-window)
+ (select-window this-window)
+ (when (eq last-window this-window)
(select-window lowest-window)
(setq window-search nil))))))
(defalias 'gnus-window-edges 'window-pixel-edges)
(if (and (<= emacs-major-version 19)
- (< emacs-minor-version 14))
+ (< emacs-minor-version 14))
(defalias 'gnus-set-text-properties 'gnus-xmas-set-text-properties))
(unless (boundp 'standard-display-table)
(set-window-start (selected-window) (point-min))))
(t
(insert "
- _ ___ _ _
- _ ___ __ ___ __ _ ___
- __ _ ___ __ ___
- _ ___ _
- _ _ __ _
- ___ __ _
- __ _
- _ _ _
- _ _ _
- _ _ _
- __ ___
- _ _ _ _
- _ _
- _ _
- _ _
- _
- __
+ _ ___ _ _
+ _ ___ __ ___ __ _ ___
+ __ _ ___ __ ___
+ _ ___ _
+ _ _ __ _
+ ___ __ _
+ __ _
+ _ _ _
+ _ _ _
+ _ _ _
+ __ ___
+ _ _ _ _
+ _ _
+ _ _
+ _ _
+ _
+ __
"
)
t))))
(t
(insert "
- _ ___ _ _
- _ ___ __ ___ __ _ ___
- __ _ ___ __ ___
- _ ___ _
- _ _ __ _
- ___ __ _
- __ _
- _ _ _
- _ _ _
- _ _ _
- __ ___
- _ _ _ _
- _ _
- _ _
- _ _
- _
- __
+ _ ___ _ _
+ _ ___ __ ___ __ _ ___
+ __ _ ___ __ ___
+ _ ___ _
+ _ _ __ _
+ ___ __ _
+ __ _
+ _ _ _
+ _ _ _
+ _ _ _
+ __ ___
+ _ _ _ _
+ _ _
+ _ _
+ _ _
+ _
+ __
"
)
For example:
((\"mail\\\\..*\" (gnus-show-threads nil)
- (gnus-use-scoring nil)
- (gnus-summary-line-format
- \"%U%R%z%I%(%[%d:%ub%-20,20f%]%) %s\\n\")
- (gcc-self . t)
- (display . all))
+ (gnus-use-scoring nil)
+ (gnus-summary-line-format
+ \"%U%R%z%I%(%[%d:%ub%-20,20f%]%) %s\\n\")
+ (gcc-self . t)
+ (display . all))
(\"mail\\\\.me\" (gnus-use-scoring t))
(\"list\\\\..*\" (total-expire . t)
- (broken-reply-to . t)))")
+ (broken-reply-to . t)))")
(defvar gnus-group-parameters-more nil)
write in another group, you could say something like:
\(setq gnus-message-archive-group
- '((if (message-news-p)
- \"misc-news\"
- \"misc-mail\")))
+ '((if (message-news-p)
+ \"misc-news\"
+ \"misc-mail\")))
Normally the group names returned by this variable should be
unprefixed -- which implicitly means \"store on the archive server\".
ftp.seas.gwu.edu /pub/rtfm
rtfm.mit.edu /pub/usenet
Europe: ftp.uni-paderborn.de /pub/FAQ
- src.doc.ic.ac.uk /usenet/news-FAQS
+ src.doc.ic.ac.uk /usenet/news-FAQS
ftp.sunet.se /pub/usenet
sunsite.auc.dk /pub/usenet
Asia: nctuccca.edu.tw /USENET/FAQ
:function-document
"Return the default charset of GROUP."
:variable gnus-group-charset-alist
- :variable-default
+ :variable-default
'(("\\(^\\|:\\)hk\\>\\|\\(^\\|:\\)tw\\>\\|\\<big5\\>" cn-big5)
("\\(^\\|:\\)cn\\>\\|\\<chinese\\>" cn-gb-2312)
("\\(^\\|:\\)fj\\>\\|\\(^\\|:\\)japan\\>" iso-2022-jp-2)
params-list)
(while alist
(when (string-match (caar alist) group)
- (setq params-list
+ (setq params-list
(nconc (copy-sequence (cdar alist))
params-list)))
(pop alist))
If SYMBOL, return the value of that symbol in the group parameters."
(save-excursion
(set-buffer gnus-group-buffer)
- (let ((parameters
+ (let ((parameters
(nconc
(copy-sequence
(funcall gnus-group-get-parameter-function group))
(defun gnus-read-method (prompt)
"Prompt the user for a method.
Allow completion over sensible values."
- (let* ((open-servers
+ (let* ((open-servers
(mapcar (lambda (i) (cons (format "%s:%s" (caar i) (cadar i)) i))
gnus-opened-servers))
(valid-methods
;;
;; Mailbox commands:
;;
-;; imap-mailbox-get, imap-mailbox-map, imap-current-mailbox,
+;; imap-mailbox-get, imap-mailbox-map, imap-current-mailbox,
;; imap-current-mailbox-p, imap-search, imap-mailbox-select,
;; imap-mailbox-examine, imap-mailbox-unselect, imap-mailbox-expunge
;; imap-mailbox-close, imap-mailbox-create, imap-mailbox-delete
;; imap-fetch-asynch, imap-fetch,
;; imap-current-message, imap-list-to-message-set,
;; imap-message-get, imap-message-map
-;; imap-message-envelope-date, imap-message-envelope-subject,
+;; imap-message-envelope-date, imap-message-envelope-subject,
;; imap-message-envelope-from, imap-message-envelope-sender,
;; imap-message-envelope-reply-to, imap-message-envelope-to,
;; imap-message-envelope-cc, imap-message-envelope-bcc
;; => "X-Sieve: cmu-sieve 1.3^M\nX-Username: <jas@pdc.kth.se>^M\r...."
;;
;; Todo:
-;;
+;;
;; o Parse UIDs as strings? We need to overcome the 28 bit limit somehow.
;; o Don't use `read' at all (important places already fixed)
;; o Accept list of articles instead of message set string in most
server support the stream and OPEN is a function for opening the
stream.")
-(defvar imap-authenticators '(gssapi
+(defvar imap-authenticators '(gssapi
kerberos4
digest-md5
cram-md5
anonymous)
"Priority of authenticators to consider when authenticating to server.")
-(defvar imap-authenticator-alist
+(defvar imap-authenticator-alist
'((gssapi imap-gssapi-auth-p imap-gssapi-auth)
(kerberos4 imap-kerberos4-auth-p imap-kerberos4-auth)
(cram-md5 imap-cram-md5-p imap-cram-md5-auth)
(defvar imap-username nil)
(defvar imap-password nil)
(defvar imap-calculate-literal-size-first nil)
-(defvar imap-state 'closed
+(defvar imap-state 'closed
"IMAP state.
Valid states are `closed', `initial', `nonauth', `auth', `selected'
and `examine'.")
(defvar imap-reached-tag 0
"Lower limit on command tags that have been parsed.")
-(defvar imap-failed-tags nil
+(defvar imap-failed-tags nil
"Alist of tags that failed.
Each element is a list with four elements; tag (a integer), response
state (a symbol, `OK', `NO' or `BAD'), response code (a string), and
(and string
(condition-case ()
(utf7-encode string t)
- (error (message
+ (error (message
"imap: Could not UTF7 encode `%s', using it unencoded..."
string)
string)))
(while (and (memq (process-status process) '(open run))
(set-buffer buffer) ;; XXX "blue moon" nntp.el bug
(goto-char (point-min))
- ;; cyrus 1.6.x (13? < x <= 22) queries capabilities
- (or (while (looking-at "^C:")
+ ;; cyrus 1.6.x (13? < x <= 22) queries capabilities
+ (or (while (looking-at "^C:")
(forward-line))
t)
;; cyrus 1.6 imtest print "S: " before server greeting
(delete-process process)
nil)))))
done))
-
+
(defun imap-gssapi-stream-p (buffer)
(imap-capability 'AUTH=GSSAPI buffer))
(while (and (memq (process-status process) '(open run))
(set-buffer buffer) ;; XXX "blue moon" nntp.el bug
(goto-char (point-min))
- ;; cyrus 1.6.x (13? < x <= 22) queries capabilities
- (or (while (looking-at "^C:")
+ ;; cyrus 1.6.x (13? < x <= 22) queries capabilities
+ (or (while (looking-at "^C:")
(forward-line))
t)
;; cyrus 1.6 imtest print "S: " before server greeting
done)
(message "imap: Connecting with STARTTLS...failed")
nil)))
-
+
;; Server functions; authenticator stuff:
(defun imap-interactive-login (buffer loginfunc)
;; (condition-case ()
(while (or (not user) (not passwd))
(setq user (or imap-username
- (read-from-minibuffer
+ (read-from-minibuffer
(concat "IMAP username for " imap-server ": ")
(or user imap-default-user))))
(setq passwd (or imap-password
(imap-read-passwd
- (concat "IMAP password for " user "@"
+ (concat "IMAP password for " user "@"
imap-server ": "))))
(when (and user passwd)
(if (funcall loginfunc user passwd)
(defun imap-login-auth (buffer)
"Login to server using the LOGIN command."
(message "imap: Plaintext authentication...")
- (imap-interactive-login buffer
+ (imap-interactive-login buffer
(lambda (user passwd)
- (imap-ok-p (imap-send-command-wait
- (concat "LOGIN \"" user "\" \""
+ (imap-ok-p (imap-send-command-wait
+ (concat "LOGIN \"" user "\" \""
passwd "\""))))))
(defun imap-anonymous-p (buffer)
(message "imap: Loging in anonymously...")
(with-current-buffer buffer
(imap-ok-p (imap-send-command-wait
- (concat "LOGIN anonymous \"" (concat (user-login-name) "@"
+ (concat "LOGIN anonymous \"" (concat (user-login-name) "@"
(system-name)) "\"")))))
(defun imap-digest-md5-p (buffer)
(imap-interactive-login
buffer
(lambda (user passwd)
- (let ((tag
+ (let ((tag
(imap-send-command
(list
"AUTHENTICATE DIGEST-MD5"
imap-current-message nil
imap-state 'initial
imap-process (condition-case ()
- (funcall (nth 2 (assq imap-stream
+ (funcall (nth 2 (assq imap-stream
imap-stream-alist))
"imap" buffer imap-server imap-port)
((error quit) nil)))
(let ((streams imap-streams))
(while (setq stream (pop streams))
(if (funcall (nth 1 (assq stream imap-stream-alist)) buffer)
- (setq stream-changed (not (eq (or imap-stream
+ (setq stream-changed (not (eq (or imap-stream
imap-default-stream)
stream))
imap-stream stream
(if (imap-open-1 buffer)
(message "imap: Reconnecting with stream `%s'...done"
imap-stream)
- (message "imap: Reconnecting with stream `%s'...failed"
+ (message "imap: Reconnecting with stream `%s'...failed"
imap-stream))
(setq imap-capability nil))
(if (imap-opened buffer)
(when (and (null imap-auth) (not (eq imap-state 'auth)))
(let ((auths imap-authenticators))
(while (setq auth (pop auths))
- (if (funcall (nth 1 (assq auth imap-authenticator-alist))
+ (if (funcall (nth 1 (assq auth imap-authenticator-alist))
buffer)
(setq imap-auth auth
auths nil)))
(defun imap-mailbox-map-1 (func &optional mailbox-decoder buffer)
(with-current-buffer (or buffer (current-buffer))
(let (result)
- (mapatoms
+ (mapatoms
(lambda (s)
(push (funcall func (if mailbox-decoder
(funcall mailbox-decoder (symbol-name s))
imap-current-mailbox
(setq imap-current-mailbox mailbox)
(if (imap-ok-p (imap-send-command-wait
- (concat (if examine "EXAMINE" "SELECT") " \""
+ (concat (if examine "EXAMINE" "SELECT") " \""
mailbox "\"")))
(progn
(setq imap-message-data (make-vector imap-message-prime 0)
;; Failed SELECT/EXAMINE unselects current mailbox
(setq imap-current-mailbox nil))))
-(defun imap-mailbox-select (mailbox &optional examine buffer)
+(defun imap-mailbox-select (mailbox &optional examine buffer)
(with-current-buffer (or buffer (current-buffer))
- (imap-utf7-decode
+ (imap-utf7-decode
(imap-mailbox-select-1 (imap-utf7-encode mailbox) examine))))
(defun imap-mailbox-examine-1 (mailbox &optional buffer)
(when (or (eq imap-state 'auth)
(and (imap-capability 'UNSELECT)
(imap-ok-p (imap-send-command-wait "UNSELECT")))
- (and (imap-ok-p
+ (and (imap-ok-p
(imap-send-command-wait (concat "EXAMINE \""
imap-current-mailbox
"\"")))
(imap-send-command-wait (list "RENAME \"" oldname "\" "
"\"" newname "\""))))))
-(defun imap-mailbox-lsub (&optional root reference add-delimiter buffer)
+(defun imap-mailbox-lsub (&optional root reference add-delimiter buffer)
"Return a list of subscribed mailboxes on server in BUFFER.
If ROOT is non-nil, only list matching mailboxes. If ADD-DELIMITER is
non-nil, a hierarchy delimiter is added to root. REFERENCE is a
(imap-mailbox-map-1 (lambda (mailbox)
(imap-mailbox-put 'lsub nil mailbox)))
(when (imap-ok-p
- (imap-send-command-wait
+ (imap-send-command-wait
(concat "LSUB \"" reference "\" \"" (imap-utf7-encode root)
(and add-delimiter (imap-mailbox-get-1 'delimiter root))
"%\"")))
(imap-mailbox-map-1 (lambda (mailbox)
(imap-mailbox-put 'list nil mailbox)))
(when (imap-ok-p
- (imap-send-command-wait
+ (imap-send-command-wait
(concat "LIST \"" reference "\" \"" (imap-utf7-encode root)
(and add-delimiter (imap-mailbox-get-1 'delimiter root))
"%\"")))
"Send the SUBSCRIBE command on the mailbox to server in BUFFER.
Returns non-nil if successful."
(with-current-buffer (or buffer (current-buffer))
- (imap-ok-p (imap-send-command-wait (concat "SUBSCRIBE \""
+ (imap-ok-p (imap-send-command-wait (concat "SUBSCRIBE \""
(imap-utf7-encode mailbox)
"\"")))))
"Send the SUBSCRIBE command on the mailbox to server in BUFFER.
Returns non-nil if successful."
(with-current-buffer (or buffer (current-buffer))
- (imap-ok-p (imap-send-command-wait (concat "UNSUBSCRIBE "
+ (imap-ok-p (imap-send-command-wait (concat "UNSUBSCRIBE "
(imap-utf7-encode mailbox)
"\"")))))
or 'unseen. If ITEMS is a list of symbols, a list of values is
returned, if ITEMS is a symbol only it's value is returned."
(with-current-buffer (or buffer (current-buffer))
- (when (imap-ok-p
+ (when (imap-ok-p
(imap-send-command-wait (list "STATUS \""
(imap-utf7-encode mailbox)
"\" "
(format "%s"
(if (listp items)
- items
+ items
(list items))))))
(if (listp items)
(mapcar (lambda (item)
(mapconcat
(lambda (item)
(if (consp item)
- (format "%d:%d"
- (car item) (cdr item))
+ (format "%d:%d"
+ (car item) (cdr item))
(format "%d" item)))
(if (and (listp range) (not (listp (cdr range))))
(list range) ;; make (1 . 2) into ((1 . 2))
UIDS can be a string, number or a list of numbers. If RECEIVE
is non-nil return theese properties."
(with-current-buffer (or buffer (current-buffer))
- (when (imap-ok-p (imap-send-command-wait
+ (when (imap-ok-p (imap-send-command-wait
(format "%sFETCH %s %s" (if nouidfetch "" "UID ")
(if (listp uids)
(imap-list-to-message-set uids)
(imap-message-get uid receive)))
uids)
(imap-message-get uids receive))))))
-
+
(defun imap-message-put (uid propname value &optional buffer)
(with-current-buffer (or buffer (current-buffer))
(if imap-message-data
(imap-ok-p (imap-send-command-wait cmd)))))
(or no-copyuid
(imap-message-copyuid-1 mailbox)))))))
-
+
(defun imap-message-appenduid-1 (mailbox)
(if (imap-capability 'UIDPLUS)
(imap-mailbox-get-1 'appenduid mailbox)
(let ((mailbox (imap-utf7-encode mailbox)))
(with-current-buffer (or buffer (current-buffer))
(and (let ((imap-current-target-mailbox mailbox))
- (imap-ok-p
- (imap-send-command-wait
+ (imap-ok-p
+ (imap-send-command-wait
(list "APPEND \"" mailbox "\" " article))))
(imap-message-appenduid-1 mailbox)))))
-
+
(defun imap-body-lines (body)
"Return number of lines in article by looking at the mime bodystructure BODY."
(if (listp body)
(and from
(concat (aref from 0)
(if (aref from 0) " <")
- (aref from 2)
- "@"
+ (aref from 2)
+ "@"
(aref from 3)
(if (aref from 0) ">"))))
(replace-match eol)))
(if (not calcfirst)
(setq size (buffer-size))))
- (setq cmdstr
+ (setq cmdstr
(concat cmdstr (format "{%d}" size))))
(unwind-protect
(progn
(< imap-reached-tag tag))
(or (and (not (memq (process-status imap-process) '(open run)))
(sit-for 1))
- (let ((len (/ (point-max) 1024))
+ (let ((len (/ (point-max) 1024))
message-log-max)
- (unless (< len 10)
- (message "imap read: %dk" len))
- (accept-process-output imap-process 1))))
+ (unless (< len 10)
+ (message "imap read: %dk" len))
+ (accept-process-output imap-process 1))))
(message "")
(or (assq tag imap-failed-tags)
(if imap-continuation
(eq imap-state 'examine))
(imap-parse-response))
(t
- (message "Unknown state %s in arrival filter"
+ (message "Unknown state %s in arrival filter"
imap-state)))
(delete-region (point-min) (point-max))))))))
(defsubst imap-parse-astring ()
(or (imap-parse-string)
- (buffer-substring (point)
+ (buffer-substring (point)
(if (re-search-forward "[(){ \r\n%*\"\\]" nil t)
(goto-char (1- (match-end 0)))
(end-of-line)
;; resp-cond-bye = "BYE" SP resp-text
;;
;; mailbox-data = "FLAGS" SP flag-list /
-;; "LIST" SP mailbox-list /
+;; "LIST" SP mailbox-list /
;; "LSUB" SP mailbox-list /
;; "SEARCH" *(SP nz-number) /
;; "STATUS" SP mailbox SP "("
(FLAGS (imap-mailbox-put 'flags (imap-parse-flag-list)))
(LIST (imap-parse-data-list 'list))
(LSUB (imap-parse-data-list 'lsub))
- (SEARCH (imap-mailbox-put
- 'search
+ (SEARCH (imap-mailbox-put
+ 'search
(read (concat "(" (buffer-substring (point) (point-max)) ")"))))
(STATUS (imap-parse-status))
- (CAPABILITY (setq imap-capability
+ (CAPABILITY (setq imap-capability
(read (concat "(" (upcase (buffer-substring
(point) (point-max)))
")"))))
(search-forward "]")))
(imap-forward))
(setq text (buffer-substring (point) (point-max)))
- (push (list token status code text)
+ (push (list token status code text)
imap-failed-tags))))
(BAD (progn
(setq imap-reached-tag (max imap-reached-tag token))
;; resp-text-code = "ALERT" /
;; "BADCHARSET [SP "(" astring *(SP astring) ")" ] /
-;; "NEWNAME" SP string SP string /
+;; "NEWNAME" SP string SP string /
;; "PARSE" /
-;; "PERMANENTFLAGS" SP "("
+;; "PERMANENTFLAGS" SP "("
;; [flag-perm *(SP flag-perm)] ")" /
-;; "READ-ONLY" /
-;; "READ-WRITE" /
-;; "TRYCREATE" /
-;; "UIDNEXT" SP nz-number /
+;; "READ-ONLY" /
+;; "READ-WRITE" /
+;; "TRYCREATE" /
+;; "UIDNEXT" SP nz-number /
;; "UIDVALIDITY" SP nz-number /
;; "UNSEEN" SP nz-number /
;; resp-text-atom [SP 1*<any TEXT-CHAR except "]">]
;; ; delimits between two numbers inclusive.
;; ; Example: 2,4:7,9,12:* is 2,4,5,6,7,9,12,13,
;; ; 14,15 for a mailbox with 15 messages.
-;;
+;;
;; sequence-num = nz-number / "*"
;; ; * is the largest number in use. For message
;; ; sequence numbers, it is the number of messages
;; "BODY" ["STRUCTURE"] SPACE body /
;; "BODY" section ["<" number ">"] SPACE nstring /
;; "UID" SPACE uniqueid) ")"
-;;
+;;
;; date_time ::= <"> date_day_fixed "-" date_month "-" date_year
;; SPACE time SPACE zone <">
-;;
+;;
;; section ::= "[" [section_text / (nz_number *["." nz_number]
;; ["." (section_text / "MIME")])] "]"
-;;
+;;
;; section_text ::= "HEADER" / "HEADER.FIELDS" [".NOT"]
;; SPACE header_list / "TEXT"
-;;
+;;
;; header_fld_name ::= astring
-;;
+;;
;; header_list ::= "(" 1#header_fld_name ")"
(defsubst imap-parse-header-list ()
(nreverse strlist))))
(defsubst imap-parse-fetch-body-section ()
- (let ((section
+ (let ((section
(buffer-substring (point) (1- (re-search-forward "[] ]" nil t)))))
(if (eq (char-before) ? )
(prog1
(defun imap-parse-fetch (response)
(when (eq (char-after) ?\()
- (let (uid flags envelope internaldate rfc822 rfc822header rfc822text
+ (let (uid flags envelope internaldate rfc822 rfc822header rfc822text
rfc822size body bodydetail bodystructure)
(while (not (eq (char-after) ?\)))
(imap-forward)
;; mailbox-data = ...
;; "STATUS" SP mailbox SP "("
-;; [status-att SP number
+;; [status-att SP number
;; *(SP status-att SP number)] ")"
;; ...
;;
((eq token 'UNSEEN)
(imap-mailbox-put 'unseen (read (current-buffer)) mailbox))
(t
- (message "Unknown status data %s in mailbox %s ignored"
+ (message "Unknown status data %s in mailbox %s ignored"
token mailbox))))))))
;; acl_data ::= "ACL" SPACE mailbox *(SPACE identifier SPACE
(imap-forward)
(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)
(nreverse body)))))
(when imap-debug ; (untrace-all)
(require 'trace)
(buffer-disable-undo (get-buffer-create imap-debug))
- (mapcar (lambda (f) (trace-function-background f imap-debug))
+ (mapcar (lambda (f) (trace-function-background f imap-debug))
'(
imap-read-passwd
imap-utf7-encode
imap-parse-body-extension
imap-parse-body
)))
-
+
(provide 'imap)
;;; imap.el ends here
(maybe-fbind '(babel-fetch
babel-wash create-image decode-coding-string display-graphic-p
- bbdb-complete-name
+ bbdb-complete-name
display-time-event-handler
find-image font-create-object gnus-mule-get-coding-system
font-lock-set-defaults
(insert-file-contents file)
(goto-char (point-min))
;;; ;; Unix mail format
-;;; (unless (looking-at "\n*From ")
-;;; (insert "From maildir "
-;;; (current-time-string) "\n"))
-;;; (while (re-search-forward "^From " nil t)
-;;; (replace-match ">From "))
+;;; (unless (looking-at "\n*From ")
+;;; (insert "From maildir "
+;;; (current-time-string) "\n"))
+;;; (while (re-search-forward "^From " nil t)
+;;; (replace-match ">From "))
;;; (goto-char (point-max))
;;; (insert "\n\n")
;; MMDF mail format
(defsubst md5-add (x y)
"Return 32-bit sum of 32-bit integers X and Y."
(let ((m (+ (car x) (car y)))
- (l (+ (cdr x) (cdr y))))
+ (l (+ (cdr x) (cdr y))))
(cons (logand 65535 (+ m (lsh l -16))) (logand l 65535))))
;; FF, GG, HH and II are basic MD5 functions, providing transformations
(`
(defun (, name) (a b c d x s ac)
(let*
- ((m1 (+ (car a) ((, func) (car b) (car c) (car d)) (car x) (car ac)))
- (l1 (+ (cdr a) ((, func) (cdr b) (cdr c) (cdr d)) (cdr x) (cdr ac)))
- (m2 (logand 65535 (+ m1 (lsh l1 -16))))
- (l2 (logand 65535 l1))
- (m3 (logand 65535 (if (> s 15)
- (+ (lsh m2 (- s 32)) (lsh l2 (- s 16)))
- (+ (lsh m2 s) (lsh l2 (- s 16))))))
- (l3 (logand 65535 (if (> s 15)
- (+ (lsh l2 (- s 32)) (lsh m2 (- s 16)))
- (+ (lsh l2 s) (lsh m2 (- s 16)))))))
+ ((m1 (+ (car a) ((, func) (car b) (car c) (car d)) (car x) (car ac)))
+ (l1 (+ (cdr a) ((, func) (cdr b) (cdr c) (cdr d)) (cdr x) (cdr ac)))
+ (m2 (logand 65535 (+ m1 (lsh l1 -16))))
+ (l2 (logand 65535 l1))
+ (m3 (logand 65535 (if (> s 15)
+ (+ (lsh m2 (- s 32)) (lsh l2 (- s 16)))
+ (+ (lsh m2 s) (lsh l2 (- s 16))))))
+ (l3 (logand 65535 (if (> s 15)
+ (+ (lsh l2 (- s 32)) (lsh m2 (- s 16)))
+ (+ (lsh l2 s) (lsh m2 (- s 16)))))))
(md5-add (cons m3 l3) b)))))
(md5-make-step md5-FF md5-F)
(defun md5-update (string)
"Update the current MD5 state with STRING (an array of bytes)."
(let ((len (length string))
- (i 0)
- (j 0))
+ (i 0)
+ (j 0))
(while (< i len)
;; Compute number of bytes modulo 64
(setq j (% (/ (aref md5-bits 0) 8) 64))
;; Update number of bits by 8 (modulo 2^64)
(let ((c 8) (k 0))
- (while (and (> c 0) (< k 4))
- (let ((b (aref md5-bits k)))
- (aset md5-bits k (logand 65535 (+ b c)))
- (setq c (if (> b (- 65535 c)) 1 0)
- k (1+ k)))))
+ (while (and (> c 0) (< k 4))
+ (let ((b (aref md5-bits k)))
+ (aset md5-bits k (logand 65535 (+ b c)))
+ (setq c (if (> b (- 65535 c)) 1 0)
+ k (1+ k)))))
;; Increment number of bytes processed
(setq i (1+ i))
;; When 64 bytes accumulated, pack them into sixteen 32-bit
;; integers in the array `in' and then tranform them.
(if (= j 63)
- (let ((in (make-vector 16 (cons 0 0)))
- (k 0)
- (kk 0))
- (while (< k 16)
- (aset in k (md5-pack md5-input kk))
- (setq k (+ k 1) kk (+ kk 4)))
- (md5-transform in))))))
+ (let ((in (make-vector 16 (cons 0 0)))
+ (k 0)
+ (kk 0))
+ (while (< k 16)
+ (aset in k (md5-pack md5-input kk))
+ (setq k (+ k 1) kk (+ kk 4)))
+ (md5-transform in))))))
(defun md5-pack (array i)
"Pack the four bytes at ARRAY reference I to I+3 into a 32-bit integer."
(cons (+ (lsh (aref array (+ i 3)) 8) (aref array (+ i 2)))
- (+ (lsh (aref array (+ i 1)) 8) (aref array (+ i 0)))))
+ (+ (lsh (aref array (+ i 1)) 8) (aref array (+ i 0)))))
(defun md5-byte (array n b)
"Unpack byte B (0 to 3) from Nth member of ARRAY of 32-bit integers."
(let ((e (aref array n)))
(cond ((eq b 0) (logand 255 (cdr e)))
- ((eq b 1) (lsh (cdr e) -8))
- ((eq b 2) (logand 255 (car e)))
- ((eq b 3) (lsh (car e) -8)))))
+ ((eq b 1) (lsh (cdr e) -8))
+ ((eq b 2) (logand 255 (car e)))
+ ((eq b 3) (lsh (car e) -8)))))
(defun md5-final ()
(let ((in (make-vector 16 (cons 0 0)))
- (j 0)
- (digest (make-vector 16 0))
- (padding))
+ (j 0)
+ (digest (make-vector 16 0))
+ (padding))
;; Save the number of bits in the message
(aset in 14 (cons (aref md5-bits 1) (aref md5-bits 0)))
;; Append length in bits and transform
(let ((k 0) (kk 0))
(while (< k 14)
- (aset in k (md5-pack md5-input kk))
- (setq k (+ k 1) kk (+ kk 4))))
+ (aset in k (md5-pack md5-input kk))
+ (setq k (+ k 1) kk (+ kk 4))))
(md5-transform in)
;; Store the results in the digest
(let ((k 0) (kk 0))
(while (< k 4)
- (aset digest (+ kk 0) (md5-byte md5-buffer k 0))
- (aset digest (+ kk 1) (md5-byte md5-buffer k 1))
- (aset digest (+ kk 2) (md5-byte md5-buffer k 2))
- (aset digest (+ kk 3) (md5-byte md5-buffer k 3))
- (setq k (+ k 1) kk (+ kk 4))))
+ (aset digest (+ kk 0) (md5-byte md5-buffer k 0))
+ (aset digest (+ kk 1) (md5-byte md5-buffer k 1))
+ (aset digest (+ kk 2) (md5-byte md5-buffer k 2))
+ (aset digest (+ kk 3) (md5-byte md5-buffer k 3))
+ (setq k (+ k 1) kk (+ kk 4))))
;; Return digest
digest))
(defun md5-transform (in)
"Basic MD5 step. Transform md5-buffer based on array IN."
(let ((a (aref md5-buffer 0))
- (b (aref md5-buffer 1))
- (c (aref md5-buffer 2))
- (d (aref md5-buffer 3)))
+ (b (aref md5-buffer 1))
+ (c (aref md5-buffer 2))
+ (d (aref md5-buffer 3)))
(setq
a (md5-FF a b c d (aref in 0) 7 '(55146 . 42104))
d (md5-FF d a b c (aref in 1) 12 '(59591 . 46934))
is the symbol `guess', try to detect \"Re: \" within an encoded-word."
:group 'message-various
:type '(choice (const :tag "off" nil)
- (const :tag "on" t)
- (const guess)))
+ (const :tag "on" t)
+ (const guess)))
;;;###autoload
(defcustom message-signature-separator "^-- *$"
(const :tag "always" use)
(const :tag "ask" ask)))
-(defcustom message-use-mail-followup-to t
+(defcustom message-use-mail-followup-to 'use
"*Specifies what to do with Mail-Followup-To header.
If nil, always ignore the header. If it is the symbol `ask', always
query the user whether to use the value. If it is t or the symbol
;; can be removed, e.g.
;; From: joe@y.z (Joe K
;; User)
- ;; can yield `From joe@y.z (Joe K Fri Mar 22 08:11:15 1996', and
+ ;; can yield `From joe@y.z (Joe K Fri Mar 22 08:11:15 1996', and
;; From: Joe User
;; <joe@y.z>
;; can yield `From Joe User Fri Mar 22 08:11:15 1996'.
((and (eq (char-after) ?\))
(not quoted))
(setq paren nil))))
- (nreverse elems)))))
+ (nreverse elems)))))
(defun message-mail-file-mbox-p (file)
"Say whether FILE looks like a Unix mbox file."
(save-excursion
(save-restriction
(when (message-goto-body)
- (narrow-to-region (point) (point-max)))
+ (narrow-to-region (point) (point-max)))
(shell-command-on-region
(point-min) (point-max) program nil t))))
(widen)
(mm-with-unibyte-current-buffer
(funcall (or message-send-mail-real-function
- message-send-mail-function))))
+ message-send-mail-function))))
(setq n (+ n 1))
(setq p (pop plist))
(erase-buffer)))
(if followup-to
(concat newsgroups "," followup-to)
newsgroups)))
- (known-groups
- (mapcar '(lambda (n) (gnus-group-real-name n))
- (gnus-groups-from-server
- (cond ((equal gnus-post-method 'current)
- gnus-current-select-method)
- (gnus-post-method gnus-post-method)
- (t gnus-select-method)))))
+ (known-groups
+ (mapcar '(lambda (n) (gnus-group-real-name n))
+ (gnus-groups-from-server
+ (cond ((equal gnus-post-method 'current)
+ gnus-current-select-method)
+ (gnus-post-method gnus-post-method)
+ (t gnus-select-method)))))
errors)
(while groups
- (unless (or (equal (car groups) "poster")
- (member (car groups) known-groups))
- (push (car groups) errors))
- (pop groups))
+ (unless (or (equal (car groups) "poster")
+ (member (car groups) known-groups))
+ (push (car groups) errors))
+ (pop groups))
(cond
;; Gnus is not running.
((or (not (and (boundp 'gnus-active-hashtb)
- gnus-active-hashtb))
+ gnus-active-hashtb))
(not (boundp 'gnus-read-active-file)))
t)
;; We don't have all the group names.
(reply-to (message-fetch-field "reply-to"))
ad)
(cond
- ((not reply-to)
- t)
- ((string-match "," reply-to)
- (y-or-n-p
- (format "Multiple Reply-To addresses: \"%s\". Really post? "
- reply-to)))
+ ((not reply-to)
+ t)
+ ((string-match "," reply-to)
+ (y-or-n-p
+ (format "Multiple Reply-To addresses: \"%s\". Really post? "
+ reply-to)))
((or (not (string-match
"@[^\\.]*\\."
(setq ad (nth 1 (mail-extract-address-components
(string-match "\\.$" ad) ;larsi@ifi.uio.
(not (string-match "^[^@]+@[^@]+$" ad)) ;larsi.ifi.uio
(string-match "(.*).*(.*)" reply-to)) ;(lars) (lars)
- (y-or-n-p
- (format
- "The Reply-To looks strange: \"%s\". Really post? "
- reply-to)))
+ (y-or-n-p
+ (format
+ "The Reply-To looks strange: \"%s\". Really post? "
+ reply-to)))
(t t))))))
(defun message-check-news-body-syntax ()
"Make a followup Subject."
(cond
((and (eq message-use-subject-re 'guess)
- (string-match message-subject-encoded-re-regexp subject))
+ (string-match message-subject-encoded-re-regexp subject))
subject)
(message-use-subject-re
(concat "Re: " (message-strip-subject-re subject)))
(when (not quoted)
(if (and (> (current-column) 78)
last)
- (save-excursion
- (goto-char last)
+ (save-excursion
+ (goto-char last)
(looking-at "[ \t]*")
- (replace-match "\n " t t)))
- (setq last (1+ (point))))
+ (replace-match "\n " t t)))
+ (setq last (1+ (point))))
(setq quoted (not quoted)))
(unless (eobp)
(forward-char 1))))
;; list of buffers.
(setq message-buffer-list (delq (current-buffer) message-buffer-list))
(while (and message-max-buffers
- message-buffer-list
+ message-buffer-list
(>= (length message-buffer-list) message-max-buffers))
;; Kill the oldest buffer -- unless it has been changed.
(let ((buffer (pop message-buffer-list)))
;;;(defvar mc-modes-alist)
(defun message-setup-1 (headers &optional replybuffer actions)
;;; (when (and (boundp 'mc-modes-alist)
-;;; (not (assq 'message-mode mc-modes-alist)))
+;;; (not (assq 'message-mode mc-modes-alist)))
;;; (push '(message-mode (encrypt . mc-encrypt-message)
-;;; (sign . mc-sign-message))
-;;; mc-modes-alist))
+;;; (sign . mc-sign-message))
+;;; mc-modes-alist))
(when actions
(setq message-send-actions actions))
(setq message-reply-buffer
(mail-strip-quoted-names
(message-fetch-field "from")))
(message-options-set 'message-recipients
- (mail-strip-quoted-names
+ (mail-strip-quoted-names
(let ((to (message-fetch-field "to"))
(cc (message-fetch-field "cc"))
(bcc (message-fetch-field "bcc")))
(defun message-xmas-redefine ()
"Redefine message functions for XEmacs."
- (defalias 'message-exchange-point-and-mark
+ (defalias 'message-exchange-point-and-mark
'message-xmas-exchange-point-and-mark)
(when (>= emacs-major-version 20)
(if (re-search-forward "[^\x0-\x7f]" nil t)
(or mail-parse-charset
(message-options-get 'mm-encody-body-charset)
- (message-options-set
+ (message-options-set
'mm-encody-body-charset
(mm-read-charset "Charset used in the article: ")))
;; The logic in `mml-generate-mime-1' confirms that it's OK
The characters in CHARSET should then be decoded."
(if (stringp charset)
(setq charset (intern (downcase charset))))
- (if (or (not charset)
+ (if (or (not charset)
(eq 'gnus-all mail-parse-ignored-charsets)
(memq 'gnus-all mail-parse-ignored-charsets)
(memq charset mail-parse-ignored-charsets))
(if (and (not coding-system)
(listp mail-parse-ignored-charsets)
(memq 'gnus-unknown mail-parse-ignored-charsets))
- (setq coding-system
+ (setq coding-system
(mm-charset-to-coding-system mail-parse-charset)))
(when (and charset coding-system
;; buffer-file-coding-system
"Decode STRING with CHARSET."
(when (stringp charset)
(setq charset (intern (downcase charset))))
- (when (or (not charset)
+ (when (or (not charset)
(eq 'gnus-all mail-parse-ignored-charsets)
(memq 'gnus-all mail-parse-ignored-charsets)
(memq charset mail-parse-ignored-charsets))
(if (and (not coding-system)
(listp mail-parse-ignored-charsets)
(memq 'gnus-unknown mail-parse-ignored-charsets))
- (setq coding-system
+ (setq coding-system
(mm-charset-to-coding-system mail-parse-charset)))
(when (and charset coding-system
(mm-multibyte-p)
;;; Commentary:
-;; Jaap-Henk Hoepman (jhh@xs4all.nl):
+;; Jaap-Henk Hoepman (jhh@xs4all.nl):
;;
;; Added support for delayed destroy of external MIME viewers. All external
;; viewers for mime types in mm-keep-viewer-alive-types will remain active
;; after switching articles or groups, and will only be removed when exiting
;; gnus.
-;;
+;;
;;; Code:
(require 'gnus-mailcap)
(require 'mm-bodies)
(eval-when-compile (require 'cl)
- (require 'term))
+ (require 'term))
(eval-and-compile
(autoload 'mm-inline-partial "mm-partial")
when selecting a different article."
:type '(repeat string)
:group 'mime-display)
-
+
(defcustom mm-automatic-display
'("text/plain" "text/enriched" "text/richtext" "text/html"
"text/x-vcard" "image/.*" "message/delivery-status" "multipart/.*"
(let ((mm-dissect-default-type (if (equal subtype "digest")
"message/rfc822"
"text/plain")))
- (add-text-properties 0 (length (car ctl))
- (mm-alist-to-plist (cdr ctl)) (car ctl))
+ (add-text-properties 0 (length (car ctl))
+ (mm-alist-to-plist (cdr ctl)) (car ctl))
;; what really needs to be done here is a way to link a
;; MIME handle back to it's parent MIME handle (in a multilevel
;; MIME article). That would probably require changing
;; the mm-handle API so we simply store the multipart buffert
;; name as a text property of the "multipart/whatever" string.
- (add-text-properties 0 (length (car ctl))
+ (add-text-properties 0 (length (car ctl))
(list 'buffer (mm-copy-to-buffer))
- (car ctl))
- (add-text-properties 0 (length (car ctl))
+ (car ctl))
+ (add-text-properties 0 (length (car ctl))
(list 'from from)
- (car ctl))
+ (car ctl))
(cons (car ctl) (mm-dissect-multipart ctl))))
(t
(mm-dissect-singlepart
(message "Viewing with %s" method)
(cond (needsterm
(unwind-protect
- (if window-system
- (start-process "*display*" nil
- mm-external-terminal-program
- "-e" shell-file-name
- shell-command-switch
- (mm-mailcap-command
- method file (mm-handle-type handle)))
- (require 'term)
- (require 'gnus-win)
- (set-buffer
- (setq buffer
- (make-term "display"
- shell-file-name
- nil
- shell-command-switch
- (mm-mailcap-command
- method file
- (mm-handle-type handle)))))
- (term-mode)
- (term-char-mode)
- (set-process-sentinel
- (get-buffer-process buffer)
- `(lambda (process state)
- (if (eq 'exit (process-status process))
- (gnus-configure-windows
- ',gnus-current-window-configuration))))
- (gnus-configure-windows 'display-term))
+ (if window-system
+ (start-process "*display*" nil
+ mm-external-terminal-program
+ "-e" shell-file-name
+ shell-command-switch
+ (mm-mailcap-command
+ method file (mm-handle-type handle)))
+ (require 'term)
+ (require 'gnus-win)
+ (set-buffer
+ (setq buffer
+ (make-term "display"
+ shell-file-name
+ nil
+ shell-command-switch
+ (mm-mailcap-command
+ method file
+ (mm-handle-type handle)))))
+ (term-mode)
+ (term-char-mode)
+ (set-process-sentinel
+ (get-buffer-process buffer)
+ `(lambda (process state)
+ (if (eq 'exit (process-status process))
+ (gnus-configure-windows
+ ',gnus-current-window-configuration))))
+ (gnus-configure-windows 'display-term))
(mm-handle-set-external-undisplayer handle (cons file buffer)))
(message "Displaying %s..." (format method file))
'external)
(save-excursion
(if (member (mm-handle-media-supertype handle) '("text" "message"))
(with-temp-buffer
- (insert-buffer-substring (mm-handle-buffer handle))
+ (insert-buffer-substring (mm-handle-buffer handle))
(mm-decode-content-transfer-encoding
(mm-handle-encoding handle)
(mm-handle-media-type handle))
parts))
(defun mm-multiple-handles (handles)
- (and (listp (car handles))
+ (and (listp (car handles))
(> (length handles) 1)))
-(defun mm-merge-handles (handles1 handles2)
+(defun mm-merge-handles (handles1 handles2)
(append
- (if (listp (car handles1))
+ (if (listp (car handles1))
handles1
(list handles1))
(if (listp (car handles2))
-;;; mm-encode.el --- Functions for encoding MIME things
+;;; mm-encode.el --- Functions for encoding MIME things
;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
(while rules
(when (string-match (caar rules) type)
(throw 'found
- (let ((encoding
+ (let ((encoding
(if (eq (cadr (car rules)) 'qp-or-base64)
(mm-qp-or-base64)
(cadr (car rules)))))
(eval-and-compile
(defalias 'mm-read-coding-system
(cond
- ((fboundp 'read-coding-system)
+ ((fboundp 'read-coding-system)
(if (and (featurep 'xemacs)
- (<= (string-to-number emacs-version) 21.1))
- (lambda (prompt &optional default-coding-system)
- (read-coding-system prompt))
- 'read-coding-system))
+ (<= (string-to-number emacs-version) 21.1))
+ (lambda (prompt &optional default-coding-system)
+ (read-coding-system prompt))
+ 'read-coding-system))
(t (lambda (prompt &optional default-coding-system)
"Prompt the user for a coding system."
(completing-read
Only do this if the default value of `enable-multibyte-characters' is
non-nil. This is a no-op in XEmacs."
(when (and (not (featurep 'xemacs))
- (boundp 'default-enable-multibyte-characters)
+ (boundp 'default-enable-multibyte-characters)
default-enable-multibyte-characters
(fboundp 'set-buffer-multibyte))
(set-buffer-multibyte t)))
"Enable multibyte in the current buffer.
Only used in Emacs Mule 4."
(when (and (not (featurep 'xemacs))
- (boundp 'default-enable-multibyte-characters)
+ (boundp 'default-enable-multibyte-characters)
default-enable-multibyte-characters
(fboundp 'set-buffer-multibyte)
(fboundp 'charsetp)
"Return a list of Emacs charsets in the region B to E."
(cond
((and (mm-multibyte-p)
- (fboundp 'find-charset-region))
+ (fboundp 'find-charset-region))
;; Remove composition since the base charsets have been included.
;; Remove eight-bit-*, treat them as ascii.
(let ((css (find-charset-region b e)))
(auto-mode-alist (if inhibit nil (mm-auto-mode-alist)))
(default-major-mode 'fundamental-mode)
(enable-local-variables nil)
- (after-insert-file-functions nil)
+ (after-insert-file-functions nil)
(enable-local-eval nil)
(find-file-hooks nil)
(inhibit-file-name-operation (if inhibit
(funcall func))
(forward-line);; in case of failure
(when (and (not (mm-uu-configure-p (mm-uu-type entry) 'disabled))
- (let ((end-regexp (mm-uu-end-regexp entry)))
+ (let ((end-regexp (mm-uu-end-regexp entry)))
(if (not end-regexp)
(or (setq end-point (point-max)) t)
(prog1
(and (boundp 'w3-meta-charset-content-type-regexp)
(re-search-forward
w3-meta-charset-content-type-regexp nil t)))
- (setq charset
- (or (let ((bsubstr (buffer-substring-no-properties
- (match-beginning 2)
- (match-end 2))))
- (if (fboundp 'w3-coding-system-for-mime-charset)
- (w3-coding-system-for-mime-charset bsubstr)
- (mm-charset-to-coding-system bsubstr)))
- charset)))
+ (setq charset
+ (or (let ((bsubstr (buffer-substring-no-properties
+ (match-beginning 2)
+ (match-end 2))))
+ (if (fboundp 'w3-coding-system-for-mime-charset)
+ (w3-coding-system-for-mime-charset bsubstr)
+ (mm-charset-to-coding-system bsubstr)))
+ charset)))
(delete-region (point-min) (point-max))
(insert (mm-decode-string text charset))
(save-window-excursion
(condition-case var
(w3-region (point-min) (point-max))
(error
- (delete-region (point-min) (point-max))
- (let ((b (point))
- (charset (mail-content-type-get
- (mm-handle-type handle) 'charset)))
- (if (or (eq charset 'gnus-decoded)
- (eq mail-parse-charset 'gnus-decoded))
- (save-restriction
- (narrow-to-region (point) (point))
- (mm-insert-part handle)
- (goto-char (point-max)))
- (insert (mm-decode-string (mm-get-part handle)
- charset))))
+ (delete-region (point-min) (point-max))
+ (let ((b (point))
+ (charset (mail-content-type-get
+ (mm-handle-type handle) 'charset)))
+ (if (or (eq charset 'gnus-decoded)
+ (eq mail-parse-charset 'gnus-decoded))
+ (save-restriction
+ (narrow-to-region (point) (point))
+ (mm-insert-part handle)
+ (goto-char (point-max)))
+ (insert (mm-decode-string (mm-get-part handle)
+ charset))))
(message
"Error while rendering html; showing as text/plain"))))))
(mm-handle-set-undisplayer
(when (string-match "[\"'\\~/*;() \t\n]" value)
(setq value (prin1-to-string value)))
(insert (format " %s=%s" key value))))))
- ((or (re-search-backward
+ ((or (re-search-backward
(concat "^" (regexp-quote mail-header-separator) "\n") nil t)
(re-search-forward
(concat "^" (regexp-quote mail-header-separator) "\n") nil t))
(autoload 'message-fetch-field "message")
(autoload 'message-posting-charset "message"))
-(defcustom mml-content-type-parameters
+(defcustom mml-content-type-parameters
'(name access-type expiration size permission format)
"*A list of acceptable parameters in MML tag.
These parameters are generated in Content-Type header if exists."
:type '(repeat (symbol :tag "Parameter"))
:group 'message)
-(defcustom mml-content-disposition-parameters
+(defcustom mml-content-disposition-parameters
'(filename creation-date modification-date read-date)
"*A list of acceptable parameters in MML tag.
These parameters are generated in Content-Disposition header if exists."
point (point)
contents (mml-read-part (eq 'mml (car tag)))
charsets (cond
- (raw nil)
- ((assq 'charset tag)
- (list
- (intern (downcase (cdr (assq 'charset tag))))))
- (t
- (mm-find-mime-charset-region point (point)))))
+ (raw nil)
+ ((assq 'charset tag)
+ (list
+ (intern (downcase (cdr (assq 'charset tag))))))
+ (t
+ (mm-find-mime-charset-region point (point)))))
(when (and (not raw) (memq nil charsets))
(if (or (memq 'unknown-encoding mml-confirmation-set)
- (message-options-get 'unknown-encoding)
+ (message-options-get 'unknown-encoding)
(and (y-or-n-p "\
Message contains characters with unknown encoding. Really send?")
- (message-options-set 'unknown-encoding t)))
+ (message-options-set 'unknown-encoding t)))
(if (setq use-ascii
(or (memq 'use-ascii mml-confirmation-set)
- (message-options-get 'use-ascii)
+ (message-options-get 'use-ascii)
(and (y-or-n-p "Use ASCII as charset?")
- (message-options-set 'use-ascii t))))
+ (message-options-set 'use-ascii t))))
(setq charsets (delq nil charsets))
(setq warn nil))
(error "Edit your message to remove those characters")))
tag point (point) use-ascii)))
(when (and warn
(not (memq 'multipart mml-confirmation-set))
- (not (message-options-get 'multipart))
+ (not (message-options-get 'multipart))
(not (and (y-or-n-p (format "\
A message part needs to be split into %d charset parts. Really send? "
- (length nstruct)))
- (message-options-set 'multipart t))))
+ (length nstruct)))
+ (message-options-set 'multipart t))))
(error "Edit your message to use only one charset"))
(setq struct (nconc nstruct struct)))))))
(unless (eobp)
(run-hooks 'gnus-article-decode-hook)
(let ((gnus-newsgroup-name "dummy"))
(gnus-article-prepare-display))))
- ;; Disable article-mode-map.
+ ;; Disable article-mode-map.
(use-local-map nil)
(setq buffer-read-only t)
(local-set-key "q" (lambda () (interactive) (kill-buffer nil)))
mm-security-handle 'gnus-info "Failed")
(throw 'error handle)))
(mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-info
- (with-current-buffer mml2015-result-buffer
+ mm-security-handle 'gnus-info
+ (with-current-buffer mml2015-result-buffer
(mml2015-gpg-extract-from))))
handle)))
mm-security-handle 'gnus-details "Quit.")
nil))
(mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-info
- (with-current-buffer mml2015-result-buffer
+ mm-security-handle 'gnus-info
+ (with-current-buffer mml2015-result-buffer
(mml2015-gpg-extract-from)))
(mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "Failed")))
(nnagent-active-file ,(gnus-agent-lib-file "active"))
(nnagent-newsgroups-file ,(gnus-agent-lib-file "newsgroups"))
(nnagent-get-new-mail nil)))
- (nnoo-change-server 'nnagent
+ (nnoo-change-server 'nnagent
(nnagent-server server)
defs)
(let ((dir (gnus-agent-directory))
(deffoo nnagent-request-set-mark (group action server)
(with-temp-buffer
(insert (format "(%s-request-set-mark \"%s\" '%s \"%s\")\n"
- (nth 0 gnus-command-method) group action
- (or server (nth 1 gnus-command-method))))
+ (nth 0 gnus-command-method) group action
+ (or server (nth 1 gnus-command-method))))
(append-to-file (point-min) (point-max) (gnus-agent-lib-file "flags")))
nil)
(list articles group (nnagent-server server) force)))
(deffoo nnagent-request-list (&optional server)
- (nnoo-parent-function 'nnagent 'nnml-request-list
+ (nnoo-parent-function 'nnagent 'nnml-request-list
(list (nnagent-server server))))
(deffoo nnagent-request-list-newsgroups (&optional server)
- (nnoo-parent-function 'nnagent 'nnml-request-list-newsgroups
+ (nnoo-parent-function 'nnagent 'nnml-request-list-newsgroups
(list (nnagent-server server))))
-(deffoo nnagent-request-move-article
+(deffoo nnagent-request-move-article
(article group server accept-form &optional last)
- (nnoo-parent-function 'nnagent 'nnml-request-move-article
- (list article group (nnagent-server server)
+ (nnoo-parent-function 'nnagent 'nnml-request-move-article
+ (list article group (nnagent-server server)
accept-form last)))
(deffoo nnagent-request-rename-group (group new-name &optional server)
- (nnoo-parent-function 'nnagent 'nnml-request-rename-group
+ (nnoo-parent-function 'nnagent 'nnml-request-rename-group
(list group new-name (nnagent-server server))))
(deffoo nnagent-request-scan (&optional group server)
- (nnoo-parent-function 'nnagent 'nnml-request-scan
+ (nnoo-parent-function 'nnagent 'nnml-request-scan
(list group (nnagent-server server))))
(deffoo nnagent-retrieve-headers (sequence &optional group server fetch-old)
- (nnoo-parent-function 'nnagent 'nnml-retrieve-headers
+ (nnoo-parent-function 'nnagent 'nnml-retrieve-headers
(list sequence group (nnagent-server server) fetch-old)))
(deffoo nnagent-set-status (article name value &optional group server)
- (nnoo-parent-function 'nnagent 'nnml-set-status
+ (nnoo-parent-function 'nnagent 'nnml-set-status
(list article name value group (nnagent-server server))))
(deffoo nnagent-server-opened (&optional server)
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
-;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
+;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
;; Keywords: news, mail
;; This file is part of GNU Emacs.
(progn
(unless (eq nnmail-expiry-target 'delete)
(with-temp-buffer
- (nnbabyl-request-article (car articles)
- newsgroup server
+ (nnbabyl-request-article (car articles)
+ newsgroup server
(current-buffer))
(let ((nnml-current-directory nil))
(nnmail-expiry-target-group
(nntp-send-command "^\\([23]\\|^423\\).*\n" "X-DATE" art)
(setq msg (nndb-status-message))
(if (string-match "^423" msg)
- ()
+ ()
(or (string-match "'\\(.+\\)'" msg)
(error "Not a valid response for X-DATE command: %s"
msg))
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
-;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
+;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
;; Keywords: news
;; This file is part of GNU Emacs.
(deffoo nndoc-request-type (group &optional article)
(cond ((not article) 'unknown)
- (nndoc-post-type nndoc-post-type)
- (t 'unknown)))
+ (nndoc-post-type nndoc-post-type)
+ (t 'unknown)))
(deffoo nndoc-close-group (group &optional server)
(nndoc-possibly-change-buffer group server)
t))
(defun nndoc-forward-type-p ()
- (when (and (re-search-forward "^-+ \\(Start of \\)?forwarded message.*\n+"
+ (when (and (re-search-forward "^-+ \\(Start of \\)?forwarded message.*\n+"
nil t)
(not (re-search-forward "^Subject:.*digest" nil t))
(not (re-search-backward "^From:" nil t 2))
(limit (search-forward "\n\n" nil t)))
(goto-char (point-min))
(when (and limit
- (re-search-forward
- (concat "\
+ (re-search-forward
+ (concat "\
^Content-Type:[ \t]*multipart/[a-z]+ *; *\\(\\(\n[ \t]\\)?.*;\\)*"
- "\\(\n[ \t]\\)?[ \t]*boundary=\"?[^\"\n]*[^\" \t\n]")
- limit t))
+ "\\(\n[ \t]\\)?[ \t]*boundary=\"?[^\"\n]*[^\" \t\n]")
+ limit t))
t)))
(defun nndoc-transform-mime-parts (article)
(defun nndoc-generate-lanl-gov-head (article)
(let ((entry (cdr (assq article nndoc-dissection-alist)))
- (e-mail "no address given")
- subject from)
+ (e-mail "no address given")
+ subject from)
(save-excursion
(set-buffer nndoc-current-buffer)
(save-restriction
- (narrow-to-region (car entry) (nth 1 entry))
- (goto-char (point-min))
- (when (looking-at "^Paper.*: \\([a-z-]+/[0-9]+\\)")
- (setq subject (concat " (" (match-string 1) ")"))
- (when (re-search-forward "^From: \\([^ ]+\\)" nil t)
- (setq e-mail (match-string 1)))
- (when (re-search-forward "^Title: \\([^\f]*\\)\nAuthors?: \\(.*\\)"
- nil t)
- (setq subject (concat (match-string 1) subject))
- (setq from (concat (match-string 2) " <" e-mail ">"))))))
+ (narrow-to-region (car entry) (nth 1 entry))
+ (goto-char (point-min))
+ (when (looking-at "^Paper.*: \\([a-z-]+/[0-9]+\\)")
+ (setq subject (concat " (" (match-string 1) ")"))
+ (when (re-search-forward "^From: \\([^ ]+\\)" nil t)
+ (setq e-mail (match-string 1)))
+ (when (re-search-forward "^Title: \\([^\f]*\\)\nAuthors?: \\(.*\\)"
+ nil t)
+ (setq subject (concat (match-string 1) subject))
+ (setq from (concat (match-string 2) " <" e-mail ">"))))))
(while (and from (string-match "(\[^)\]*)" from))
(setq from (replace-match "" t t from)))
(insert "From: " (or from "unknown")
- "\nSubject: " (or subject "(no subject)") "\n")))
+ "\nSubject: " (or subject "(no subject)") "\n")))
(defun nndoc-nsmail-type-p ()
(when (looking-at "From - ")
(funcall nndoc-head-begin-function))
(nndoc-head-begin
(nndoc-search nndoc-head-begin)))
- (if (or (eobp)
+ (if (or (eobp)
(and nndoc-file-end
(looking-at nndoc-file-end)))
(goto-char (point-max))
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
-;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
+;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
;; Keywords: news, mail
;; This file is part of GNU Emacs.
(defun nneething-file-name (article)
"Return the file name of ARTICLE."
(let ((dir (file-name-as-directory nneething-address))
- fname)
+ fname)
(if (numberp article)
(if (setq fname (cadr (assq article nneething-map)))
(expand-file-name fname dir)
;; Author: ShengHuo Zhu <zsh@cs.rochester.edu> (adding NOV)
;; Scott Byer <byer@mv.us.adobe.com>
;; Lars Magne Ingebrigtsen <larsi@gnus.org>
-;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
+;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
;; Keywords: mail
;; This file is part of GNU Emacs.
(defvoo nnfolder-scantime-alist nil)
(defvoo nnfolder-active-timestamp nil)
(defvoo nnfolder-active-file-coding-system nnheader-text-coding-system)
-(defvoo nnfolder-active-file-coding-system-for-write
+(defvoo nnfolder-active-file-coding-system-for-write
nnmail-active-file-coding-system)
(defvoo nnfolder-file-coding-system nnheader-text-coding-system)
(defvoo nnfolder-file-coding-system-for-write nnheader-file-coding-system
'headers
(if (nnfolder-retrieve-headers-with-nov articles fetch-old)
'nov
- (setq articles (gnus-sorted-intersection
+ (setq articles (gnus-sorted-intersection
;; Is ARTICLES sorted?
(sort articles '<)
(nnfolder-existing-articles)))
(cons nnfolder-current-group article)
(goto-char (point-min))
(cons nnfolder-current-group
- (if (search-forward (concat "\n" nnfolder-article-marker)
+ (if (search-forward (concat "\n" nnfolder-article-marker)
nil t)
(string-to-int
(buffer-substring
force nnfolder-inhibit-expiry))
(unless (eq nnmail-expiry-target 'delete)
(with-temp-buffer
- (nnfolder-request-article (car maybe-expirable)
+ (nnfolder-request-article (car maybe-expirable)
newsgroup server (current-buffer))
(let ((nnml-current-directory nil))
(nnmail-expiry-target-group
(goto-char (point-min))
(while (re-search-forward
(concat "^" nnfolder-article-marker)
- (save-excursion (and (search-forward "\n\n" nil t) (point)))
+ (save-excursion (and (search-forward "\n\n" nil t) (point)))
t)
(delete-region (progn (beginning-of-line) (point))
(progn (forward-line 1) (point))))
(unless (or gnus-nov-is-evil nnfolder-nov-is-evil)
(save-excursion
(set-buffer buffer)
- (let ((headers (nnfolder-parse-head article
+ (let ((headers (nnfolder-parse-head article
(point-min) (point-max))))
(with-current-buffer (nnfolder-open-nov group)
(if (nnheader-find-nov-line article)
;; See whether we need to create the new file.
(unless (file-exists-p file)
(gnus-make-directory (file-name-directory file))
- (let ((nnmail-file-coding-system
+ (let ((nnmail-file-coding-system
(or nnfolder-file-coding-system-for-write
nnfolder-file-coding-system-for-write)))
(nnmail-write-region 1 1 file t 'nomesg)))
(let* ((file (nnfolder-group-pathname group))
(nov (nnfolder-group-nov-pathname group))
(buffer (set-buffer
- (let ((nnheader-file-coding-system
+ (let ((nnheader-file-coding-system
nnfolder-file-coding-system))
(nnheader-find-file-noselect file)))))
(if (equal (cadr (assoc group nnfolder-scantime-alist))
(with-current-buffer novbuf
(dolist (article articles)
(when (nnheader-find-nov-line article)
- (delete-region (point)
+ (delete-region (point)
(progn (forward-line 1) (point)))))))
(setcar active (max 1 (min minid maxid)))
(setcdr active (max maxid (cdr active)))
(narrow-to-region start end)
(nnmail-insert-lines)
(nnfolder-insert-newsgroup-line
- (cons nil
+ (cons nil
(setq newnum
(nnfolder-active-number nnfolder-current-group))))
(when novbuf
(interactive)
(nnmail-activate 'nnfolder)
(unless (or gnus-nov-is-evil nnfolder-nov-is-evil)
- (dolist (file (directory-files (or nnfolder-nov-directory
+ (dolist (file (directory-files (or nnfolder-nov-directory
nnfolder-directory)
- t
- (concat
+ t
+ (concat
(regexp-quote nnfolder-nov-file-suffix)
"$")))
(when (not (message-mail-file-mbox-p file))
(ignore-errors
(delete-file file)))))
(let ((files (directory-files nnfolder-directory))
- file)
+ file)
(while (setq file (pop files))
(when (and (not (backup-file-name-p file))
- (message-mail-file-mbox-p
+ (message-mail-file-mbox-p
(nnheader-concat nnfolder-directory file)))
- (let ((oldgroup (assoc file nnfolder-group-alist)))
- (if oldgroup
- (nnheader-message 5 "Refreshing group %s..." file)
- (nnheader-message 5 "Adding group %s..." file))
+ (let ((oldgroup (assoc file nnfolder-group-alist)))
+ (if oldgroup
+ (nnheader-message 5 "Refreshing group %s..." file)
+ (nnheader-message 5 "Adding group %s..." file))
(if oldgroup
(setq nnfolder-group-alist
(delq oldgroup (copy-sequence nnfolder-group-alist))))
- (push (list file (cons 1 0)) nnfolder-group-alist)
- (nnfolder-possibly-change-folder file)
- (nnfolder-possibly-change-group file)
- (nnfolder-close-group file))))
+ (push (list file (cons 1 0)) nnfolder-group-alist)
+ (nnfolder-possibly-change-folder file)
+ (nnfolder-possibly-change-group file)
+ (nnfolder-close-group file))))
(nnheader-message 5 "")))
(defun nnfolder-group-pathname (group)
(when (buffer-name (cdar nnfolder-nov-buffer-alist))
(set-buffer (cdar nnfolder-nov-buffer-alist))
(when (buffer-modified-p)
- (gnus-make-directory (file-name-directory
+ (gnus-make-directory (file-name-directory
nnfolder-nov-buffer-file-name))
(nnmail-write-region 1 (point-max) nnfolder-nov-buffer-file-name
nil 'nomesg))
(widen)
(let (message-required-mail-headers)
(funcall (or message-send-mail-real-function
- message-send-mail-function)))
+ message-send-mail-function)))
t))))
;;; Internal functions
;; Free Software Foundation, Inc.
;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
-;; Lars Magne Ingebrigtsen <larsi@gnus.org>
+;; Lars Magne Ingebrigtsen <larsi@gnus.org>
;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
;; Katsumi Yamaoka <yamaoka@jpl.org>
;; Keywords: mail, news, MIME
(match-end 0)))
(when (> (length ref2) (length ref))
(setq ref ref2)))
- ref)
+ ref)
nil)))
;; Chars.
0
(defun nnheader-directory-articles (dir)
"Return a list of all article files in directory DIR."
(mapcar 'nnheader-file-to-number
- (if nnheader-directory-files-is-safe
+ (if nnheader-directory-files-is-safe
(directory-files
dir nil nnheader-numerical-short-files t)
(nnheader-directory-files-safe
(defun nnheader-article-to-file-alist (dir)
"Return an alist of article/file pairs in DIR."
(mapcar (lambda (file) (cons (nnheader-file-to-number file) file))
- (if nnheader-directory-files-is-safe
+ (if nnheader-directory-files-is-safe
(directory-files
dir nil nnheader-numerical-short-files t)
(nnheader-directory-files-safe
;; file-name-nondirectory is not enough to split
;; file names, containing ':', e.g.
;; "d:\\Work\\News\\nntp+news.fido7.ru:fido7.ru.gnu.SCORE"
- ;;
+ ;;
;; we are trying to correctly split such names:
;; "d:file.name" -> "a:" "file.name"
;; "aaa:bbb.ccc" -> "" "aaa:bbb.ccc"
(auto-mode-alist (nnheader-auto-mode-alist))
(default-major-mode 'fundamental-mode)
(enable-local-variables nil)
- (after-insert-file-functions nil)
+ (after-insert-file-functions nil)
(enable-local-eval nil)
(find-file-hooks nil))
(insert-file-contents-as-coding-system
(setq nnimap-split-rule
'((\"my1server\" (\".*\" ((\"ding\" \"ding@gnus.org\")
- (\"junk\" \"From:.*Simon\")))
- (\"my2server\" (\"INBOX\" nnimap-split-fancy))
- (\"my[34]server\" (\".*\" ((\"private\" \"To:.*Simon\")
- (\"junk\" my-junk-func)))))
+ (\"junk\" \"From:.*Simon\")))
+ (\"my2server\" (\"INBOX\" nnimap-split-fancy))
+ (\"my[34]server\" (\".*\" ((\"private\" \"To:.*Simon\")
+ (\"junk\" my-junk-func)))))
The virtual server name is in fact a regexp, so that the same rules
may apply to several servers. In the example, the servers
(new-uidvalidity (imap-mailbox-get 'uidvalidity))
(old-uidvalidity (gnus-group-get-parameter gnusgroup 'uidvalidity))
(dir (file-name-as-directory (expand-file-name nnimap-directory)))
- (nameuid (nnheader-translate-file-chars
- (concat nnimap-nov-file-name
- (if (equal server "")
- "unnamed"
- server) "." group "." old-uidvalidity
- nnimap-nov-file-name-suffix) t))
- (file (if (or nnmail-use-long-file-names
+ (nameuid (nnheader-translate-file-chars
+ (concat nnimap-nov-file-name
+ (if (equal server "")
+ "unnamed"
+ server) "." group "." old-uidvalidity
+ nnimap-nov-file-name-suffix) t))
+ (file (if (or nnmail-use-long-file-names
(file-exists-p (expand-file-name nameuid dir)))
(expand-file-name nameuid dir)
(expand-file-name
maxuid (if maxuid (max maxuid uid) uid)))
'UID))
(list (imap-mailbox-get 'exists) minuid maxuid)))))
-
+
(defun nnimap-possibly-change-group (group &optional server)
"Make GROUP the current group, and SERVER the current server."
(when (nnimap-possibly-change-server server)
;; remove nov's for articles which has expired on server
(goto-char (point-min))
(dolist (uid (gnus-set-difference articles uids))
- (when (re-search-forward (format "^%d\t" uid) nil t)
- (gnus-delete-line)))))
+ (when (re-search-forward (format "^%d\t" uid) nil t)
+ (gnus-delete-line)))))
;; nothing cached, fetch whole range from server
(nnimap-retrieve-headers-from-server
(cons low high) group server))
(port (if nnimap-server-port
(int-to-string nnimap-server-port)
"imap"))
- (alist (gnus-netrc-machine list (or nnimap-server-address
- nnimap-address server)
- port "imap"))
+ (alist (gnus-netrc-machine list (or nnimap-server-address
+ nnimap-address server)
+ port "imap"))
(user (gnus-netrc-get alist "login"))
(passwd (gnus-netrc-get alist "password")))
(if (imap-authenticate user passwd nnimap-server-buffer)
(with-current-buffer nnimap-callback-buffer
(insert
(with-current-buffer nnimap-server-buffer
- (if (imap-capability 'IMAP4rev1)
+ (if (imap-capability 'IMAP4rev1)
;; xxx don't just use car? alist doesn't contain
;; anything else now, but it might...
(nth 2 (car (imap-message-get (imap-current-message) 'BODYDETAIL)))
(let ((info (nnimap-find-minmax-uid mbx 'examine)))
(when info
(with-current-buffer nntp-server-buffer
- (insert (format "\"%s\" %d %d y\n"
- mbx (or (nth 2 info) 0)
- (max 1 (or (nth 1 info) 1)))))))))))
+ (insert (format "\"%s\" %d %d y\n"
+ mbx (or (nth 2 info) 0)
+ (max 1 (or (nth 1 info) 1)))))))))))
(gnus-message 5 "nnimap: Generating active list%s...done"
(if (> (length server) 0) (concat " for " server) ""))
t))
(with-current-buffer nnimap-server-buffer
(gnus-message 5 "nnimap: Updating info for %s..."
(gnus-info-group info))
-
+
(when (nnimap-mark-permanent-p 'read)
(let (seen unseen)
;; read info could contain articles marked unread by other
;; nnimap mark dormant article as ticked too (for other clients)
;; so we remove that mark for gnus since we support dormant
(gnus-info-set-marks
- info
+ info
(nnimap-update-alist-soft
'tick
(gnus-remove-from-range
(cdr-safe (assoc 'dormant (gnus-info-marks info))))
(gnus-info-marks info))
t))
-
+
(gnus-message 5 "nnimap: Updating info for %s...done"
(gnus-info-group info))
to-groups)
(or nnimap-split-crosspost
(throw 'split-done to-groups))))))))))
-
+
(defun nnimap-assoc-match (key alist)
(let (element)
(while (and alist (not element))
(defun nnimap-split-find-rule (server inbox)
(if (and (listp nnimap-split-rule) (listp (car nnimap-split-rule))
- (list (cdar nnimap-split-rule)) (listp (cadar nnimap-split-rule)))
+ (list (cdar nnimap-split-rule)) (listp (cadar nnimap-split-rule)))
;; extended format
- (cadr (nnimap-assoc-match inbox (cdr (nnimap-assoc-match
+ (cadr (nnimap-assoc-match inbox (cdr (nnimap-assoc-match
server nnimap-split-rule))))
nnimap-split-rule))
(nnimap-before-find-minmax-bugworkaround)
(dolist (pattern (nnimap-pattern-to-list-arguments
nnimap-list-pattern))
- (dolist (mbx (imap-mailbox-lsub "*" (car pattern) nil
+ (dolist (mbx (imap-mailbox-lsub "*" (car pattern) nil
nnimap-server-buffer))
(or (catch 'found
(dolist (mailbox (imap-mailbox-get 'list-flags mbx
(gnus-message 5 "nnimap: Listing subscribed mailboxes%s%s...done"
(if (> (length server) 0) " on " "") server))
t))
-
+
(deffoo nnimap-request-create-group (group &optional server args)
(when (nnimap-possibly-change-server server)
(or (imap-mailbox-status group 'uidvalidity nnimap-server-buffer)
result)
(nnimap-request-expire-articles (list article) group server t))
result))))
-
+
(deffoo nnimap-request-accept-article (group &optional server last)
(when (nnimap-possibly-change-server server)
(let (uid)
;; turn into rfc822 format (\r\n eol's)
(while (search-forward "\n" nil t)
(replace-match "\r\n")))
- ;; this 'or' is for Cyrus server bug
- (or (null (imap-current-mailbox nnimap-server-buffer))
- (imap-mailbox-unselect nnimap-server-buffer))
+ ;; this 'or' is for Cyrus server bug
+ (or (null (imap-current-mailbox nnimap-server-buffer))
+ (imap-mailbox-unselect nnimap-server-buffer))
(imap-message-append group (current-buffer) nil nil
nnimap-server-buffer)))
(cons group (nth 1 uid))
(mapcar
(lambda (pair) ; cdr is the mark
(or (assoc (cdr pair)
- '((read . "SEEN")
- (tick . "FLAGGED")
- (draft . "DRAFT")
- (reply . "ANSWERED")))
- (cons (cdr pair)
- (format "KEYWORD gnus-%s" (symbol-name (cdr pair))))))
+ '((read . "SEEN")
+ (tick . "FLAGGED")
+ (draft . "DRAFT")
+ (reply . "ANSWERED")))
+ (cons (cdr pair)
+ (format "KEYWORD gnus-%s" (symbol-name (cdr pair))))))
(cons '(read . read) gnus-article-mark-lists)))
(defun nnimap-mark-to-predicate (pred)
(mapcar
(lambda (pair)
(or (assoc (cdr pair)
- '((read . "\\Seen")
- (tick . "\\Flagged")
- (draft . "\\Draft")
- (reply . "\\Answered")))
- (cons (cdr pair)
- (format "gnus-%s" (symbol-name (cdr pair))))))
+ '((read . "\\Seen")
+ (tick . "\\Flagged")
+ (draft . "\\Draft")
+ (reply . "\\Answered")))
+ (cons (cdr pair)
+ (format "gnus-%s" (symbol-name (cdr pair))))))
(cons '(read . read) gnus-article-mark-lists)))
(defun nnimap-mark-to-flag-1 (preds)
(cdr alist)
(setcdr alist (nnimap-remassoc key (cdr alist)))
alist)))
-
+
(defun nnimap-update-alist-soft (key value alist)
(if value
(cons (cons key value) (nnimap-remassoc key alist))
(require 'trace)
(buffer-disable-undo (get-buffer-create nnimap-debug))
(mapcar (lambda (f) (trace-function-background f nnimap-debug))
- '(
+ '(
nnimap-possibly-change-server
nnimap-verify-uidvalidity
nnimap-find-minmax-uid
nnimap-mark-permanent-p
nnimap-remassoc
nnimap-update-alist-soft
- )))
+ )))
(provide 'nnimap)
(let ((coding-system-for-write nnkiboze-file-coding-system)
(output-coding-system nnkiboze-file-coding-system))
(with-temp-file (nnkiboze-nov-file-name)
- (let ((cur (current-buffer))
+ (let ((cur (current-buffer))
(nnheader-file-coding-system nnkiboze-file-coding-system))
(nnheader-insert-file-contents (nnkiboze-nov-file-name))
(goto-char (point-min))
(defun nnkiboze-generate-group (group &optional inhibit-list-groups)
(let* ((info (nth 2 (gnus-gethash group gnus-newsrc-hashtb)))
(newsrc-file (concat nnkiboze-directory
- (nnheader-translate-file-chars
- (concat group ".newsrc"))))
+ (nnheader-translate-file-chars
+ (concat group ".newsrc"))))
(nov-file (concat nnkiboze-directory
- (nnheader-translate-file-chars
- (concat group ".nov"))))
+ (nnheader-translate-file-chars
+ (concat group ".nov"))))
method nnkiboze-newsrc gname newsrc active
ginfo lowest glevel orig-info nov-buffer
;; Bind various things to nil to make group entry faster.
(gnus-score-use-all-scores nil)
(gnus-use-scoring t)
(gnus-verbose (min gnus-verbose 3))
- gnus-select-group-hook gnus-summary-prepare-hook
+ gnus-select-group-hook gnus-summary-prepare-hook
gnus-thread-sort-functions gnus-show-threads
gnus-visual gnus-suppress-duplicates num-unread)
(unless info
(setq nnmail-split-methods
'((\"mail.4ad\" \"From:.*4ad\")
- (\"mail.junk\" \"From:.*Lars\\\\|Subject:.*buy\")
- (\"mail.misc\" \"\")))
+ (\"mail.junk\" \"From:.*Lars\\\\|Subject:.*buy\")
+ (\"mail.misc\" \"\")))
As you can see, this variable is a list of lists, where the first
element in each \"rule\" is the name of the group (which, by the way,
\(setq nnmail-expiry-wait-function
(lambda (newsgroup)
- (cond ((string-match \"private\" newsgroup) 31)
- ((string-match \"junk\" newsgroup) 1)
+ (cond ((string-match \"private\" newsgroup) 31)
+ ((string-match \"junk\" newsgroup) 1)
((string-match \"important\" newsgroup) 'never)
(t 7))))"
:group 'nnmail-expire
Eg.
\(add-hook 'nnmail-read-incoming-hook
- (lambda ()
- (call-process \"/local/bin/mailsend\" nil nil nil
- \"read\" nnmail-spool-file)))
+ (lambda ()
+ (call-process \"/local/bin/mailsend\" nil nil nil
+ \"read\" nnmail-spool-file)))
If you have xwatch running, this will alert it that mail has been
read.
;; Other mailing lists...
(any \"procmail@informatik\\\\.rwth-aachen\\\\.de\" \"procmail.list\")
(any \"SmartList@informatik\\\\.rwth-aachen\\\\.de\" \"SmartList.list\")
- ;; Both lists below have the same suffix, so prevent
- ;; cross-posting to mkpkg.list of messages posted only to
- ;; the bugs- list, but allow cross-posting when the
- ;; message was really cross-posted.
- (any \"bugs-mypackage@somewhere\" \"mypkg.bugs\")
- (any \"mypackage@somewhere\" - \"bugs-mypackage\" \"mypkg.list\")
- ;;
+ ;; Both lists below have the same suffix, so prevent
+ ;; cross-posting to mkpkg.list of messages posted only to
+ ;; the bugs- list, but allow cross-posting when the
+ ;; message was really cross-posted.
+ (any \"bugs-mypackage@somewhere\" \"mypkg.bugs\")
+ (any \"mypackage@somewhere\" - \"bugs-mypackage\" \"mypkg.list\")
+ ;;
;; People...
(any \"larsi@ifi\\\\.uio\\\\.no\" \"people.Lars Magne Ingebrigtsen\"))
;; Unmatched mail goes to the catch all group.
(defun nnmail-remove-list-identifiers ()
"Remove list identifiers from Subject headers."
- (let ((regexp
- (if (consp nnmail-list-identifiers)
+ (let ((regexp
+ (if (consp nnmail-list-identifiers)
(mapconcat 'identity nnmail-list-identifiers " *\\|")
nnmail-list-identifiers)))
(when regexp
(goto-char (point-min))
(while (re-search-forward
- (concat "^Subject: +\\(R[Ee]: +\\)*\\(" regexp " *\\)")
- nil t)
- (delete-region (match-beginning 2) (match-end 0))
- (beginning-of-line))
+ (concat "^Subject: +\\(R[Ee]: +\\)*\\(" regexp " *\\)")
+ nil t)
+ (delete-region (match-beginning 2) (match-end 0))
+ (beginning-of-line))
(when (re-search-forward "^Subject: +\\(\\(R[Ee]: +\\)+\\)R[Ee]: +" nil t)
- (delete-region (match-beginning 1) (match-end 1))
+ (delete-region (match-beginning 1) (match-end 1))
(beginning-of-line)))))
(defun nnmail-remove-tabs ()
to actually put the message in the right group."
(let ((success t))
(dolist (mbx (message-unquote-tokens
- (message-tokenize-header
- (message-fetch-field "Newsgroups") ", ")) success)
+ (message-tokenize-header
+ (message-fetch-field "Newsgroups") ", ")) success)
(let ((to-newsgroup (gnus-group-prefixed-name mbx gnus-command-method)))
(or (gnus-active to-newsgroup)
(gnus-activate-group to-newsgroup)
;; length of the list is equal to 1? -- kai
(let ((g nil))
(cond ((and (boundp 'group) group)
- (setq g group))
- ((and (boundp 'group-art-list) group-art-list
- (listp group-art-list))
- (setq g (caar group-art-list)))
- ((and (boundp 'group-art) group-art (listp group-art))
- (setq g (caar group-art)))
- (t (setq g "")))
+ (setq g group))
+ ((and (boundp 'group-art-list) group-art-list
+ (listp group-art-list))
+ (setq g (caar group-art-list)))
+ ((and (boundp 'group-art) group-art (listp group-art))
+ (setq g (caar group-art)))
+ (t (setq g "")))
(unless (gnus-buffer-live-p nnmail-cache-buffer)
- (nnmail-cache-open))
+ (nnmail-cache-open))
(save-excursion
- (set-buffer nnmail-cache-buffer)
- (goto-char (point-max))
- (if (and g (not (string= "" g))
- (gnus-methods-equal-p gnus-command-method
- (nnmail-cache-primary-mail-backend)))
- (insert id "\t" g "\n")
- (insert id "\n"))))))
+ (set-buffer nnmail-cache-buffer)
+ (goto-char (point-max))
+ (if (and g (not (string= "" g))
+ (gnus-methods-equal-p gnus-command-method
+ (nnmail-cache-primary-mail-backend)))
+ (insert id "\t" g "\n")
+ (insert id "\n"))))))
(defun nnmail-cache-primary-mail-backend ()
(let ((be-list (cons gnus-select-method gnus-secondary-select-methods))
- (be nil)
- (res nil))
+ (be nil)
+ (res nil))
(while (and (null res) be-list)
(setq be (car be-list))
(setq be-list (cdr be-list))
(when (and (gnus-method-option-p be 'respool)
- (eval (intern (format "%s-get-new-mail" (car be)))))
- (setq res be)))
+ (eval (intern (format "%s-get-new-mail" (car be)))))
+ (setq res be)))
res))
;; Fetch the group name corresponding to the message id stored in the
(set-buffer nnmail-cache-buffer)
(goto-char (point-max))
(when (search-backward id nil t)
- (beginning-of-line)
- (skip-chars-forward "^\n\r\t")
- (unless (eolp)
- (forward-char 1)
- (buffer-substring (point)
- (progn (end-of-line) (point))))))))
+ (beginning-of-line)
+ (skip-chars-forward "^\n\r\t")
+ (unless (eolp)
+ (forward-char 1)
+ (buffer-substring (point)
+ (progn (end-of-line) (point))))))))
;; Function for nnmail-split-fancy: look up all references in the
;; cache and if a match is found, return that group.
See the Info node `(gnus)Fancy Mail Splitting' for more details."
(let* ((refstr (or (message-fetch-field "references")
- (message-fetch-field "in-reply-to")))
- (references nil)
- (res nil))
+ (message-fetch-field "in-reply-to")))
+ (references nil)
+ (res nil))
(when refstr
(setq references (nreverse (gnus-split-references refstr)))
(unless (gnus-buffer-live-p nnmail-cache-buffer)
- (nnmail-cache-open))
+ (nnmail-cache-open))
(mapcar (lambda (x)
- (setq res (or (nnmail-cache-fetch-group x) res))
- (when (string= "drafts" res)
- (setq res nil)))
- references)
+ (setq res (or (nnmail-cache-fetch-group x) res))
+ (when (string= "drafts" res)
+ (setq res nil)))
+ references)
res)))
(defun nnmail-cache-id-exists-p (id)
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
-;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
+;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
;; Keywords: news, mail
;; This file is part of GNU Emacs.
(progn
(unless (eq nnmail-expiry-target 'delete)
(with-temp-buffer
- (nnmbox-request-article (car articles)
- newsgroup server
+ (nnmbox-request-article (car articles)
+ newsgroup server
(current-buffer))
(let ((nnml-current-directory nil))
(nnmail-expiry-target-group
nnmbox-file-coding-system))
(nnheader-find-file-noselect
nnmbox-mbox-file nil t))))
- (buffer-disable-undo)
+ (buffer-disable-undo)
;; Go through the group alist and compare against the mbox file.
(while alist
(when large
(nnheader-message 5 "nnmh: Receiving headers...done"))
- ;; (nnheader-fold-continuation-lines)
+ ;; (nnheader-fold-continuation-lines)
'headers))))
(deffoo nnmh-retrieve-parsed-headers (articles
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
-;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
+;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
;; Keywords: news, mail
;; This file is part of GNU Emacs.
(and
(nnml-deletable-article-p group article)
(nnml-request-article article group server)
- (let (nnml-current-directory
- nnml-current-group
+ (let (nnml-current-directory
+ nnml-current-group
nnml-article-file-alist)
(save-excursion
(set-buffer buf)
(if (setq file (cdr (assq article nnml-article-file-alist)))
(expand-file-name file nnml-current-directory)
(if nnml-check-directory-twice
- ;; Just to make sure nothing went wrong when reading over NFS --
- ;; check once more.
- (when (file-exists-p
- (setq file (expand-file-name (number-to-string article)
- nnml-current-directory)))
- (nnml-update-file-alist t)
- file)))))
+ ;; Just to make sure nothing went wrong when reading over NFS --
+ ;; check once more.
+ (when (file-exists-p
+ (setq file (expand-file-name (number-to-string article)
+ nnml-current-directory)))
+ (nnml-update-file-alist t)
+ file)))))
(defun nnml-deletable-article-p (group article)
"Say whether ARTICLE in GROUP can be deleted."
(while (setq def (pop defs))
(unless (assq (car def) bvariables)
(nconc bvariables
- (list (cons (car def) (and (boundp (car def))
- (symbol-value (car def)))))))
+ (list (cons (car def) (and (boundp (car def))
+ (symbol-value (car def)))))))
(if (equal server "*internal-non-initialized-backend*")
(set (car def) (symbol-value (cadr def)))
(set (car def) (cadr def)))))
;;("TNL.net newsletter" "http://www.tnl.net/newsletter/channel100.asp" "A newsletter about Internet technology and issues.")
("W3C" "http://www.w3.org/2000/08/w3c-synd/home.rss" "The latest news at the World Wide Web Consortium.")
;;("XML News: RSS Live Content" "http://www.xmlnews.org/RSS/content.html" "A listing of well-known RSS feeds.")
- ("|fr| XMLfr" "http://xmlfr.org/actualites/general.rss10"
+ ("|fr| XMLfr" "http://xmlfr.org/actualites/general.rss10"
"French speaking portal site dedicated to XML.")
- ("XMLhack" "http://xmlhack.com/rss10.php"
+ ("XMLhack" "http://xmlhack.com/rss10.php"
"Developer news from the XML community.")
- ("The Register"
- "http://www.theregister.co.uk/tonys/slashdot.rdf"
+ ("The Register"
+ "http://www.theregister.co.uk/tonys/slashdot.rdf"
"The Register -- Biting the hand that feeds IT.")
- ("|de| Heise-Ticker"
- "http://www.heise.de/newsticker/heise.rdf"
+ ("|de| Heise-Ticker"
+ "http://www.heise.de/newsticker/heise.rdf"
"German news ticker about technology.")
- ("|de| Telepolis News"
- "http://www.heise.de/tp/news.rdf"
+ ("|de| Telepolis News"
+ "http://www.heise.de/tp/news.rdf"
"German background news about technology.")
- ("Kuro5hin"
+ ("Kuro5hin"
"http://www.kuro5hin.org/backend.rdf"
"Technology and culture, from the trenches.")
("JabberCentral"
"0" "\t" ;; lines
"" "\t" ;; Xref
(if (and (nth 6 e)
- (memq nnrss-description-field
- nnmail-extra-headers))
+ (memq nnrss-description-field
+ nnmail-extra-headers))
(concat (symbol-name nnrss-description-field)
": "
- (nnrss-format-string (nth 6 e))
- "\t")
+ (nnrss-format-string (nth 6 e))
+ "\t")
"")
- (if (and (nth 2 e)
- (memq nnrss-url-field
- nnmail-extra-headers))
+ (if (and (nth 2 e)
+ (memq nnrss-url-field
+ nnmail-extra-headers))
(concat (symbol-name nnrss-url-field)
": "
- (nnrss-format-string (nth 2 e))
- "\t")
+ (nnrss-format-string (nth 2 e))
+ "\t")
"")
"\n")))))
'nov)
(with-current-buffer nntp-server-buffer
(erase-buffer)
(goto-char (point-min))
- (if group
- (insert "Newsgroups: " group "\n"))
+ (if group
+ (insert "Newsgroups: " group "\n"))
(if (nth 3 e)
(insert "Subject: " (nnrss-format-string (nth 3 e)) "\n"))
(if (nth 4 e)
(if (and (setq e (assq art nnrss-group-data))
(nnmail-expired-article-p
group
- (if (listp (setq days (nth 1 e))) days
+ (if (listp (setq days (nth 1 e))) days
(days-to-time (- days (time-to-days '(0 0)))))
force))
(setq nnrss-group-data (delq e nnrss-group-data)
(setq nnrss-server-data
(delq (assoc group nnrss-server-data) nnrss-server-data))
(nnrss-save-server-data server)
- (let ((file (expand-file-name
+ (let ((file (expand-file-name
(nnrss-translate-file-chars
(concat group (and server
(not (equal server ""))
(defun nnrss-read-server-data (server)
(setq nnrss-server-data nil)
- (let ((file (expand-file-name
+ (let ((file (expand-file-name
(nnrss-translate-file-chars
(concat "nnrss" (and server
(not (equal server ""))
(when (file-exists-p file)
(with-temp-buffer
(let ((coding-system-for-read 'binary)
- emacs-lisp-mode-hook)
+ emacs-lisp-mode-hook)
(insert-file-contents file)
- (emacs-lisp-mode)
- (goto-char (point-min))
- (eval-buffer))))))
+ (emacs-lisp-mode)
+ (goto-char (point-min))
+ (eval-buffer))))))
(defun nnrss-save-server-data (server)
(gnus-make-directory nnrss-directory)
- (let ((file (expand-file-name
+ (let ((file (expand-file-name
(nnrss-translate-file-chars
(concat "nnrss" (and server
(not (equal server ""))
server ".el"))
nnrss-directory)))
(let ((coding-system-for-write 'binary)
- print-level print-length)
+ print-level print-length)
(with-temp-file file
(insert "(setq nnrss-server-data '"
(prin1-to-string nnrss-server-data)
(let ((pair (assoc group nnrss-server-data)))
(setq nnrss-group-max (or (cadr pair) 0))
(setq nnrss-group-min (+ nnrss-group-max 1)))
- (let ((file (expand-file-name
+ (let ((file (expand-file-name
(nnrss-translate-file-chars
(concat group (and server
(not (equal server ""))
(when (file-exists-p file)
(with-temp-buffer
(let ((coding-system-for-read 'binary)
- emacs-lisp-mode-hook)
+ emacs-lisp-mode-hook)
(insert-file-contents file)
- (emacs-lisp-mode)
- (goto-char (point-min))
- (eval-buffer)))
+ (emacs-lisp-mode)
+ (goto-char (point-min))
+ (eval-buffer)))
(dolist (e nnrss-group-data)
(gnus-sethash (nth 2 e) e nnrss-group-hashtb)
(if (and (car e) (> nnrss-group-min (car e)))
(defun nnrss-save-group-data (group server)
(gnus-make-directory nnrss-directory)
- (let ((file (expand-file-name
+ (let ((file (expand-file-name
(nnrss-translate-file-chars
(concat group (and server
(not (equal server ""))
server ".el"))
nnrss-directory)))
(let ((coding-system-for-write 'binary)
- print-level print-length)
+ print-level print-length)
(with-temp-file file
(insert "(setq nnrss-group-data '"
(prin1-to-string nnrss-group-data)
(if (re-search-forward "<rdf\\|<rss" nil t)
(goto-char (match-beginning 0)))
(setq xml (xml-parse-region (point) (point-max))))
- (error
+ (error
(nnheader-message 1 "Error in group %s: %s" group (cadr err))))
(while (and xml (not (assq 'item xml)))
(unless (listp (car (setq xml (cddar xml))))
(dolist (elem nnrss-server-data)
(let ((url (or (nth 2 elem)
(second (assoc (car elem) nnrss-group-alist)))))
- (insert "$WGET -q -O \"$RSSDIR\"/'"
+ (insert "$WGET -q -O \"$RSSDIR\"/'"
(nnrss-translate-file-chars (concat (car elem) ".xml"))
"' '" url "'\n"))))
(append nnheader-file-name-translation-alist '((?' . ?_)))))
(nnheader-translate-file-chars name)))
-(defvar nnrss-moreover-url
+(defvar nnrss-moreover-url
"http://w.moreover.com/categories/category_list_rss.html"
"The url of moreover.com categories.")
(with-temp-buffer
(nnrss-insert nnrss-moreover-url)
(goto-char (point-min))
- (while (re-search-forward
+ (while (re-search-forward
"<A NAME=\"\\([^\"]+\\)\">\\|<A HREF=\"\\(http://[^\"]*moreover\\.com[^\"]+page\\?c=\\([^\"&]+\\)&o=rss\\)" nil t)
(if (match-string 1)
(setq category (match-string 1))
(setq url (match-string 2)
name (nnweb-decode-entities-string
- (rfc2231-decode-encoded-string
+ (rfc2231-decode-encoded-string
(match-string 3))))
(if category
(setq name (concat category "." name)))
(nnslashdot-possibly-change-server group server)
(condition-case why
(unless gnus-nov-is-evil
- (if nnslashdot-threaded
- (nnslashdot-threaded-retrieve-headers articles group)
- (nnslashdot-sane-retrieve-headers articles group)))
+ (if nnslashdot-threaded
+ (nnslashdot-threaded-retrieve-headers articles group)
+ (nnslashdot-sane-retrieve-headers articles group)))
(search-failed (nnslashdot-lose why))))
(deffoo nnslashdot-threaded-retrieve-headers (articles group)
score (match-string 5))
(when (string-match "^Re: *" subject)
(setq subject (concat "Re: " (substring subject (match-end 0)))))
- (setq subject (nnweb-decode-entities-string subject))
+ (setq subject (nnweb-decode-entities-string subject))
(forward-line 1)
(if (looking-at
"by <a[^>]+>\\([^<]+\\)</a>[ \t\n]*.*(\\([^)]+\\))")
score (match-string 5))
(when (string-match "^Re: *" subject)
(setq subject (concat "Re: " (substring subject (match-end 0)))))
- (setq subject (nnweb-decode-entities-string subject))
+ (setq subject (nnweb-decode-entities-string subject))
(forward-line 1)
(if (looking-at
"by <a[^>]+>\\([^<]+\\)</a>[ \t\n]*.*(\\([^)]+\\))")
(let ((number 0)
sid elem description articles gname)
(condition-case why
- ;; First we do the Ultramode to get info on all the latest groups.
+ ;; First we do the Ultramode to get info on all the latest groups.
(progn
(mm-with-unibyte-buffer
(nnweb-insert nnslashdot-backslash-url t)
(setq gname (concat description " (" sid ")"))
(if (setq elem (assoc gname nnslashdot-groups))
(setcar (cdr elem) articles)
- (push (list gname articles sid (current-time))
+ (push (list gname articles sid (current-time))
nnslashdot-groups))
(goto-char (point-max))
(widen)))
(setq gname (concat description " (" sid ")"))
(if (setq elem (assoc gname nnslashdot-groups))
(setcar (cdr elem) articles)
- (push (list gname articles sid (current-time))
+ (push (list gname articles sid (current-time))
nnslashdot-groups)))))
(incf number 30)))
(search-failed (nnslashdot-lose why)))
(when item
(if (fourth item)
(when (and (>= (length articles) (cadr item)) ;; All are expirable.
- (nnmail-expired-article-p
+ (nnmail-expired-article-p
group
- (fourth item)
+ (fourth item)
force))
(setq nnslashdot-groups (delq item nnslashdot-groups))
(nnslashdot-write-groups)
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
-;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
+;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
;; Keywords: news, mail
;; This file is part of GNU Emacs.
(nth 1 (nnsoup-article-to-area
article nnsoup-current-group))))))
(cond ((= kind ?m) 'mail)
- ((= kind ?n) 'news)
+ ((= kind ?n) 'news)
(t 'unknown)))))
(deffoo nnsoup-close-group (group &optional server)
;; 2000 Free Software Foundation, Inc.
;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
-;; Lars Magne Ingebrigtsen <larsi@gnus.org>
+;; Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
;; This file is part of GNU Emacs.
(defvoo nnspool-nov-directory (concat nnspool-spool-directory "over.view/")
"Local news nov directory.")
-(defvoo nnspool-lib-dir
+(defvoo nnspool-lib-dir
(if (file-exists-p "/usr/lib/news/active")
"/usr/lib/news/"
"/var/lib/news/")
(let ((nov (nnheader-group-pathname
nnspool-current-group nnspool-nov-directory ".overview"))
(arts articles)
- (nnheader-file-coding-system nnspool-file-coding-system)
+ (nnheader-file-coding-system nnspool-file-coding-system)
last)
(if (not (file-exists-p nov))
()
(nntp-decode-text (not decode))
(unless discard
(save-excursion
- (set-buffer buffer)
- (goto-char (point-max))
- (insert-buffer-substring (process-buffer process))
+ (set-buffer buffer)
+ (goto-char (point-max))
+ (insert-buffer-substring (process-buffer process))
;; Nix out "nntp reading...." message.
(when nntp-have-messaged
(setq nntp-have-messaged nil)
(not nntp-nov-is-evil)
(nntp-retrieve-headers-with-xover articles fetch-old))
;; We successfully retrieved the headers via XOVER.
- 'nov
+ 'nov
;; XOVER didn't work, so we do it the hard, slow and inefficient
;; way.
(let ((number (length articles))
(defvoo nnultimate-groups nil)
(defvoo nnultimate-headers nil)
(defvoo nnultimate-articles nil)
-(defvar nnultimate-table-regexp
+(defvar nnultimate-table-regexp
"postings.*editpost\\|forumdisplay\\|Forum[0-9]+/HTML\\|getbio")
;;; Interface functions
(setq date (substring (car datel) (match-end 0))
datel nil))
(pop datel))
- (when date
- (setq date (delete "" (split-string
- date "[-, \n\t\r    ]")))
- (if (or (member "AM" date)
- (member "PM" date))
- (setq date (format
- "%s %s %s %s"
- (nth 1 date)
- (if (and (>= (length (nth 0 date)) 3)
- (assoc (downcase
- (substring (nth 0 date) 0 3))
- parse-time-months))
- (substring (nth 0 date) 0 3)
- (car (rassq (string-to-number (nth 0 date))
- parse-time-months)))
- (nth 2 date) (nth 3 date)))
- (setq date (format "%s %s %s %s"
- (car (rassq (string-to-number (nth 1 date))
- parse-time-months))
- (nth 0 date) (nth 2 date) (nth 3 date)))))
+ (when date
+ (setq date (delete "" (split-string
+ date "[-, \n\t\r    ]")))
+ (if (or (member "AM" date)
+ (member "PM" date))
+ (setq date (format
+ "%s %s %s %s"
+ (nth 1 date)
+ (if (and (>= (length (nth 0 date)) 3)
+ (assoc (downcase
+ (substring (nth 0 date) 0 3))
+ parse-time-months))
+ (substring (nth 0 date) 0 3)
+ (car (rassq (string-to-number (nth 0 date))
+ parse-time-months)))
+ (nth 2 date) (nth 3 date)))
+ (setq date (format "%s %s %s %s"
+ (car (rassq (string-to-number (nth 1 date))
+ parse-time-months))
+ (nth 0 date) (nth 2 date) (nth 3 date)))))
(push
(cons
article
nnultimate-groups-alist)
(with-temp-file (expand-file-name "groups" nnultimate-directory)
(prin1 nnultimate-groups-alist (current-buffer))))
-
+
(defun nnultimate-init (server)
"Initialize buffers and such."
(unless (file-exists-p nnultimate-directory)
;; Author: David Moore <dmoore@ucsd.edu>
;; Lars Magne Ingebrigtsen <larsi@gnus.org>
-;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
+;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
;; Keywords: news
;; This file is part of GNU Emacs.
;; Note: You need to have `url' (w3 0.46) or greater version
;; installed for this backend to work.
-;; Todo:
+;; Todo:
;; 1. To support more web archives.
;; 2. Generalize webmail to other MHonArc archive.
(defvar nnwarchive-type-definition
'((egroups
(address . "www.egroups.com")
- (open-url
- "http://www.egroups.com/login.cgi?&login_email=%s&login_password=%s"
+ (open-url
+ "http://www.egroups.com/login.cgi?&login_email=%s&login_password=%s"
nnwarchive-login nnwarchive-passwd)
- (list-url
+ (list-url
"http://www.egroups.com/mygroups")
(list-dissect . nnwarchive-egroups-list)
(list-groups . nnwarchive-egroups-list-groups)
- (xover-url
+ (xover-url
"http://www.egroups.com/messages/%s/%d" group aux)
- (xover-last-url
+ (xover-last-url
"http://www.egroups.com/messages/%s/" group)
(xover-page-size . 13)
(xover-dissect . nnwarchive-egroups-xover)
- (article-url
+ (article-url
"http://www.egroups.com/message/%s/%d?source=1" group article)
(article-dissect . nnwarchive-egroups-article)
(authentication . t)
(mail-archive
(address . "www.mail-archive.com")
(open-url)
- (list-url
+ (list-url
"http://www.mail-archive.com/lists.html")
(list-dissect . nnwarchive-mail-archive-list)
(list-groups . nnwarchive-mail-archive-list-groups)
- (xover-url
+ (xover-url
"http://www.mail-archive.com/%s/mail%d.html" group aux)
- (xover-last-url
+ (xover-last-url
"http://www.mail-archive.com/%s/maillist.html" group)
(xover-page-size)
(xover-dissect . nnwarchive-mail-archive-xover)
- (article-url
+ (article-url
"http://www.mail-archive.com/%s/msg%05d.html" group article1)
(article-dissect . nnwarchive-mail-archive-article)
(xover-files . nnwarchive-mail-archive-xover-files)
(let ((defs (cdr (assq type nnwarchive-type-definition)))
def)
(dolist (def defs)
- (set (intern (concat "nnwarchive-" (symbol-name (car def))))
+ (set (intern (concat "nnwarchive-" (symbol-name (car def))))
(cdr def)))))
(defmacro nnwarchive-backlog (&rest form)
`(let ((gnus-keep-backlog nnwarchive-keep-backlog)
- (gnus-backlog-buffer
+ (gnus-backlog-buffer
(format " *nnwarchive backlog %s*" nnwarchive-address))
(gnus-backlog-articles nnwarchive-backlog-articles)
(gnus-backlog-hashtb nnwarchive-backlog-hashtb))
(nnwarchive-backlog
(gnus-backlog-enter-article group number buffer)))
-(defun nnwarchive-get-article (article &optional group server buffer)
+(defun nnwarchive-get-article (article &optional group server buffer)
(if (numberp article)
(if (nnwarchive-backlog
- (gnus-backlog-request-article group article
+ (gnus-backlog-request-article group article
(or buffer nntp-server-buffer)))
(cons group article)
(let (contents)
(setq nnwarchive-passwd
(or nnwarchive-passwd
(mail-source-read-passwd
- (format "Password for %s at %s: "
+ (format "Password for %s at %s: "
nnwarchive-login server)))))
(unless nnwarchive-groups
(nnwarchive-read-groups))
(nnwarchive-open-server server)))
(defun nnwarchive-read-groups ()
- (let ((file (expand-file-name (concat "groups-" nnwarchive-address)
+ (let ((file (expand-file-name (concat "groups-" nnwarchive-address)
nnwarchive-directory)))
(when (file-exists-p file)
(with-temp-buffer
(setq nnwarchive-groups (read (current-buffer)))))))
(defun nnwarchive-write-groups ()
- (with-temp-file (expand-file-name (concat "groups-" nnwarchive-address)
+ (with-temp-file (expand-file-name (concat "groups-" nnwarchive-address)
nnwarchive-directory)
(prin1 nnwarchive-groups (current-buffer))))
(defun nnwarchive-init (server)
"Initialize buffers and such."
(let ((type (intern server)) (defs nnwarchive-type-definition) def)
- (cond
+ (cond
((equal server "")
(setq type nnwarchive-default-type))
((assq type nnwarchive-type-definition) t)
(mm-with-unibyte-current-buffer
(let ((url-confirmation-func 'identity)
(url-cookie-multiple-line nil))
- (cond
+ (cond
((eq (car xurl) 'post)
(pop xurl)
(nnwarchive-fetch-form (car xurl) (nnwarchive-eval (cdr xurl))))
(t
(nnweb-insert (apply 'format (nnwarchive-eval xurl))))))))
-
+
(defun nnwarchive-generate-active ()
(save-excursion
(set-buffer nntp-server-buffer)
(save-excursion
(let (articles)
(set-buffer nnwarchive-buffer)
- (dolist (group groups)
+ (dolist (group groups)
(erase-buffer)
(nnwarchive-url nnwarchive-xover-last-url)
(goto-char (point-min))
(when (re-search-forward "of \\([0-9]+\\)[ \t\n\r]*</title>" nil t)
- (setq articles (string-to-number (match-string 1))))
+ (setq articles (string-to-number (match-string 1))))
(let ((elem (assoc group nnwarchive-groups)))
(if elem
(setcar (cdr elem) articles)
(let ((case-fold-search t)
group description elem articles)
(goto-char (point-min))
- (while
+ (while
(re-search-forward "href=\"/group/\\([^/\"\> ]+\\)" nil t)
(setq group (match-string 1)
description (match-string 2))
(push (cons
article
(make-full-mail-header
- article
+ article
(nnweb-decode-entities-string subject)
(nnweb-decode-entities-string from)
date
(concat "<" group "%"
- (number-to-string article)
+ (number-to-string article)
"@egroup.com>")
""
0 0 "")) nnwarchive-headers))))
(let ((elem (assoc group nnwarchive-headers-cache)))
(if elem
(setcdr elem nnwarchive-headers)
- (push (cons group nnwarchive-headers)
+ (push (cons group nnwarchive-headers)
nnwarchive-headers-cache)))))))
(defun nnwarchive-mail-archive-list ()
(push (cons
article
(make-full-mail-header
- article
+ article
(nnweb-decode-entities-string subject)
(nnweb-decode-entities-string from)
date
(insert from-r13)
(let ((message-caesar-translation-table
(or nnwarchive-caesar-translation-table
- (setq nnwarchive-caesar-translation-table
+ (setq nnwarchive-caesar-translation-table
(nnwarchive-make-caesar-translation-table)))))
(message-caesar-region (point-min) (point-max))
(buffer-string)))))
(defun nnwarchive-mail-archive-article (group article)
- (let (p refs url mime e
- from subject date id
+ (let (p refs url mime e
+ from subject date id
done
(case-fold-serch t))
(save-restriction
(goto-char (point-min))
(while (search-forward " -->" nil t)
(replace-match ""))
- (setq from
+ (setq from
(or (mail-fetch-field "from")
- (nnwarchive-from-r13
+ (nnwarchive-from-r13
(mail-fetch-field "from-r13"))))
(setq date (mail-fetch-field "date"))
(setq id (mail-fetch-field "message-id"))
(goto-char (point-max))
(widen)
(insert "\n"))
- (setq p (point))
+ (setq p (point))
(when (search-forward "X-Body-of-Message" nil t)
(forward-line)
(delete-region p (point))
(if (> (skip-chars-forward "\040\n\r\t") 0)
(delete-region (point-min) (point)))
(while (not (eobp))
- (cond
- ((looking-at "<PRE>\r?\n?")
+ (cond
+ ((looking-at "<PRE>\r?\n?")
(delete-region (match-beginning 0) (match-end 0))
(setq p (point))
(when (search-forward "</PRE>" nil t)
(goto-char (point-max)))))
((looking-at "<P><A HREF=\"\\([^\"]+\\)")
(setq url (match-string 1))
- (delete-region (match-beginning 0)
+ (delete-region (match-beginning 0)
(progn (forward-line) (point)))
- ;; I hate to download the url encode it, then immediately
+ ;; I hate to download the url encode it, then immediately
;; decode it.
(insert "<#external"
" type="
(mailcap-extension-to-mime
(match-string 0 url)))
"application/octet-stream")
- (format " url=\"http://www.mail-archive.com/%s/%s\""
+ (format " url=\"http://www.mail-archive.com/%s/%s\""
group url)
">\n"
"<#/external>")
(setq p (point))
(insert "<#part type=\"text/html\" disposition=inline>")
(goto-char
- (if (re-search-forward
- "[\040\n\r\t]*<PRE>\\|[\040\n\r\t]*<P><A HREF=\""
+ (if (re-search-forward
+ "[\040\n\r\t]*<PRE>\\|[\040\n\r\t]*<P><A HREF=\""
nil t)
(match-beginning 0)
(point-max)))
(insert " " (pop refs)))
(insert "\n"))
(when mime
- (unless (looking-at "$")
+ (unless (looking-at "$")
(search-forward "\n\n" nil t)
(forward-line -1))
(narrow-to-region (point) (point-max))
(nnweb-fetch-url url))
(if (nnweb-definition 'reference t)
(setq article
- (funcall (nnweb-definition
+ (funcall (nnweb-definition
'reference) article)))))))
(unless nnheader-callback-function
(funcall (nnweb-definition 'article))
Subject Score Date Newsgroups From
map url)
(unless active
- (push (list nnweb-group (setq active (cons 1 0))
+ (push (list nnweb-group (setq active (cons 1 0))
nnweb-type nnweb-search)
nnweb-group-alist))
;; Go through all the article hits on this page.
(goto-char (point-min))
(while (re-search-forward
- "a href=/groups\\(\\?[^ \">]*selm=[^ \">]*\\)" nil t)
+ "a href=/groups\\(\\?[^ \">]*selm=[^ \">]*\\)" nil t)
(setq url
(concat (nnweb-definition 'address)
(match-string 1)))
(goto-char (point-max))
(widen)
(skip-chars-forward "- \t"))
- (when (looking-at
+ (when (looking-at
"\\([0-9]+[/ ][A-Za-z]+[/ ][0-9]+\\)[ \t]*by[ \t]*\\([^<]*\\) - <a")
(setq From (match-string 2)
Date (match-string 1)))
(incf (cdr active))
(make-full-mail-header
(cdr active) (if Newsgroups
- (concat "(" Newsgroups ") " Subject)
+ (concat "(" Newsgroups ") " Subject)
Subject)
From Date Message-ID
nil 0 0 url))
(defun nnweb-google-reference (id)
(let ((map (nnweb-google-parse-1 id)) header)
- (setq nnweb-articles
+ (setq nnweb-articles
(nconc nnweb-articles map))
(when (setq header (cadar map))
(mm-with-unibyte-current-buffer
(defvoo nnwfm-groups nil)
(defvoo nnwfm-headers nil)
(defvoo nnwfm-articles nil)
-(defvar nnwfm-table-regexp
+(defvar nnwfm-table-regexp
"postings.*editpost\\|forumdisplay\\|Forum[0-9]+/HTML\\|getbio")
;;; Interface functions
nnwfm-groups-alist)
(with-temp-file (expand-file-name "groups" nnwfm-directory)
(prin1 nnwfm-groups-alist (current-buffer))))
-
+
(defun nnwfm-init (server)
"Initialize buffers and such."
(unless (file-exists-p nnwfm-directory)
(ssl-program-arguments
`(,@pop3-ssl-program-arguments ,extra-arg
"-connect" ,(format "%s:%d" host service)))
- (process (open-ssl-stream name buffer host service)))
+ (process (open-ssl-stream name buffer host service)))
(when process
(with-current-buffer buffer
(goto-char (point-min))
(while (and (memq (process-status process) '(open run))
- (goto-char (point-max))
- (forward-line -1)
- (not (looking-at "+OK")))
- (accept-process-output process 1)
- (sit-for 1))
+ (goto-char (point-max))
+ (forward-line -1)
+ (not (looking-at "+OK")))
+ (accept-process-output process 1)
+ (sit-for 1))
(delete-region (point-min) (point)))
(and process (memq (process-status process) '(open run))
process))))
(if msgno
(pop3-send-command process (format "UIDL %d" msgno))
(pop3-send-command process "UIDL"))
-
+
(if (null (pop3-read-response process t))
nil ;; UIDL is not supported on this server
(let (pairs uidl)
16)))
(insert byte)
(delete-char 3)
- ;; Why backward-char???
+ ;; Why backward-char???
;;(unless (eq byte 61) ;; 61 is not ?= in XEmacs
;; (backward-char))
))
rfc1843-hzp-word-regexp
rfc1843-word-regexp) (point-max) t)
;;; Text with extents may cause XEmacs crash
- (setq str (buffer-substring-no-properties
+ (setq str (buffer-substring-no-properties
(match-beginning 1)
(match-end 1)))
(setq firstc (aref str 0))
(ct (message-fetch-field "Content-Type" t))
(ctl (and ct (ignore-errors
(mail-header-parse-content-type ct)))))
- (if (and ctl (not (string-match "/" (car ctl))))
+ (if (and ctl (not (string-match "/" (car ctl))))
(setq ctl nil))
(goto-char (point-max))
(widen)
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
-
+
;; RFC 2045 is: "Multipurpose Internet Mail Extensions (MIME) Part
;; One: Format of Internet Message Bodies".
(while alist
(when (looking-at (caar alist))
(mm-with-unibyte-current-buffer-mule4
- (quoted-printable-encode-region
+ (quoted-printable-encode-region
(point-min) (point-max) nil (cdar alist)))
(subst-char-in-region (point-min) (point-max) ? ?_)
(setq alist nil))
;;; 2000-05-12 added sha-1 example, added test case reference
;;; Code:
-
+
(eval-when-compile (require 'cl))
;; Magic character for inner HMAC round. 0x36 == 54 == '6'
(defconst rfc2104-zero ?\x00)
;; Alist for converting hex to decimal.
-(defconst rfc2104-hex-alist
+(defconst rfc2104-hex-alist
'((?0 . 0) (?a . 10) (?A . 10)
(?1 . 1) (?b . 11) (?B . 11)
(?2 . 2) (?c . 12) (?C . 12)
(defun rfc2104-hash (hash block-length hash-length key text)
(let* (;; if key is longer than B, reset it to HASH(key)
- (key (if (> (length key) block-length)
+ (key (if (> (length key) block-length)
(funcall hash key) key))
(k_ipad (append key nil))
(k_opad (append key nil)))
(overlay-put overlay
'help-echo "mouse-2: toggle smilies in buffer")
(overlay-put overlay 'keymap smiley-mouse-map))))))
- (setq smiley-active t)))
+ (setq smiley-active t)))
(defun smiley-toggle-buffer (&optional arg)
"Toggle displaying smiley faces.
(dolist (overlay (overlays-in (or st (point-min))
(or nd (point-max))))
(when (overlay-get overlay 'smiley)
- (remove-text-properties (overlay-start overlay)
+ (remove-text-properties (overlay-start overlay)
(overlay-end overlay) '(display))
(delete-overlay overlay)))
(goto-char (or st (point-min)))
;; FIXME: make it work as the one in XEmacs.
(defun smiley-toggle-buffer-ems (&optional arg buffer st nd)
"Toggle displaying smiley faces.
-With arg, turn displaying on if and only if arg is positive."
+With arg, turn displaying on if and only if arg is positive."
(interactive "P")
(save-excursion
(when buffer
(dolist (overlay (overlays-in (or st (point-min))
(or nd (point-max))))
(when (overlay-get overlay 'smiley)
- (remove-text-properties (overlay-start overlay)
+ (remove-text-properties (overlay-start overlay)
(overlay-end overlay) '(display))
(setq found t)))
(unless found
(const :tag "RC2 64 bits" "-rc2-64")
(const :tag "RC2 128 bits" "-rc2-128"))
:group 'smime)
-
+
(defcustom smime-dns-server nil
"DNS server to query certificates from.
If nil, use system defaults."
(if passphrase
(setenv "GNUS_SMIME_PASSPHRASE" passphrase))
(prog1
- (when (apply 'smime-call-openssl-region b e buffer "smime" "-sign"
+ (when (apply 'smime-call-openssl-region b e buffer "smime" "-sign"
"-signer" (expand-file-name keyfile)
(append
(smime-make-certfiles certfiles)
(if passphrase
(setenv "GNUS_SMIME_PASSPHRASE" passphrase))
(when (apply 'smime-call-openssl-region
- b e buffer "smime" "-decrypt"
+ b e buffer "smime" "-decrypt"
"-recip" keyfile
(if passphrase
(list "-passin" "env:GNUS_SMIME_PASSPHRASE" )))
(month (nth 4 tim))
(day (nth 3 tim))
(year (nth 5 tim)))
- (+ (time-to-day-in-year time) ; Days this year
+ (+ (time-to-day-in-year time) ; Days this year
(* 365 (1- year)) ; + Days in prior years
(/ (1- year) 4) ; + Julian leap years
(- (/ (1- year) 100)) ; - century years