From d0d7895d28592cc44beb8882209f78aeb1efc487 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Fri, 16 Oct 1998 10:39:25 +0000 Subject: [PATCH] * lisp/gnus-msg.el (gnus-message-setup-hook): Replace the default value to `gnus-maybe-setup-default-charset'. (gnus-maybe-setup-default-charset): New function. It is called `message-maybe-setup-default-charset' at one time. * lisp/message.el (message-maybe-setup-default-charset): Abolished. --- lisp/gnus-msg.el | 20 +++++++++++++++++++- lisp/message.el | 13 ------------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 5e7d21b..df420e6 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -93,7 +93,7 @@ Thank you. The first %s will be replaced by the Newsgroups header; the second with the current group name.") -(defvar gnus-message-setup-hook '(message-maybe-setup-default-charset) +(defvar gnus-message-setup-hook '(gnus-maybe-setup-default-charset) "Hook run after setting up a message buffer.") (defvar gnus-bug-create-help-buffer t @@ -1191,6 +1191,24 @@ this is a reply." (insert (car val) ": " (cdr val) "\n")) (gnus-pull (car val) gnus-message-style-insertions))))) + +;;; @ for MIME Edit mode +;;; + +(defun gnus-maybe-setup-default-charset () + (let ((charset + (and (boundp 'gnus-summary-buffer) + (buffer-live-p gnus-summary-buffer) + (save-excursion + (set-buffer gnus-summary-buffer) + default-mime-charset)))) + (if charset + (progn + (make-local-variable 'default-mime-charset) + (setq default-mime-charset charset) + )))) + + ;;; Allow redefinition of functions. (gnus-ems-redefine) diff --git a/lisp/message.el b/lisp/message.el index ad81728..337963d 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -4465,19 +4465,6 @@ regexp varstr." ;;; @ for MIME Edit mode ;;; -(defun message-maybe-setup-default-charset () - (let ((charset - (and (boundp 'gnus-summary-buffer) - (buffer-live-p gnus-summary-buffer) - (save-excursion - (set-buffer gnus-summary-buffer) - default-mime-charset)))) - (if charset - (progn - (make-local-variable 'default-mime-charset) - (setq default-mime-charset charset) - )))) - (defun message-maybe-encode () (when message-mime-mode (run-hooks 'mime-edit-translate-hook) -- 1.7.10.4