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\".")
(defun gnus-cache-open ()
"Initialize the cache."
(when (or (file-exists-p gnus-cache-directory)
(and gnus-use-cache
(not (eq gnus-use-cache 'passive))))
(gnus-add-shutdown 'gnus-cache-close 'gnus)
......@@ -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
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
"*Regexp matching groups that are really mailing lists.
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."
(save-excursion (re-search-backward "[ \t\n]" nil t) (1+ (point)))
(save-excursion (re-search-forward "[ \t\n]" nil t) (1- (point))))))
(when address
(switch-to-buffer gnus-summary-buffer)
(message-reply address)
(when yank
(gnus-inews-yank-articles yank)))))
(gnus-inews-yank-articles (list (cdr gnus-article-current)))))))
(defun gnus-bug ()
"Send a bug report to the Gnus maintainers."
......@@ -139,6 +139,7 @@ isn't bound, the message will be used unconditionally.")
(nnmail-time-since (nnmail-date-to-time date))
(nnmail-days-to-time gnus-nocem-expiry-wait)))
(gnus-request-article-this-buffer (mail-header-number header) group)
(goto-char (point-min))
;; The article has to have proper NoCeM headers.
(when (and (setq b (search-forward "\n@@BEGIN NCM HEADERS\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."
((eq type 'f)
(setq match (gnus-simplify-subject-fuzzy match))))
(let ((score (gnus-score-default score))
(header (downcase header))
(header (format "%s" (downcase header)))
(and prompt (setq match (read-string
(format "Match %s on %s, %s: "
......@@ -566,6 +566,9 @@ If optional argument `SILENT' is nil, show effect of score entry."
(int-to-string match)
;; Get rid of string props.
(setq match (format "%s" match))
;; If this is an integer comparison, we transform from string to int.
(and (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer)
(setq match (string-to-int match)))
......@@ -720,11 +723,11 @@ SCORE is the score to add."
(setq score (gnus-score-default score))
(when (gnus-buffer-live-p gnus-summary-buffer)
(set-buffer gnus-summary-buffer)
(goto-char (point-min))
(let ((id (mail-fetch-field "message-id")))
(when id
(set-buffer gnus-summary-buffer)
"references" (concat id "[ \t]*$") 'r
score (current-time-string) nil t)))))))
......@@ -735,11 +738,11 @@ SCORE is the score to add."
(setq score (gnus-score-default score))
(when (gnus-buffer-live-p gnus-summary-buffer)
(set-buffer gnus-summary-buffer)
(goto-char (point-min))
(let ((id (mail-fetch-field "message-id")))
(when id
(set-buffer gnus-summary-buffer)
"references" id 's
score (current-time-string))))))))
......@@ -40,7 +40,6 @@
(require 'mail-abbrevs)
(require 'mailabbrev))
(defvar message-directory "~/Mail/"
"*Directory from which all other mail file variables are derived.")
......@@ -164,9 +163,8 @@ If t, use `message-user-organization-file'.")
(defvar message-user-organization-file "/usr/lib/news/organization"
"*Local news organization file.")
(defvar message-autosave-directory
(concat (file-name-as-directory message-directory) "drafts/")
(defvar message-autosave-directory "~/"
; (concat (file-name-as-directory message-directory) "drafts/")
"*Directory where message autosaves buffers.
If nil, message won't autosave.")
......@@ -1095,6 +1093,8 @@ Puts point before the text and mark after.
Normally indents each nonblank line ARG spaces (default 3). However,
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
prefix, and don't delete any headers."
(interactive "P")
......@@ -1531,8 +1531,9 @@ the user from the mailer."
;; Check "Shoot me".
(or (message-check-element 'shoot)
(if (search-forward
".i-have-a-misconfigured-system-so-shoot-me" nil t)
(if (re-search-forward
nil t)
"You appear to have a misconfigured system. Really post? ")
......@@ -2489,7 +2490,9 @@ Headers already prepared in the buffer are not modified."
(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
(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.")
(when (and (file-exists-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))
(nneething-insert-head file)
(insert ".\n"))
......@@ -670,8 +670,9 @@ time saver for large mailboxes.")
(let ((delim (concat "^" message-unix-mail-delimiter))
(marker (concat "\n" nnfolder-article-marker))
(number "[0-9]+")
(active (cadr (assoc nnfolder-current-group
(active (or (cadr (assoc nnfolder-current-group
(cons 1 0)))
(scantime (assoc nnfolder-current-group nnfolder-scantime-alist))
(minid (lsh -1 -1))
maxid start end newscantime)
......@@ -570,6 +570,40 @@ without formatting."
(while (re-search-forward "\r$" nil t)
(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)
(setq dir (concat
(directory-file-name (car path)))
"etc/" package "/")))
(file-directory-p dir))
(setq result dir
path nil)
(setq path (cdr path))))
(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-cancel-timer 'cancel-timer)
(fset 'nnheader-find-file-noselect 'find-file-noselect)
......@@ -382,9 +382,9 @@ parameter. It should return nil, `warn' or `delete'.")
(substring inbox (+ popmail 3))))))
(message "Getting mail from post office ..."))
(when (or (and (file-exists-p tofile)
(/= 0 (nth 7 (file-attributes tofile))))
(/= 0 (nnheader-file-size tofile)))
(and (file-exists-p inbox)
(/= 0 (nth 7 (file-attributes inbox)))))
(/= 0 (nnheader-file-size inbox))))
(message "Getting mail from %s..." inbox)))
;; Set TOFILE if have not already done so, and
;; 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."
nnmail-procmail-suffix "$") t)))
(p procmails)
(crash (when (and (file-exists-p nnmail-crash-box)
(> (nth 7 (file-attributes
(file-truename nnmail-crash-box))) 0))
(> (nnheader-file-size
(file-truename nnmail-crash-box)) 0))
(list nnmail-crash-box))))
;; Remove any directories that inadvertantly match the procmail
;; suffix, which might happen if the suffix is "".
......@@ -937,8 +937,12 @@ See the documentation for the variable `nnmail-split-fancy' for documentation."
(cond ((and group
(or (eq nnmail-spool-file 'procmail)
((and group
(eq nnmail-spool-file 'procmail))
((listp nnmail-spool-file)
(append nnmail-spool-file procmails))
((stringp nnmail-spool-file)
......@@ -1107,7 +1111,7 @@ See the documentation for the variable `nnmail-split-fancy' for documentation."
;; existance of POPped mail.
(when (or (string-match "^po:" 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)
(when (and (nnmail-move-inbox spool)
(file-exists-p nnmail-crash-box))
......@@ -484,7 +484,7 @@
(buffer-name 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))))
(let ((delim (concat "^" message-unix-mail-delimiter))
......@@ -157,6 +157,8 @@
(nnheader-report 'nnmh "Selected group %s" group)
;; Re-scan the directory if it's on a foreign system.
(nnheader-re-read-dir pathname)
(setq dir
(mapcar (lambda (name) (string-to-int name))
......@@ -465,7 +465,7 @@ there.")
(buffer-disable-undo (current-buffer))
(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))
(goto-char (point-min))
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