+Sat Sep 13 19:48:49 1997 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
+
+ * gnus.el: Gnus v5.4.67 is released.
+
+Wed Sep 10 02:59:30 1997 Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
+
+ * message.el (message-cleanup-headers): Don't "fix" Newsgroups
+ headers in bodies.remove
+
Tue Sep 9 04:02:33 1997 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
* gnus.el: Gnus v5.4.66 is released.
(if (null (boundp 'running-xemacs))
(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)))
+(eval-when-compile (require 'cl))
(require 'gnus)
(require 'gnus-audio)
(require 'gnus-art)
-(eval-when-compile (require 'cl))
(defgroup earcon nil
"Turn ** sounds ** into noise."
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'custom)
(require 'gnus)
(require 'gnus-sum)
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(require 'gnus-sum)
(require 'nntp)
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
;;;
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(require 'gnus-int)
(require 'gnus-range)
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(require 'gnus-art)
(require 'gnus-range)
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(require 'gnus-int)
(require 'nnheader)
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(require 'gnus-art)
(truncate-string valstr (, max-width))
valstr))))
+(defun gnus-encode-coding-string (string system)
+ string)
+
(eval-and-compile
(if (string-match "XEmacs\\|Lucid" emacs-version)
nil
(fset 'gnus-cite-add-face 'gnus-mule-cite-add-face)
(fset 'gnus-max-width-function 'gnus-mule-max-width-function)
(fset 'gnus-summary-set-display-table 'ignore)
+ (fset 'gnus-encode-coding-string 'encode-coding-string)
(when (boundp 'gnus-check-before-posting)
(setq gnus-check-before-posting
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus-score)
-(require 'cl)
(require 'gnus)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(require 'gnus-start)
(require 'nnmail)
(defcustom gnus-permanently-visible-groups nil
"*Regexp to match groups that should always be listed in the group buffer.
-This means that they will still be listed when there are no unread
-articles in the groups."
+This means that they will still be listed even when there are no
+unread articles in the groups.
+
+If nil, no groups are permanently visible."
:group 'gnus-group-listing
:type 'regexp)
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(defcustom gnus-open-server-hook nil
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(require 'gnus-art)
(require 'gnus-range)
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(require 'gnus-score)
(require 'gnus-util)
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(require 'gnus-start)
(require 'gnus-int)
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(require 'gnus-ems)
(require 'message)
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(require 'nnmail)
(require 'gnus-art)
;;; Code:
+(eval-when-compile (require 'cl))
+
;;; List and range functions
(defun gnus-last-element (list)
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(require 'gnus-sum)
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(require 'gnus-sum)
(require 'gnus-range)
;;; Code:
-(require 'cl)
+(eval-when-compile (require 'cl))
(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(require 'gnus-art)
(require 'message)
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
;;; Internal variables.
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(require 'gnus-spec)
(require 'gnus-group)
(require 'gnus-range)
(require 'gnus-util)
(require 'message)
+(eval-when-compile (require 'cl))
(defcustom gnus-startup-file (nnheader-concat gnus-home-directory ".newsrc")
"Your `.newsrc' file.
:type 'file)
(defcustom gnus-init-file (nnheader-concat gnus-home-directory ".gnus")
- "Your Gnus elisp startup file.
-If a file with the .el or .elc suffixes exist, it will be read
-instead."
+ "Your Gnus Emacs-Lisp startup file name.
+If a file with the `.el' or `.elc' suffixes exists, it will be read instead."
:group 'gnus-start
:type 'file)
(defcustom gnus-site-init-file
- (ignore-errors
- (concat (file-name-directory
- (directory-file-name installation-directory))
- "site-lisp/gnus-init"))
- "The site-wide Gnus elisp startup file.
-If a file with the .el or .elc suffixes exist, it will be read
-instead."
+ (condition-case nil
+ (concat (file-name-directory
+ (directory-file-name installation-directory))
+ "site-lisp/gnus-init")
+ (error nil))
+ "The site-wide Gnus Emacs-Lisp startup file name, or nil if none.
+If a file with the `.el' or `.elc' suffixes exists, it will be read instead."
:group 'gnus-start
- :type 'file)
+ :type '(choice file (const nil)))
(defcustom gnus-default-subscribed-newsgroups nil
- "This variable lists what newsgroups should be subscribed the first time Gnus is used.
-It should be a list of strings.
-If it is `t', Gnus will not do anything special the first time it is
+ "List of newsgroups to subscribe, when a user runs Gnus the first time.
+The value should be a list of strings.
+If it is t, Gnus will not do anything special the first time it is
started; it'll just use the normal newsgroups subscription methods."
:group 'gnus-start
- :type '(repeat string))
+ :type '(choice (repeat string) (const :tag "Nothing special" t)))
(defcustom gnus-use-dribble-file t
"*Non-nil means that Gnus will use a dribble file to store user updates.
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(require 'gnus-group)
(require 'gnus-spec)
`gnus-gather-threads-by-references', which compared the References
headers of the articles to find matches."
:group 'gnus-thread
- :type '(set (function-item gnus-gather-threads-by-subject)
- (function-item gnus-gather-threads-by-references)
- (function :tag "other")))
+ :type '(radio (function-item gnus-gather-threads-by-subject)
+ (function-item gnus-gather-threads-by-references)
+ (function :tag "other")))
;; Added by Per Abrahamsen <amanda@iesd.auc.dk>.
(defcustom gnus-summary-same-subject ""
:group 'gnus-summary-visual
:type 'hook)
+;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+(defcustom gnus-structured-field-decoder 'identity
+ "Function to decode non-ASCII characters in structured field for summary."
+ :group 'gnus-various
+ :type 'function)
+
+(defcustom gnus-unstructured-field-decoder 'identity
+ "Function to decode non-ASCII characters in unstructured field for summary."
+ :group 'gnus-various
+ :type 'function)
+
(defcustom gnus-parse-headers-hook
(list 'gnus-hack-decode-rfc1522 'gnus-decode-rfc1522)
"*A hook called before parsing the headers."
(progn
(goto-char p)
(if (search-forward "\nsubject: " nil t)
- (nnheader-header-value) "(none)"))
+ ;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+ (funcall
+ gnus-unstructured-field-decoder (nnheader-header-value))
+ "(none)"))
;; From.
(progn
(goto-char p)
(if (search-forward "\nfrom: " nil t)
- (nnheader-header-value) "(nobody)"))
+ ;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+ (funcall
+ gnus-structured-field-decoder (nnheader-header-value))
+ "(nobody)"))
;; Date.
(progn
(goto-char p)
(setq header
(vector
number ; number
- (gnus-nov-field) ; subject
- (gnus-nov-field) ; from
+ ;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+ (funcall
+ gnus-unstructured-field-decoder (gnus-nov-field)) ; subject
+ (funcall
+ gnus-structured-field-decoder (gnus-nov-field)) ; from
(gnus-nov-field) ; date
(setq id (or (gnus-nov-field)
(nnheader-generate-fake-message-id))) ; id
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(require 'gnus-group)
(require 'gnus-start)
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus-util)
(require 'gnus)
;;; Code:
(require 'custom)
-(require 'cl)
+(eval-when-compile (require 'cl))
(require 'nnheader)
(require 'timezone)
(require 'message)
If N, return the Nth ancestor instead."
(when references
(let ((ids (inline (gnus-split-references references))))
- (car (last ids (or n 1))))))
+ (while (nthcdr (or n 1) ids)
+ (setq ids (cdr ids)))
+ (car ids))))
(defsubst gnus-buffer-live-p (buffer)
"Say whether BUFFER is alive or not."
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(require 'gnus-art)
(require 'message)
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'gnus)
(defgroup gnus-windows nil
(eval '(run-hooks 'gnus-load-hook))
+(eval-when-compile (require 'cl))
+
(require 'custom)
(require 'gnus-load)
(require 'message)
:link '(custom-manual "(gnus)Exiting Gnus")
:group 'gnus)
-(defconst gnus-version-number "5.4.66"
+(defconst gnus-version-number "5.4.67"
"Version number for this version of Gnus.")
(defconst gnus-version (format "Gnus v%s" gnus-version-number)
(kill-buffer (current-buffer))))))))
(defcustom gnus-select-method
- (ignore-errors
+ (condition-case nil
(nconc
- (list 'nntp (or (ignore-errors
- (gnus-getenv-nntpserver))
+ (list 'nntp (or (condition-case nil
+ (gnus-getenv-nntpserver)
+ (error nil))
(when (and gnus-default-nntp-server
(not (string= gnus-default-nntp-server "")))
gnus-default-nntp-server)
(if (or (null gnus-nntp-service)
(equal gnus-nntp-service "nntp"))
nil
- (list gnus-nntp-service))))
+ (list gnus-nntp-service)))
+ (error nil))
"Default method for selecting a newsgroup.
This variable should be a list, where the first element is how the
news is to be fetched, the second is the address.
;;; More various functions.
+(defsubst gnus-check-backend-function (func group)
+ "Check whether GROUP supports function FUNC.
+GROUP can either be a string (a group name) or a select method."
+ (ignore-errors
+ (let ((method (if (stringp group)
+ (car (gnus-find-method-for-group group))
+ group)))
+ (unless (featurep method)
+ (require method))
+ (fboundp (intern (format "%s-%s" method func))))))
+
(defun gnus-group-read-only-p (&optional group)
"Check whether GROUP supports editing or not.
If GROUP is nil, `gnus-newsgroup-name' will be checked instead. Note
(t
(gnus-server-add-address method)))))))
-(defsubst gnus-check-backend-function (func group)
- "Check whether GROUP supports function FUNC.
-GROUP can either be a string (a group name) or a select method."
- (ignore-errors
- (let ((method (if (stringp group)
- (car (gnus-find-method-for-group group))
- group)))
- (unless (featurep method)
- (require method))
- (fboundp (intern (format "%s-%s" method func))))))
-
(defun gnus-methods-using (feature)
"Find all methods that have FEATURE."
(let ((valids gnus-valid-select-methods)
;;; Code:
-(require 'cl)
+(eval-when-compile (require 'cl))
+
(require 'mailheader)
(require 'rmail)
(require 'nnheader)
:group 'message-sending
:type 'sexp)
-(ignore-errors
- (define-mail-user-agent 'message-user-agent
- 'message-mail 'message-send-and-exit
- 'message-kill-buffer 'message-send-hook))
+;; Ignore errors in case this is used in Emacs 19.
+;; Don't use ignore-errors because this is copied into loaddefs.el.
+;;;###autoload
+(condition-case nil
+ (define-mail-user-agent 'message-user-agent
+ 'message-mail 'message-send-and-exit
+ 'message-kill-buffer 'message-send-hook)
+ (error nil))
(defvar message-mh-deletable-headers '(Message-ID Date Lines Sender)
"If non-nil, delete the deletable headers before feeding to mh.")
(defvar gnus-read-active-file)
;;; Regexp matching the delimiter of messages in UNIX mail format
-;;; (UNIX From lines), minus the initial ^.
+;;; (UNIX From lines), minus the initial ^. It should be a copy
+;;; of rmail.el's rmail-unix-mail-delimiter.
(defvar message-unix-mail-delimiter
(let ((time-zone-regexp
(concat "\\([A-Z]?[A-Z]?[A-Z][A-Z]\\( DST\\)?"
(concat
"From "
- ;; Username, perhaps with a quoted section that can contain spaces.
- "\\("
- "[^ \n]*"
- "\\(\\|\".*\"[^ \n]*\\)"
- "\\|<[^<>\n]+>"
- "\\) ?"
+ ;; Many things can happen to an RFC 822 mailbox before it is put into
+ ;; a `From' line. The leading phrase can be stripped, e.g.
+ ;; `Joe <@w.x:joe@y.z>' -> `<@w.x:joe@y.z>'. The <> can be stripped, e.g.
+ ;; `<@x.y:joe@y.z>' -> `@x.y:joe@y.z'. Everything starting with a CRLF
+ ;; 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
+ ;; From: Joe User
+ ;; <joe@y.z>
+ ;; can yield `From Joe User Fri Mar 22 08:11:15 1996'.
+ ;; The mailbox can be removed or be replaced by white space, e.g.
+ ;; From: "Joe User"{space}{tab}
+ ;; <joe@y.z>
+ ;; can yield `From {space}{tab} Fri Mar 22 08:11:15 1996',
+ ;; where {space} and {tab} represent the Ascii space and tab characters.
+ ;; We want to match the results of any of these manglings.
+ ;; The following regexp rejects names whose first characters are
+ ;; obviously bogus, but after that anything goes.
+ "\\([^\0-\b\n-\r\^?].*\\)? "
;; The time the message was sent.
- "\\([^ \n]*\\) *" ; day of the week
- "\\([^ ]*\\) *" ; month
- "\\([0-9]*\\) *" ; day of month
- "\\([0-9:]*\\) *" ; time of day
+ "\\([^\0-\r \^?]+\\) +" ; day of the week
+ "\\([^\0-\r \^?]+\\) +" ; month
+ "\\([0-3]?[0-9]\\) +" ; day of month
+ "\\([0-2][0-9]:[0-5][0-9]\\(:[0-6][0-9]\\)?\\) *" ; time of day
;; Perhaps a time zone, specified by an abbreviation, or by a
;; numeric offset.
time-zone-regexp
;; The year.
- " [0-9][0-9]\\([0-9]*\\) *"
+ " \\([0-9][0-9]+\\) *"
;; On some systems the time zone can appear after the year, too.
time-zone-regexp
;; Old uucp cruft.
"\\(remote from .*\\)?"
- "\n")))
+ "\n"))
+ nil)
(defvar message-unsent-separator
(concat "^ *---+ +Unsent message follows +---+ *$\\|"
;; Remove empty lines in the header.
(save-restriction
(message-narrow-to-headers)
+ ;; Remove blank lines.
(while (re-search-forward "^[ \t]*\n" nil t)
- (replace-match "" t t)))
+ (replace-match "" t t))
- ;; Correct Newsgroups and Followup-To headers: change sequence of
- ;; spaces to comma and eliminate spaces around commas. Eliminate
- ;; embedded line breaks.
- (goto-char (point-min))
- (while (re-search-forward "^\\(Newsgroups\\|Followup-To\\): +" nil t)
- (save-restriction
- (narrow-to-region
- (point)
- (if (re-search-forward "^[^ \t]" nil t)
- (match-beginning 0)
- (forward-line 1)
- (point)))
- (goto-char (point-min))
- (while (re-search-forward "\n[ \t]+" nil t)
- (replace-match " " t t)) ;No line breaks (too confusing)
- (goto-char (point-min))
- (while (re-search-forward "[ \t\n]*,[ \t\n]*\\|[ \t]+" nil t)
- (replace-match "," t t))
- (goto-char (point-min))
- ;; Remove trailing commas.
- (when (re-search-forward ",+$" nil t)
- (replace-match "" t t)))))
+ ;; Correct Newsgroups and Followup-To headers: Change sequence of
+ ;; spaces to comma and eliminate spaces around commas. Eliminate
+ ;; embedded line breaks.
+ (goto-char (point-min))
+ (while (re-search-forward "^\\(Newsgroups\\|Followup-To\\): +" nil t)
+ (save-restriction
+ (narrow-to-region
+ (point)
+ (if (re-search-forward "^[^ \t]" nil t)
+ (match-beginning 0)
+ (forward-line 1)
+ (point)))
+ (goto-char (point-min))
+ (while (re-search-forward "\n[ \t]+" nil t)
+ (replace-match " " t t)) ;No line breaks (too confusing)
+ (goto-char (point-min))
+ (while (re-search-forward "[ \t\n]*,[ \t\n]*\\|[ \t]+" nil t)
+ (replace-match "," t t))
+ (goto-char (point-min))
+ ;; Remove trailing commas.
+ (when (re-search-forward ",+$" nil t)
+ (replace-match "" t t))))))
(defun message-make-date ()
"Make a valid data header."
;;; Help stuff.
(defun message-talkative-question (ask question show &rest text)
- "Call FUNCTION with argument QUESTION, displaying the rest of the arguments in a temporary buffer if SHOW.
+ "Call FUNCTION with argument QUESTION; optionally display TEXT... args.
+If SHOW is non-nil, the arguments TEXT... are displayed in a temp buffer.
The following arguments may contain lists of values."
(if (and show
(setq text (message-flatten-list text)))
If a function, the result from the function will be used instead.
If a form, the result from the form will be used instead.")
-;;;###autoload
+;; Deleted the autoload cookie because this crashes in loaddefs.el.
(defvar message-signature-file mail-signature-file
"*File containing the text inserted at end of message. buffer.")
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'nnheader)
(require 'nnmail)
(require 'nnoo)
(require 'gnus-util)
-(require 'cl)
(nnoo-declare nneething)
(deffoo nnfolder-request-list (&optional server)
(nnfolder-possibly-change-group nil server)
(save-excursion
- (nnmail-find-file nnfolder-active-file)
- (setq nnfolder-group-alist (nnmail-get-active))
+ ;; 1997/8/14 by MORIOKA Tomohiko
+ ;; for XEmacs/mule.
+ (let ((nnmail-file-coding-system nnmail-active-file-coding-system)
+ (pathname-coding-system 'binary)) ; for XEmacs/mule
+ (nnmail-find-file nnfolder-active-file)
+ (setq nnfolder-group-alist (nnmail-get-active)))
t))
(deffoo nnfolder-request-newgroups (date &optional server)
;; Change group.
(when (and group
(not (equal group nnfolder-current-group)))
- (nnmail-activate 'nnfolder)
- (when (and (not (assoc group nnfolder-group-alist))
- (not (file-exists-p
- (nnfolder-group-pathname group))))
- ;; The group doesn't exist, so we create a new entry for it.
- (push (list group (cons 1 0)) nnfolder-group-alist)
- (nnmail-save-active nnfolder-group-alist nnfolder-active-file))
-
- (if dont-check
- (setq nnfolder-current-group group
- nnfolder-current-buffer nil)
- (let (inf file)
- ;; If we have to change groups, see if we don't already have the
- ;; folder in memory. If we do, verify the modtime and destroy
- ;; the folder if needed so we can rescan it.
- (setq nnfolder-current-buffer
- (nth 1 (assoc group nnfolder-buffer-alist)))
-
- ;; If the buffer is not live, make sure it isn't in the alist. If it
- ;; is live, verify that nobody else has touched the file since last
- ;; time.
- (when (and nnfolder-current-buffer
- (not (gnus-buffer-live-p nnfolder-current-buffer)))
- (setq nnfolder-buffer-alist (delq inf nnfolder-buffer-alist)
- nnfolder-current-buffer nil))
-
- (setq nnfolder-current-group group)
-
- (when (or (not nnfolder-current-buffer)
- (not (verify-visited-file-modtime nnfolder-current-buffer)))
- (save-excursion
- (setq file (nnfolder-group-pathname group))
- ;; See whether we need to create the new file.
- (unless (file-exists-p file)
- (gnus-make-directory (file-name-directory file))
- (nnmail-write-region 1 1 file t 'nomesg))
- (when (setq nnfolder-current-buffer (nnfolder-read-folder group))
- (set-buffer nnfolder-current-buffer)
- (push (list group nnfolder-current-buffer)
- nnfolder-buffer-alist))))))))
+ (let ((pathname-coding-system 'binary))
+ (nnmail-activate 'nnfolder)
+ (when (and (not (assoc group nnfolder-group-alist))
+ (not (file-exists-p
+ (nnfolder-group-pathname group))))
+ ;; The group doesn't exist, so we create a new entry for it.
+ (push (list group (cons 1 0)) nnfolder-group-alist)
+ (nnmail-save-active nnfolder-group-alist nnfolder-active-file))
+
+ (if dont-check
+ (setq nnfolder-current-group group
+ nnfolder-current-buffer nil)
+ (let (inf file)
+ ;; If we have to change groups, see if we don't already have the
+ ;; folder in memory. If we do, verify the modtime and destroy
+ ;; the folder if needed so we can rescan it.
+ (setq nnfolder-current-buffer
+ (nth 1 (assoc group nnfolder-buffer-alist)))
+
+ ;; If the buffer is not live, make sure it isn't in the alist. If it
+ ;; is live, verify that nobody else has touched the file since last
+ ;; time.
+ (when (and nnfolder-current-buffer
+ (not (gnus-buffer-live-p nnfolder-current-buffer)))
+ (setq nnfolder-buffer-alist (delq inf nnfolder-buffer-alist)
+ nnfolder-current-buffer nil))
+
+ (setq nnfolder-current-group group)
+
+ (when (or (not nnfolder-current-buffer)
+ (not (verify-visited-file-modtime nnfolder-current-buffer)))
+ (save-excursion
+ (setq file (nnfolder-group-pathname group))
+ ;; See whether we need to create the new file.
+ (unless (file-exists-p file)
+ (gnus-make-directory (file-name-directory file))
+ (nnmail-write-region 1 1 file t 'nomesg))
+ (when (setq nnfolder-current-buffer (nnfolder-read-folder group))
+ (set-buffer nnfolder-current-buffer)
+ (push (list group nnfolder-current-buffer)
+ nnfolder-buffer-alist)))))))))
(defun nnfolder-save-mail (group-art-list)
"Called narrowed to an article."
(if oldgroup
(nnheader-message 5 "Refreshing group %s..." file)
(nnheader-message 5 "Adding group %s..." file))
- (setq nnfolder-group-alist (remove oldgroup nnfolder-group-alist))
+ (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)
(defun nnfolder-group-pathname (group)
"Make pathname for GROUP."
+ (setq group (gnus-encode-coding-string group nnmail-pathname-coding-system))
(let ((dir (file-name-as-directory (expand-file-name nnfolder-directory))))
;; If this file exists, we use it directly.
(if (or nnmail-use-long-file-names
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'mail-utils)
(defvar nnheader-max-head-length 4096
(or (not (numberp gnus-verbose-backends))
(<= level gnus-verbose-backends)))
+;; 1997/8/10 by MORIOKA Tomohiko
+(defvar nnheader-pathname-coding-system
+ 'iso-8859-1
+ "*Coding system for pathname.")
+
(defun nnheader-group-pathname (group dir &optional file)
"Make pathname for GROUP."
(concat
(if (file-directory-p (concat dir group))
(concat dir group "/")
;; If not, we translate dots into slashes.
- (concat dir (nnheader-replace-chars-in-string group ?. ?/) "/")))
+ (concat dir
+ (gnus-encode-coding-string
+ (nnheader-replace-chars-in-string group ?. ?/)
+ nnheader-pathname-coding-system)
+ "/")))
(cond ((null file) "")
((numberp file) (int-to-string file))
(t file))))
(when (string-match (car ange-ftp-path-format) path)
(ange-ftp-re-read-dir path)))))
+;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+(defvar nnheader-file-coding-system nil
+ "Coding system used in file backends of Gnus.")
+
(defun nnheader-insert-file-contents (filename &optional visit beg end replace)
"Like `insert-file-contents', q.v., but only reads in the file.
A buffer may be modified in several ways after reading into the buffer due
(let ((format-alist nil)
(auto-mode-alist (nnheader-auto-mode-alist))
(default-major-mode 'fundamental-mode)
- (after-insert-file-functions nil))
+ (after-insert-file-functions nil)
+ ;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+ (coding-system-for-read nnheader-file-coding-system))
(insert-file-contents filename visit beg end replace)))
(defun nnheader-find-file-noselect (&rest args)
(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)
+ ;; 1997/5/16 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+ (coding-system-for-read nnheader-file-coding-system))
(apply 'find-file-noselect args)))
(defun nnheader-auto-mode-alist ()
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'nnheader)
(require 'timezone)
(require 'message)
-(require 'cl)
(require 'custom)
(eval-and-compile
(defun nnmail-request-post (&optional server)
(mail-send-and-exit nil))
+;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+(defvar nnmail-file-coding-system nil
+ "Coding system used in nnmail.")
+
(defun nnmail-find-file (file)
"Insert FILE in server buffer safely."
(set-buffer nntp-server-buffer)
(let ((format-alist nil)
(after-insert-file-functions nil))
(condition-case ()
- (progn (insert-file-contents file) t)
+ ;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+ (let ((coding-system-for-read nnmail-file-coding-system)
+ ;; 1997/8/12 by MORIOKA Tomohiko
+ ;; for XEmacs/mule.
+ (pathname-coding-system 'binary))
+ (insert-file-contents file)
+ t)
(file-error nil))))
+;; 1997/8/10 by MORIOKA Tomohiko
+(defvar nnmail-pathname-coding-system
+ 'iso-8859-1
+ "*Coding system for pathname.")
+
(defun nnmail-group-pathname (group dir &optional file)
"Make pathname for GROUP."
(concat
(file-directory-p (concat dir group)))
(concat dir group "/")
;; If not, we translate dots into slashes.
- (concat dir (nnheader-replace-chars-in-string group ?. ?/) "/")))
+ (concat dir
+ (gnus-encode-coding-string
+ (nnheader-replace-chars-in-string group ?. ?/)
+ nnmail-pathname-coding-system)
+ "/")))
(or file "")))
(defun nnmail-date-to-time (date)
group-assoc)))
group-assoc))
+;; 1997/8/12 by MORIOKA Tomohiko
+(defvar nnmail-active-file-coding-system
+ 'iso-8859-1
+ "*Coding system for active file.")
+
(defun nnmail-save-active (group-assoc file-name)
"Save GROUP-ASSOC in ACTIVE-FILE."
- (when file-name
- (nnheader-temp-write file-name
- (nnmail-generate-active group-assoc))))
+ (let ((coding-system-for-write nnmail-active-file-coding-system))
+ (when file-name
+ (nnheader-temp-write file-name
+ (nnmail-generate-active group-assoc)))))
(defun nnmail-generate-active (alist)
"Generate an active file from group-alist ALIST."
(progn (forward-line 1) (point))))
(insert (format "Xref: %s" (system-name)))
(while group-alist
- (insert (format " %s:%d" (caar group-alist) (cdar group-alist)))
+ (insert (format " %s:%d"
+ (gnus-encode-coding-string (caar group-alist)
+ nnmail-pathname-coding-system)
+ (cdar group-alist)))
(setq group-alist (cdr group-alist)))
(insert "\n"))))
(defun nnmail-write-region (start end filename &optional append visit lockname)
"Do a `write-region', and then set the file modes."
- (write-region start end filename append visit lockname)
- (set-file-modes filename nnmail-default-file-modes))
+ ;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+ (let ((coding-system-for-write nnmail-file-coding-system)
+ ;; 1997/8/12 by MORIOKA Tomohiko
+ ;; for XEmacs/mule.
+ (pathname-coding-system 'binary))
+ (write-region start end filename append visit lockname)
+ (set-file-modes filename nnmail-default-file-modes)))
;;;
;;; Status functions
(require 'nnmail)
(require 'gnus-start)
(require 'nnoo)
-(require 'cl)
+(eval-when-compile (require 'cl))
(nnoo-declare nnmh)
(large (and (numberp nnmail-large-newsgroup)
(> number nnmail-large-newsgroup)))
(count 0)
+ ;; 1997/8/12 by MORIOKA Tomohiko
+ ;; for XEmacs/mule.
+ (pathname-coding-system 'binary)
beg article)
(nnmh-possibly-change-directory newsgroup server)
;; We don't support fetching by Message-ID.
(let ((file (if (stringp id)
nil
(concat nnmh-current-directory (int-to-string id))))
+ ;; 1997/8/12 by MORIOKA Tomohiko
+ ;; for XEmacs/mule.
+ (pathname-coding-system 'binary)
(nntp-server-buffer (or buffer nntp-server-buffer)))
(and (stringp file)
(file-exists-p file)
(deffoo nnmh-request-group (group &optional server dont-check)
(let ((pathname (nnmail-group-pathname group nnmh-directory))
+ ;; 1997/8/12 by MORIOKA Tomohiko
+ ;; for XEmacs/mule.
+ (pathname-coding-system 'binary)
dir)
(cond
((not (file-directory-p pathname))
(deffoo nnmh-request-list (&optional server dir)
(nnheader-insert "")
- (let ((nnmh-toplev
+ (let ((pathname-coding-system 'binary)
+ (nnmh-toplev
(file-truename (or dir (file-name-as-directory nnmh-directory)))))
(nnmh-request-list-1 nnmh-toplev))
(setq nnmh-group-alist (nnmail-get-active))
(expand-file-name nnmh-toplev))))
dir)
(nnheader-replace-chars-in-string
- (substring dir (match-end 0)) ?/ ?.))
+ (decode-coding-string (substring dir (match-end 0))
+ nnmail-pathname-coding-system)
+ ?/ ?.))
(apply 'max files)
(apply 'min files)))))))
t)
(not (nnmh-server-opened server)))
(nnmh-open-server server))
(when newsgroup
- (let ((pathname (nnmail-group-pathname newsgroup nnmh-directory)))
+ (let ((pathname (nnmail-group-pathname newsgroup nnmh-directory))
+ ;; 1997/8/12 by MORIOKA Tomohiko
+ ;; for XEmacs/mule.
+ (pathname-coding-system 'binary))
(if (file-directory-p pathname)
(setq nnmh-current-directory pathname)
(error "No such newsgroup: %s" newsgroup)))))
(defun nnmh-active-number (group)
"Compute the next article number in GROUP."
(let ((active (cadr (assoc group nnmh-group-alist)))
- (dir (nnmail-group-pathname group nnmh-directory)))
+ (dir (nnmail-group-pathname group nnmh-directory))
+ ;; 1997/8/14 by MORIOKA Tomohiko
+ ;; for XEmacs/mule.
+ (pathname-coding-system 'binary))
(unless active
;; The group wasn't known to nnmh, so we just create an active
;; entry for it.
(require 'nnheader)
(require 'nnmail)
(require 'nnoo)
-(require 'cl)
+(eval-when-compile (require 'cl))
(nnoo-declare nnml)
(let ((file nil)
(number (length sequence))
(count 0)
+ ;; 1997/8/12 by MORIOKA Tomohiko
+ ;; for XEmacs/mule.
+ (pathname-coding-system 'binary)
beg article)
(if (stringp (car sequence))
'headers
(deffoo nnml-request-article (id &optional group server buffer)
(nnml-possibly-change-directory group server)
(let* ((nntp-server-buffer (or buffer nntp-server-buffer))
+ ;; 1997/8/12 by MORIOKA Tomohiko
+ ;; for XEmacs/mule.
+ (pathname-coding-system 'binary)
path gpath group-num)
(if (stringp id)
(when (and (setq group-num (nnml-find-group-number id))
(string-to-int (file-name-nondirectory path)))))))
(deffoo nnml-request-group (group &optional server dont-check)
- (cond
- ((not (nnml-possibly-change-directory group server))
- (nnheader-report 'nnml "Invalid group (no such directory)"))
- ((not (file-exists-p nnml-current-directory))
- (nnheader-report 'nnml "Directory %s does not exist"
- nnml-current-directory))
- ((not (file-directory-p nnml-current-directory))
- (nnheader-report 'nnml "%s is not a directory" nnml-current-directory))
- (dont-check
- (nnheader-report 'nnml "Group %s selected" group)
- t)
- (t
- (nnheader-re-read-dir nnml-current-directory)
- (nnmail-activate 'nnml)
- (let ((active (nth 1 (assoc group nnml-group-alist))))
- (if (not active)
- (nnheader-report 'nnml "No such group: %s" group)
- (nnheader-report 'nnml "Selected group %s" group)
- (nnheader-insert "211 %d %d %d %s\n"
- (max (1+ (- (cdr active) (car active))) 0)
- (car active) (cdr active) group))))))
+ ;; 1997/8/12 by MORIOKA Tomohiko
+ ;; for XEmacs/mule.
+ (let ((pathname-coding-system 'binary))
+ (cond
+ ((not (nnml-possibly-change-directory group server))
+ (nnheader-report 'nnml "Invalid group (no such directory)"))
+ ((not (file-exists-p nnml-current-directory))
+ (nnheader-report 'nnml "Directory %s does not exist"
+ nnml-current-directory))
+ ((not (file-directory-p nnml-current-directory))
+ (nnheader-report 'nnml "%s is not a directory" nnml-current-directory))
+ (dont-check
+ (nnheader-report 'nnml "Group %s selected" group)
+ t)
+ (t
+ (nnheader-re-read-dir nnml-current-directory)
+ (nnmail-activate 'nnml)
+ (let ((active (nth 1 (assoc group nnml-group-alist))))
+ (if (not active)
+ (nnheader-report 'nnml "No such group: %s" group)
+ (nnheader-report 'nnml "Selected group %s" group)
+ (nnheader-insert "211 %d %d %d %s\n"
+ (max (1+ (- (cdr active) (car active))) 0)
+ (car active) (cdr active) group)))))))
(deffoo nnml-request-scan (&optional group server)
(setq nnml-article-file-alist nil)
(deffoo nnml-request-list (&optional server)
(save-excursion
- (nnmail-find-file nnml-active-file)
+ ;; 1997/8/12 by MORIOKA Tomohiko
+ ;; for XEmacs/mule.
+ (let ((nnmail-file-coding-system nnmail-active-file-coding-system)
+ (pathname-coding-system 'binary)) ; for XEmacs/mule
+ (nnmail-find-file nnml-active-file)
+ )
(setq nnml-group-alist (nnmail-get-active))
t))
(nnml-open-server server))
(if (not group)
t
- (let ((pathname (nnmail-group-pathname group nnml-directory)))
+ (let ((pathname (nnmail-group-pathname group nnml-directory))
+ ;; 1997/8/14 by MORIOKA Tomohiko
+ ;; for XEmacs/mule.
+ (pathname-coding-system 'binary))
(when (not (equal pathname nnml-current-directory))
(setq nnml-current-directory pathname
nnml-current-group group
;;; Code:
(require 'nnheader)
-(require 'cl)
+(eval-when-compile (require 'cl))
(defvar nnoo-definition-alist nil)
(defvar nnoo-state-alist nil)
(defvoo nnspool-rejected-article-hook nil
"*A hook that will be run when an article has been rejected by the server.")
+;; 1997/8/14 by MORIOKA Tomohiko
+(defvoo nnspool-file-coding-system nnheader-file-coding-system
+ "Coding system for nnspool.")
+
\f
(defconst nnspool-version "nnspool 2.0"
(default-directory nnspool-current-directory)
(do-message (and (numberp nnspool-large-newsgroup)
(> number nnspool-large-newsgroup)))
+ ;; 1997/8/14 by MORIOKA Tomohiko
+ ;; for Win32
+ (nnheader-file-coding-system nnspool-file-coding-system)
file beg article ag)
(if (and (numberp (car articles))
(nnspool-retrieve-headers-with-nov articles fetch-old))
(let ((nov (nnheader-group-pathname
nnspool-current-group nnspool-nov-directory ".overview"))
(arts articles)
+ ;; 1997/8/14 by MORIOKA Tomohiko
+ ;; for Win32
+ (nnheader-file-coding-system nnspool-file-coding-system)
last)
(if (not (file-exists-p nov))
()
(set-buffer nntp-server-buffer)
(erase-buffer)
(condition-case ()
- (progn (nnheader-insert-file-contents file) t)
+ ;; 1997/8/14 by MORIOKA Tomohiko
+ ;; for Win32
+ (let ((nnheader-file-coding-system nnspool-file-coding-system))
+ (nnheader-insert-file-contents file)
+ t)
(file-error nil)))
(defun nnspool-possibly-change-directory (group)
(defvoo nntp-warn-about-losing-connection t
"*If non-nil, beep when a server closes connection.")
+;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+(defvoo nntp-coding-system-for-read nil
+ "*coding-system for read from NNTP.")
+
\f
;;; Internal variables.
(let* ((pbuffer (nntp-make-process-buffer buffer))
(process
(condition-case ()
- (funcall nntp-open-connection-function pbuffer)
+ ;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
+ (let ((coding-system-for-read nntp-coding-system-for-read))
+ (funcall nntp-open-connection-function pbuffer))
(error nil)
(quit nil))))
(when process
"Merge many sorted lists of numbers."
(if (null (cdr lists))
(car lists)
- (apply 'nnvirtual-merge-sorted-lists
- (merge 'list (car lists) (cadr lists) '<)
- (cddr lists))))
-
+ (sort (apply 'nconc lists) '<)))
;;; We map between virtual articles and real articles in a manner
(setq entry (assoc (car article) carticles))
(setcdr entry (cons (cdr article) (cdr entry))))
(setq i (1+ i))))
- (mapc (lambda (x) (setcdr x (nreverse (cdr x))))
- carticles)
+ (mapcar (lambda (x) (setcdr x (nreverse (cdr x))))
+ carticles)
carticles))
gnus-article-mark-lists))
;; Remove any empty marks lists, and store.
- (setq nnvirtual-mapping-marks (delete-if-not 'cdr marks))
+ (setq nnvirtual-mapping-marks nil)
+ (while marks
+ (if (cdr (car marks))
+ (push (car marks) nnvirtual-mapping-marks))
+ (setq marks (cdr marks)))
;; We need to convert the unreads to reads. We compress the
;; sequence as we go, otherwise it could be huge.
;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'nnoo)
(require 'message)
(require 'gnus-util)
;;; Code:
-(require 'cl) ;and ah ain't kiddin' 'bout it
+(eval-when-compile (require 'cl)) ;and ah ain't kiddin' 'bout it
(put 'parse-time-syntax 'char-table-extra-slots 0)
"Timestamp returned when initially connected to the POP server.
Used for APOP authentication.")
+(defvar pop3-movemail-file-coding-system nil
+ "Crashbox made by pop3-movemail with this coding system.")
+
(defvar pop3-read-point nil)
(defvar pop3-debug nil)
(pop3-retr process n crashbuf)
(save-excursion
(set-buffer crashbuf)
- (append-to-file (point-min) (point-max) crashbox)
+ (let ((coding-system-for-write pop3-movemail-file-coding-system))
+ (append-to-file (point-min) (point-max) crashbox))
(set-buffer (process-buffer process))
(while (> (buffer-size) 5000)
(goto-char (point-min))
(pop3-quit process)))))
))
+(defvar pop3-md5-program "md5"
+ "*Program to encode its input in MD5.")
+
+(defun pop3-md5 (string)
+ (with-temp-buffer
+ (insert string)
+ (call-process-region (point-min) (point-max)
+ (or shell-file-name "/bin/sh")
+ t (current-buffer) nil
+ "-c" pop3-md5-program)
+ ;; The meaningful output is the first 32 characters.
+ ;; Don't return the newline that follows them!
+ (buffer-substring (point-min) (+ (point-min) 32))))
+
(defun pop3-apop (process user)
"Send alternate authentication information to the server."
- (if (not (fboundp 'md5)) (autoload 'md5 "md5"))
(let ((pass pop3-password))
(if (and pop3-password-required (not pass))
(setq pass
(pop3-read-passwd (format "Password for %s: " pop3-maildrop))))
(if pass
- (let ((hash (md5 (concat pop3-timestamp pass))))
+ (let ((hash (pop3-md5 (concat pop3-timestamp pass))))
(pop3-send-command process (format "APOP %s %s" user hash))
(let ((response (pop3-read-response process t)))
(if (not (and response (string-match "+OK" response)))
\input texinfo @c -*-texinfo-*-
@setfilename gnus
-@settitle Gnus 5.4.66 Manual
+@settitle Gnus 5.4.67 Manual
@synindex fn cp
@synindex vr cp
@synindex pg cp
@tex
@titlepage
-@title Gnus 5.4.66 Manual
+@title Gnus 5.4.67 Manual
@author by Lars Magne Ingebrigtsen
@page
spool or your mbox file. All at the same time, if you want to push your
luck.
-This manual corresponds to Gnus 5.4.66.
+This manual corresponds to Gnus 5.4.67.
@end ifinfo
\input texinfo @c -*-texinfo-*-
@setfilename message
-@settitle Message 5.4.66 Manual
+@settitle Message 5.4.67 Manual
@synindex fn cp
@synindex vr cp
@synindex pg cp
@tex
@titlepage
-@title Message 5.4.66 Manual
+@title Message 5.4.67 Manual
@author by Lars Magne Ingebrigtsen
@page
* Key Index:: List of Message mode keys.
@end menu
-This manual corresponds to Message 5.4.66. Message is distributed with
+This manual corresponds to Message 5.4.67. Message is distributed with
the Gnus distribution bearing the same version number as this manual
has.