From 1a6362c3aaedfaa3813d4545c0c23f4beb05e881 Mon Sep 17 00:00:00 2001 From: czkmt Date: Sat, 18 Dec 1999 07:02:52 +0000 Subject: [PATCH] (base64-encode-string): Fix. May work. --- lisp/imap.el | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) 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") -- 1.7.10.4