Commit c4c7f54c authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen
Browse files

Synched with Gnus 5.2.31.

parent b1cfbae4
...@@ -66,7 +66,10 @@ variable to \"^nnml\".") ...@@ -66,7 +66,10 @@ variable to \"^nnml\".")
(defun gnus-cache-open () (defun gnus-cache-open ()
"Initialize the cache." "Initialize the cache."
(gnus-cache-read-active)) (when (or (file-exists-p gnus-cache-directory)
(and gnus-use-cache
(not (eq gnus-use-cache 'passive))))
(gnus-cache-read-active)))
(gnus-add-shutdown 'gnus-cache-close 'gnus) (gnus-add-shutdown 'gnus-cache-close 'gnus)
......
...@@ -55,20 +55,6 @@ message in, you can set this variable to a function that checks the ...@@ -55,20 +55,6 @@ message in, you can set this variable to a function that checks the
current newsgroup name and then returns a suitable group name (or list current newsgroup name and then returns a suitable group name (or list
of names).") of names).")
(defvar gnus-message-archive-group
'((if (message-news-p) "misc-news" "misc-mail"))
"*Name of the group in which to save the messages you've written.
This can either be a string, a list of strings; or an alist
of regexps/functions/forms to be evaluated to return a string (or a list
of strings). The functions are called with the name of the current
group (or nil) as a parameter.
Normally the group names returned by this variable should be
unprefixed -- which implictly means \"store on the archive server\".
However, you may wish to store the message on some other server. In
that case, just return a fully prefixed name of the group --
\"nnml+private:mail.misc\", for instance.")
(defvar gnus-mailing-list-groups nil (defvar gnus-mailing-list-groups nil
"*Regexp matching groups that are really mailing lists. "*Regexp matching groups that are really mailing lists.
This is useful when you're reading a mailing list that has been This is useful when you're reading a mailing list that has been
...@@ -668,10 +654,9 @@ If YANK is non-nil, include the original article." ...@@ -668,10 +654,9 @@ If YANK is non-nil, include the original article."
(save-excursion (re-search-backward "[ \t\n]" nil t) (1+ (point))) (save-excursion (re-search-backward "[ \t\n]" nil t) (1+ (point)))
(save-excursion (re-search-forward "[ \t\n]" nil t) (1- (point)))))) (save-excursion (re-search-forward "[ \t\n]" nil t) (1- (point))))))
(when address (when address
(switch-to-buffer gnus-summary-buffer)
(message-reply address) (message-reply address)
(when yank (when yank
(gnus-inews-yank-articles yank))))) (gnus-inews-yank-articles (list (cdr gnus-article-current)))))))
(defun gnus-bug () (defun gnus-bug ()
"Send a bug report to the Gnus maintainers." "Send a bug report to the Gnus maintainers."
......
...@@ -139,6 +139,7 @@ isn't bound, the message will be used unconditionally.") ...@@ -139,6 +139,7 @@ isn't bound, the message will be used unconditionally.")
(nnmail-time-since (nnmail-date-to-time date)) (nnmail-time-since (nnmail-date-to-time date))
(nnmail-days-to-time gnus-nocem-expiry-wait))) (nnmail-days-to-time gnus-nocem-expiry-wait)))
(gnus-request-article-this-buffer (mail-header-number header) group) (gnus-request-article-this-buffer (mail-header-number header) group)
(goto-char (point-min))
;; The article has to have proper NoCeM headers. ;; The article has to have proper NoCeM headers.
(when (and (setq b (search-forward "\n@@BEGIN NCM HEADERS\n" nil t)) (when (and (setq b (search-forward "\n@@BEGIN NCM HEADERS\n" nil t))
(setq e (search-forward "\n@@BEGIN NCM BODY\n" nil t))) (setq e (search-forward "\n@@BEGIN NCM BODY\n" nil t)))
......
...@@ -551,7 +551,7 @@ If optional argument `SILENT' is nil, show effect of score entry." ...@@ -551,7 +551,7 @@ If optional argument `SILENT' is nil, show effect of score entry."
((eq type 'f) ((eq type 'f)
(setq match (gnus-simplify-subject-fuzzy match)))) (setq match (gnus-simplify-subject-fuzzy match))))
(let ((score (gnus-score-default score)) (let ((score (gnus-score-default score))
(header (downcase header)) (header (format "%s" (downcase header)))
new) new)
(and prompt (setq match (read-string (and prompt (setq match (read-string
(format "Match %s on %s, %s: " (format "Match %s on %s, %s: "
...@@ -566,6 +566,9 @@ If optional argument `SILENT' is nil, show effect of score entry." ...@@ -566,6 +566,9 @@ If optional argument `SILENT' is nil, show effect of score entry."
(int-to-string match) (int-to-string match)
match)))) match))))
;; Get rid of string props.
(setq match (format "%s" match))
;; If this is an integer comparison, we transform from string to int. ;; If this is an integer comparison, we transform from string to int.
(and (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer) (and (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer)
(setq match (string-to-int match))) (setq match (string-to-int match)))
...@@ -720,11 +723,11 @@ SCORE is the score to add." ...@@ -720,11 +723,11 @@ SCORE is the score to add."
(setq score (gnus-score-default score)) (setq score (gnus-score-default score))
(when (gnus-buffer-live-p gnus-summary-buffer) (when (gnus-buffer-live-p gnus-summary-buffer)
(save-excursion (save-excursion
(set-buffer gnus-summary-buffer)
(save-restriction (save-restriction
(goto-char (point-min)) (goto-char (point-min))
(let ((id (mail-fetch-field "message-id"))) (let ((id (mail-fetch-field "message-id")))
(when id (when id
(set-buffer gnus-summary-buffer)
(gnus-summary-score-entry (gnus-summary-score-entry
"references" (concat id "[ \t]*$") 'r "references" (concat id "[ \t]*$") 'r
score (current-time-string) nil t))))))) score (current-time-string) nil t)))))))
...@@ -735,11 +738,11 @@ SCORE is the score to add." ...@@ -735,11 +738,11 @@ SCORE is the score to add."
(setq score (gnus-score-default score)) (setq score (gnus-score-default score))
(when (gnus-buffer-live-p gnus-summary-buffer) (when (gnus-buffer-live-p gnus-summary-buffer)
(save-excursion (save-excursion
(set-buffer gnus-summary-buffer)
(save-restriction (save-restriction
(goto-char (point-min)) (goto-char (point-min))
(let ((id (mail-fetch-field "message-id"))) (let ((id (mail-fetch-field "message-id")))
(when id (when id
(set-buffer gnus-summary-buffer)
(gnus-summary-score-entry (gnus-summary-score-entry
"references" id 's "references" id 's
score (current-time-string)))))))) score (current-time-string))))))))
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
(require 'mail-abbrevs) (require 'mail-abbrevs)
(require 'mailabbrev)) (require 'mailabbrev))
;;;###autoload
(defvar message-directory "~/Mail/" (defvar message-directory "~/Mail/"
"*Directory from which all other mail file variables are derived.") "*Directory from which all other mail file variables are derived.")
...@@ -164,9 +163,8 @@ If t, use `message-user-organization-file'.") ...@@ -164,9 +163,8 @@ If t, use `message-user-organization-file'.")
(defvar message-user-organization-file "/usr/lib/news/organization" (defvar message-user-organization-file "/usr/lib/news/organization"
"*Local news organization file.") "*Local news organization file.")
;;;###autoload (defvar message-autosave-directory "~/"
(defvar message-autosave-directory ; (concat (file-name-as-directory message-directory) "drafts/")
(concat (file-name-as-directory message-directory) "drafts/")
"*Directory where message autosaves buffers. "*Directory where message autosaves buffers.
If nil, message won't autosave.") If nil, message won't autosave.")
...@@ -1095,6 +1093,8 @@ Puts point before the text and mark after. ...@@ -1095,6 +1093,8 @@ Puts point before the text and mark after.
Normally indents each nonblank line ARG spaces (default 3). However, Normally indents each nonblank line ARG spaces (default 3). However,
if `message-yank-prefix' is non-nil, insert that prefix on each line. if `message-yank-prefix' is non-nil, insert that prefix on each line.
This function uses `message-cite-function' to do the actual citing.
Just \\[universal-argument] as argument means don't indent, insert no Just \\[universal-argument] as argument means don't indent, insert no
prefix, and don't delete any headers." prefix, and don't delete any headers."
(interactive "P") (interactive "P")
...@@ -1531,8 +1531,9 @@ the user from the mailer." ...@@ -1531,8 +1531,9 @@ the user from the mailer."
;; Check "Shoot me". ;; Check "Shoot me".
(or (message-check-element 'shoot) (or (message-check-element 'shoot)
(save-excursion (save-excursion
(if (search-forward (if (re-search-forward
".i-have-a-misconfigured-system-so-shoot-me" nil t) "Message-ID.*.i-have-a-misconfigured-system-so-shoot-me"
nil t)
(y-or-n-p (y-or-n-p
"You appear to have a misconfigured system. Really post? ") "You appear to have a misconfigured system. Really post? ")
t))) t)))
...@@ -2489,7 +2490,9 @@ Headers already prepared in the buffer are not modified." ...@@ -2489,7 +2490,9 @@ Headers already prepared in the buffer are not modified."
follow-to))))) follow-to)))))
(widen)) (widen))
(message-pop-to-buffer (message-buffer-name "reply" from)) (message-pop-to-buffer (message-buffer-name
(if wide "wide reply" "reply") from
(if wide to-address nil)))
(setq message-reply-headers (setq message-reply-headers
(vector 0 subject from date message-id references 0 0 "")) (vector 0 subject from date message-id references 0 0 ""))
......
This diff is collapsed.
...@@ -95,7 +95,7 @@ If this variable is nil, no files will be excluded.") ...@@ -95,7 +95,7 @@ If this variable is nil, no files will be excluded.")
(when (and (file-exists-p file) (when (and (file-exists-p file)
(or (file-directory-p file) (or (file-directory-p file)
(not (zerop (nth 7 (file-attributes file)))))) (not (zerop (nnheader-file-size file)))))
(insert (format "221 %d Article retrieved.\n" article)) (insert (format "221 %d Article retrieved.\n" article))
(nneething-insert-head file) (nneething-insert-head file)
(insert ".\n")) (insert ".\n"))
......
...@@ -670,8 +670,9 @@ time saver for large mailboxes.") ...@@ -670,8 +670,9 @@ time saver for large mailboxes.")
(let ((delim (concat "^" message-unix-mail-delimiter)) (let ((delim (concat "^" message-unix-mail-delimiter))
(marker (concat "\n" nnfolder-article-marker)) (marker (concat "\n" nnfolder-article-marker))
(number "[0-9]+") (number "[0-9]+")
(active (cadr (assoc nnfolder-current-group (active (or (cadr (assoc nnfolder-current-group
nnfolder-group-alist))) nnfolder-group-alist))
(cons 1 0)))
(scantime (assoc nnfolder-current-group nnfolder-scantime-alist)) (scantime (assoc nnfolder-current-group nnfolder-scantime-alist))
(minid (lsh -1 -1)) (minid (lsh -1 -1))
maxid start end newscantime) maxid start end newscantime)
......
...@@ -570,6 +570,40 @@ without formatting." ...@@ -570,6 +570,40 @@ without formatting."
(while (re-search-forward "\r$" nil t) (while (re-search-forward "\r$" nil t)
(delete-backward-char 1)))) (delete-backward-char 1))))
(defun nnheader-file-size (file)
"Return the file size of FILE or 0."
(or (nth 7 (file-attributes file)) 0))
(defun nnheader-find-etc-directory (package)
"Go through the path and find the \".../etc/PACKAGE\" directory."
(let ((path load-path)
dir result)
;; We try to find the dir by looking at the load path,
;; stripping away the last component and adding "etc/".
(while path
(if (and (car path)
(file-exists-p
(setq dir (concat
(file-name-directory
(directory-file-name (car path)))
"etc/" package "/")))
(file-directory-p dir))
(setq result dir
path nil)
(setq path (cdr path))))
result))
(defvar ange-ftp-path-format)
(defvar efs-path-regexp)
(defun nnheader-re-read-dir (path)
"Re-read directory PATH if PATH is on a remote system."
(if (boundp 'ange-ftp-path-format)
(when (string-match (car ange-ftp-path-format) path)
(ange-ftp-re-read-dir path))
(if (boundp 'efs-path-regexp)
(when (string-match efs-path-regexp path)
(efs-re-read-dir path)))))
(fset 'nnheader-run-at-time 'run-at-time) (fset 'nnheader-run-at-time 'run-at-time)
(fset 'nnheader-cancel-timer 'cancel-timer) (fset 'nnheader-cancel-timer 'cancel-timer)
(fset 'nnheader-find-file-noselect 'find-file-noselect) (fset 'nnheader-find-file-noselect 'find-file-noselect)
......
...@@ -382,9 +382,9 @@ parameter. It should return nil, `warn' or `delete'.") ...@@ -382,9 +382,9 @@ parameter. It should return nil, `warn' or `delete'.")
(substring inbox (+ popmail 3)))))) (substring inbox (+ popmail 3))))))
(message "Getting mail from post office ...")) (message "Getting mail from post office ..."))
(when (or (and (file-exists-p tofile) (when (or (and (file-exists-p tofile)
(/= 0 (nth 7 (file-attributes tofile)))) (/= 0 (nnheader-file-size tofile)))
(and (file-exists-p inbox) (and (file-exists-p inbox)
(/= 0 (nth 7 (file-attributes inbox))))) (/= 0 (nnheader-file-size inbox))))
(message "Getting mail from %s..." inbox))) (message "Getting mail from %s..." inbox)))
;; Set TOFILE if have not already done so, and ;; Set TOFILE if have not already done so, and
;; rename or copy the file INBOX to TOFILE if and as appropriate. ;; rename or copy the file INBOX to TOFILE if and as appropriate.
...@@ -923,8 +923,8 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." ...@@ -923,8 +923,8 @@ See the documentation for the variable `nnmail-split-fancy' for documentation."
nnmail-procmail-suffix "$") t))) nnmail-procmail-suffix "$") t)))
(p procmails) (p procmails)
(crash (when (and (file-exists-p nnmail-crash-box) (crash (when (and (file-exists-p nnmail-crash-box)
(> (nth 7 (file-attributes (> (nnheader-file-size
(file-truename nnmail-crash-box))) 0)) (file-truename nnmail-crash-box)) 0))
(list nnmail-crash-box)))) (list nnmail-crash-box))))
;; Remove any directories that inadvertantly match the procmail ;; Remove any directories that inadvertantly match the procmail
;; suffix, which might happen if the suffix is "". ;; suffix, which might happen if the suffix is "".
...@@ -937,8 +937,12 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." ...@@ -937,8 +937,12 @@ See the documentation for the variable `nnmail-split-fancy' for documentation."
crash crash
(cond ((and group (cond ((and group
(or (eq nnmail-spool-file 'procmail) (or (eq nnmail-spool-file 'procmail)
nnmail-use-procmail)) nnmail-use-procmail)
procmails)
procmails) procmails)
((and group
(eq nnmail-spool-file 'procmail))
nil)
((listp nnmail-spool-file) ((listp nnmail-spool-file)
(append nnmail-spool-file procmails)) (append nnmail-spool-file procmails))
((stringp nnmail-spool-file) ((stringp nnmail-spool-file)
...@@ -1107,7 +1111,7 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." ...@@ -1107,7 +1111,7 @@ See the documentation for the variable `nnmail-split-fancy' for documentation."
;; existance of POPped mail. ;; existance of POPped mail.
(when (or (string-match "^po:" spool) (when (or (string-match "^po:" spool)
(and (file-exists-p spool) (and (file-exists-p spool)
(> (nth 7 (file-attributes (file-truename spool))) 0))) (> (nnheader-file-size (file-truename spool)) 0)))
(nnheader-message 3 "%s: Reading incoming mail..." method) (nnheader-message 3 "%s: Reading incoming mail..." method)
(when (and (nnmail-move-inbox spool) (when (and (nnmail-move-inbox spool)
(file-exists-p nnmail-crash-box)) (file-exists-p nnmail-crash-box))
......
...@@ -484,7 +484,7 @@ ...@@ -484,7 +484,7 @@
(buffer-name nnmbox-mbox-buffer) (buffer-name nnmbox-mbox-buffer)
(save-excursion (save-excursion
(set-buffer nnmbox-mbox-buffer) (set-buffer nnmbox-mbox-buffer)
(= (buffer-size) (nth 7 (file-attributes nnmbox-mbox-file))))) (= (buffer-size) (nnheader-file-size nnmbox-mbox-file))))
() ()
(save-excursion (save-excursion
(let ((delim (concat "^" message-unix-mail-delimiter)) (let ((delim (concat "^" message-unix-mail-delimiter))
......
...@@ -157,6 +157,8 @@ ...@@ -157,6 +157,8 @@
(nnheader-report 'nnmh "Selected group %s" group) (nnheader-report 'nnmh "Selected group %s" group)
t) t)
(t (t
;; Re-scan the directory if it's on a foreign system.
(nnheader-re-read-dir pathname)
(setq dir (setq dir
(sort (sort
(mapcar (lambda (name) (string-to-int name)) (mapcar (lambda (name) (string-to-int name))
......
...@@ -465,7 +465,7 @@ there.") ...@@ -465,7 +465,7 @@ there.")
(buffer-disable-undo (current-buffer)) (buffer-disable-undo (current-buffer))
(erase-buffer) (erase-buffer)
(condition-case () (condition-case ()
(call-process "grep" nil t nil id nnspool-history-file) (call-process "grep" nil t nil (regexp-quote id) nnspool-history-file)
(error nil)) (error nil))
(goto-char (point-min)) (goto-char (point-min))
(prog1 (prog1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment