(static-cond
((fboundp 'point-at-bol)
- (fset 'gnus-point-at-bol 'point-at-bol))
+ (defalias 'gnus-point-at-bol 'point-at-bol))
((fboundp 'line-beginning-position)
- (fset 'gnus-point-at-bol 'line-beginning-position))
+ (defalias 'gnus-point-at-bol 'line-beginning-position))
(t
(defun gnus-point-at-bol ()
"Return point at the beginning of the line."
))
(static-cond
((fboundp 'point-at-eol)
- (fset 'gnus-point-at-eol 'point-at-eol))
+ (defalias 'gnus-point-at-eol 'point-at-eol))
((fboundp 'line-end-position)
- (fset 'gnus-point-at-eol 'line-end-position))
+ (defalias 'gnus-point-at-eol 'line-end-position))
(t
(defun gnus-point-at-eol ()
"Return point at the end of the line."
"Write the current buffer's contents to FILE."
;; Make sure the directory exists.
(gnus-make-directory (file-name-directory file))
- ;; Write the buffer.
- (write-region (point-min) (point-max) file nil 'quietly))
+ (let ((file-name-coding-system nnmail-pathname-coding-system)
+ (pathname-coding-system nnmail-pathname-coding-system))
+ ;; Write the buffer.
+ (write-region (point-min) (point-max) file nil 'quietly)))
(defun gnus-write-buffer-as-binary (file)
"Write the current buffer's contents to FILE without code conversion."
(set-buffer file-buffer)
(rmail-insert-rmail-file-header)
(let ((require-final-newline nil))
- (gnus-write-buffer filename)))
+ (gnus-write-buffer-as-coding-system
+ nnheader-text-coding-system filename)))
(kill-buffer file-buffer))
(error "Output file does not exist")))
(set-buffer tmpbuf)
(save-excursion
(set-buffer file-buffer)
(let ((require-final-newline nil))
- (gnus-write-buffer-as-binary filename)))
+ (gnus-write-buffer-as-coding-system
+ nnheader-text-coding-system filename)))
(kill-buffer file-buffer))
(error "Output file does not exist")))
(set-buffer tmpbuf)
(forward-line 1))
(nreverse result)))))
-(defun gnus-netrc-machine (list machine &optional port)
- "Return the netrc values from LIST for MACHINE or for the default entry."
+(defun gnus-netrc-machine (list machine &optional port defaultport)
+ "Return the netrc values from LIST for MACHINE or for the default entry.
+If PORT specified, only return entries with matching port tokens.
+Entries without port tokens default to DEFAULTPORT."
(let ((rest list)
result)
(while list
(when result
(setq result (nreverse result))
(while (and result
- (not (equal (or port "nntp")
+ (not (equal (or port defaultport "nntp")
(or (gnus-netrc-get (car result) "port")
- "nntp"))))
+ defaultport "nntp"))))
(pop result))
(car result))))
(throw 'found nil)))
t))
-(defun gnus-write-active-file-as-coding-system (coding-system file hashtb
- &optional
- full-names)
- (let ((output-coding-system coding-system)
- (coding-system-for-write coding-system))
+(defun gnus-write-active-file (file hashtb &optional full-names)
+ (let ((output-coding-system nnmail-active-file-coding-system)
+ (coding-system-for-write nnmail-active-file-coding-system))
(with-temp-file file
(mapatoms
(lambda (sym)