From 040eb6285c7fe29ae2bf894bf563155f1ab53e0e Mon Sep 17 00:00:00 2001 From: ShengHuo ZHU Date: Thu, 1 Nov 2001 13:10:42 +0000 Subject: [PATCH] 2001-11-01 07:00:00 ShengHuo ZHU * smiley-ems.el (smiley-update-cache): Auto detect file type. * message.el (message-forward-rmail-make-body): save-window-excursion. (message-encode-message-body): no error. (message-setup-1): compose-mail send-actions are different from message-send-actions. --- lisp/ChangeLog | 10 ++++++++++ lisp/lpath.el | 1 + lisp/message.el | 16 ++++++++++------ lisp/smiley-ems.el | 6 ++++-- 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bd7058a2f..ad6944cbd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2001-11-01 07:00:00 ShengHuo ZHU + + * smiley-ems.el (smiley-update-cache): Auto detect file type. + + * message.el (message-forward-rmail-make-body): + save-window-excursion. + (message-encode-message-body): no error. + (message-setup-1): compose-mail send-actions are different from + message-send-actions. + 2001-11-01 Simon Josefsson * sieve.el: Don't require easy-mmode. Suggested by Katsumi Yamaoka diff --git a/lisp/lpath.el b/lisp/lpath.el index 713ec5122..d9433b4ca 100644 --- a/lisp/lpath.el +++ b/lisp/lpath.el @@ -18,6 +18,7 @@ find-image font-create-object gnus-mule-get-coding-system font-lock-set-defaults image-size image-type-available-p insert-image + image-type-from-file-header make-temp-file message-xmas-redefine mail-aliases-setup mm-copy-tree mule-write-region-no-coding-system put-image diff --git a/lisp/message.el b/lisp/message.el index 5f11df705..5a34792db 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -4017,8 +4017,10 @@ than 988 characters long, and if they are not, trim them until they are." ;;; (push '(message-mode (encrypt . mc-encrypt-message) ;;; (sign . mc-sign-message)) ;;; mc-modes-alist)) - (when actions - (setq message-send-actions actions)) + (dolist (action actions) + (condition-case nil + (add-to-list 'message-send-actions + `(apply ',(car action) ',(cdr action))))) (setq message-reply-buffer replybuffer) (goto-char (point-min)) ;; Insert all the headers. @@ -4732,7 +4734,8 @@ Optional DIGEST will use digest to forward." ;;;###autoload (defun message-forward-rmail-make-body (forward-buffer) - (with-current-buffer forward-buffer + (save-window-excursion + (set-buffer forward-buffer) (let (rmail-enable-mime) (rmail-toggle-header 0))) (message-forward-make-body forward-buffer)) @@ -5142,9 +5145,10 @@ regexp varstr." ;; /usr/bin/mail. (unless content-type-p (goto-char (point-min)) - (re-search-forward "^MIME-Version:") - (forward-line 1) - (insert "Content-Type: text/plain; charset=us-ascii\n"))))) + ;; For unknown reason, MIME-Version doesn't exist. + (when (re-search-forward "^MIME-Version:" nil t) + (forward-line 1) + (insert "Content-Type: text/plain; charset=us-ascii\n")))))) (defun message-read-from-minibuffer (prompt) "Read from the minibuffer while providing abbrev expansion." diff --git a/lisp/smiley-ems.el b/lisp/smiley-ems.el index 3b4f972e7..37ba59b51 100644 --- a/lisp/smiley-ems.el +++ b/lisp/smiley-ems.el @@ -57,7 +57,7 @@ ("\\(:-{\\)\\W" 1 "frown.pbm")) "*A list of regexps to map smilies to images. The elements are (REGEXP MATCH FILE), where MATCH is the submatch in -rgexp to replace with IMAGE. IMAGE is the name of a PBM file in +regexp to replace with IMAGE. IMAGE is the name of a PBM file in `smiley-data-directory'." :type '(repeat (list regexp (integer :tag "Regexp match number") @@ -75,7 +75,9 @@ rgexp to replace with IMAGE. IMAGE is the name of a PBM file in (symbol-value smiley-regexp-alist) smiley-regexp-alist)) (let* ((data-directory smiley-data-directory) - (image (find-image (list (list :type 'pbm + (image (find-image (list (list :type + (image-type-from-file-header + (nth 2 elt)) :file (nth 2 elt) :ascent 'center))))) (if image -- 2.25.1