From bd38b7e5229f66edaede4061030bc7d11edba089 Mon Sep 17 00:00:00 2001 From: morioka Date: Wed, 7 Jan 1998 15:40:23 +0000 Subject: [PATCH] Sync with Quassia Gnus v0.22. --- lisp/message.el | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/lisp/message.el b/lisp/message.el index 96e5626..b6f199f 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -783,6 +783,8 @@ Defaults to `text-mode-abbrev-table'.") (0 'message-cited-text-face)))) "Additional expressions to highlight in Message mode.") +;; XEmacs does it like this. For Emacs, we have to set the +;; `font-lock-defaults' buffer-local variable. (put 'message-mode 'font-lock-defaults '(message-font-lock-keywords t)) (defvar message-face-alist @@ -1190,6 +1192,7 @@ Return the number of headers removed." (define-key message-mode-map "\C-c\C-e" 'message-elide-region) (define-key message-mode-map "\C-c\C-v" 'message-delete-not-region) + (define-key message-mode-map "\C-c\C-z" 'message-kill-to-signature) (define-key message-mode-map "\M-\r" 'message-newline-and-reformat) (define-key message-mode-map "\t" 'message-tab)) @@ -1205,6 +1208,7 @@ Return the number of headers removed." ["Caesar (rot13) Region" message-caesar-region (mark t)] ["Elide Region" message-elide-region (mark t)] ["Delete Outside Region" message-delete-not-region (mark t)] + ["Kill To Signature" message-kill-to-signature t] ["Newline and Reformat" message-newline-and-reformat t] ["Rename buffer" message-rename-buffer t] ["Spellcheck" ispell-message t] @@ -1316,7 +1320,10 @@ C-c C-r message-caesar-buffer-body (rot13 the message body)." (mail-abbrevs-setup) (funcall (intern "mail-aliases-setup")))) (message-set-auto-save-file-name) - (run-hooks 'text-mode-hook 'message-mode-hook)) + (run-hooks 'text-mode-hook 'message-mode-hook) + (unless (string-match "XEmacs" emacs-version) + (set (make-local-variable 'font-lock-defaults) + '(message-font-lock-keywords t)))) @@ -1445,6 +1452,13 @@ With the prefix argument FORCE, insert the header anyway." (message-goto-signature) (forward-line -2)) +(defun message-kill-to-signature () + "Deletes all text up to the signature." + (interactive) + (let ((point (point))) + (message-goto-signature) + (kill-region point (point)))) + (defun message-newline-and-reformat () "Insert four newlines, and then reformat if inside quoted text." (interactive) @@ -1598,7 +1612,9 @@ name, rather than giving an automatic name." (read-string "New buffer name: " name-default) name-default)) (default-directory - (file-name-as-directory message-autosave-directory))) + (if message-autosave-directory + (file-name-as-directory message-autosave-directory) + default-directory))) (rename-buffer name t))))) (defun message-fill-yanked-message (&optional justifyp) -- 1.7.10.4