Synch to flim-1_14 branch.
authoryamaoka <yamaoka>
Tue, 9 Mar 2004 23:10:03 +0000 (23:10 +0000)
committeryamaoka <yamaoka>
Tue, 9 Mar 2004 23:10:03 +0000 (23:10 +0000)
ChangeLog
lunit.el
mel-b-el.el
mel-q.el
sha1-el.el
smtp.el

index 6606e8d..b1e9f06 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,42 @@
+2004-03-05  Jesper Harder  <harder@ifa.au.dk>
+
+       * sha1-el.el (sha1-maximum-internal-length): Doc fix.
+
+2004-02-23  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * lunit.el (lunit-make-test-suite-from-class): Fix regexp.
+       Use "^test" instead of "^test-".
+
+2004-02-19  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * lunit.el (lunit-assert): Avoid double-eval `condtion-expr'.
+       Use ,(not (not condition)) instead of ,condition.
+
+2004-02-18  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * lunit.el (lunit-make-test-suite-from-class): Restrict test
+       method name to test-*.
+
+2004-02-17  Daiki Ueno  <ueno@unixuser.org>
+
+       * smtp.el (smtp-starttls-program): New user option.
+       (smtp-starttls-extra-args): New user option.
+       (smtp-send-buffer): Bind starttls-program and starttls-extra-args.
+
+2004-01-27  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * mel-q.el (quoted-printable-external-decoder-option-to-specify-file): 
+       Accept nil.
+       (mime-write-decoded-region): If the value of the variable
+       `quoted-printable-external-decoder-option-to-specify-file' is nil,
+       write stdout to the output file.
+
+       * mel-b-el.el (base64-external-decoder-option-to-specify-file): 
+       Accept nil.
+       (base64-write-decoded-region): If the value of the variable
+       `base64-external-decoder-option-to-specify-file' is nil, write
+       stdout to the output file.
+
 2004-01-12  Daiki Ueno  <ueno@unixuser.org>
 
        * sasl.texi: Texinfo markup fixes.  From Jesper Harder
index 99132d3..dbe1f74 100644 (file)
--- a/lunit.el
+++ b/lunit.el
@@ -237,7 +237,7 @@ TESTS holds a number of instances of `lunit-test'."
 (defmacro lunit-assert (condition-expr)
   "Verify that CONDITION-EXPR returns non-nil; signal an error if not."
   (let ((condition (eval condition-expr)))
-    `(unless ,condition
+    `(when ,(not condition)
        (signal 'lunit-failure (list ',condition-expr)))))
 
 (luna-define-class lunit-test-printer (lunit-test-listener))
