;;; sendmail.el --- mail sending commands for Emacs. -*- byte-compile-dynamic: t -*-
-;; Copyright (C) 1985, 86, 92, 93, 94, 95, 96, 98, 2000, 2001, 2002, 2003
+;; Copyright (C) 1985, 86, 92, 93, 94, 95, 96, 98, 2000, 2001, 2002, 03, 2004
;; Free Software Foundation, Inc.
;; Maintainer: FSF
;; Allow using comment commands to add/remove quoting (this only does
;; anything if mail-yank-prefix is set to a non-nil value).
(set (make-local-variable 'comment-start) mail-yank-prefix)
+ (if mail-yank-prefix
+ (set (make-local-variable 'comment-start-skip)
+ (concat "^" (regexp-quote mail-yank-prefix) "[ \t]*")))
(make-local-variable 'adaptive-fill-regexp)
(setq adaptive-fill-regexp
(concat "[ \t]*[-[:alnum:]]+>+[ \t]*\\|"
(if (and (or (window-dedicated-p (frame-selected-window))
(cdr (assq 'mail-dedicated-frame (frame-parameters))))
(not (null (delq (selected-frame) (visible-frame-list)))))
- (delete-frame (selected-frame))
+ (progn
+ (if (display-multi-frame-p)
+ (delete-frame (selected-frame))
+ ;; The previous frame is where normally they have the
+ ;; RMAIL buffer displayed.
+ (other-frame -1)))
(let (rmail-flag summary-buffer)
(and (not arg)
(not (one-window-p))
(/= (point) (point-max)))
selected-coding
(setq charset
- (coding-system-get selected-coding 'mime-charset))
+ (coding-system-get selected-coding :mime-charset))
(goto-char delimline)
(insert "MIME-version: 1.0\n"
"Content-type: text/plain; charset="
(define-key (current-local-map) "v"
(lambda ()
(interactive)
- (let ((coding-system-for-read 'emacs-mule-unix))
+ (let ((coding-system-for-read 'utf-8-emacs-unix))
(dired-view-file))))
(define-key (current-local-map) "\C-c\C-c"
(lambda ()
(let ((fname (dired-get-filename))
;; Auto-saved files are written in the internal
;; representation, so they should be read accordingly.
- (coding-system-for-read 'emacs-mule-unix))
+ (coding-system-for-read 'utf-8-emacs-unix))
(switch-to-buffer-other-window "*mail*")
(let ((buffer-read-only nil))
(erase-buffer)
(insert-file-contents fname nil)
;; insert-file-contents will set buffer-file-coding-system
- ;; to emacs-mule, which is probably not what they want to
+ ;; to utf-8-emacs, which is probably not what they want to
;; use for sending the message. But we don't know what
;; was its value before the buffer was killed or Emacs
;; crashed. We therefore reset buffer-file-coding-system
(buffer-coding buffer-file-coding-system)
;; Auto-save files are written in internal
;; representation of non-ASCII characters.
- (coding-system-for-read 'emacs-mule-unix))
+ (coding-system-for-read 'utf-8-emacs-unix))
(erase-buffer)
(insert-file-contents file-name nil)
(setq buffer-file-coding-system buffer-coding)))))