+2003-12-08 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-util.el: Revert 2003-12-03 change, instead, provide the
+ compiler macro for rmail-select-summary if rmail is not available.
+
+2003-12-08 Simon Josefsson <jas@extundo.com>
+
+ * flow-fill.el (fill-flowed-encode-tests, fill-flowed-test): Add.
+
+2003-12-08 Jesper Harder <harder@ifa.au.dk>
+
+ * gnus-msg.el (gnus-extended-version): Bind float-output-format to
+ nil.
+
+2003-12-08 Simon Josefsson <jas@extundo.com>
+
+ * mml-smime.el (mml-smime-sign): Replace CRLF with LF in OpenSSL
+ output. Reported by Arne J\e,Ax\e(Brgensen <arne@arnested.dk>.
+
2003-12-07 Simon Josefsson <jas@extundo.com>
* pgg-gpg.el (pgg-gpg-recipient-arg): Add.
;; 2000-10-23 don't flow "-- " lines, make "quote-depth wins" rule
;; work when first line is at level 0.
;; 2002-01-12 probably incomplete encoding support
+;; 2003-12-08 started working on test harness.
;;; Code:
(forward-line 1)
nil))))))))
+;; Test vectors.
+
+(eval-when-compile
+ (defvar show-trailing-whitespace))
+
+(defvar fill-flowed-encode-tests
+ '(
+ ;; The syntax of each list element is:
+ ;; (INPUT . EXPECTED-OUTPUT)
+ ("> Thou villainous ill-breeding spongy dizzy-eyed
+> reeky elf-skinned pigeon-egg!
+>> Thou artless swag-bellied milk-livered
+>> dismal-dreaming idle-headed scut!
+>>> Thou errant folly-fallen spleeny reeling-ripe
+>>> unmuzzled ratsbane!
+>>>> Henceforth, the coding style is to be strictly
+>>>> enforced, including the use of only upper case.
+>>>>> I've noticed a lack of adherence to the coding
+>>>>> styles, of late.
+>>>>>> Any complaints?
+" . "> Thou villainous ill-breeding spongy dizzy-eyed reeky elf-skinned
+> pigeon-egg!
+>> Thou artless swag-bellied milk-livered dismal-dreaming idle-headed
+>> scut!
+>>> Thou errant folly-fallen spleeny reeling-ripe unmuzzled ratsbane!
+>>>> Henceforth, the coding style is to be strictly enforced,
+>>>> including the use of only upper case.
+>>>>> I've noticed a lack of adherence to the coding styles, of late.
+>>>>>> Any complaints?
+")
+; ("
+;> foo
+;>
+;>
+;> bar
+;" . "
+;> foo bar
+;")
+ ))
+
+(defun fill-flowed-test ()
+ (interactive "")
+ (switch-to-buffer (get-buffer-create "*Format=Flowed test output*"))
+ (erase-buffer)
+ (setq show-trailing-whitespace t)
+ (dolist (test fill-flowed-encode-tests)
+ (let (start output)
+ (insert "***** BEGIN TEST INPUT *****\n")
+ (insert (car test))
+ (insert "***** END TEST INPUT *****\n\n")
+ (insert "***** BEGIN TEST OUTPUT *****\n")
+ (setq start (point))
+ (insert (car test))
+ (save-restriction
+ (narrow-to-region start (point))
+ (fill-flowed))
+ (setq output (buffer-substring start (point-max)))
+ (insert "***** END TEST OUTPUT *****\n")
+ (unless (string= output (cdr test))
+ (insert "\n***** BEGIN TEST EXPECTED OUTPUT *****\n")
+ (insert (cdr test))
+ (insert "***** END TEST EXPECTED OUTPUT *****\n"))
+ (insert "\n\n")))
+ (goto-char (point-max)))
+
(provide 'flow-fill)
;;; flow-fill.el ends here
;;; Functions for saving to babyl/mail files.
(eval-when-compile
- (when (featurep 'xemacs)
- ;; The XEmacs version of rmail requires tm, however tm was taken
- ;; over to SEMI and FLIM long ago. So, there may be those who
- ;; have not installed tm.
- (require 'alist)
- (provide 'tm-view))
- (require 'rmail)
- (autoload 'rmail-update-summary "rmailsum")
+ (condition-case nil
+ (progn
+ (require 'rmail)
+ (autoload 'rmail-update-summary "rmailsum"))
+ (error
+ (define-compiler-macro rmail-select-summary (&rest body)
+ ;; Rmail of the XEmacs version is supplied by the package, and
+ ;; requires tm and apel packages. However, there may be those
+ ;; who haven't installed those packages. This macro helps such
+ ;; people even if they install those packages later.
+ `(eval '(rmail-select-summary ,@body)))))
(defvar rmail-default-rmail-file)
(defvar mm-text-coding-system))
(customize-variable 'smime-keys)
(error "No S/MIME keys configured, use customize to add your key"))
(smime-sign-buffer (cdr (assq 'keyfile cont)))
+ (goto-char (point-min))
+ (while (search-forward "\r\n" nil t)
+ (replace-match "\n" t t))
(goto-char (point-max)))
(defun mml-smime-encrypt (cont)
emacs, Emacs Manual}) when encoding a message, and the
``format=flowed'' Content-Type parameter when decoding a message.
-On encoding text, if @code{use-hard-newlines} is enabled, lines
+On encoding text, regardless of @code{use-hard-newlines}, lines
terminated by soft newline characters are filled together and wrapped
after the column decided by @code{fill-flowed-encode-column}.
Quotation marks (matching @samp{^>* ?}) are respected. The variable