diff options
| author | Christian Ohler | 2011-01-13 19:08:58 +1100 |
|---|---|---|
| committer | Christian Ohler | 2011-01-13 19:08:58 +1100 |
| commit | 8b845e3b896986f55dcaf6aa3eb845663a82d3a5 (patch) | |
| tree | 566fc6dc3d21912ec7170d31e677582e84077643 | |
| parent | ea062854af17fa1c75d17557dd3e157cb4952667 (diff) | |
| parent | a03b542a784a745f65c3527a1980f1d22a7ad291 (diff) | |
| download | emacs-8b845e3b896986f55dcaf6aa3eb845663a82d3a5.tar.gz emacs-8b845e3b896986f55dcaf6aa3eb845663a82d3a5.zip | |
Merged from trunk.
| -rw-r--r-- | etc/NEWS | 5 | ||||
| -rw-r--r-- | etc/themes/tsdh-dark-theme.el | 6 | ||||
| -rw-r--r-- | lisp/ChangeLog | 29 | ||||
| -rw-r--r-- | lisp/cus-theme.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package.el | 18 | ||||
| -rw-r--r-- | lisp/font-lock.el | 5 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 13 | ||||
| -rw-r--r-- | lisp/gnus/gnus-msg.el | 4 | ||||
| -rw-r--r-- | lisp/gnus/message.el | 42 | ||||
| -rw-r--r-- | lisp/mail/rmail.el | 72 | ||||
| -rw-r--r-- | lisp/mail/sendmail.el | 134 | ||||
| -rw-r--r-- | lisp/menu-bar.el | 20 | ||||
| -rw-r--r-- | lisp/mh-e/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/mh-e/mh-comp.el | 7 | ||||
| -rw-r--r-- | lisp/simple.el | 67 |
15 files changed, 230 insertions, 198 deletions
| @@ -625,6 +625,11 @@ Notifications API. It requires D-Bus for communication. | |||
| 625 | 625 | ||
| 626 | * Incompatible Lisp Changes in Emacs 24.1 | 626 | * Incompatible Lisp Changes in Emacs 24.1 |
| 627 | 627 | ||
| 628 | ** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and | ||
| 629 | passes it to the mail user agent function. This argument specifies an | ||
| 630 | action for returning to the caller after finishing with the mail. | ||
| 631 | This is currently used by Rmail to delete a mail window. | ||
| 632 | |||
| 628 | ** For mouse click input events in the text area, the Y pixel | 633 | ** For mouse click input events in the text area, the Y pixel |
| 629 | coordinate in the POSITION list now counts from the top of the text | 634 | coordinate in the POSITION list now counts from the top of the text |
| 630 | area, excluding any header line. Previously, it counted from the top | 635 | area, excluding any header line. Previously, it counted from the top |
diff --git a/etc/themes/tsdh-dark-theme.el b/etc/themes/tsdh-dark-theme.el index 4fe86987d87..cc1e86b3306 100644 --- a/etc/themes/tsdh-dark-theme.el +++ b/etc/themes/tsdh-dark-theme.el | |||
| @@ -25,12 +25,12 @@ | |||
| 25 | (custom-theme-set-faces | 25 | (custom-theme-set-faces |
| 26 | 'tsdh-dark | 26 | 'tsdh-dark |
| 27 | '(default ((t (:background "gray20" :foreground "white smoke")))) | 27 | '(default ((t (:background "gray20" :foreground "white smoke")))) |
| 28 | '(diff-added ((t (:inherit diff-changed :background "light green")))) | 28 | '(diff-added ((t (:inherit diff-changed :background "dark green")))) |
| 29 | '(diff-changed ((t (:background "light steel blue")))) | 29 | '(diff-changed ((t (:background "midnight blue")))) |
| 30 | '(diff-indicator-added ((t (:inherit diff-indicator-changed)))) | 30 | '(diff-indicator-added ((t (:inherit diff-indicator-changed)))) |
| 31 | '(diff-indicator-changed ((t (:weight bold)))) | 31 | '(diff-indicator-changed ((t (:weight bold)))) |
| 32 | '(diff-indicator-removed ((t (:inherit diff-indicator-changed)))) | 32 | '(diff-indicator-removed ((t (:inherit diff-indicator-changed)))) |
| 33 | '(diff-removed ((t (:inherit diff-changed :background "sandy brown")))) | 33 | '(diff-removed ((t (:inherit diff-changed :background "dark red")))) |
| 34 | '(dired-directory ((t (:inherit font-lock-function-name-face :weight bold)))) | 34 | '(dired-directory ((t (:inherit font-lock-function-name-face :weight bold)))) |
| 35 | '(hl-line ((t (:background "grey28")))) | 35 | '(hl-line ((t (:background "grey28")))) |
| 36 | '(message-header-subject ((t (:foreground "SkyBlue")))) | 36 | '(message-header-subject ((t (:foreground "SkyBlue")))) |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5869f5086f1..a465244a4dd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -2,6 +2,35 @@ | |||
| 2 | 2 | ||
| 3 | * emacs-lisp/ert.el, emacs-lisp/ert-x.el: New files. | 3 | * emacs-lisp/ert.el, emacs-lisp/ert-x.el: New files. |
| 4 | 4 | ||
| 5 | 2011-01-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 6 | |||
| 7 | * font-lock.el (font-lock-verbose): Default to nil. | ||
| 8 | |||
| 9 | 2011-01-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 10 | |||
| 11 | * simple.el (sendmail-user-agent-compose): Move to sendmail.el. | ||
| 12 | (compose-mail): New arg RETURN-ACTION. | ||
| 13 | (compose-mail-other-window, compose-mail-other-frame): Likewise. | ||
| 14 | |||
| 15 | * mail/sendmail.el (mail-return-action): New var. | ||
| 16 | (mail-mode): Make it buffer-local. | ||
| 17 | (mail-bury): Obey it. Move special Rmail window handling to | ||
| 18 | rmail-mail-return. | ||
| 19 | (mail, mail-setup): New arg RETURN-ACTION. | ||
| 20 | (sendmail-user-agent-compose): Move from simple.el. | ||
| 21 | |||
| 22 | * mail/rmail.el (rmail-mail-return): New function. | ||
| 23 | (rmail-start-mail): Pass it to compose-mail. | ||
| 24 | |||
| 25 | 2011-01-12 Chong Yidong <cyd@stupidchicken.com> | ||
| 26 | |||
| 27 | * menu-bar.el (menu-bar-custom-menu): Tweak Mule and Customize | ||
| 28 | menus. Add menu item for customize-themes. | ||
| 29 | |||
| 30 | * cus-theme.el (customize-themes): | ||
| 31 | * emacs-lisp/package.el (package--list-packages): Use | ||
| 32 | switch-to-buffer. | ||
| 33 | |||
| 5 | 2011-01-11 Johan Bockgård <bojohan@gnu.org> | 34 | 2011-01-11 Johan Bockgård <bojohan@gnu.org> |
| 6 | 35 | ||
| 7 | * emacs-lisp/unsafep.el (unsafep): Handle backquoted forms. | 36 | * emacs-lisp/unsafep.el (unsafep): Handle backquoted forms. |
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index e6e286f00fa..6e94b326e53 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el | |||
| @@ -541,7 +541,7 @@ Do not call this mode function yourself. It is meant for internal use." | |||
| 541 | When called from Lisp, BUFFER should be the buffer to use; if | 541 | When called from Lisp, BUFFER should be the buffer to use; if |
| 542 | omitted, a buffer named *Custom Themes* is used." | 542 | omitted, a buffer named *Custom Themes* is used." |
| 543 | (interactive) | 543 | (interactive) |
| 544 | (pop-to-buffer (get-buffer-create (or buffer "*Custom Themes*"))) | 544 | (switch-to-buffer (get-buffer-create (or buffer "*Custom Themes*"))) |
| 545 | (let ((inhibit-read-only t)) | 545 | (let ((inhibit-read-only t)) |
| 546 | (erase-buffer)) | 546 | (erase-buffer)) |
| 547 | (custom-theme-choose-mode) | 547 | (custom-theme-choose-mode) |
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index fecddcf16ed..dfe1a4309ca 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -1663,15 +1663,15 @@ A value of nil means to display all packages.") | |||
| 1663 | Optional PACKAGES is a list of names of packages (symbols) to | 1663 | Optional PACKAGES is a list of names of packages (symbols) to |
| 1664 | list; the default is to display everything in `package-alist'." | 1664 | list; the default is to display everything in `package-alist'." |
| 1665 | (require 'finder-inf nil t) | 1665 | (require 'finder-inf nil t) |
| 1666 | (with-current-buffer (get-buffer-create "*Packages*") | 1666 | (let ((buf (get-buffer-create "*Packages*"))) |
| 1667 | (package-menu-mode) | 1667 | (with-current-buffer buf |
| 1668 | (set (make-local-variable 'package-menu-package-list) packages) | 1668 | (package-menu-mode) |
| 1669 | (set (make-local-variable 'package-menu-sort-key) nil) | 1669 | (set (make-local-variable 'package-menu-package-list) packages) |
| 1670 | (package--generate-package-list) | 1670 | (set (make-local-variable 'package-menu-sort-key) nil) |
| 1671 | ;; It's okay to use pop-to-buffer here. The package menu buffer | 1671 | (package--generate-package-list)) |
| 1672 | ;; has keybindings, and the user just typed `M-x list-packages', | 1672 | ;; The package menu buffer has keybindings. If the user types |
| 1673 | ;; suggesting that they might want to use them. | 1673 | ;; `M-x list-packages', that suggests it should become current. |
| 1674 | (pop-to-buffer (current-buffer)))) | 1674 | (switch-to-buffer buf))) |
| 1675 | 1675 | ||
| 1676 | ;;;###autoload | 1676 | ;;;###autoload |
| 1677 | (defun list-packages () | 1677 | (defun list-packages () |
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index fe873297dc2..b10c3d8b9ee 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -276,13 +276,14 @@ decoration for buffers in C++ mode, and level 1 decoration otherwise." | |||
| 276 | (integer :tag "level" 1))))) | 276 | (integer :tag "level" 1))))) |
| 277 | :group 'font-lock) | 277 | :group 'font-lock) |
| 278 | 278 | ||
| 279 | (defcustom font-lock-verbose 0 | 279 | (defcustom font-lock-verbose nil |
| 280 | "If non-nil, means show status messages for buffer fontification. | 280 | "If non-nil, means show status messages for buffer fontification. |
| 281 | If a number, only buffers greater than this size have fontification messages." | 281 | If a number, only buffers greater than this size have fontification messages." |
| 282 | :type '(choice (const :tag "never" nil) | 282 | :type '(choice (const :tag "never" nil) |
| 283 | (other :tag "always" t) | 283 | (other :tag "always" t) |
| 284 | (integer :tag "size")) | 284 | (integer :tag "size")) |
| 285 | :group 'font-lock) | 285 | :group 'font-lock |
| 286 | :version "24.1") | ||
| 286 | 287 | ||
| 287 | 288 | ||
| 288 | ;; Originally these variable values were face names such as `bold' etc. | 289 | ;; Originally these variable values were face names such as `bold' etc. |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index c0c6533d531..dcb2353208c 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2011-01-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * message.el (message-tool-bar-gnome): Tweak tool-bar items. Add | ||
| 4 | :vert-only tags. | ||
| 5 | (message-mail): New arg RETURN-ACTION. | ||
| 6 | (message-return-action): New var. | ||
| 7 | (message-bury): Use it. | ||
| 8 | (message-mode): Make it buffer-local. | ||
| 9 | (message-send-and-exit): Always call message-bury. | ||
| 10 | |||
| 11 | * gnus-msg.el (gnus-msg-mail): New arg RETURN-ACTION. Pass it to | ||
| 12 | message-mail. | ||
| 13 | |||
| 1 | 2011-01-11 Lars Magne Ingebrigtsen <larsi@gnus.org> | 14 | 2011-01-11 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 15 | ||
| 3 | * nnimap.el (nnimap-convert-partial-article): Protect against | 16 | * nnimap.el (nnimap-convert-partial-article): Protect against |
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index d66e1692a80..e352ffacef8 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el | |||
| @@ -477,7 +477,7 @@ Thank you for your help in stamping out bugs. | |||
| 477 | 477 | ||
| 478 | ;;;###autoload | 478 | ;;;###autoload |
| 479 | (defun gnus-msg-mail (&optional to subject other-headers continue | 479 | (defun gnus-msg-mail (&optional to subject other-headers continue |
| 480 | switch-action yank-action send-actions) | 480 | switch-action yank-action send-actions return-action) |
| 481 | "Start editing a mail message to be sent. | 481 | "Start editing a mail message to be sent. |
| 482 | Like `message-mail', but with Gnus paraphernalia, particularly the | 482 | Like `message-mail', but with Gnus paraphernalia, particularly the |
| 483 | Gcc: header for archiving purposes." | 483 | Gcc: header for archiving purposes." |
| @@ -486,7 +486,7 @@ Gcc: header for archiving purposes." | |||
| 486 | mail-buf) | 486 | mail-buf) |
| 487 | (gnus-setup-message 'message | 487 | (gnus-setup-message 'message |
| 488 | (message-mail to subject other-headers continue | 488 | (message-mail to subject other-headers continue |
| 489 | nil yank-action send-actions)) | 489 | nil yank-action send-actions return-action)) |
| 490 | (when switch-action | 490 | (when switch-action |
| 491 | (setq mail-buf (current-buffer)) | 491 | (setq mail-buf (current-buffer)) |
| 492 | (switch-to-buffer buf) | 492 | (switch-to-buffer buf) |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 78652fb2ee0..e8b6d141720 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -1120,6 +1120,8 @@ It is a vector of the following headers: | |||
| 1120 | (defvar message-checksum nil) | 1120 | (defvar message-checksum nil) |
| 1121 | (defvar message-send-actions nil | 1121 | (defvar message-send-actions nil |
| 1122 | "A list of actions to be performed upon successful sending of a message.") | 1122 | "A list of actions to be performed upon successful sending of a message.") |
| 1123 | (defvar message-return-action nil | ||
| 1124 | "Action to return to the caller after sending or postphoning a message.") | ||
| 1123 | (defvar message-exit-actions nil | 1125 | (defvar message-exit-actions nil |
| 1124 | "A list of actions to be performed upon exiting after sending a message.") | 1126 | "A list of actions to be performed upon exiting after sending a message.") |
| 1125 | (defvar message-kill-actions nil | 1127 | (defvar message-kill-actions nil |
| @@ -2863,6 +2865,7 @@ M-RET `message-newline-and-reformat' (break the line and reformat)." | |||
| 2863 | (set (make-local-variable 'message-reply-buffer) nil) | 2865 | (set (make-local-variable 'message-reply-buffer) nil) |
| 2864 | (set (make-local-variable 'message-inserted-headers) nil) | 2866 | (set (make-local-variable 'message-inserted-headers) nil) |
| 2865 | (set (make-local-variable 'message-send-actions) nil) | 2867 | (set (make-local-variable 'message-send-actions) nil) |
| 2868 | (set (make-local-variable 'message-return-action) nil) | ||
| 2866 | (set (make-local-variable 'message-exit-actions) nil) | 2869 | (set (make-local-variable 'message-exit-actions) nil) |
| 2867 | (set (make-local-variable 'message-kill-actions) nil) | 2870 | (set (make-local-variable 'message-kill-actions) nil) |
| 2868 | (set (make-local-variable 'message-postpone-actions) nil) | 2871 | (set (make-local-variable 'message-postpone-actions) nil) |
| @@ -3955,11 +3958,9 @@ The text will also be indented the normal way." | |||
| 3955 | (actions message-exit-actions)) | 3958 | (actions message-exit-actions)) |
| 3956 | (when (and (message-send arg) | 3959 | (when (and (message-send arg) |
| 3957 | (buffer-name buf)) | 3960 | (buffer-name buf)) |
| 3961 | (message-bury buf) | ||
| 3958 | (if message-kill-buffer-on-exit | 3962 | (if message-kill-buffer-on-exit |
| 3959 | (kill-buffer buf) | 3963 | (kill-buffer buf)) |
| 3960 | (bury-buffer buf) | ||
| 3961 | (when (eq buf (current-buffer)) | ||
| 3962 | (message-bury buf))) | ||
| 3963 | (message-do-actions actions) | 3964 | (message-do-actions actions) |
| 3964 | t))) | 3965 | t))) |
| 3965 | 3966 | ||
| @@ -4009,9 +4010,8 @@ Instead, just auto-save the buffer and then bury it." | |||
| 4009 | "Bury this mail BUFFER." | 4010 | "Bury this mail BUFFER." |
| 4010 | (let ((newbuf (other-buffer buffer))) | 4011 | (let ((newbuf (other-buffer buffer))) |
| 4011 | (bury-buffer buffer) | 4012 | (bury-buffer buffer) |
| 4012 | (if (and (window-dedicated-p (selected-window)) | 4013 | (if message-return-action |
| 4013 | (not (null (delq (selected-frame) (visible-frame-list))))) | 4014 | (apply (car message-return-action) (cdr message-return-action)) |
| 4014 | (delete-frame (selected-frame)) | ||
| 4015 | (switch-to-buffer newbuf)))) | 4015 | (switch-to-buffer newbuf)))) |
| 4016 | 4016 | ||
| 4017 | (defun message-send (&optional arg) | 4017 | (defun message-send (&optional arg) |
| @@ -6304,11 +6304,11 @@ between beginning of field and beginning of line." | |||
| 6304 | ;; YANK-ACTION, if non-nil, can be a buffer or a yank action of the | 6304 | ;; YANK-ACTION, if non-nil, can be a buffer or a yank action of the |
| 6305 | ;; form (FUNCTION . ARGS). | 6305 | ;; form (FUNCTION . ARGS). |
| 6306 | (defun message-setup (headers &optional yank-action actions | 6306 | (defun message-setup (headers &optional yank-action actions |
| 6307 | continue switch-function) | 6307 | continue switch-function return-action) |
| 6308 | (let ((mua (message-mail-user-agent)) | 6308 | (let ((mua (message-mail-user-agent)) |
| 6309 | subject to field) | 6309 | subject to field) |
| 6310 | (if (not (and message-this-is-mail mua)) | 6310 | (if (not (and message-this-is-mail mua)) |
| 6311 | (message-setup-1 headers yank-action actions) | 6311 | (message-setup-1 headers yank-action actions return-action) |
| 6312 | (setq headers (copy-sequence headers)) | 6312 | (setq headers (copy-sequence headers)) |
| 6313 | (setq field (assq 'Subject headers)) | 6313 | (setq field (assq 'Subject headers)) |
| 6314 | (when field | 6314 | (when field |
| @@ -6356,11 +6356,12 @@ are not included." | |||
| 6356 | (push header result))) | 6356 | (push header result))) |
| 6357 | (nreverse result))) | 6357 | (nreverse result))) |
| 6358 | 6358 | ||
| 6359 | (defun message-setup-1 (headers &optional yank-action actions) | 6359 | (defun message-setup-1 (headers &optional yank-action actions return-action) |
| 6360 | (dolist (action actions) | 6360 | (dolist (action actions) |
| 6361 | (condition-case nil | 6361 | (condition-case nil |
| 6362 | (add-to-list 'message-send-actions | 6362 | (add-to-list 'message-send-actions |
| 6363 | `(apply ',(car action) ',(cdr action))))) | 6363 | `(apply ',(car action) ',(cdr action))))) |
| 6364 | (setq message-return-action return-action) | ||
| 6364 | (setq message-reply-buffer | 6365 | (setq message-reply-buffer |
| 6365 | (if (and (consp yank-action) | 6366 | (if (and (consp yank-action) |
| 6366 | (eq (car yank-action) 'insert-buffer)) | 6367 | (eq (car yank-action) 'insert-buffer)) |
| @@ -6489,9 +6490,9 @@ are not included." | |||
| 6489 | ;;; | 6490 | ;;; |
| 6490 | 6491 | ||
| 6491 | ;;;###autoload | 6492 | ;;;###autoload |
| 6492 | (defun message-mail (&optional to subject | 6493 | (defun message-mail (&optional to subject other-headers continue |
| 6493 | other-headers continue switch-function | 6494 | switch-function yank-action send-actions |
| 6494 | yank-action send-actions) | 6495 | return-action &rest ignored) |
| 6495 | "Start editing a mail message to be sent. | 6496 | "Start editing a mail message to be sent. |
| 6496 | OTHER-HEADERS is an alist of header/value pairs. CONTINUE says whether | 6497 | OTHER-HEADERS is an alist of header/value pairs. CONTINUE says whether |
| 6497 | to continue editing a message already being composed. SWITCH-FUNCTION | 6498 | to continue editing a message already being composed. SWITCH-FUNCTION |
| @@ -6512,7 +6513,8 @@ is a function used to switch to and display the mail buffer." | |||
| 6512 | (nconc | 6513 | (nconc |
| 6513 | `((To . ,(or to "")) (Subject . ,(or subject ""))) | 6514 | `((To . ,(or to "")) (Subject . ,(or subject ""))) |
| 6514 | (when other-headers other-headers)) | 6515 | (when other-headers other-headers)) |
| 6515 | yank-action send-actions continue switch-function) | 6516 | yank-action send-actions continue switch-function |
| 6517 | return-action) | ||
| 6516 | ;; FIXME: Should return nil if failure. | 6518 | ;; FIXME: Should return nil if failure. |
| 6517 | t)) | 6519 | t)) |
| 6518 | 6520 | ||
| @@ -7642,24 +7644,22 @@ Pre-defined symbols include `message-tool-bar-gnome' and | |||
| 7642 | 7644 | ||
| 7643 | (defcustom message-tool-bar-gnome | 7645 | (defcustom message-tool-bar-gnome |
| 7644 | '((ispell-message "spell" nil | 7646 | '((ispell-message "spell" nil |
| 7647 | :vert-only t | ||
| 7645 | :visible (or (not (boundp 'flyspell-mode)) | 7648 | :visible (or (not (boundp 'flyspell-mode)) |
| 7646 | (not flyspell-mode))) | 7649 | (not flyspell-mode))) |
| 7647 | (flyspell-buffer "spell" t | 7650 | (flyspell-buffer "spell" t |
| 7651 | :vert-only t | ||
| 7648 | :visible (and (boundp 'flyspell-mode) | 7652 | :visible (and (boundp 'flyspell-mode) |
| 7649 | flyspell-mode) | 7653 | flyspell-mode) |
| 7650 | :help "Flyspell whole buffer") | 7654 | :help "Flyspell whole buffer") |
| 7651 | (gmm-ignore "separator") | 7655 | (message-send-and-exit "mail/send" t :label "Send") |
| 7652 | (message-send-and-exit "mail/send") | ||
| 7653 | (message-dont-send "mail/save-draft") | 7656 | (message-dont-send "mail/save-draft") |
| 7654 | (message-kill-buffer "close") ;; stock_cancel | 7657 | (mml-attach-file "attach" mml-mode-map :vert-only t) |
| 7655 | (mml-attach-file "attach" mml-mode-map) | ||
| 7656 | (mml-preview "mail/preview" mml-mode-map) | 7658 | (mml-preview "mail/preview" mml-mode-map) |
| 7657 | (mml-secure-message-sign-encrypt "lock" mml-mode-map :visible nil) | 7659 | (mml-secure-message-sign-encrypt "lock" mml-mode-map :visible nil) |
| 7658 | (message-insert-importance-high "important" nil :visible nil) | 7660 | (message-insert-importance-high "important" nil :visible nil) |
| 7659 | (message-insert-importance-low "unimportant" nil :visible nil) | 7661 | (message-insert-importance-low "unimportant" nil :visible nil) |
| 7660 | (message-insert-disposition-notification-to "receipt" nil :visible nil) | 7662 | (message-insert-disposition-notification-to "receipt" nil :visible nil)) |
| 7661 | (gmm-customize-mode "preferences" t :help "Edit mode preferences") | ||
| 7662 | (message-info "help" t :help "Message manual")) | ||
| 7663 | "List of items for the message tool bar (GNOME style). | 7663 | "List of items for the message tool bar (GNOME style). |
| 7664 | 7664 | ||
| 7665 | See `gmm-tool-bar-from-list' for details on the format of the list." | 7665 | See `gmm-tool-bar-from-list' for details on the format of the list." |
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 250481c20b5..1697bce91a5 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -3441,30 +3441,62 @@ does not pop any summary buffer." | |||
| 3441 | ;;;; *** Rmail Mailing Commands *** | 3441 | ;;;; *** Rmail Mailing Commands *** |
| 3442 | 3442 | ||
| 3443 | (defun rmail-start-mail (&optional noerase to subject in-reply-to cc | 3443 | (defun rmail-start-mail (&optional noerase to subject in-reply-to cc |
| 3444 | replybuffer sendactions same-window others) | 3444 | replybuffer sendactions same-window |
| 3445 | (let (yank-action) | 3445 | other-headers) |
| 3446 | (let ((switch-function | ||
| 3447 | (cond (same-window nil) | ||
| 3448 | (rmail-mail-new-frame 'switch-to-buffer-other-frame) | ||
| 3449 | (t 'switch-to-buffer-other-window))) | ||
| 3450 | yank-action) | ||
| 3446 | (if replybuffer | 3451 | (if replybuffer |
| 3447 | ;; The function used here must behave like insert-buffer wrt | 3452 | ;; The function used here must behave like insert-buffer wrt |
| 3448 | ;; point and mark (see doc of sc-cite-original). | 3453 | ;; point and mark (see doc of sc-cite-original). |
| 3449 | (setq yank-action (list 'insert-buffer replybuffer))) | 3454 | (setq yank-action (list 'insert-buffer replybuffer))) |
| 3450 | (setq others (cons (cons "cc" cc) others)) | 3455 | (push (cons "cc" cc) other-headers) |
| 3451 | (setq others (cons (cons "in-reply-to" in-reply-to) others)) | 3456 | (push (cons "in-reply-to" in-reply-to) other-headers) |
| 3452 | (if same-window | 3457 | (prog1 |
| 3453 | (compose-mail to subject others | 3458 | (compose-mail to subject other-headers noerase |
| 3454 | noerase nil | 3459 | switch-function yank-action sendactions |
| 3455 | yank-action sendactions) | 3460 | '(rmail-mail-return)) |
| 3456 | (if rmail-mail-new-frame | 3461 | (if (eq switch-function 'switch-to-buffer-other-frame) |
| 3457 | (prog1 | 3462 | ;; This is not a standard frame parameter; nothing except |
| 3458 | (compose-mail to subject others | 3463 | ;; sendmail.el looks at it. |
| 3459 | noerase 'switch-to-buffer-other-frame | 3464 | (modify-frame-parameters (selected-frame) |
| 3460 | yank-action sendactions) | 3465 | '((mail-dedicated-frame . t))))))) |
| 3461 | ;; This is not a standard frame parameter; | 3466 | |
| 3462 | ;; nothing except sendmail.el looks at it. | 3467 | (defun rmail-mail-return () |
| 3463 | (modify-frame-parameters (selected-frame) | 3468 | (cond |
| 3464 | '((mail-dedicated-frame . t)))) | 3469 | ;; If there is only one visible frame with no special handling, |
| 3465 | (compose-mail to subject others | 3470 | ;; consider deleting the mail window to return to Rmail. |
| 3466 | noerase 'switch-to-buffer-other-window | 3471 | ((or (null (delq (selected-frame) (visible-frame-list))) |
| 3467 | yank-action sendactions))))) | 3472 | (not (or (window-dedicated-p (frame-selected-window)) |
| 3473 | (and pop-up-frames (one-window-p)) | ||
| 3474 | (cdr (assq 'mail-dedicated-frame | ||
| 3475 | (frame-parameters)))))) | ||
| 3476 | (let (rmail-flag summary-buffer) | ||
| 3477 | (and (not (one-window-p)) | ||
| 3478 | (with-current-buffer | ||
| 3479 | (window-buffer (next-window (selected-window) 'not)) | ||
| 3480 | (setq rmail-flag (eq major-mode 'rmail-mode)) | ||
| 3481 | (setq summary-buffer | ||
| 3482 | (and (boundp 'mail-bury-selects-summary) | ||
| 3483 | mail-bury-selects-summary | ||
| 3484 | (boundp 'rmail-summary-buffer) | ||
| 3485 | rmail-summary-buffer | ||
| 3486 | (buffer-name rmail-summary-buffer) | ||
| 3487 | (not (get-buffer-window rmail-summary-buffer)) | ||
| 3488 | rmail-summary-buffer)))) | ||
| 3489 | (if rmail-flag | ||
| 3490 | ;; If the Rmail buffer has a summary, show that. | ||
| 3491 | (if summary-buffer (switch-to-buffer summary-buffer) | ||
| 3492 | (delete-window))))) | ||
| 3493 | ;; If the frame was probably made for this buffer, the user | ||
| 3494 | ;; probably wants to delete it now. | ||
| 3495 | ((display-multi-frame-p) | ||
| 3496 | (delete-frame (selected-frame))) | ||
| 3497 | ;; The previous frame is where normally they have the Rmail buffer | ||
| 3498 | ;; displayed. | ||
| 3499 | (t (other-frame -1)))) | ||
| 3468 | 3500 | ||
| 3469 | (defun rmail-mail () | 3501 | (defun rmail-mail () |
| 3470 | "Send mail in another window. | 3502 | "Send mail in another window. |
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index ca91d9512ee..4fa513089bc 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -419,8 +419,7 @@ in `message-auto-save-directory'." | |||
| 419 | (defvar mail-reply-action nil) | 419 | (defvar mail-reply-action nil) |
| 420 | (defvar mail-send-actions nil | 420 | (defvar mail-send-actions nil |
| 421 | "A list of actions to be performed upon successful sending of a message.") | 421 | "A list of actions to be performed upon successful sending of a message.") |
| 422 | (put 'mail-reply-action 'permanent-local t) | 422 | (defvar mail-return-action nil) |
| 423 | (put 'mail-send-actions 'permanent-local t) | ||
| 424 | 423 | ||
| 425 | ;;;###autoload | 424 | ;;;###autoload |
| 426 | (defcustom mail-default-headers nil | 425 | (defcustom mail-default-headers nil |
| @@ -521,7 +520,46 @@ by Emacs.)") | |||
| 521 | (setq mail-alias-modtime modtime | 520 | (setq mail-alias-modtime modtime |
| 522 | mail-aliases t))))) | 521 | mail-aliases t))))) |
| 523 | 522 | ||
| 524 | (defun mail-setup (to subject in-reply-to cc replybuffer actions) | 523 | |
| 524 | ;;;###autoload | ||
| 525 | (define-mail-user-agent 'sendmail-user-agent | ||
| 526 | 'sendmail-user-agent-compose | ||
| 527 | 'mail-send-and-exit) | ||
| 528 | |||
| 529 | ;;;###autoload | ||
| 530 | (defun sendmail-user-agent-compose (&optional to subject other-headers | ||
| 531 | continue switch-function yank-action | ||
| 532 | send-actions return-action | ||
| 533 | &rest ignored) | ||
| 534 | (if switch-function | ||
| 535 | (let ((special-display-buffer-names nil) | ||
| 536 | (special-display-regexps nil) | ||
| 537 | (same-window-buffer-names nil) | ||
| 538 | (same-window-regexps nil)) | ||
| 539 | (funcall switch-function "*mail*"))) | ||
| 540 | (let ((cc (cdr (assoc-string "cc" other-headers t))) | ||
| 541 | (in-reply-to (cdr (assoc-string "in-reply-to" other-headers t))) | ||
| 542 | (body (cdr (assoc-string "body" other-headers t)))) | ||
| 543 | (or (mail continue to subject in-reply-to cc yank-action | ||
| 544 | send-actions return-action) | ||
| 545 | continue | ||
| 546 | (error "Message aborted")) | ||
| 547 | (save-excursion | ||
| 548 | (rfc822-goto-eoh) | ||
| 549 | (while other-headers | ||
| 550 | (unless (member-ignore-case (car (car other-headers)) | ||
| 551 | '("in-reply-to" "cc" "body")) | ||
| 552 | (insert (car (car other-headers)) ": " | ||
| 553 | (cdr (car other-headers)) | ||
| 554 | (if use-hard-newlines hard-newline "\n"))) | ||
| 555 | (setq other-headers (cdr other-headers))) | ||
| 556 | (when body | ||
| 557 | (forward-line 1) | ||
| 558 | (insert body)) | ||
| 559 | t))) | ||
| 560 | |||
| 561 | (defun mail-setup (to subject in-reply-to cc replybuffer | ||
| 562 | actions return-action) | ||
| 525 | (or mail-default-reply-to | 563 | (or mail-default-reply-to |
| 526 | (setq mail-default-reply-to (getenv "REPLYTO"))) | 564 | (setq mail-default-reply-to (getenv "REPLYTO"))) |
| 527 | (sendmail-sync-aliases) | 565 | (sendmail-sync-aliases) |
| @@ -537,8 +575,12 @@ by Emacs.)") | |||
| 537 | (set-buffer-multibyte (default-value 'enable-multibyte-characters)) | 575 | (set-buffer-multibyte (default-value 'enable-multibyte-characters)) |
| 538 | (if current-input-method | 576 | (if current-input-method |
| 539 | (inactivate-input-method)) | 577 | (inactivate-input-method)) |
| 578 | |||
| 579 | ;; Local variables for Mail mode. | ||
| 540 | (setq mail-send-actions actions) | 580 | (setq mail-send-actions actions) |
| 541 | (setq mail-reply-action replybuffer) | 581 | (setq mail-reply-action replybuffer) |
| 582 | (setq mail-return-action return-action) | ||
| 583 | |||
| 542 | (goto-char (point-min)) | 584 | (goto-char (point-min)) |
| 543 | (if mail-setup-with-from | 585 | (if mail-setup-with-from |
| 544 | (mail-insert-from-field)) | 586 | (mail-insert-from-field)) |
| @@ -629,6 +671,7 @@ Turning on Mail mode runs the normal hooks `text-mode-hook' and | |||
| 629 | `mail-mode-hook' (in that order)." | 671 | `mail-mode-hook' (in that order)." |
| 630 | (make-local-variable 'mail-reply-action) | 672 | (make-local-variable 'mail-reply-action) |
| 631 | (make-local-variable 'mail-send-actions) | 673 | (make-local-variable 'mail-send-actions) |
| 674 | (make-local-variable 'mail-return-action) | ||
| 632 | (setq buffer-offer-save t) | 675 | (setq buffer-offer-save t) |
| 633 | (make-local-variable 'font-lock-defaults) | 676 | (make-local-variable 'font-lock-defaults) |
| 634 | (setq font-lock-defaults '(mail-font-lock-keywords t t)) | 677 | (setq font-lock-defaults '(mail-font-lock-keywords t t)) |
| @@ -762,39 +805,9 @@ Prefix arg means don't delete this window." | |||
| 762 | "Bury this mail buffer." | 805 | "Bury this mail buffer." |
| 763 | (let ((newbuf (other-buffer (current-buffer)))) | 806 | (let ((newbuf (other-buffer (current-buffer)))) |
| 764 | (bury-buffer (current-buffer)) | 807 | (bury-buffer (current-buffer)) |
| 765 | (if (and (or nil | 808 | (if (and (null arg) mail-return-action) |
| 766 | ;; In this case, we need to go to a different frame. | 809 | (apply (car mail-return-action) (cdr mail-return-action)) |
| 767 | (window-dedicated-p (frame-selected-window)) | 810 | (switch-to-buffer newbuf)))) |
| 768 | ;; In this mode of operation, the frame was probably | ||
| 769 | ;; made for this buffer, so the user probably wants | ||
| 770 | ;; to delete it now. | ||
| 771 | (and pop-up-frames (one-window-p)) | ||
| 772 | (cdr (assq 'mail-dedicated-frame (frame-parameters)))) | ||
| 773 | (not (null (delq (selected-frame) (visible-frame-list))))) | ||
| 774 | (progn | ||
| 775 | (if (display-multi-frame-p) | ||
| 776 | (delete-frame (selected-frame)) | ||
| 777 | ;; The previous frame is where normally they have the | ||
| 778 | ;; Rmail buffer displayed. | ||
| 779 | (other-frame -1))) | ||
| 780 | (let (rmail-flag summary-buffer) | ||
| 781 | (and (not arg) | ||
| 782 | (not (one-window-p)) | ||
| 783 | (with-current-buffer | ||
| 784 | (window-buffer (next-window (selected-window) 'not)) | ||
| 785 | (setq rmail-flag (eq major-mode 'rmail-mode)) | ||
| 786 | (setq summary-buffer | ||
| 787 | (and mail-bury-selects-summary | ||
| 788 | (boundp 'rmail-summary-buffer) | ||
| 789 | rmail-summary-buffer | ||
| 790 | (buffer-name rmail-summary-buffer) | ||
| 791 | (not (get-buffer-window rmail-summary-buffer)) | ||
| 792 | rmail-summary-buffer)))) | ||
| 793 | (if rmail-flag | ||
| 794 | ;; If the Rmail buffer has a summary, show that. | ||
| 795 | (if summary-buffer (switch-to-buffer summary-buffer) | ||
| 796 | (delete-window)) | ||
| 797 | (switch-to-buffer newbuf)))))) | ||
| 798 | 811 | ||
| 799 | (defcustom mail-send-hook nil | 812 | (defcustom mail-send-hook nil |
| 800 | "Hook run just before sending a message." | 813 | "Hook run just before sending a message." |
| @@ -1643,7 +1656,8 @@ If the current line has `mail-yank-prefix', insert it on the new line." | |||
| 1643 | ;;;###autoload (add-hook 'same-window-buffer-names (purecopy "*unsent mail*")) | 1656 | ;;;###autoload (add-hook 'same-window-buffer-names (purecopy "*unsent mail*")) |
| 1644 | 1657 | ||
| 1645 | ;;;###autoload | 1658 | ;;;###autoload |
| 1646 | (defun mail (&optional noerase to subject in-reply-to cc replybuffer actions) | 1659 | (defun mail (&optional noerase to subject in-reply-to cc replybuffer |
| 1660 | actions return-action) | ||
| 1647 | "Edit a message to be sent. Prefix arg means resume editing (don't erase). | 1661 | "Edit a message to be sent. Prefix arg means resume editing (don't erase). |
| 1648 | When this function returns, the buffer `*mail*' is selected. | 1662 | When this function returns, the buffer `*mail*' is selected. |
| 1649 | The value is t if the message was newly initialized; otherwise, nil. | 1663 | The value is t if the message was newly initialized; otherwise, nil. |
| @@ -1691,49 +1705,6 @@ The seventh argument ACTIONS is a list of actions to take | |||
| 1691 | when the message is sent, we apply FUNCTION to ARGS. | 1705 | when the message is sent, we apply FUNCTION to ARGS. |
| 1692 | This is how Rmail arranges to mark messages `answered'." | 1706 | This is how Rmail arranges to mark messages `answered'." |
| 1693 | (interactive "P") | 1707 | (interactive "P") |
| 1694 | ;; This is commented out because I found it was confusing in practice. | ||
| 1695 | ;; It is easy enough to rename *mail* by hand with rename-buffer | ||
| 1696 | ;; if you want to have multiple mail buffers. | ||
| 1697 | ;; And then you can control which messages to save. --rms. | ||
| 1698 | ;; (let ((index 1) | ||
| 1699 | ;; buffer) | ||
| 1700 | ;; ;; If requested, look for a mail buffer that is modified and go to it. | ||
| 1701 | ;; (if noerase | ||
| 1702 | ;; (progn | ||
| 1703 | ;; (while (and (setq buffer | ||
| 1704 | ;; (get-buffer (if (= 1 index) "*mail*" | ||
| 1705 | ;; (format "*mail*<%d>" index)))) | ||
| 1706 | ;; (not (buffer-modified-p buffer))) | ||
| 1707 | ;; (setq index (1+ index))) | ||
| 1708 | ;; (if buffer (switch-to-buffer buffer) | ||
| 1709 | ;; ;; If none exists, start a new message. | ||
| 1710 | ;; ;; This will never re-use an existing unmodified mail buffer | ||
| 1711 | ;; ;; (since index is not 1 anymore). Perhaps it should. | ||
| 1712 | ;; (setq noerase nil)))) | ||
| 1713 | ;; ;; Unless we found a modified message and are happy, start a new message. | ||
| 1714 | ;; (if (not noerase) | ||
| 1715 | ;; (progn | ||
| 1716 | ;; ;; Look for existing unmodified mail buffer. | ||
| 1717 | ;; (while (and (setq buffer | ||
| 1718 | ;; (get-buffer (if (= 1 index) "*mail*" | ||
| 1719 | ;; (format "*mail*<%d>" index)))) | ||
| 1720 | ;; (buffer-modified-p buffer)) | ||
| 1721 | ;; (setq index (1+ index))) | ||
| 1722 | ;; ;; If none, make a new one. | ||
| 1723 | ;; (or buffer | ||
| 1724 | ;; (setq buffer (generate-new-buffer "*mail*"))) | ||
| 1725 | ;; ;; Go there and initialize it. | ||
| 1726 | ;; (switch-to-buffer buffer) | ||
| 1727 | ;; (erase-buffer) | ||
| 1728 | ;; (setq default-directory (expand-file-name "~/")) | ||
| 1729 | ;; (auto-save-mode auto-save-default) | ||
| 1730 | ;; (mail-mode) | ||
| 1731 | ;; (mail-setup to subject in-reply-to cc replybuffer actions) | ||
| 1732 | ;; (if (and buffer-auto-save-file-name | ||
| 1733 | ;; (file-exists-p buffer-auto-save-file-name)) | ||
| 1734 | ;; (message "Auto save file for draft message exists; consider M-x mail-recover")) | ||
| 1735 | ;; t)) | ||
| 1736 | |||
| 1737 | (if (eq noerase 'new) | 1708 | (if (eq noerase 'new) |
| 1738 | (pop-to-buffer (generate-new-buffer "*mail*")) | 1709 | (pop-to-buffer (generate-new-buffer "*mail*")) |
| 1739 | (and noerase | 1710 | (and noerase |
| @@ -1772,7 +1743,8 @@ The seventh argument ACTIONS is a list of actions to take | |||
| 1772 | t)) | 1743 | t)) |
| 1773 | (let ((inhibit-read-only t)) | 1744 | (let ((inhibit-read-only t)) |
| 1774 | (erase-buffer) | 1745 | (erase-buffer) |
| 1775 | (mail-setup to subject in-reply-to cc replybuffer actions) | 1746 | (mail-setup to subject in-reply-to cc replybuffer actions |
| 1747 | return-action) | ||
| 1776 | (setq initialized t))) | 1748 | (setq initialized t))) |
| 1777 | (if (and buffer-auto-save-file-name | 1749 | (if (and buffer-auto-save-file-name |
| 1778 | (file-exists-p buffer-auto-save-file-name)) | 1750 | (file-exists-p buffer-auto-save-file-name)) |
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 7babd41b69d..2fe5f94ac7f 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -584,18 +584,15 @@ Do the same for the keys of the same name." | |||
| 584 | 584 | ||
| 585 | (defvar menu-bar-custom-menu (make-sparse-keymap "Customize")) | 585 | (defvar menu-bar-custom-menu (make-sparse-keymap "Customize")) |
| 586 | 586 | ||
| 587 | (define-key menu-bar-custom-menu [customize-apropos-groups] | ||
| 588 | `(menu-item ,(purecopy "Groups Matching Regexp...") customize-apropos-groups | ||
| 589 | :help ,(purecopy "Browse groups whose names match regexp"))) | ||
| 590 | (define-key menu-bar-custom-menu [customize-apropos-faces] | 587 | (define-key menu-bar-custom-menu [customize-apropos-faces] |
| 591 | `(menu-item ,(purecopy "Faces Matching Regexp...") customize-apropos-faces | 588 | `(menu-item ,(purecopy "Faces Matching...") customize-apropos-faces |
| 592 | :help ,(purecopy "Browse faces whose names match regexp"))) | 589 | :help ,(purecopy "Browse faces matching a regexp or word list"))) |
| 593 | (define-key menu-bar-custom-menu [customize-apropos-options] | 590 | (define-key menu-bar-custom-menu [customize-apropos-options] |
| 594 | `(menu-item ,(purecopy "Options Matching Regexp...") customize-apropos-options | 591 | `(menu-item ,(purecopy "Options Matching...") customize-apropos-options |
| 595 | :help ,(purecopy "Browse options whose names match regexp"))) | 592 | :help ,(purecopy "Browse options matching a regexp or word list"))) |
| 596 | (define-key menu-bar-custom-menu [customize-apropos] | 593 | (define-key menu-bar-custom-menu [customize-apropos] |
| 597 | `(menu-item ,(purecopy "Settings Matching Regexp...") customize-apropos | 594 | `(menu-item ,(purecopy "All Settings Matching...") customize-apropos |
| 598 | :help ,(purecopy "Browse customizable settings whose names match regexp"))) | 595 | :help ,(purecopy "Browse customizable settings matching a regexp or word list"))) |
| 599 | (define-key menu-bar-custom-menu [separator-1] | 596 | (define-key menu-bar-custom-menu [separator-1] |
| 600 | menu-bar-separator) | 597 | menu-bar-separator) |
| 601 | (define-key menu-bar-custom-menu [customize-group] | 598 | (define-key menu-bar-custom-menu [customize-group] |
| @@ -623,6 +620,9 @@ Do the same for the keys of the same name." | |||
| 623 | (define-key menu-bar-custom-menu [customize] | 620 | (define-key menu-bar-custom-menu [customize] |
| 624 | `(menu-item ,(purecopy "Top-level Customization Group") customize | 621 | `(menu-item ,(purecopy "Top-level Customization Group") customize |
| 625 | :help ,(purecopy "The master group called `Emacs'"))) | 622 | :help ,(purecopy "The master group called `Emacs'"))) |
| 623 | (define-key menu-bar-custom-menu [customize-themes] | ||
| 624 | `(menu-item ,(purecopy "Custom Themes") customize-themes | ||
| 625 | :help ,(purecopy "Choose a pre-defined customization theme"))) | ||
| 626 | 626 | ||
| 627 | ;(defvar menu-bar-preferences-menu (make-sparse-keymap "Preferences")) | 627 | ;(defvar menu-bar-preferences-menu (make-sparse-keymap "Preferences")) |
| 628 | 628 | ||
| @@ -1144,7 +1144,7 @@ mail status in mode line")) | |||
| 1144 | ;; It is better not to use backquote here, | 1144 | ;; It is better not to use backquote here, |
| 1145 | ;; because that makes a bootstrapping problem | 1145 | ;; because that makes a bootstrapping problem |
| 1146 | ;; if you need to recompile all the Lisp files using interpreted code. | 1146 | ;; if you need to recompile all the Lisp files using interpreted code. |
| 1147 | `(menu-item ,(purecopy "Mule (Multilingual Environment)") ,mule-menu-keymap | 1147 | `(menu-item ,(purecopy "Multilingual Environment") ,mule-menu-keymap |
| 1148 | ;; Most of the MULE menu actually does make sense in unibyte mode, | 1148 | ;; Most of the MULE menu actually does make sense in unibyte mode, |
| 1149 | ;; e.g. language selection. | 1149 | ;; e.g. language selection. |
| 1150 | ;;; :visible '(default-value 'enable-multibyte-characters) | 1150 | ;;; :visible '(default-value 'enable-multibyte-characters) |
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 336fd0100c1..d6cc987bf41 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-01-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * mh-comp.el (mh-user-agent-compose): New arg RETURN-ACTION. | ||
| 4 | |||
| 1 | 2010-11-07 Glenn Morris <rgm@gnu.org> | 5 | 2010-11-07 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * mh-seq.el (mh-read-msg-list): Use point-at-eol. | 7 | * mh-seq.el (mh-read-msg-list): Use point-at-eol. |
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el index 762aad86080..b2de7ab706e 100644 --- a/lisp/mh-e/mh-comp.el +++ b/lisp/mh-e/mh-comp.el | |||
| @@ -199,7 +199,8 @@ applications should use `mh-user-agent-compose'." | |||
| 199 | ;;;###autoload | 199 | ;;;###autoload |
| 200 | (defun mh-user-agent-compose (&optional to subject other-headers continue | 200 | (defun mh-user-agent-compose (&optional to subject other-headers continue |
| 201 | switch-function yank-action | 201 | switch-function yank-action |
| 202 | send-actions) | 202 | send-actions return-action |
| 203 | &rest ignored) | ||
| 203 | "Set up mail composition draft with the MH mail system. | 204 | "Set up mail composition draft with the MH mail system. |
| 204 | This is the `mail-user-agent' entry point to MH-E. This function | 205 | This is the `mail-user-agent' entry point to MH-E. This function |
| 205 | conforms to the contract specified by `define-mail-user-agent' | 206 | conforms to the contract specified by `define-mail-user-agent' |
| @@ -213,8 +214,8 @@ OTHER-HEADERS is an alist specifying additional header fields. | |||
| 213 | Elements look like (HEADER . VALUE) where both HEADER and VALUE | 214 | Elements look like (HEADER . VALUE) where both HEADER and VALUE |
| 214 | are strings. | 215 | are strings. |
| 215 | 216 | ||
| 216 | CONTINUE, SWITCH-FUNCTION, YANK-ACTION and SEND-ACTIONS are | 217 | CONTINUE, SWITCH-FUNCTION, YANK-ACTION, SEND-ACTIONS, and |
| 217 | ignored." | 218 | RETURN-ACTION are ignored." |
| 218 | (mh-find-path) | 219 | (mh-find-path) |
| 219 | (let ((mh-error-if-no-draft t)) | 220 | (let ((mh-error-if-no-draft t)) |
| 220 | (mh-send to "" subject) | 221 | (mh-send to "" subject) |
diff --git a/lisp/simple.el b/lisp/simple.el index ca365e9f854..57ef84882d0 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -5712,10 +5712,6 @@ appears to have customizations applying to the old default, | |||
| 5712 | :version "23.2" | 5712 | :version "23.2" |
| 5713 | :group 'mail) | 5713 | :group 'mail) |
| 5714 | 5714 | ||
| 5715 | (define-mail-user-agent 'sendmail-user-agent | ||
| 5716 | 'sendmail-user-agent-compose | ||
| 5717 | 'mail-send-and-exit) | ||
| 5718 | |||
| 5719 | (defun rfc822-goto-eoh () | 5715 | (defun rfc822-goto-eoh () |
| 5720 | ;; Go to header delimiter line in a mail message, following RFC822 rules | 5716 | ;; Go to header delimiter line in a mail message, following RFC822 rules |
| 5721 | (goto-char (point-min)) | 5717 | (goto-char (point-min)) |
| @@ -5723,37 +5719,9 @@ appears to have customizations applying to the old default, | |||
| 5723 | "^\\([:\n]\\|[^: \t\n]+[ \t\n]\\)" nil 'move) | 5719 | "^\\([:\n]\\|[^: \t\n]+[ \t\n]\\)" nil 'move) |
| 5724 | (goto-char (match-beginning 0)))) | 5720 | (goto-char (match-beginning 0)))) |
| 5725 | 5721 | ||
| 5726 | (defun sendmail-user-agent-compose (&optional to subject other-headers continue | ||
| 5727 | switch-function yank-action | ||
| 5728 | send-actions) | ||
| 5729 | (if switch-function | ||
| 5730 | (let ((special-display-buffer-names nil) | ||
| 5731 | (special-display-regexps nil) | ||
| 5732 | (same-window-buffer-names nil) | ||
| 5733 | (same-window-regexps nil)) | ||
| 5734 | (funcall switch-function "*mail*"))) | ||
| 5735 | (let ((cc (cdr (assoc-string "cc" other-headers t))) | ||
| 5736 | (in-reply-to (cdr (assoc-string "in-reply-to" other-headers t))) | ||
| 5737 | (body (cdr (assoc-string "body" other-headers t)))) | ||
| 5738 | (or (mail continue to subject in-reply-to cc yank-action send-actions) | ||
| 5739 | continue | ||
| 5740 | (error "Message aborted")) | ||
| 5741 | (save-excursion | ||
| 5742 | (rfc822-goto-eoh) | ||
| 5743 | (while other-headers | ||
| 5744 | (unless (member-ignore-case (car (car other-headers)) | ||
| 5745 | '("in-reply-to" "cc" "body")) | ||
| 5746 | (insert (car (car other-headers)) ": " | ||
| 5747 | (cdr (car other-headers)) | ||
| 5748 | (if use-hard-newlines hard-newline "\n"))) | ||
| 5749 | (setq other-headers (cdr other-headers))) | ||
| 5750 | (when body | ||
| 5751 | (forward-line 1) | ||
| 5752 | (insert body)) | ||
| 5753 | t))) | ||
| 5754 | |||
| 5755 | (defun compose-mail (&optional to subject other-headers continue | 5722 | (defun compose-mail (&optional to subject other-headers continue |
| 5756 | switch-function yank-action send-actions) | 5723 | switch-function yank-action send-actions |
| 5724 | return-action) | ||
| 5757 | "Start composing a mail message to send. | 5725 | "Start composing a mail message to send. |
| 5758 | This uses the user's chosen mail composition package | 5726 | This uses the user's chosen mail composition package |
| 5759 | as selected with the variable `mail-user-agent'. | 5727 | as selected with the variable `mail-user-agent'. |
| @@ -5778,7 +5746,12 @@ FUNCTION to ARGS, to insert the raw text of the original message. | |||
| 5778 | original text has been inserted in this way.) | 5746 | original text has been inserted in this way.) |
| 5779 | 5747 | ||
| 5780 | SEND-ACTIONS is a list of actions to call when the message is sent. | 5748 | SEND-ACTIONS is a list of actions to call when the message is sent. |
| 5781 | Each action has the form (FUNCTION . ARGS)." | 5749 | Each action has the form (FUNCTION . ARGS). |
| 5750 | |||
| 5751 | RETURN-ACTION, if non-nil, is an action for returning to the | ||
| 5752 | caller. It has the form (FUNCTION . ARGS). The function is | ||
| 5753 | called after the mail has been sent or put aside, and the mail | ||
| 5754 | buffer buried." | ||
| 5782 | (interactive | 5755 | (interactive |
| 5783 | (list nil nil nil current-prefix-arg)) | 5756 | (list nil nil nil current-prefix-arg)) |
| 5784 | 5757 | ||
| @@ -5808,25 +5781,27 @@ To disable this warning, set `compose-mail-user-agent-warnings' to nil." | |||
| 5808 | warn-vars " ")))))) | 5781 | warn-vars " ")))))) |
| 5809 | 5782 | ||
| 5810 | (let ((function (get mail-user-agent 'composefunc))) | 5783 | (let ((function (get mail-user-agent 'composefunc))) |
| 5811 | (funcall function to subject other-headers continue | 5784 | (funcall function to subject other-headers continue switch-function |
| 5812 | switch-function yank-action send-actions))) | 5785 | yank-action send-actions return-action))) |
| 5813 | 5786 | ||
| 5814 | (defun compose-mail-other-window (&optional to subject other-headers continue | 5787 | (defun compose-mail-other-window (&optional to subject other-headers continue |
| 5815 | yank-action send-actions) | 5788 | yank-action send-actions |
| 5789 | return-action) | ||
| 5816 | "Like \\[compose-mail], but edit the outgoing message in another window." | 5790 | "Like \\[compose-mail], but edit the outgoing message in another window." |
| 5817 | (interactive | 5791 | (interactive (list nil nil nil current-prefix-arg)) |
| 5818 | (list nil nil nil current-prefix-arg)) | ||
| 5819 | (compose-mail to subject other-headers continue | 5792 | (compose-mail to subject other-headers continue |
| 5820 | 'switch-to-buffer-other-window yank-action send-actions)) | 5793 | 'switch-to-buffer-other-window yank-action send-actions |
| 5821 | 5794 | return-action)) | |
| 5822 | 5795 | ||
| 5823 | (defun compose-mail-other-frame (&optional to subject other-headers continue | 5796 | (defun compose-mail-other-frame (&optional to subject other-headers continue |
| 5824 | yank-action send-actions) | 5797 | yank-action send-actions |
| 5798 | return-action) | ||
| 5825 | "Like \\[compose-mail], but edit the outgoing message in another frame." | 5799 | "Like \\[compose-mail], but edit the outgoing message in another frame." |
| 5826 | (interactive | 5800 | (interactive (list nil nil nil current-prefix-arg)) |
| 5827 | (list nil nil nil current-prefix-arg)) | ||
| 5828 | (compose-mail to subject other-headers continue | 5801 | (compose-mail to subject other-headers continue |
| 5829 | 'switch-to-buffer-other-frame yank-action send-actions)) | 5802 | 'switch-to-buffer-other-frame yank-action send-actions |
| 5803 | return-action)) | ||
| 5804 | |||
| 5830 | 5805 | ||
| 5831 | (defvar set-variable-value-history nil | 5806 | (defvar set-variable-value-history nil |
| 5832 | "History of values entered with `set-variable'. | 5807 | "History of values entered with `set-variable'. |