From: Dave Love Date: Sun, 12 Nov 2000 22:51:35 +0000 (+0000) Subject: From Emerick Rogul . X-Git-Tag: emacs-pretest-21.0.90~105 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f8c0f31e17b41cd9b4d6a8da534e08ad352bced8;p=emacs.git From Emerick Rogul . * message.el (message-setup-fill-variables): New variable. (message-mode): Use it. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 9d1afa55f77..77757e6e911 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,9 @@ +2000-11-12 Dave Love + + From Emerick Rogul . + * message.el (message-setup-fill-variables): New variable. + (message-mode): Use it. + 2000-11-10 Alexandre Oliva * gnus-mlspl.el: Documentation tweaks. diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index e8f2de562e3..f0c4d34e3a9 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -1488,20 +1488,6 @@ M-RET message-newline-and-reformat (break the line and reformat)." (error "Face %s not configured for %s mode" face mode-name))) "") facemenu-remove-face-function t) - (make-local-variable 'paragraph-separate) - (make-local-variable 'paragraph-start) - ;; `-- ' precedes the signature. `-----' appears at the start of the - ;; lines that delimit forwarded messages. - ;; Lines containing just >= 3 dashes, perhaps after whitespace, - ;; are also sometimes used and should be separators. - (setq paragraph-start - (concat (regexp-quote mail-header-separator) - "$\\|[ \t]*[a-z0-9A-Z]*>+[ \t]*$\\|[ \t]*$\\|" - "-- $\\|---+$\\|" - page-delimiter - ;;!!! Uhm... shurely this can't be right? - "[> " (regexp-quote message-yank-prefix) "]+$")) - (setq paragraph-separate paragraph-start) (make-local-variable 'message-reply-headers) (setq message-reply-headers nil) (make-local-variable 'message-newsreader) @@ -1510,6 +1496,7 @@ M-RET message-newline-and-reformat (break the line and reformat)." (set (make-local-variable 'message-sent-message-via) nil) (set (make-local-variable 'message-checksum) nil) (set (make-local-variable 'message-mime-part) 0) + (message-setup-fill-variables) ;;(when (fboundp 'mail-hist-define-keys) ;; (mail-hist-define-keys)) (if (featurep 'xemacs) @@ -1526,23 +1513,45 @@ M-RET message-newline-and-reformat (break the line and reformat)." (mail-abbrevs-setup) (mail-aliases-setup))) (message-set-auto-save-file-name) - (make-local-variable 'adaptive-fill-regexp) - (setq adaptive-fill-regexp - (concat "[ \t]*[-[:alnum:]]*\\(>[ \t]*\\)+[ \t]*\\|" adaptive-fill-regexp)) - (unless (boundp 'adaptive-fill-first-line-regexp) - (setq adaptive-fill-first-line-regexp nil)) - (make-local-variable 'adaptive-fill-first-line-regexp) - (setq adaptive-fill-first-line-regexp - (concat "[ \t]*[-[:alnum:]]*\\(>[ \t]*\\)+[ \t]*\\|" - adaptive-fill-first-line-regexp)) - (make-local-variable 'auto-fill-inhibit-regexp) - (setq auto-fill-inhibit-regexp "^[A-Z][^: \n\t]+:") (mm-enable-multibyte) (make-local-variable 'indent-tabs-mode) ;Turn off tabs for indentation. (setq indent-tabs-mode nil) (mml-mode) (run-hooks 'text-mode-hook 'message-mode-hook)) +(defun message-setup-fill-variables () + "Setup message fill variables." + (make-local-variable 'paragraph-separate) + (make-local-variable 'paragraph-start) + (make-local-variable 'adaptive-fill-regexp) + (unless (boundp 'adaptive-fill-first-line-regexp) + (setq adaptive-fill-first-line-regexp nil)) + (make-local-variable 'adaptive-fill-first-line-regexp) + (make-local-variable 'auto-fill-inhibit-regexp) + (let ((quote-prefix-regexp + (concat + "[ \t]*" ; possible initial space + "\\(\\(" (regexp-quote message-yank-prefix) "\\|" ; user's prefix + "\\w+>\\|" ; supercite-style prefix + "[|:>]" ; standard prefix + "\\)[ \t]*\\)+"))) ; possible space after each prefix + (setq paragraph-start + (concat + (regexp-quote mail-header-separator) "$\\|" + "[ \t]*$\\|" ; blank lines + "-- $\\|" ; signature delimiter + "---+$\\|" ; delimiters for forwarded messages + page-delimiter "$\\|" ; spoiler warnings + ".*wrote:$\\|" ; attribution lines + quote-prefix-regexp "$")) ; empty lines in quoted text + (setq paragraph-separate paragraph-start) + (setq adaptive-fill-regexp + (concat quote-prefix-regexp "\\|" adaptive-fill-regexp)) + (setq adaptive-fill-first-line-regexp + (concat quote-prefix-regexp "\\|" + adaptive-fill-first-line-regexp)) + (setq auto-fill-inhibit-regexp "^[A-Z][^: \n\t]+:"))) + ;;;