;;; rmailedit.el --- "RMAIL edit mode" Edit the current message
-;; Copyright (C) 1985, 1994, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1994, 2001, 2002, 2003, 2004, 2005, 2006,
+;; 2007, 2008, 2009 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: mail
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; Rmail Edit mode is suitable only for specially formatted data.
(put 'rmail-edit-mode 'mode-class 'special)
+(declare-function rmail-summary-disable "" ())
+(declare-function rmail-summary-enable "rmailsum" ())
+
(defun rmail-edit-mode ()
"Major mode for editing the contents of an RMAIL message.
The editing commands are the same as in Text mode, together with two commands
* \\[rmail-cease-edit] makes them permanent.
This functions runs the normal hook `rmail-edit-mode-hook'.
\\{rmail-edit-map}"
- (text-mode)
+ (delay-mode-hooks (text-mode))
(use-local-map rmail-edit-map)
(setq major-mode 'rmail-edit-mode)
(setq mode-name "RMAIL Edit")
(save-excursion
(set-buffer rmail-summary-buffer)
(rmail-summary-disable)))
- (run-hooks 'rmail-edit-mode-hook))
+ (run-mode-hooks 'rmail-edit-mode-hook))
(defvar rmail-old-pruned nil)
(put 'rmail-old-pruned 'permanent-local t)
(force-mode-line-update)
(kill-all-local-variables)
(rmail-mode-1)
+ (if (boundp 'tool-bar-map)
+ (set (make-local-variable 'tool-bar-map) rmail-tool-bar-map))
(rmail-variables)
;; As the local value of save-buffer-coding-system is changed by
;; rmail-variables, we restore the original value.
(provide 'rmailedit)
-;;; arch-tag: 93c22709-a14a-46c1-ab91-52c3f5a0ec12
+;; arch-tag: 93c22709-a14a-46c1-ab91-52c3f5a0ec12
;;; rmailedit.el ends here