From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/32797 Path: main.gmane.org!not-for-mail From: Emerick Rogul Newsgroups: gmane.emacs.gnus.general Subject: Re: Citation formatting improvements Date: 06 Oct 2000 00:08:47 -0400 Organization: Boston Rotary Club Sender: owner-ding@hpc.uh.edu Message-ID: References: <5bu2arytpu.fsf@finch.cs.rochester.edu> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035169018 21747 80.91.224.250 (21 Oct 2002 02:56:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 02:56:58 +0000 (UTC) Return-Path: Original-Received: from fisher.math.uh.edu (fisher.math.uh.edu [129.7.128.35]) by mailhost.sclp.com (Postfix) with ESMTP id 3F2D0D051E for ; Fri, 6 Oct 2000 00:09:29 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by fisher.math.uh.edu (8.9.1/8.9.1) with ESMTP id XAC01963; Thu, 5 Oct 2000 23:09:17 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 05 Oct 2000 23:08:38 -0500 (CDT) Original-Received: from mailhost.sclp.com (postfix@66-209.196.61.interliant.com [209.196.61.66] (may be forged)) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id XAA26029 for ; Thu, 5 Oct 2000 23:08:25 -0500 (CDT) Original-Received: from quimby.gnus.org (quimby.gnus.org [195.204.10.139]) by mailhost.sclp.com (Postfix) with ESMTP id 58380D051E for ; Fri, 6 Oct 2000 00:08:49 -0400 (EDT) Original-Received: (from news@localhost) by quimby.gnus.org (8.9.3/8.9.3) id FAA27009 for ding@gnus.org; Fri, 6 Oct 2000 05:11:10 +0200 (CEST) Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 141 Original-NNTP-Posting-Host: csa.bu.edu Original-X-Trace: quimby.gnus.org 970801870 19835 128.197.12.3 (6 Oct 2000 03:11:10 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 6 Oct 2000 03:11:10 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.4 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:32797 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:32797 --=-=-= ShengHuo ZHU writes: : Emerick Rogul writes: :: Is there any chance of getting some of these changes into CVS? I :: think it would really make filling in message-mode a lot more :: pleasant... :-) : You could send a patch here. : ShengHuo OK. I've attached a patch to this message. It includes the variable changes as originally suggested by Gareth Rees. It seems to work really well, but if people have suggestions for changes/additions, please feel free to suggest them. -Emerick --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=message-citation.patch Content-Description: Patch for message-mode fill variables *** /csa/forum/emerick/gnus/lisp/message.el Fri Oct 6 00:00:02 2000 --- message.el Thu Oct 5 23:55:40 2000 *************** *** 1464,1483 **** (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) --- 1464,1469 ---- *************** *** 1486,1491 **** --- 1472,1478 ---- (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) *************** *** 1500,1521 **** (mail-abbrevs-setup) (mail-aliases-setup))) (message-set-auto-save-file-name) - (make-local-variable 'adaptive-fill-regexp) - (setq adaptive-fill-regexp - (concat "[ \t]*[-a-z0-9A-Z]*\\(>[ \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]*[-a-z0-9A-Z]*\\(>[ \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)) --- 1487,1530 ---- (mail-abbrevs-setup) (mail-aliases-setup))) (message-set-auto-save-file-name) (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]+:"))) --=-=-= -- ------------------------------------------------------------------------- Emerick Rogul /\/ "...i saw your girlfriend and she's eating her emerick@cs.bu.edu /\/ fingers like they're just another meal." ------------------------------------------------- 'summer babe', pavement --=-=-=--