From: czkmt Date: Sat, 18 Dec 1999 07:02:52 +0000 (+0000) Subject: (base64-encode-string): Fix. May work. X-Git-Tag: t-gnus-6_14_0-13~11 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a6362c3aaedfaa3813d4545c0c23f4beb05e881;p=elisp%2Fgnus.git- (base64-encode-string): Fix. May work. --- diff --git a/lisp/imap.el b/lisp/imap.el index de3c21d..bbb84e1 100644 --- a/lisp/imap.el +++ b/lisp/imap.el @@ -160,27 +160,21 @@ (condition-case nil (base64-encode-string "" 'no-line-break) (error - (defun base64-encode-string (string &optional no-line-break) - "Base64-encode STRING and return the result. + (condition-case nil + (let ((fn (mel-find-function 'mime-encode-string "base64"))) + (funcall fn "" 'no-line-break) + (fset 'base64-encode-string (symbol-function fn))) + (wrong-number-of-arguments + (defun base64-encode-string (string &optional no-line-break) + "Base64-encode STRING and return the result. Optional second argument NO-LINE-BREAK means do not break long lines into shorter lines." - (fmakunbound 'base64-encode-string) - (condition-case nil - (let ((fn (mel-find-function 'mime-encode-string "base64"))) - (funcall fn "" 'no-line-break) - (fset 'base64-encode-string (symbol-function fn))) - (wrong-number-of-arguments - (defun base64-encode-string (string &optional no-line-break) - "Base64-encode STRING and return the result. -Optional second argument NO-LINE-BREAK means do not break long lines -into shorter lines." - (let ((fn (mel-find-function 'mime-encode-string "base64"))) - (if no-line-break - (mapconcat 'identity - (split-string (funcall fn string) "\n") - "") + (let ((fn (mel-find-function 'mime-encode-string "base64"))) + (if no-line-break + (mapconcat 'identity + (split-string (funcall fn string) "\n") + "") (funcall fn string)))))) - (base64-encode-string string no-line-break)) ))) (autoload 'md5 "md5")