* nnheader.el (nnheader-find-file-noselect): Use
authoryamaoka <yamaoka>
Mon, 14 Dec 1998 02:04:18 +0000 (02:04 +0000)
committeryamaoka <yamaoka>
Mon, 14 Dec 1998 02:04:18 +0000 (02:04 +0000)
`find-file-noselect-as-coding-system' (renamed from
`find-file-noselect-as-specified-coding-system').

* nnmail.el (nnmail-find-file): Use `insert-file-contents-as-coding-system'
(renamed from `insert-file-contents-as-specified-coding-system').
* nnheader.el (nnheader-insert-file-contents): Likewise.

* gnus-start.el (gnus-save-newsrc-file): Use `write-region-as-coding-system'
(renamed from `write-region-as-specified-coding-system').
(gnus-read-newsrc-el-file): Use `insert-file-contents-as-coding-system'
(renamed from `insert-file-contents-as-specified-coding-system').

* gnus-cache.el (gnus-cache-save-buffers): Use
`gnus-write-buffer-as-coding-system' (renamed from
`gnus-write-buffer-as-specified-coding-system').

* gnus-util.el (gnus-write-buffer-as-coding-system): Renamed from
`gnus-write-buffer-as-specified-coding-system'.

* nnmail.el (nnmail-write-region): Use `write-region-as-coding-system'
(renamed from `write-region-as-specified-coding-system').
* 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
lisp/gnus-cache.el
lisp/gnus-start.el
lisp/gnus-util.el
lisp/nnheader.el
lisp/nnmail.el

index c0894fa..8a1492b 100644 (file)
@@ -517,9 +517,9 @@ the actual number of articles toggled is returned."
     (let* ((gnus-command-method method)
           (file (gnus-agent-lib-file "active")))
       (gnus-make-directory (file-name-directory file))
-      (write-region-as-specified-coding-system
-       (point-min) (point-max) file nil 'silent
-       gnus-agent-file-coding-system)
+      (write-region-as-coding-system
+       (point-min) (point-max) file gnus-agent-file-coding-system
+       nil 'silent)
       (when (file-exists-p (gnus-agent-lib-file "groups"))
        (delete-file (gnus-agent-lib-file "groups"))))))
 
@@ -527,9 +527,9 @@ the actual number of articles toggled is returned."
   (let* ((gnus-command-method method)
         (file (gnus-agent-lib-file "groups")))
     (gnus-make-directory (file-name-directory file))
-    (write-region-as-specified-coding-system
-     (point-min) (point-max) file nil 'silent
-     gnus-agent-file-coding-system)
+    (write-region-as-coding-system
+     (point-min) (point-max) file gnus-agent-file-coding-system
+     nil 'silent)
     (when (file-exists-p (gnus-agent-lib-file "active"))
       (delete-file (gnus-agent-lib-file "active")))))
 
@@ -600,9 +600,9 @@ the actual number of articles toggled is returned."
   (save-excursion
     (set-buffer gnus-agent-current-history)
     (gnus-make-directory (file-name-directory gnus-agent-file-name))
-    (write-region-as-specified-coding-system
-     (1+ (point-min)) (point-max) gnus-agent-file-name nil 'silent
-     gnus-agent-file-coding-system)))
+    (write-region-as-coding-system
+     (1+ (point-min)) (point-max) gnus-agent-file-name
+     gnus-agent-file-coding-system nil 'silent)))
 
 (defun gnus-agent-close-history ()
   (when (gnus-buffer-live-p gnus-agent-current-history)
@@ -699,10 +699,10 @@ the actual number of articles toggled is returned."
            (if (not (re-search-forward "^Message-ID: *<\\([^>\n]+\\)>" nil t))
                (setq id "No-Message-ID-in-article")
              (setq id (buffer-substring (match-beginning 1) (match-end 1))))
-           (write-region-as-specified-coding-system
+           (write-region-as-coding-system
             (point-min) (point-max)
-            (concat dir (number-to-string (caar pos))) nil 'silent
-            gnus-agent-file-coding-system)
+            (concat dir (number-to-string (caar pos)))
+            gnus-agent-file-coding-system nil 'silent)
            (when (setq elem (assq (caar pos) gnus-agent-article-alist))
              (setcdr elem t))
            (gnus-agent-enter-history
@@ -742,11 +742,11 @@ the actual number of articles toggled is returned."
   (save-excursion
     (while gnus-agent-buffer-alist
       (set-buffer (cdar gnus-agent-buffer-alist))
-      (write-region-as-specified-coding-system
+      (write-region-as-coding-system
        (point-min) (point-max)
        (gnus-agent-article-name ".overview"
                                (caar gnus-agent-buffer-alist))
-       nil 'silent gnus-agent-file-coding-system)
+       gnus-agent-file-coding-system nil 'silent)
       (pop gnus-agent-buffer-alist))
     (while gnus-agent-group-alist
       (nnheader-temp-write (caar gnus-agent-group-alist)
@@ -777,9 +777,9 @@ the actual number of articles toggled is returned."
            (gnus-agent-braid-nov group articles file))
          (gnus-make-directory (nnheader-translate-file-chars
                                (file-name-directory file)))
-         (write-region-as-specified-coding-system
-          (point-min) (point-max) file nil 'silent
-          gnus-agent-file-coding-system)
+         (write-region-as-coding-system
+          (point-min) (point-max) file gnus-agent-file-coding-system
+          nil 'silent)
          (gnus-agent-save-alist group articles nil)
          (gnus-agent-enter-history
           "last-header-fetched-for-session"
@@ -1349,9 +1349,9 @@ The following commands are available:
                 ;; Schedule the history line for nuking.
                 (push (cdr elem) histories)))
             (gnus-make-directory (file-name-directory nov-file))
-            (write-region-as-specified-coding-system
-             (point-min) (point-max) nov-file nil 'silent
-             gnus-agent-file-coding-system)
+            (write-region-as-coding-system
+             (point-min) (point-max) nov-file gnus-agent-file-coding-system
+             nil 'silent)
             ;; Delete the unwanted entries in the alist.
             (setq gnus-agent-article-alist
                   (sort gnus-agent-article-alist 'car-less-than-car))
index 6a996b8..b259118 100644 (file)
@@ -124,7 +124,7 @@ it's not cached."
          (set-buffer buffer)
          (if (> (buffer-size) 0)
              ;; Non-empty overview, write it to a file.
-             (gnus-write-buffer-as-specified-coding-system
+             (gnus-write-buffer-as-coding-system
               overview-file gnus-cache-overview-coding-system)
            ;; Empty overview file, remove it
            (when (file-exists-p overview-file)
index 363682f..0d270d6 100644 (file)
@@ -1918,7 +1918,7 @@ If FORCE is non-nil, the .newsrc file is read."
     (let (gnus-newsrc-assoc)
       (condition-case nil
          (with-temp-buffer
-           (insert-file-contents-as-specified-coding-system
+           (insert-file-contents-as-coding-system
             ding-file gnus-startup-file-coding-system)
            (eval-region (point-min) (point-max)))
        (error
@@ -2281,7 +2281,7 @@ If FORCE is non-nil, the .newsrc file is read."
          (gnus-message 5 "Saving %s.eld..." gnus-current-startup-file)
          (gnus-gnus-to-quick-newsrc-format)
          (gnus-run-hooks 'gnus-save-quick-newsrc-hook)
-         (write-region-as-specified-coding-system
+         (write-region-as-coding-system
           (point-min) (point-max) (buffer-file-name)
           gnus-startup-file-coding-system)
          (set-buffer-modified-p nil)
index 1e2dd18..28c973b 100644 (file)
@@ -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-specified-coding-system (file coding-system)
+(defun gnus-write-buffer-as-coding-system (file coding-system)
   "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-specified-coding-system
-   (point-min) (point-max) file nil 'quietly coding-system))
+  (write-region-as-coding-system
+   (point-min) (point-max) file coding-system nil 'quietly))
 
 (defun gnus-delete-file (file)
   "Delete FILE if it exists."
index b0b6f70..9861b9e 100644 (file)
@@ -775,8 +775,8 @@ find-file-hooks, etc.
        (enable-local-variables nil)
        (after-insert-file-functions nil)
        (find-file-hooks nil))
-    (insert-file-contents-as-specified-coding-system
-     filename visit beg end replace nnheader-file-coding-system)))
+    (insert-file-contents-as-coding-system
+     filename nnheader-file-coding-system visit beg end replace)))
 
 (defun nnheader-find-file-noselect (&rest args)
   (let ((format-alist nil)
@@ -785,8 +785,8 @@ find-file-hooks, etc.
        (enable-local-variables nil)
        (after-insert-file-functions nil)
        (find-file-hooks nil))
-    (find-file-noselect-as-specified-coding-system
-     (car args) (append (cdr args) (list nnheader-file-coding-system)))))
+    (apply 'find-file-noselect-as-coding-system
+          (car args) nnheader-file-coding-system (cdr args))))
 
 (defun nnheader-auto-mode-alist ()
   "Return an `auto-mode-alist' with only the .gz (etc) thingies."
index 77f39f6..99e742d 100644 (file)
@@ -494,7 +494,7 @@ parameter.  It should return nil, `warn' or `delete'."
         (after-insert-file-functions nil))
     (condition-case ()
        (let ((pathname-coding-system 'binary))
-         (insert-file-contents-as-specified-coding-system
+         (insert-file-contents-as-coding-system
           file nnmail-file-coding-system)
          t)
       (file-error nil))))
@@ -1704,8 +1704,8 @@ If ARGS, PROMPT is used as an argument to `format'."
 (defun nnmail-write-region (start end filename &optional append visit lockname)
   "Do a `write-region', and then set the file modes."
   (let ((pathname-coding-system 'binary))
-    (write-region-as-specified-coding-system
-     start end filename append visit lockname nnmail-file-coding-system)
+    (write-region-as-coding-system
+     start end filename nnmail-file-coding-system append visit lockname)
     (set-file-modes filename nnmail-default-file-modes)))
 
 ;;;