From: tomo Date: Tue, 19 Dec 2000 05:17:27 +0000 (+0000) Subject: Merge emacs-21_0_90-emh-1_13_0-0. X-Git-Tag: emh-1_14_0~8 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=6e3264ab51e45bf0da5db5644ff699e95f70c4e8;p=elisp%2Femh.git Merge emacs-21_0_90-emh-1_13_0-0. --- diff --git a/ChangeLog b/ChangeLog index 4357926..5b90ede 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,21 @@ 2000-05-25 Tanaka Akira - * README.en: Update for CVS via SSH. + * README.en: Update for CVS via SSH. + +2000-01-10 MORIOKA Tomohiko + + * emh-comp.el (emh-insert-message): Comment out GNUS and Gnus + related codes. + (emh-yank-cur-msg-with-no-filter): Comment out. + + * emh.el (emh-raw-buffer): New inline function. + (mh-display-msg): Use `emh-raw-buffer'. + (emh-toggle-decoding-mode): Likewise. + +2000-01-10 MORIOKA Tomohiko + + * emh.el (emh-toggle-decoding-mode): Don't refer + `mime-raw-buffer'. 2000-01-05 Katsumi Yamaoka @@ -11,7 +26,7 @@ * README.en: Update for the recent ML address and ftp site. -1999-11-11 MORIOKA Tomohiko +1999-11-11 MORIOKA Tomohiko * EMH: Version 1.10.1 was released. diff --git a/emh-comp.el b/emh-comp.el index 4c16c36..1fa22f5 100644 --- a/emh-comp.el +++ b/emh-comp.el @@ -1,8 +1,8 @@ ;;; emh-comp.el --- emh functions for composing messages -;; Copyright (C) 1993,1994,1995,1996,1997,1998 Free Software Foundation, Inc. +;; Copyright (C) 1993,94,95,96,97,98,99,2000 Free Software Foundation, Inc. -;; Author: MORIOKA Tomohiko +;; Author: MORIOKA Tomohiko ;; OKABE Yasuo ;; Created: 1996/2/29 (separated from tm-mh-e.el) ;; Renamed: 1997/2/21 from tmh-comp.el @@ -140,33 +140,32 @@ system MH lib directory.") (defun emh-insert-message (&optional message) ;; always ignores message - (let ((article-buffer - (if (not (and (stringp mh-sent-from-folder) - (numberp mh-sent-from-msg) - )) - (cond ((and (boundp 'gnus-original-article-buffer) - (bufferp mh-sent-from-folder) - (get-buffer gnus-original-article-buffer) - ) - gnus-original-article-buffer) - ((and (boundp 'gnus-article-buffer) - (get-buffer gnus-article-buffer) - (bufferp mh-sent-from-folder) - ) - (save-excursion - (set-buffer gnus-article-buffer) - (if (eq major-mode 'mime-view-mode) - mime-raw-buffer - (current-buffer) - ))) - )))) - (if (null article-buffer) - (emh-insert-mail - (emh::make-message mh-sent-from-folder mh-sent-from-msg) - ) - (insert-buffer article-buffer) - (mime-edit-inserted-message-filter) - ) + ;; (let ((article-buffer + ;; (if (not (and (stringp mh-sent-from-folder) + ;; (numberp mh-sent-from-msg) + ;; )) + ;; (cond ((and (boundp 'gnus-original-article-buffer) + ;; (bufferp mh-sent-from-folder) + ;; (get-buffer gnus-original-article-buffer) + ;; ) + ;; gnus-original-article-buffer) + ;; ((and (boundp 'gnus-article-buffer) + ;; (get-buffer gnus-article-buffer) + ;; (bufferp mh-sent-from-folder) + ;; ) + ;; (save-excursion + ;; (set-buffer gnus-article-buffer) + ;; (if (eq major-mode 'mime-view-mode) + ;; mime-raw-buffer + ;; (current-buffer) + ;; ))) + ;; )))) + (if (null article-buffer) + (emh-insert-mail + (emh::make-message mh-sent-from-folder mh-sent-from-msg)) + ;; (insert-buffer article-buffer) + ;; (mime-edit-inserted-message-filter) + ;; ) )) (defun emh-insert-mail (&optional message) @@ -446,47 +445,47 @@ then prompt for the message sequence. See also documentation for (number (emh-prompt-for-message "Message number: " folder))) (emh::insert-letter folder number verbatim))) -(defun emh-yank-cur-msg-with-no-filter () - "Insert the current message into the draft buffer. -This function makes new show-buffer from article-buffer to disable -variable `mime-preview-text/plain-hook'. If you don't want to use text -filters for replying message, please set it to -`emh-message-yank-function'. -Prefix each non-blank line in the message with the string in -`mh-ins-buf-prefix'. The entire message will be inserted if -`mh-yank-from-start-of-msg' is non-nil. If this variable is nil, the -portion of the message following the point will be yanked. If -`mh-delete-yanked-msg-window' is non-nil, any window displaying the -yanked message will be deleted." - (interactive) - (if (and mh-sent-from-folder mh-sent-from-msg) - (let ((to-point (point)) - (to-buffer (current-buffer))) - (set-buffer mh-sent-from-folder) - (if mh-delete-yanked-msg-window - (delete-windows-on mh-show-buffer)) - (set-buffer mh-show-buffer) ; Find displayed message - (let ((mh-ins-str - (if mime-raw-buffer - (let (mime-display-text/plain-hook buf) - (prog1 - (save-window-excursion - (set-buffer mime-raw-buffer) - (setq buf (mime-view-mode)) - (buffer-string) - ) - (kill-buffer buf) - )) - (buffer-string) - ))) - (set-buffer to-buffer) - (save-restriction - (narrow-to-region to-point to-point) - (push-mark) - (insert mh-ins-str) - (mh-insert-prefix-string mh-ins-buf-prefix) - (insert "\n")))) - (error "There is no current message"))) +;; (defun emh-yank-cur-msg-with-no-filter () +;; "Insert the current message into the draft buffer. +;; This function makes new show-buffer from article-buffer to disable +;; variable `mime-preview-text/plain-hook'. If you don't want to use text +;; filters for replying message, please set it to +;; `emh-message-yank-function'. +;; Prefix each non-blank line in the message with the string in +;; `mh-ins-buf-prefix'. The entire message will be inserted if +;; `mh-yank-from-start-of-msg' is non-nil. If this variable is nil, the +;; portion of the message following the point will be yanked. If +;; `mh-delete-yanked-msg-window' is non-nil, any window displaying the +;; yanked message will be deleted." +;; (interactive) +;; (if (and mh-sent-from-folder mh-sent-from-msg) +;; (let ((to-point (point)) +;; (to-buffer (current-buffer))) +;; (set-buffer mh-sent-from-folder) +;; (if mh-delete-yanked-msg-window +;; (delete-windows-on mh-show-buffer)) +;; (set-buffer mh-show-buffer) ; Find displayed message +;; (let ((mh-ins-str +;; (if mime-raw-buffer +;; (let (mime-display-text/plain-hook buf) +;; (prog1 +;; (save-window-excursion +;; (set-buffer mime-raw-buffer) +;; (setq buf (mime-view-mode)) +;; (buffer-string) +;; ) +;; (kill-buffer buf) +;; )) +;; (buffer-string) +;; ))) +;; (set-buffer to-buffer) +;; (save-restriction +;; (narrow-to-region to-point to-point) +;; (push-mark) +;; (insert mh-ins-str) +;; (mh-insert-prefix-string mh-ins-buf-prefix) +;; (insert "\n")))) +;; (error "There is no current message"))) ;; (defun emh-yank-current-message () ;; "Insert the current message into the draft buffer. diff --git a/emh.el b/emh.el index af0ad17..22a2d7e 100644 --- a/emh.el +++ b/emh.el @@ -1,6 +1,6 @@ ;;; emh.el --- MIME extender for mh-e -;; Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc. +;; Copyright (C) 1995,1996,1997,1998,2000 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko ;; OKABE Yasuo @@ -37,7 +37,7 @@ ;;; @ version ;;; -(defconst emh-version "1.10.0") +(defconst emh-version "1.13.0") ;;; @ variable @@ -62,6 +62,11 @@ ;;; @ functions ;;; +(defsubst emh-raw-buffer (folder-buffer) + (concat "article-" (if (bufferp folder-buffer) + (buffer-name folder-buffer) + folder-buffer))) + (defun mh-display-msg (msg-num folder &optional show-buffer mode) "Display message number MSG-NUM of FOLDER. This function uses `mime-view-mode' if MODE is not nil. If MODE is @@ -87,7 +92,7 @@ nil, `emh-automatic-mime-preview' is used as default value." (setq buffer-read-only nil) (erase-buffer) (if mode - (let* ((aname (concat "article-" folder)) + (let* ((aname (emh-raw-buffer folder)) (abuf (get-buffer aname))) (if abuf (progn @@ -173,13 +178,10 @@ With arg, turn MIME processing on if arg is positive." (if (null arg) (not emh-automatic-mime-preview) arg)) - (save-excursion - (set-buffer mh-show-buffer) - (if (null emh-automatic-mime-preview) - (if (and mime-raw-buffer - (get-buffer mime-raw-buffer)) - (kill-buffer mime-raw-buffer) - ))) + (let ((raw-buffer (emh-raw-buffer (current-buffer)))) + (if (get-buffer raw-buffer) + (kill-buffer raw-buffer) + )) (mh-invalidate-show-buffer) (mh-show (mh-get-msg-num t)) )