From 67a3d12ddf2d1eb7f343396fc06d438fc8eb3b1f Mon Sep 17 00:00:00 2001 From: yamaoka Date: Mon, 14 Dec 1998 07:25:26 +0000 Subject: [PATCH] * nnheader.el (nnheader-find-file-noselect): Call `find-file-noselect-as-coding-system' with CODING-SYSTEM as the 1st arg. * nnmail.el (nnmail-find-file): Call `insert-file-contents-as-coding-system' with CODING-SYSTEM as the 1st arg. * nnheader.el (nnheader-insert-file-contents): Likewise. * gnus-start.el (gnus-save-newsrc-file): Call `write-region-as-coding-system' with CODING-SYSTEM as the 1st arg. (gnus-read-newsrc-el-file): Call `insert-file-contents-as-coding-system' with CODING-SYSTEM as the 1st arg. * gnus-cache.el (gnus-cache-save-buffers): Call `gnus-write-buffer-as-coding-system' with CODING-SYSTEM as the 1st arg. * gnus-util.el (gnus-write-buffer-as-coding-system): Be CODING-SYSTEM the 1st arg. * nnmail.el (nnmail-write-region): Call `write-region-as-coding-system' with CODING-SYSTEM as the 1st arg. * gnus-start.el (gnus-save-newsrc-file): Likewise. * gnus-agent.el (gnus-agent-expire): Likewise. (gnus-agent-fetch-headers): Likewise. (gnus-agent-flush-cache): Likewise. (gnus-agent-fetch-articles): Likewise. (gnus-agent-save-history): Likewise. (gnus-agent-save-groups): Likewise. (gnus-agent-save-active): Likewise. --- lisp/gnus-agent.el | 25 ++++++++++++------------- lisp/gnus-cache.el | 2 +- lisp/gnus-start.el | 6 +++--- lisp/gnus-util.el | 4 ++-- lisp/nnheader.el | 4 ++-- lisp/nnmail.el | 4 ++-- 6 files changed, 22 insertions(+), 23 deletions(-) diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 8a1492b..d37bd7b 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -518,8 +518,7 @@ the actual number of articles toggled is returned." (file (gnus-agent-lib-file "active"))) (gnus-make-directory (file-name-directory file)) (write-region-as-coding-system - (point-min) (point-max) file gnus-agent-file-coding-system - nil 'silent) + gnus-agent-file-coding-system (point-min) (point-max) file nil 'silent) (when (file-exists-p (gnus-agent-lib-file "groups")) (delete-file (gnus-agent-lib-file "groups")))))) @@ -528,8 +527,7 @@ the actual number of articles toggled is returned." (file (gnus-agent-lib-file "groups"))) (gnus-make-directory (file-name-directory file)) (write-region-as-coding-system - (point-min) (point-max) file gnus-agent-file-coding-system - nil 'silent) + gnus-agent-file-coding-system (point-min) (point-max) file nil 'silent) (when (file-exists-p (gnus-agent-lib-file "active")) (delete-file (gnus-agent-lib-file "active"))))) @@ -601,8 +599,8 @@ the actual number of articles toggled is returned." (set-buffer gnus-agent-current-history) (gnus-make-directory (file-name-directory gnus-agent-file-name)) (write-region-as-coding-system - (1+ (point-min)) (point-max) gnus-agent-file-name - gnus-agent-file-coding-system nil 'silent))) + gnus-agent-file-coding-system + (1+ (point-min)) (point-max) gnus-agent-file-name nil 'silent))) (defun gnus-agent-close-history () (when (gnus-buffer-live-p gnus-agent-current-history) @@ -700,9 +698,9 @@ the actual number of articles toggled is returned." (setq id "No-Message-ID-in-article") (setq id (buffer-substring (match-beginning 1) (match-end 1)))) (write-region-as-coding-system + gnus-agent-file-coding-system (point-min) (point-max) - (concat dir (number-to-string (caar pos))) - gnus-agent-file-coding-system nil 'silent) + (concat dir (number-to-string (caar pos))) nil 'silent) (when (setq elem (assq (caar pos) gnus-agent-article-alist)) (setcdr elem t)) (gnus-agent-enter-history @@ -743,10 +741,11 @@ the actual number of articles toggled is returned." (while gnus-agent-buffer-alist (set-buffer (cdar gnus-agent-buffer-alist)) (write-region-as-coding-system + gnus-agent-file-coding-system (point-min) (point-max) (gnus-agent-article-name ".overview" (caar gnus-agent-buffer-alist)) - gnus-agent-file-coding-system nil 'silent) + nil 'silent) (pop gnus-agent-buffer-alist)) (while gnus-agent-group-alist (nnheader-temp-write (caar gnus-agent-group-alist) @@ -778,8 +777,8 @@ the actual number of articles toggled is returned." (gnus-make-directory (nnheader-translate-file-chars (file-name-directory file))) (write-region-as-coding-system - (point-min) (point-max) file gnus-agent-file-coding-system - nil 'silent) + gnus-agent-file-coding-system + (point-min) (point-max) file nil 'silent) (gnus-agent-save-alist group articles nil) (gnus-agent-enter-history "last-header-fetched-for-session" @@ -1350,8 +1349,8 @@ The following commands are available: (push (cdr elem) histories))) (gnus-make-directory (file-name-directory nov-file)) (write-region-as-coding-system - (point-min) (point-max) nov-file gnus-agent-file-coding-system - nil 'silent) + gnus-agent-file-coding-system + (point-min) (point-max) nov-file nil 'silent) ;; Delete the unwanted entries in the alist. (setq gnus-agent-article-alist (sort gnus-agent-article-alist 'car-less-than-car)) diff --git a/lisp/gnus-cache.el b/lisp/gnus-cache.el index 8f99f93..7f48584 100644 --- a/lisp/gnus-cache.el +++ b/lisp/gnus-cache.el @@ -125,7 +125,7 @@ it's not cached." (if (> (buffer-size) 0) ;; Non-empty overview, write it to a file. (gnus-write-buffer-as-coding-system - overview-file gnus-cache-overview-coding-system) + gnus-cache-overview-coding-system overview-file) ;; Empty overview file, remove it (when (file-exists-p overview-file) (delete-file overview-file)) diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 0d270d6..377e264 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -1919,7 +1919,7 @@ If FORCE is non-nil, the .newsrc file is read." (condition-case nil (with-temp-buffer (insert-file-contents-as-coding-system - ding-file gnus-startup-file-coding-system) + gnus-startup-file-coding-system ding-file) (eval-region (point-min) (point-max))) (error (ding) @@ -2282,8 +2282,8 @@ If FORCE is non-nil, the .newsrc file is read." (gnus-gnus-to-quick-newsrc-format) (gnus-run-hooks 'gnus-save-quick-newsrc-hook) (write-region-as-coding-system - (point-min) (point-max) (buffer-file-name) - gnus-startup-file-coding-system) + gnus-startup-file-coding-system + (point-min) (point-max) (buffer-file-name)) (set-buffer-modified-p nil) (kill-buffer (current-buffer)) (gnus-message diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 28c973b..cba9137 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -617,13 +617,13 @@ Bind `print-quoted' and `print-readably' to t while printing." ;; Write the buffer. (write-region-as-binary (point-min) (point-max) file nil 'quietly)) -(defun gnus-write-buffer-as-coding-system (file coding-system) +(defun gnus-write-buffer-as-coding-system (coding-system file) "Write the current buffer's contents to FILE with code conversion." ;; Make sure the directory exists. (gnus-make-directory (file-name-directory file)) ;; Write the buffer. (write-region-as-coding-system - (point-min) (point-max) file coding-system nil 'quietly)) + coding-system (point-min) (point-max) file nil 'quietly)) (defun gnus-delete-file (file) "Delete FILE if it exists." diff --git a/lisp/nnheader.el b/lisp/nnheader.el index 1943fe7..43e3147 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -778,7 +778,7 @@ find-file-hooks, etc. (after-insert-file-functions nil) (find-file-hooks nil)) (insert-file-contents-as-coding-system - filename nnheader-file-coding-system visit beg end replace))) + nnheader-file-coding-system filename visit beg end replace))) (defun nnheader-find-file-noselect (&rest args) (let ((format-alist nil) @@ -788,7 +788,7 @@ find-file-hooks, etc. (after-insert-file-functions nil) (find-file-hooks nil)) (apply 'find-file-noselect-as-coding-system - (car args) nnheader-file-coding-system (cdr args)))) + nnheader-file-coding-system args))) (defun nnheader-auto-mode-alist () "Return an `auto-mode-alist' with only the .gz (etc) thingies." diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 21f761c..b6f3ac8 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -525,7 +525,7 @@ If this variable is `t', do not use password cache.") (condition-case () (let ((pathname-coding-system 'binary)) (insert-file-contents-as-coding-system - file nnmail-file-coding-system) + nnmail-file-coding-system file) t) (file-error nil)))) @@ -1754,7 +1754,7 @@ If ARGS, PROMPT is used as an argument to `format'." "Do a `write-region', and then set the file modes." (let ((pathname-coding-system 'binary)) (write-region-as-coding-system - start end filename nnmail-file-coding-system append visit lockname) + nnmail-file-coding-system start end filename append visit lockname) (set-file-modes filename nnmail-default-file-modes))) ;;; -- 1.7.10.4