Mercurial > emacs
comparison lisp/gnus/message.el @ 33436:a324254af725
From Emerick Rogul <emerick@csa.bu.edu>.
* message.el (message-setup-fill-variables): New variable.
(message-mode): Use it.
author | Dave Love <fx@gnu.org> |
---|---|
date | Sun, 12 Nov 2000 22:51:11 +0000 |
parents | 42c1ba3caf9c |
children | 2827e4066e08 |
comparison
equal
deleted
inserted
replaced
33435:4ef19e88da9a | 33436:a324254af725 |
---|---|
1486 (if face-fun | 1486 (if face-fun |
1487 (funcall face-fun (point) end) | 1487 (funcall face-fun (point) end) |
1488 (error "Face %s not configured for %s mode" face mode-name))) | 1488 (error "Face %s not configured for %s mode" face mode-name))) |
1489 "") | 1489 "") |
1490 facemenu-remove-face-function t) | 1490 facemenu-remove-face-function t) |
1491 (make-local-variable 'paragraph-separate) | |
1492 (make-local-variable 'paragraph-start) | |
1493 ;; `-- ' precedes the signature. `-----' appears at the start of the | |
1494 ;; lines that delimit forwarded messages. | |
1495 ;; Lines containing just >= 3 dashes, perhaps after whitespace, | |
1496 ;; are also sometimes used and should be separators. | |
1497 (setq paragraph-start | |
1498 (concat (regexp-quote mail-header-separator) | |
1499 "$\\|[ \t]*[a-z0-9A-Z]*>+[ \t]*$\\|[ \t]*$\\|" | |
1500 "-- $\\|---+$\\|" | |
1501 page-delimiter | |
1502 ;;!!! Uhm... shurely this can't be right? | |
1503 "[> " (regexp-quote message-yank-prefix) "]+$")) | |
1504 (setq paragraph-separate paragraph-start) | |
1505 (make-local-variable 'message-reply-headers) | 1491 (make-local-variable 'message-reply-headers) |
1506 (setq message-reply-headers nil) | 1492 (setq message-reply-headers nil) |
1507 (make-local-variable 'message-newsreader) | 1493 (make-local-variable 'message-newsreader) |
1508 (make-local-variable 'message-mailer) | 1494 (make-local-variable 'message-mailer) |
1509 (make-local-variable 'message-post-method) | 1495 (make-local-variable 'message-post-method) |
1510 (set (make-local-variable 'message-sent-message-via) nil) | 1496 (set (make-local-variable 'message-sent-message-via) nil) |
1511 (set (make-local-variable 'message-checksum) nil) | 1497 (set (make-local-variable 'message-checksum) nil) |
1512 (set (make-local-variable 'message-mime-part) 0) | 1498 (set (make-local-variable 'message-mime-part) 0) |
1499 (message-setup-fill-variables) | |
1513 ;;(when (fboundp 'mail-hist-define-keys) | 1500 ;;(when (fboundp 'mail-hist-define-keys) |
1514 ;; (mail-hist-define-keys)) | 1501 ;; (mail-hist-define-keys)) |
1515 (if (featurep 'xemacs) | 1502 (if (featurep 'xemacs) |
1516 (message-setup-toolbar) | 1503 (message-setup-toolbar) |
1517 (set (make-local-variable 'font-lock-defaults) | 1504 (set (make-local-variable 'font-lock-defaults) |
1524 (when (eq message-mail-alias-type 'abbrev) | 1511 (when (eq message-mail-alias-type 'abbrev) |
1525 (if (fboundp 'mail-abbrevs-setup) | 1512 (if (fboundp 'mail-abbrevs-setup) |
1526 (mail-abbrevs-setup) | 1513 (mail-abbrevs-setup) |
1527 (mail-aliases-setup))) | 1514 (mail-aliases-setup))) |
1528 (message-set-auto-save-file-name) | 1515 (message-set-auto-save-file-name) |
1529 (make-local-variable 'adaptive-fill-regexp) | |
1530 (setq adaptive-fill-regexp | |
1531 (concat "[ \t]*[-[:alnum:]]*\\(>[ \t]*\\)+[ \t]*\\|" adaptive-fill-regexp)) | |
1532 (unless (boundp 'adaptive-fill-first-line-regexp) | |
1533 (setq adaptive-fill-first-line-regexp nil)) | |
1534 (make-local-variable 'adaptive-fill-first-line-regexp) | |
1535 (setq adaptive-fill-first-line-regexp | |
1536 (concat "[ \t]*[-[:alnum:]]*\\(>[ \t]*\\)+[ \t]*\\|" | |
1537 adaptive-fill-first-line-regexp)) | |
1538 (make-local-variable 'auto-fill-inhibit-regexp) | |
1539 (setq auto-fill-inhibit-regexp "^[A-Z][^: \n\t]+:") | |
1540 (mm-enable-multibyte) | 1516 (mm-enable-multibyte) |
1541 (make-local-variable 'indent-tabs-mode) ;Turn off tabs for indentation. | 1517 (make-local-variable 'indent-tabs-mode) ;Turn off tabs for indentation. |
1542 (setq indent-tabs-mode nil) | 1518 (setq indent-tabs-mode nil) |
1543 (mml-mode) | 1519 (mml-mode) |
1544 (run-hooks 'text-mode-hook 'message-mode-hook)) | 1520 (run-hooks 'text-mode-hook 'message-mode-hook)) |
1521 | |
1522 (defun message-setup-fill-variables () | |
1523 "Setup message fill variables." | |
1524 (make-local-variable 'paragraph-separate) | |
1525 (make-local-variable 'paragraph-start) | |
1526 (make-local-variable 'adaptive-fill-regexp) | |
1527 (unless (boundp 'adaptive-fill-first-line-regexp) | |
1528 (setq adaptive-fill-first-line-regexp nil)) | |
1529 (make-local-variable 'adaptive-fill-first-line-regexp) | |
1530 (make-local-variable 'auto-fill-inhibit-regexp) | |
1531 (let ((quote-prefix-regexp | |
1532 (concat | |
1533 "[ \t]*" ; possible initial space | |
1534 "\\(\\(" (regexp-quote message-yank-prefix) "\\|" ; user's prefix | |
1535 "\\w+>\\|" ; supercite-style prefix | |
1536 "[|:>]" ; standard prefix | |
1537 "\\)[ \t]*\\)+"))) ; possible space after each prefix | |
1538 (setq paragraph-start | |
1539 (concat | |
1540 (regexp-quote mail-header-separator) "$\\|" | |
1541 "[ \t]*$\\|" ; blank lines | |
1542 "-- $\\|" ; signature delimiter | |
1543 "---+$\\|" ; delimiters for forwarded messages | |
1544 page-delimiter "$\\|" ; spoiler warnings | |
1545 ".*wrote:$\\|" ; attribution lines | |
1546 quote-prefix-regexp "$")) ; empty lines in quoted text | |
1547 (setq paragraph-separate paragraph-start) | |
1548 (setq adaptive-fill-regexp | |
1549 (concat quote-prefix-regexp "\\|" adaptive-fill-regexp)) | |
1550 (setq adaptive-fill-first-line-regexp | |
1551 (concat quote-prefix-regexp "\\|" | |
1552 adaptive-fill-first-line-regexp)) | |
1553 (setq auto-fill-inhibit-regexp "^[A-Z][^: \n\t]+:"))) | |
1545 | 1554 |
1546 | 1555 |
1547 | 1556 |
1548 ;;; | 1557 ;;; |
1549 ;;; Message mode commands | 1558 ;;; Message mode commands |