+Tue Sep 8 22:38:27 1998 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
+
+ * gnus.el: Pterodactyl Gnus v0.22 is released.
+
+1998-09-08 22:36:54 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * mm-util.el (mm-multibyte-p): Typo.
+
+Tue Sep 8 22:25:53 1998 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
+
+ * gnus.el: Pterodactyl Gnus v0.21 is released.
+
+1998-09-08 Hrvoje Niksic <hniksic@srce.hr>
+
+ * gnus-art.el (article-treat-dumbquotes): Handle \224 correctly.
+
+1998-09-08 22:18:03 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * mm-util.el (mm-multibyte-p): New function.
+
+Tue Sep 8 21:43:03 1998 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
+
+ * gnus.el: Pterodactyl Gnus v0.20 is released.
+
+1998-09-08 11:40:45 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * rfc2047.el (rfc2047-decode-region): Only decode when in
+ multibyte.
+
+ * nnheader.el (nnheader-pathname-coding-system): Changed to binary.
+
+ * gnus-int.el (gnus-request-replace-article): Encode.
+ (gnus-request-accept-article): Encode.
+
+ * gnus-art.el (gnus-request-article-this-buffer): Decode charsets
+ here.
+
+ * gnus.el (gnus-article-display-hook): Take the charset functions
+ out.
+
+ * time-date.el (safe-date-to-time): New function.
+
+ * gnus-util.el (gnus-dd-mmm): Protect against bogus dates.
+
Tue Sep 8 07:09:28 1998 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
* gnus.el: Pterodactyl Gnus v0.19 is released.
(item :tag "skip" nil)
(face :value default)))))
+(defcustom gnus-article-decode-hook
+ '(gnus-article-decode-charset gnus-article-decode-rfc1522)
+ "*Hook run to decode charsets in articles.")
+
;;; Internal variables
(defvar article-lapsed-timer nil)
(defun article-treat-dumbquotes ()
"Translate M******** sm*rtq**t*s into proper text."
(interactive)
- (article-translate-characters "\221\222\223\223" "`'\"\""))
+ (article-translate-characters "\221\222\223\224" "`'\"\""))
(defun article-translate-characters (from to)
"Translate all characters in the body of the article according to FROM and TO.
(insert-buffer-substring gnus-article-buffer))
(setq gnus-original-article (cons group article))))
+ ;; Decode charsets.
+ (run-hooks 'gnus-article-decode-hook)
+
;; Update sparse articles.
(when (and do-update-line
(or (numberp article)
(goto-char (point-max))
(unless (bolp)
(insert "\n"))
+ (save-restriction
+ (message-narrow-to-headers)
+ (rfc2047-encode-message-header))
+ (message-encode-message-body)
(let ((func (car (or gnus-command-method
(gnus-find-method-for-group group)))))
(funcall (intern (format "%s-request-accept-article" func))
last)))
(defun gnus-request-replace-article (article group buffer)
+ (save-restriction
+ (message-narrow-to-headers)
+ (rfc2047-encode-message-header))
+ (message-encode-message-body)
(let ((func (car (gnus-group-name-to-method group))))
(funcall (intern (format "%s-request-replace-article" func))
article (gnus-group-real-name group) buffer)))
(fboundp 'gnus-mule-get-coding-system)
(gnus-mule-get-coding-system (symbol-name group)))))
(when coding
- (setq str (nnheader-decode-coding-string str (car coding))))
+ (setq str (mm-decode-coding-string str (car coding))))
(set group str)))
(forward-line 1))))
(gnus-message 5 "Reading descriptions file...done")
(defun gnus-dd-mmm (messy-date)
"Return a string like DD-MMM from a big messy string."
- (format-time-string "%2d-%b" (date-to-time messy-date)))
+ (format-time-string "%2d-%b" (safe-date-to-time messy-date)))
(defmacro gnus-date-get-time (date)
"Convert DATE string to Emacs time.
:link '(custom-manual "(gnus)Exiting Gnus")
:group 'gnus)
-(defconst gnus-version-number "0.19"
+(defconst gnus-version-number "0.22"
"Version number for this version of Gnus.")
(defconst gnus-version (format "Pterodactyl Gnus v%s" gnus-version-number)
(defcustom gnus-article-display-hook
(if (and (string-match "XEmacs" emacs-version)
(featurep 'xface))
- '(gnus-article-decode-charset
- gnus-article-decode-rfc1522
- gnus-article-hide-headers-if-wanted
+ '(gnus-article-hide-headers-if-wanted
gnus-article-hide-boring-headers
gnus-article-treat-overstrike
gnus-article-maybe-highlight
gnus-article-display-x-face)
- '(gnus-article-decode-charset
- gnus-article-decode-rfc1522
- gnus-article-hide-headers-if-wanted
+ '(gnus-article-hide-headers-if-wanted
gnus-article-hide-boring-headers
gnus-article-treat-overstrike
gnus-article-maybe-highlight))
(point-min) (point-max)))))
(mm-mule-charset-to-mime-charset charset)))
+(defun mm-multibyte-p ()
+ "Say whether multibyte is enabled."
+ (and (boundp 'enable-multibyte-characters)
+ enable-multibyte-characters))
+
(provide 'mm-util)
;;; mm-util.el ends here
(defun nnfolder-group-pathname (group)
"Make pathname for GROUP."
(setq group
- (nnheader-encode-coding-string group nnmail-pathname-coding-system))
+ (mm-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
(eval-when-compile (require 'cl))
(require 'mail-utils)
+(require 'mm-util)
(defvar nnheader-max-head-length 4096
"*Max length of the head of articles.")
(or (not (numberp gnus-verbose-backends))
(<= level gnus-verbose-backends)))
-(defvar nnheader-pathname-coding-system 'iso-8859-1
+(defvar nnheader-pathname-coding-system 'binary
"*Coding system for pathname.")
(defun nnheader-group-pathname (group dir &optional file)
(concat dir group "/")
;; If not, we translate dots into slashes.
(concat dir
- (nnheader-encode-coding-string
+ (mm-encode-coding-string
(nnheader-replace-chars-in-string group ?. ?/)
nnheader-pathname-coding-system)
"/")))
(fset 'nnheader-cancel-timer 'cancel-timer)
(fset 'nnheader-cancel-function-timers 'cancel-function-timers)
-(if (fboundp 'encode-coding-string)
- (fset 'nnheader-encode-coding-string 'encode-coding-string)
- (fset 'nnheader-encode-coding-string (lambda (s a) s)))
-
-(if (fboundp 'decode-coding-string)
- (fset 'nnheader-decode-coding-string 'decode-coding-string)
- (fset 'nnheader-decode-coding-string (lambda (s a) s)))
-
(when (string-match "XEmacs\\|Lucid" emacs-version)
(require 'nnheaderxm))
(concat dir group "/")
;; If not, we translate dots into slashes.
(concat dir
- (nnheader-encode-coding-string
+ (mm-encode-coding-string
(nnheader-replace-chars-in-string group ?. ?/)
nnmail-pathname-coding-system)
"/")))
(insert (format "Xref: %s" (system-name)))
(while group-alist
(insert (format " %s:%d"
- (nnheader-encode-coding-string
+ (mm-encode-coding-string
(caar group-alist)
nnmail-pathname-coding-system)
(cdar group-alist)))
(expand-file-name nnmh-toplev))))
dir)
(nnheader-replace-chars-in-string
- (nnheader-decode-coding-string (substring dir (match-end 0))
- nnmail-pathname-coding-system)
+ (mm-decode-coding-string (substring dir (match-end 0))
+ nnmail-pathname-coding-system)
?/ ?.))
(apply 'max files)
(apply 'min files)))))))
;;; Code:
(eval-and-compile
- (if (not (fboundp 'base64-encode-string))
- (require 'base64)))
+ (eval
+ '(if (not (fboundp 'base64-encode-string))
+ (require 'base64))))
(require 'qp)
(require 'mm-util)
(prog1
(match-string 0)
(delete-region (match-beginning 0) (match-end 0)))))
- (mm-decode-coding-region b e rfc2047-default-charset)
+ (when (mm-multibyte-p)
+ (mm-decode-coding-region b e rfc2047-default-charset))
(setq b (point)))
- (mm-decode-coding-region b (point-max) rfc2047-default-charset)))))
+ (when (mm-multibyte-p)
+ (mm-decode-coding-region b (point-max) rfc2047-default-charset))))))
;;;###autoload
(defun rfc2047-decode-string (string)
- "Decode the quoted-printable-encoded STRING and return the results."
- (with-temp-buffer
- (mm-enable-multibyte)
- (insert string)
- (inline
- (rfc2047-decode-region (point-min) (point-max)))
- (buffer-string)))
-
+ "Decode the quoted-printable-encoded STRING and return the results."
+ (let ((m (mm-multibyte-p)))
+ (with-temp-buffer
+ (when m
+ (mm-enable-multibyte))
+ (insert string)
+ (inline
+ (rfc2047-decode-region (point-min) (point-max)))
+ (buffer-string))))
+
(defun rfc2047-parse-and-decode (word)
"Decode WORD and return it if it is an encoded word.
Return WORD if not."
(- (/ (1- year) 100)) ; - century years
(/ (1- year) 400)))) ; + Gregorian leap years
+(defun safe-date-to-time (date)
+ "Parse DATE and return a time structure.
+If DATE is malformed, a zero time will be returned."
+ (condition-case ()
+ (date-to-time date)
+ (error '(0 0))))
+
(provide 'time-date)
;;; time-date.el ends here
\input texinfo @c -*-texinfo-*-
@setfilename gnus
-@settitle Pterodactyl Gnus 0.19 Manual
+@settitle Pterodactyl Gnus 0.22 Manual
@synindex fn cp
@synindex vr cp
@synindex pg cp
@tex
@titlepage
-@title Pterodactyl Gnus 0.19 Manual
+@title Pterodactyl Gnus 0.22 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 Pterodactyl Gnus 0.19.
+This manual corresponds to Pterodactyl Gnus 0.22.
@end ifinfo
\input texinfo @c -*-texinfo-*-
@setfilename message
-@settitle Pterodactyl Message 0.19 Manual
+@settitle Pterodactyl Message 0.22 Manual
@synindex fn cp
@synindex vr cp
@synindex pg cp
@tex
@titlepage
-@title Pterodactyl Message 0.19 Manual
+@title Pterodactyl Message 0.22 Manual
@author by Lars Magne Ingebrigtsen
@page
* Key Index:: List of Message mode keys.
@end menu
-This manual corresponds to Pterodactyl Message 0.19. Message is
+This manual corresponds to Pterodactyl Message 0.22. Message is
distributed with the Gnus distribution bearing the same version number
-as this manual has.
+as this manual.
@node Interface