X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fgnus-util.el;h=8de7434739e4db0c340f0dbbcd207ea74323c0c1;hb=0d50b54bd30078817098fcbc198a3092b32e3e45;hp=ee18c66614fa7b102dadbd64bdbc40f8a6206cb1;hpb=d5b2595c76252736d89e6f20bf87b3905d582a75;p=elisp%2Fgnus.git- diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index ee18c66..8de7434 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -733,7 +733,7 @@ with potentially long computations." ;; Decide whether to append to a file or to an Emacs buffer. (let ((outbuf (get-file-buffer filename))) (if (not outbuf) - (append-to-file (point-min) (point-max) filename) + (write-region-as-binary (point-min) (point-max) filename 'append) ;; File has been visited, in buffer OUTBUF. (set-buffer outbuf) (let ((buffer-read-only nil) @@ -986,7 +986,8 @@ ARG is passed to the first function." t)) (static-if (boundp 'MULE) - (defun gnus-write-active-file-as-coding-system (coding-system file hashtb) + (defun gnus-write-active-file-as-coding-system + (coding-system file hashtb &optional full-names) (let ((output-coding-system coding-system)) (with-temp-file file (mapatoms @@ -995,11 +996,15 @@ ARG is passed to the first function." (boundp sym) (symbol-value sym)) (insert (format "%s %d %d y\n" - (gnus-group-real-name (symbol-name sym)) - (cdr (symbol-value sym)) + (if full-names + (symbol-name sym) + (gnus-group-real-name (symbol-name sym))) + (or (cdr (symbol-value sym)) + (car (symbol-value sym))) (car (symbol-value sym)))))) hashtb)))) - (defun gnus-write-active-file-as-coding-system (coding-system file hashtb) + (defun gnus-write-active-file-as-coding-system + (coding-system file hashtb &optional full-names) (let ((coding-system-for-write coding-system)) (with-temp-file file (mapatoms @@ -1008,8 +1013,11 @@ ARG is passed to the first function." (boundp sym) (symbol-value sym)) (insert (format "%s %d %d y\n" - (gnus-group-real-name (symbol-name sym)) - (cdr (symbol-value sym)) + (if full-names + (symbol-name sym) + (gnus-group-real-name (symbol-name sym))) + (or (cdr (symbol-value sym)) + (car (symbol-value sym))) (car (symbol-value sym)))))) hashtb)))) )