From: Emerick Rogul <emerick@csa.bu.edu>
Subject: Citation formatting improvements
Date: 05 Oct 2000 15:06:28 -0400 [thread overview]
Message-ID: <vuou2arkszv.fsf@csa.bu.edu> (raw)
The current citation formatting in message-mode doesn't always do the
right thing (it seems like the paragraph-start and paragraph-end
variables in particular could be improved a lot). I've been using the
following bit of e-lisp (appears at the end of this message) from
Gareth Rees, and it's been a great improvement, IMO.
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... :-)
-Emerick
;; Better filling behaviour in Message mode (from Gareth Rees).
(defvar gdr-message-quote-chars "|:>")
(defun gdr-message-mode-vars ()
(let ((quote-prefix-regexp
(concat
"[ \t]*" ; possible initial space
"\\(\\(" (regexp-quote message-yank-prefix) "\\|" ; user's prefix
"\\w+>\\|" ; supercite-style prefix
"[" gdr-message-quote-chars "]" ; 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))))
(add-hook 'message-mode-hook 'gdr-message-mode-vars)
--
-------------------------------------------------------------------------
Emerick Rogul /\/ "i was going to take every drug known to the
emerick@cs.bu.edu /\/ human race and shag anything that moved."
------------------------------------------------- 'ecstasy', irvine welsh
next reply other threads:[~2000-10-05 19:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-10-05 19:06 Emerick Rogul [this message]
2000-10-05 19:27 ` ShengHuo ZHU
2000-10-06 4:08 ` Emerick Rogul
2000-10-06 12:49 ` ShengHuo ZHU
2000-10-06 10:35 ` Kai Großjohann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vuou2arkszv.fsf@csa.bu.edu \
--to=emerick@csa.bu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).