@@ -265,6 +265,7 @@ TESTS holds a number of instances of `lunit-test'."
     (mapatoms
      (lambda (symbol)
        (if (and (fboundp symbol)
+               (string-match "^test" (symbol-name symbol))
                (null (get symbol 'luna-method-qualifier)))
           (push (lunit-make-test-case class symbol) tests)))
      (luna-class-obarray (luna-find-class class)))
index f8a13ef..eac60b5 100644 (file)
@@ -50,7 +50,8 @@
   :type '(cons (file :tag "Command")(repeat :tag "Arguments" string)))
 
 (defcustom base64-external-decoder-option-to-specify-file '("-o")
-  "*list of options of base64 decoder program to specify file."
+  "*list of options of base64 decoder program to specify file.
+If the base64 decoder program does not have such option, set this as nil."
   :group 'base64
   :type '(repeat :tag "Arguments" string))
 
@@ -368,13 +369,22 @@ START and END are buffer positions."
   (interactive "*r\nFWrite decoded region to file: ")
   (if (and base64-internal-decoding-limit
           (> (- end start) base64-internal-decoding-limit))
-      (as-binary-process
-       (apply (function call-process-region)
-             start end (car base64-external-decoder)
-             nil nil nil
-             (append (cdr base64-external-decoder)
-                     base64-external-decoder-option-to-specify-file
-                     (list filename))))
+      (progn
+       (as-binary-process
+        (apply (function call-process-region)
+               start end (car base64-external-decoder)
+               (null base64-external-decoder-option-to-specify-file)
+               (unless base64-external-decoder-option-to-specify-file
+                 (list (current-buffer) nil))
+               nil
+               (delq nil
+                     (append
+                      (cdr base64-external-decoder)
+                      base64-external-decoder-option-to-specify-file
+                      (when base64-external-decoder-option-to-specify-file
+                        (list filename))))))
+       (unless base64-external-decoder-option-to-specify-file
+         (write-region-as-binary (point-min) (point-max) filename)))
     (let ((str (buffer-substring start end)))
       (with-temp-buffer
        (insert (base64-internal-decode-string str))
index 4a59b02..5c9f7c5 100644 (file)
--- a/mel-q.el
+++ b/mel-q.el
@@ -254,7 +254,8 @@ the program (maybe mmencode included in metamail or XEmacs package)."
 
 
 (defvar quoted-printable-external-decoder-option-to-specify-file '("-o")
-  "*list of options of quoted-printable decoder program to specify file.")
+  "*list of options of quoted-printable decoder program to specify file.
+If the quoted-printable decoder does not have such option, set this as nil.")
 
 (mel-define-method mime-write-decoded-region (start end filename
                                                    (nil "quoted-printable"))
@@ -264,10 +265,18 @@ START and END are buffer positions."
   (as-binary-process
    (apply (function call-process-region)
          start end (car quoted-printable-external-decoder)
-         nil nil nil
-         (append (cdr quoted-printable-external-decoder)
-                 quoted-printable-external-decoder-option-to-specify-file
-                 (list filename)))))
+         (null quoted-printable-external-decoder-option-to-specify-file)
+         (unless quoted-printable-external-decoder-option-to-specify-file
+           (list (current-buffer) nil))
+         nil
+         (delq nil
+               (append
+                (cdr quoted-printable-external-decoder)
+                quoted-printable-external-decoder-option-to-specify-file
+                (when quoted-printable-external-decoder-option-to-specify-file
+                  (list filename))))))
+  (unless quoted-printable-external-decoder-option-to-specify-file
+    (write-region-as-binary (point-min) (point-max) filename)))
 
 \f
 ;;; @ Q-encoding encode/decode string
index 760c2d0..6e47953 100644 (file)
   :group 'extensions)
 
 (defcustom sha1-maximum-internal-length 500
-  "*Maximum length of message to use lisp version of SHA1 function.
+  "*Maximum length of message to use Lisp version of SHA1 function.
 If message is longer than this, `sha1-program' is used instead.
 
-If this variable is set to 0, use extarnal program only.
+If this variable is set to 0, use external program only.
 If this variable is set to nil, use internal function only."
   :type 'integer
   :group 'sha1)
diff --git a/smtp.el b/smtp.el
index ff13f5a..31e393d 100644 (file)
--- a/smtp.el
+++ b/smtp.el
@@ -102,6 +102,14 @@ don't define this value."
   :type 'boolean
   :group 'smtp-extensions)
 
+(defcustom smtp-starttls-program "starttls"
+  "The program to run in a subprocess to open an TLSv1 connection."
+  :group 'smtp-extensions)
+
+(defcustom smtp-starttls-extra-args nil
+  "Extra arguments to `starttls-program'"
+  :group 'smtp-extensions)
+
 (defcustom smtp-use-sasl nil
   "If non-nil, use SMTP Authentication (RFC2554) if available."
   :type 'boolean
@@ -343,17 +351,19 @@ RECIPIENTS is a list of envelope recipient addresses.
 BUFFER may be a buffer or a buffer name which contains mail message."
   (if smtp-send-by-myself
       (smtp-send-buffer-by-myself sender recipients buffer)
-    (let ((server
-          (if (functionp smtp-server)
-              (funcall smtp-server sender recipients)
-            (or smtp-server
-                (error "`smtp-server' not defined"))))
-         (package
-          (smtp-make-package sender recipients buffer))
-         (smtp-open-connection-function
-          (if smtp-use-starttls
-              #'starttls-open-stream
-            smtp-open-connection-function)))
+    (let* ((server
+           (if (functionp smtp-server)
+               (funcall smtp-server sender recipients)
+             (or smtp-server
+                 (error "`smtp-server' not defined"))))
+          (package
+           (smtp-make-package sender recipients buffer))
+          (starttls-program smtp-starttls-program)
+          (starttls-extra-args smtp-starttls-extra-args)
+          (smtp-open-connection-function
+           (if smtp-use-starttls
+               #'starttls-open-stream
+             smtp-open-connection-function)))
       (save-excursion
        (set-buffer
         (get-buffer-create