summaryrefslogtreecommitdiff
path: root/lisp/mail
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-09-26 10:37:16 +0300
committerEli Zaretskii <eliz@gnu.org>2013-09-26 10:37:16 +0300
commitb87c4ff2817e71ca71b028792200b1e069a95e04 (patch)
treebfe00c0655fa02078a9ab2c633ea06d90c4a2064 /lisp/mail
parentbbc108377873aa6ed7cf21c731770103096eea39 (diff)
parentba355de014b75ed104da4777f909db70d62f2357 (diff)
downloademacs-b87c4ff2817e71ca71b028792200b1e069a95e04.tar.gz
Merge from trunk.
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/emacsbug.el6
-rw-r--r--lisp/mail/mspools.el10
-rw-r--r--lisp/mail/rmail.el4
-rw-r--r--lisp/mail/rmailmm.el3
-rw-r--r--lisp/mail/rmailsum.el11
5 files changed, 12 insertions, 22 deletions
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index c1bc7e2e1ab..e045519e850 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -1,7 +1,7 @@
;;; emacsbug.el --- command to report Emacs bugs to appropriate mailing list
-;; Copyright (C) 1985, 1994, 1997-1998, 2000-2013 Free Software
-;; Foundation, Inc.
+;; Copyright (C) 1985, 1994, 1997-1998, 2000-2013
+;; Free Software Foundation, Inc.
;; Author: K. Shane Hartman
;; Maintainer: FSF
@@ -160,7 +160,7 @@ Prompts for bug subject. Leaves you in a mail buffer."
(report-emacs-bug-can-use-osx-open)))
user-point message-end-point)
(setq message-end-point
- (with-current-buffer (get-buffer-create "*Messages*")
+ (with-current-buffer (messages-buffer)
(point-max-marker)))
(compose-mail report-emacs-bug-address topic)
;; The rest of this does not execute if the user was asked to
diff --git a/lisp/mail/mspools.el b/lisp/mail/mspools.el
index 5e01a7149a8..b2618ef42db 100644
--- a/lisp/mail/mspools.el
+++ b/lisp/mail/mspools.el
@@ -344,19 +344,13 @@ nil."
(interactive)
(kill-buffer mspools-buffer))
-(defun mspools-mode ()
+(define-derived-mode mspools-mode special-mode "MSpools"
"Major mode for output from mspools-show.
\\<mspools-mode-map>Move point to one of the items in this buffer, then use
\\[mspools-visit-spool] to go to the spool that the current line refers to.
\\[revert-buffer] to regenerate the list of spools.
\\{mspools-mode-map}"
- (kill-all-local-variables)
- (make-local-variable 'revert-buffer-function)
- (setq revert-buffer-function 'mspools-revert-buffer)
- (use-local-map mspools-mode-map)
- (setq major-mode 'mspools-mode)
- (setq mode-name "MSpools")
- (run-mode-hooks 'mspools-mode-hook))
+ (setq-local revert-buffer-function 'mspools-revert-buffer))
(defun mspools-get-spool-files ()
"Find the list of spool files and display them in *spools* buffer."
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index aa244ddae81..246ee5f566a 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -4668,7 +4668,7 @@ With prefix argument N moves forward N messages with these labels.
;;;***
-;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "93951f748e43e1015da1b485088970ca")
+;;;### (autoloads nil "rmailmm" "rmailmm.el" "8c14f4cf6e7dacb0c94fd300d814caf7")
;;; Generated autoloads from rmailmm.el
(autoload 'rmail-mime "rmailmm" "\
@@ -4768,7 +4768,7 @@ If prefix argument REVERSE is non-nil, sorts in reverse order.
;;;***
-;;;### (autoloads nil "rmailsum" "rmailsum.el" "a9b3bbd9b82dd566524a1209b5cdb7dd")
+;;;### (autoloads nil "rmailsum" "rmailsum.el" "9005bd5da3e21d1cc173e86fd9fec3c9")
;;; Generated autoloads from rmailsum.el
(autoload 'rmail-summary "rmailsum" "\
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el
index 350e3dacbcf..f2437b16d14 100644
--- a/lisp/mail/rmailmm.el
+++ b/lisp/mail/rmailmm.el
@@ -685,7 +685,8 @@ directly."
((string-match "image/\\(.*\\)" content-type)
(setq type (image-type-from-file-name
(concat "." (match-string 1 content-type))))
- (if (and (memq type image-types)
+ (if (and (boundp 'image-types)
+ (memq type image-types)
(image-type-available-p type))
(if (and rmail-mime-show-images
(not (eq rmail-mime-show-images 'button))
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 3a0a7824ad8..cced2231522 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -408,7 +408,7 @@ If FUNCTION is nil, includes all messages."
(unless rmail-buffer
(error "No RMAIL buffer found"))
(let (mesg was-in-summary sumbuf)
- (if (eq major-mode 'rmail-summary-mode)
+ (if (derived-mode-p 'rmail-summary-mode)
(setq was-in-summary t))
(with-current-buffer rmail-buffer
(setq rmail-summary-buffer (rmail-new-summary-1 desc redo function args)
@@ -1035,7 +1035,7 @@ Optional prefix ARG means undelete ARG previous messages."
;; Rmail Summary mode is suitable only for specially formatted data.
(put 'rmail-summary-mode 'mode-class 'special)
-(defun rmail-summary-mode ()
+(define-derived-mode rmail-summary-mode special-mode "RMAIL Summary"
"Rmail Summary Mode is invoked from Rmail Mode by using \\<rmail-mode-map>\\[rmail-summary].
As commands are issued in the summary buffer, they are applied to the
corresponding mail messages in the rmail buffer.
@@ -1058,10 +1058,6 @@ Commands for sorting the summary:
\\[rmail-summary-sort-by-correspondent] Sort by correspondent.
\\[rmail-summary-sort-by-lines] Sort by lines.
\\[rmail-summary-sort-by-labels] Sort by labels."
- (interactive)
- (kill-all-local-variables)
- (setq major-mode 'rmail-summary-mode)
- (setq mode-name "RMAIL Summary")
(setq truncate-lines t)
(setq buffer-read-only t)
(set-syntax-table text-mode-syntax-table)
@@ -1074,8 +1070,7 @@ Commands for sorting the summary:
(make-local-variable 'revert-buffer-function)
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults '(rmail-summary-font-lock-keywords t))
- (rmail-summary-enable)
- (run-mode-hooks 'rmail-summary-mode-hook))
+ (rmail-summary-enable))
;; Summary features need to be disabled during edit mode.
(defun rmail-summary-disable ()