From: Rui Zhu <sprache@iname.com>
Subject: [patch] `M-Return' on quoted text failed when not using prefix `>'.
Date: 18 Mar 2000 18:50:59 +0100 [thread overview]
Message-ID: <36202.1677232862$1042200446@news.gmane.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 256 bytes --]
Hi, there,
The problem is I'd like to use `| ' as quote prefix when composing
replies, but `message-newline-and-reformat' always searches `>', so it
fails for reformat the text after inserting 3 `\n'.
This one line patch is against today's CVS version.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch for `message-newline-and-reformat' in message.el --]
[-- Type: text/x-patch, Size: 332 bytes --]
--- message.el.orig Sat Mar 18 17:59:57 2000
+++ message.el Sat Mar 18 18:13:16 2000
@@ -1627,7 +1627,7 @@
(unless (bolp)
(save-excursion
(beginning-of-line)
- (when (looking-at (concat prefix
+ (when (looking-at (concat prefix "\\|"
supercite-thing))
(setq quoted (match-string 0))))
(insert "\n"))
[-- Attachment #3: Type: text/plain, Size: 1916 bytes --]
BTW, it is still trouble some, because default `fill-paragraph' seems
not like `| ', `: ', etc. So I now use a external format filter called
`par', following is glue codes.
;;;------------- External Paragraph Reformatter -----------------------
(defvar my-fill-external-program "par")
(defun my-fill-with-external (&optional formatter)
"Fill region/paragraph with your favorite external formatter.
Fill the region in the sense of `transient-mark-mode' being `t', but
you don't need to use transient mark mode. Or fill the paragraph
under the point if no region marked.
The external formatter can be set using variable
`my-fill-external-program'. `par' is highly recommended; `fmt' in Gnu
`textutils' is one choice; or others which I don't know but can be
used as a filter from stdin to stdout.
Prefix can be used to specify your external formatter or more command
line options."
(interactive
(let ((not-use-default current-prefix-arg))
(list (if not-use-default
(read-string "Fill formatter: "
(format "%s " my-fill-external-program))
my-fill-external-program))))
(let ((old-is-transient transient-mark-mode)
(formatter (or formatter my-fill-external-program)))
(unwind-protect
(progn
(setq transient-mark-mode t)
(unless mark-active
(mark-paragraph))
(shell-command-on-region (region-beginning) (region-end)
formatter nil t nil)
t) ; return `t' for `fill-paragraph'
(setq transient-mark-mode old-is-transient))))
(add-hook 'message-mode-hook
#'(lambda ()
(make-local-variable 'fill-paragraph-function)
(setq fill-paragraph-function 'my-fill-with-external)))
;; (global-set-key [?\C-c ?q] 'my-fill-with-external)
;;; End here
#\Rui
--
Happy Gnusing!
next reply other threads:[~2000-03-18 17:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-18 17:50 Rui Zhu [this message]
[not found] <87snxodv5o.fsf@.i-did-set--mail-host-address--so-not-shoot-me>
2000-04-20 18:40 ` Lars Magne Ingebrigtsen
2000-04-22 0:07 ` Rui Zhu
[not found] ` <87aein577h.fsf@.i-did-set--mail-host-address--so-not-shoot-me>
2000-04-22 12:15 ` Lars Magne Ingebrigtsen
2000-04-22 15:09 ` 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='36202.1677232862$1042200446@news.gmane.org' \
--to=sprache@iname.com \
/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).