Gnus development mailing list
 help / color / mirror / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Ted Zlatanov <tzz@lifelogs.com>
Cc: <ding@gnus.org>, David Kastrup <dak@gnu.org>,
	Katsumi Yamaoka <yamaoka@jpl.org>
Subject: Re: message-yank-original issue
Date: Mon, 28 Mar 2011 16:41:38 -0400	[thread overview]
Message-ID: <jwv1v1rkmgj.fsf-monnier+INBOX@gnu.org> (raw)
In-Reply-To: <877hbjkquz.fsf@lifelogs.com> (Ted Zlatanov's message of "Mon, 28 Mar 2011 14:05:40 -0500")

> I'm not sure what's going on with message.el.  It clearly says 

> (eval-when-compile
>   (require 'cl))

> so it should not be erroring out.  Stefan wanted to go back to using
> `case' instead of `cond' so I'll defer to him.

How 'bout the patch below, which makes the bulk of the eval'd code
visible to the byte-compiler, as god intended it to be.


        Stefan


=== modified file 'lisp/gnus/message.el'
--- lisp/gnus/message.el	2011-03-18 02:09:58 +0000
+++ lisp/gnus/message.el	2011-03-28 20:38:41 +0000
@@ -3721,22 +3721,9 @@
       (while (re-search-forward citexp nil t)
 	(replace-match (if remove "" "\n"))))))
 
-(defun message-yank-original (&optional arg)
-  "Insert the message being replied to, if any.
-Puts point before the text and mark after.
-Normally indents each nonblank line ARG spaces (default 3).  However,
-if `message-yank-prefix' is non-nil, insert that prefix on each line.
-
-This function uses `message-cite-function' to do the actual citing.
-
-Just \\[universal-argument] as argument means don't indent, insert no
-prefix, and don't delete any headers."
-  (interactive "P")
+(defun message--yank-original-internal (arg)
   (let ((modified (buffer-modified-p))
 	body-text)
-    ;; eval the let forms contained in message-cite-style
-    (eval
-     `(let ,message-cite-style
 	(when (and message-reply-buffer
 		   message-cite-function)
 	  (when (equal message-cite-reply-position 'above)
@@ -3776,7 +3763,23 @@
 	  ;; Add a `message-setup-very-last-hook' here?
 	  ;; Add `gnus-article-highlight-citation' here?
 	  (unless modified
-	    (setq message-checksum (message-checksum))))))))
+        (setq message-checksum (message-checksum))))))
+
+(defun message-yank-original (&optional arg)
+  "Insert the message being replied to, if any.
+Puts point before the text and mark after.
+Normally indents each nonblank line ARG spaces (default 3).  However,
+if `message-yank-prefix' is non-nil, insert that prefix on each line.
+
+This function uses `message-cite-function' to do the actual citing.
+
+Just \\[universal-argument] as argument means don't indent, insert no
+prefix, and don't delete any headers."
+  (interactive "P")
+  ;; eval the let forms contained in message-cite-style
+  (eval
+   `(let ,message-cite-style
+      (message--yank-original-internal ',arg))))
 
 (defun message-yank-buffer (buffer)
   "Insert BUFFER into the current buffer and quote it."




  parent reply	other threads:[~2011-03-28 20:41 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-14 10:11 Gnus bugfixing is broken David Kastrup
2011-03-14 14:47 ` Lars Magne Ingebrigtsen
2011-03-14 15:17   ` David Kastrup
2011-03-14 16:12     ` Adam Sjøgren
2011-03-14 17:47       ` Sivaram Neelakantan
2011-03-14 16:22     ` Lars Magne Ingebrigtsen
2011-03-14 19:13 ` message-yank-original issue (was: Gnus bugfixing is broken.) Ted Zlatanov
2011-03-14 19:38   ` message-yank-original issue Antoine Levitt
2011-03-14 19:47     ` Ted Zlatanov
2011-03-14 21:02       ` Antoine Levitt
2011-03-14 22:04         ` Ted Zlatanov
2011-03-15  0:36         ` Michael Welsh Duggan
2011-03-15 15:30         ` Lars Magne Ingebrigtsen
2011-03-15 15:29       ` Lars Magne Ingebrigtsen
2011-03-15 15:49         ` Ted Zlatanov
2011-03-15 15:56           ` Lars Magne Ingebrigtsen
2011-03-15  9:34   ` Ted Zlatanov
2011-03-15  9:48     ` David Kastrup
2011-03-15 10:01       ` Ted Zlatanov
2011-03-26 19:34     ` Sven Joachim
2011-03-28 19:05       ` Ted Zlatanov
2011-03-28 19:57         ` Sven Joachim
2011-03-28 20:06           ` Ted Zlatanov
2011-03-28 20:35         ` Stefan Monnier
2011-03-29  5:37           ` Antoine Levitt
2011-03-28 20:41         ` Stefan Monnier [this message]
2011-03-29 14:55           ` Ted Zlatanov
2011-03-29 15:08             ` David Kastrup
2011-03-29 15:20               ` Gnus compatibility with the lexical binding branch (was: message-yank-original issue) Ted Zlatanov
2011-03-29 20:16                 ` Gnus compatibility with the lexical binding branch Stefan Monnier
2011-03-29 20:53                   ` Ted Zlatanov
2011-03-30  0:42                     ` Stefan Monnier
2011-04-08  5:51                       ` Ted Zlatanov
2011-03-15 10:06 ` Gnus bugfixing is broken Ted Zlatanov
2011-03-15 13:31   ` Didier Verna
2011-03-15 13:52     ` Ted Zlatanov
2011-03-15 15:23       ` Lars Magne Ingebrigtsen
2011-03-15 15:56         ` Ted Zlatanov
2011-03-15 16:09           ` Lars Magne Ingebrigtsen
2011-03-15 17:01             ` Didier Verna
2011-03-15 13:58     ` Michael Albinus
2011-03-15 14:46       ` Didier Verna
2011-03-15 14:57         ` Ted Zlatanov
2011-03-15 15:08         ` Michael Albinus

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=jwv1v1rkmgj.fsf-monnier+INBOX@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=dak@gnu.org \
    --cc=ding@gnus.org \
    --cc=tzz@lifelogs.com \
    --cc=yamaoka@jpl.org \
    /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).