Gnus development mailing list
 help / color / mirror / Atom feed
* [PATCH] Fix gnus-message-citation-mode for (S)XEmacs
@ 2006-12-31  7:18 Steve Youngs
  2006-12-31 11:52 ` Reiner Steib
  0 siblings, 1 reply; 16+ messages in thread
From: Steve Youngs @ 2006-12-31  7:18 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 4426 bytes --]

This fixes a problem reported by Norbert Koch and Nelson Ferreira in
regards to `gnus-message-citation-mode' and (S)XEmacs.

Reiner, I guess your solution fixed it too, but this one doesn't just
turn it off for (S)XEmacs. :-)  Hope you don't mind.

NOTE: This patch has been committed.


Gnus patch:
ChangeLog files diff command: cvs -q diff -U 0
Files affected:               lisp/ChangeLog
Source files diff command:    cvs -q diff -uN
Files affected:               lisp/gnus-msg.el lisp/gnus-cite.el

Index: lisp/ChangeLog
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v
retrieving revision 7.1454
diff -u -p -U0 -r7.1454 ChangeLog
--- lisp/ChangeLog	31 Dec 2006 00:57:08 -0000	7.1454
+++ lisp/ChangeLog	31 Dec 2006 07:14:47 -0000
@@ -0,0 +1,13 @@
+2006-12-31  Steve Youngs  <steve@sxemacs.org>
+
+	* gnus-cite.el: Load easy-mmode at compile time for (S)XEmacs to get
+	`define-minor-mode' macro definition expanded properly.
+	(gnus-message-citation-mode): This is now OK for (S)XEmacs so don't
+	exclude it there.
+
+	* gnus-msg.el (gnus-message-highlight-citation): Revert Reiner's patch
+	of 2006-12-30.  The default is nil on (S)XEmacs already because of the
+	`fboundp' test.
+	(gnus-message-citation-mode): Revert Reiner's patch of 2006-12-30.
+	This is OK to autoload in (S)XEmacs now.
+
Index: lisp/gnus-cite.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-cite.el,v
retrieving revision 7.21
diff -u -p -u -r7.21 gnus-cite.el
--- lisp/gnus-cite.el	30 Dec 2006 21:03:37 -0000	7.21
+++ lisp/gnus-cite.el	31 Dec 2006 07:14:42 -0000
@@ -27,6 +27,9 @@
 ;;; Code:
 
 (eval-when-compile (require 'cl))
+(eval-when-compile
+  (when (featurep 'xemacs)
+    (require 'easy-mmode))) ; for `define-minor-mode'
 
 (require 'gnus)
 (require 'gnus-range)
@@ -1159,20 +1162,19 @@ Returns nil if there is no such line bef
       (font-lock-remove-keywords nil gnus-message-citation-keywords)
     (gnus-message 1 "`font-lock-remove-keywords' not supported.")))
 
-(unless (featurep 'xemacs)
-  (define-minor-mode gnus-message-citation-mode
-    "Toggle `gnus-message-citation-mode' in current buffer.
+(define-minor-mode gnus-message-citation-mode
+  "Toggle `gnus-message-citation-mode' in current buffer.
 This buffer local minor mode provides additional font-lock support for
 nested citations.
 With prefix ARG, turn `gnus-message-citation-mode' on if and only if ARG is
 positive."
-    nil ;; init-value
-    ""  ;; lighter
-    nil ;; keymap
-    (if gnus-message-citation-mode
-	(gnus-message-add-citation-keywords)
-      (gnus-message-remove-citation-keywords))
-    (font-lock-fontify-buffer)))
+  nil ;; init-value
+  "" ;; lighter
+  nil ;; keymap
+  (if gnus-message-citation-mode
+      (gnus-message-add-citation-keywords)
+    (gnus-message-remove-citation-keywords))
+  (font-lock-fontify-buffer))
 
 (defun turn-on-gnus-message-citation-mode ()
   "Turn on `gnus-message-citation-mode'."
Index: lisp/gnus-msg.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-msg.el,v
retrieving revision 7.44
diff -u -p -u -r7.44 gnus-msg.el
--- lisp/gnus-msg.el	30 Dec 2006 13:50:57 -0000	7.44
+++ lisp/gnus-msg.el	31 Dec 2006 07:14:42 -0000
@@ -290,8 +290,7 @@ If nil, the address field will always be
   :type 'boolean)
 
 (defcustom gnus-message-highlight-citation
-  (and (not (featurep 'xemacs))
-       ;; gnus-treat-highlight-citation ;; gnus-cite dependency
+  (and t ;; gnus-treat-highlight-citation ;; gnus-cite dependency
        (fboundp 'font-lock-add-keywords))
   "Enable highlighting of different citation levels in message-mode."
   :version "23.0" ;; No Gnus
@@ -299,8 +298,7 @@ If nil, the address field will always be
   :group 'gnus-message
   :type 'boolean)
 
-(unless (featurep 'xemacs)
-  (autoload 'gnus-message-citation-mode "gnus-cite" nil t))
+(autoload 'gnus-message-citation-mode "gnus-cite" nil t)
 
 ;;; Internal variables.
 

-- 
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
|       SXEmacs - The only _______ you'll ever need.       |
|         Fill in the blank, yes, it's THAT good!          |
|------------------------------------<steve@sxemacs.org>---|

[-- Attachment #2: Type: application/pgp-signature, Size: 312 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] Fix gnus-message-citation-mode for (S)XEmacs
  2006-12-31  7:18 [PATCH] Fix gnus-message-citation-mode for (S)XEmacs Steve Youngs
@ 2006-12-31 11:52 ` Reiner Steib
  2007-01-01  7:26   ` Katsumi Yamaoka
  0 siblings, 1 reply; 16+ messages in thread
From: Reiner Steib @ 2006-12-31 11:52 UTC (permalink / raw)


On Sun, Dec 31 2006, Steve Youngs wrote:

> This fixes a problem reported by Norbert Koch and Nelson Ferreira in
> regards to `gnus-message-citation-mode' and (S)XEmacs.
>
> Reiner, I guess your solution fixed it too, but this one doesn't just
> turn it off for (S)XEmacs. :-)  Hope you don't mind.
>
> NOTE: This patch has been committed.

Thanks.

>  (eval-when-compile (require 'cl))
> +(eval-when-compile
> +  (when (featurep 'xemacs)
> +    (require 'easy-mmode))) ; for `define-minor-mode'

Hm, I'm surprised that (S)XEmacs' byte-compiler doesn't complain in
the first place.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] Fix gnus-message-citation-mode for (S)XEmacs
  2006-12-31 11:52 ` Reiner Steib
@ 2007-01-01  7:26   ` Katsumi Yamaoka
  2007-02-07  9:25     ` Katsumi Yamaoka
  0 siblings, 1 reply; 16+ messages in thread
From: Katsumi Yamaoka @ 2007-01-01  7:26 UTC (permalink / raw)


>>>>> In <v9r6ugwadx.fsf@marauder.physik.uni-ulm.de>
>>>>>	Reiner Steib <reinersteib+gmane@imap.cc> wrote:

> On Sun, Dec 31 2006, Steve Youngs wrote:

[...]

>>  (eval-when-compile (require 'cl))
>> +(eval-when-compile
>> +  (when (featurep 'xemacs)
>> +    (require 'easy-mmode))) ; for `define-minor-mode'

> Hm, I'm surprised that (S)XEmacs' byte-compiler doesn't complain in
> the first place.

I found the cause that building of Gnus with XEmacs 21.4 failed
as follows:

Compiling gnus/lisp/gnus-cite.el...
While compiling toplevel forms in file gnus/lisp/gnus-cite.el:
  !! Wrong type argument ((char-or-string-p nil))

In xemacs-base/easy-mmode.el, the `replace-regexp-in-string'
function is defined if it is not bound, and the
`define-minor-mode' macro uses it when compiling.  However,
lpath.el binds it to `ignore' before easy-mmode.el is loaded
(see dgnushack.el).  So, `define-minor-mode' uses the version of
`replace-regexp-in-string' that always returns nil.

I've removed `replace-regexp-in-string' from lpath.el in the
trunk temporarily.  However, I think the best way is to make
easy-mmode.el use `replace-in-string' instead of
`replace-regexp-in-string'.  That XEmacs easily provides the
Emacs functions causes confusion.

I've also done some minor fixes in the v5-10 branch and the
trunk.  They are mainly for only making the byte compiler
silent, don't influence the behavior of Gnus.

Regards,



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] Fix gnus-message-citation-mode for (S)XEmacs
  2007-01-01  7:26   ` Katsumi Yamaoka
@ 2007-02-07  9:25     ` Katsumi Yamaoka
  2007-02-07 15:33       ` Dave Goldberg
  2007-02-09 23:48       ` Steve Youngs
  0 siblings, 2 replies; 16+ messages in thread
From: Katsumi Yamaoka @ 2007-02-07  9:25 UTC (permalink / raw)
  To: ding

Hi,

I've made changes in the trunk so that this feature may work
even with XEmacs 21.4/5 and SXEmacs (it cannot have worked with
XEmacs 21.5 even if `font-lock-add-keywords' is available).  Now
`gnus-message-highlight-citation' always defaults to t.

Regards,



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] Fix gnus-message-citation-mode for (S)XEmacs
  2007-02-07  9:25     ` Katsumi Yamaoka
@ 2007-02-07 15:33       ` Dave Goldberg
  2007-02-08  4:42         ` Katsumi Yamaoka
  2007-02-09 23:48       ` Steve Youngs
  1 sibling, 1 reply; 16+ messages in thread
From: Dave Goldberg @ 2007-02-07 15:33 UTC (permalink / raw)
  To: ding

>>>>> On Wed, 07 Feb 2007 18:25:02 +0900, Katsumi Yamaoka <yamaoka@jpl.org> said:

> Hi,
> I've made changes in the trunk so that this feature may work
> even with XEmacs 21.4/5 and SXEmacs (it cannot have worked with
> XEmacs 21.5 even if `font-lock-add-keywords' is available).  Now
> `gnus-message-highlight-citation' always defaults to t.

> Regards,

Unfortunately with this change (I'm assuming) I lost all highlighting
in message mode unless I specifically set g-m-h-c to nil.

XEmacs 21.4 (patch 19) "Constant Variable" [Lucid] (i686-pc-linux, Mule) of Mon Mar 20 2006 on davestoy.homelinux.org

-- 
Dave Goldberg
david.goldberg6@verizon.net




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] Fix gnus-message-citation-mode for (S)XEmacs
  2007-02-07 15:33       ` Dave Goldberg
@ 2007-02-08  4:42         ` Katsumi Yamaoka
  2007-02-08 17:48           ` Dave Goldberg
  0 siblings, 1 reply; 16+ messages in thread
From: Katsumi Yamaoka @ 2007-02-08  4:42 UTC (permalink / raw)
  To: ding

>>>>> In <m1abzq6kzh.fsf@davestoy.homelinux.org> Dave Goldberg wrote:

>>>>>> On Wed, 07 Feb 2007 18:25:02 +0900, Katsumi Yamaoka <yamaoka@jpl.org> said:

>> I've made changes in the trunk so that this feature may work
>> even with XEmacs 21.4/5 and SXEmacs (it cannot have worked with
>> XEmacs 21.5 even if `font-lock-add-keywords' is available).  Now
>> `gnus-message-highlight-citation' always defaults to t.

> Unfortunately with this change (I'm assuming) I lost all highlighting
> in message mode unless I specifically set g-m-h-c to nil.

> XEmacs 21.4 (patch 19) "Constant Variable" [Lucid] (i686-pc-linux, Mule) of Mon Mar 20 2006 on davestoy.homelinux.org

I don't know why I saw it having worked with XEmacs yesterday
(it might have been due to `lazy-shot').  But it should not have
worked because of a bug.  Sorry.

Emacs uses the `(t KEYWORDS COMPILED...)' form for compiled
font-lock keywords while XEmacs uses the `(t COMPILED...)' form.
However, in XEmacs 21.5, `font-lock-add-keywords' and
`font-lock-remove-keywords' assume the form of the Emacs style
for compiled keywords mistakenly.  Because those function
definitions are now the same as the ones in Emacs 22.  And I
partially copied them for XEmacs 21.4 and SXEmacs from XEmacs
21.5 into gnus-cite.el.

I've added the test checking `f-l-add-k' and `f-l-remove-k' that
XEmacs provide work correctly.  I've also fixed the emulating
version of them.  Currently not only 21.4 but also XEmacs 21.5
uses them.  Could you try the latest CVS?

Regards,



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] Fix gnus-message-citation-mode for (S)XEmacs
  2007-02-08  4:42         ` Katsumi Yamaoka
@ 2007-02-08 17:48           ` Dave Goldberg
  2007-02-08 23:29             ` Katsumi Yamaoka
  0 siblings, 1 reply; 16+ messages in thread
From: Dave Goldberg @ 2007-02-08 17:48 UTC (permalink / raw)
  To: ding

>>>>> On Thu, 08 Feb 2007 13:42:02 +0900, Katsumi Yamaoka <yamaoka@jpl.org> said:

>>>>> In <m1abzq6kzh.fsf@davestoy.homelinux.org> Dave Goldberg wrote:
>>>>>>> On Wed, 07 Feb 2007 18:25:02 +0900, Katsumi Yamaoka <yamaoka@jpl.org> said:

>>> I've made changes in the trunk so that this feature may work
>>> even with XEmacs 21.4/5 and SXEmacs (it cannot have worked with
>>> XEmacs 21.5 even if `font-lock-add-keywords' is available).  Now
>>> `gnus-message-highlight-citation' always defaults to t.

>> Unfortunately with this change (I'm assuming) I lost all highlighting
>> in message mode unless I specifically set g-m-h-c to nil.

>> XEmacs 21.4 (patch 19) "Constant Variable" [Lucid] (i686-pc-linux, Mule) of Mon Mar 20 2006 on davestoy.homelinux.org

> I don't know why I saw it having worked with XEmacs yesterday
> (it might have been due to `lazy-shot').  But it should not have
> worked because of a bug.  Sorry.

> Emacs uses the `(t KEYWORDS COMPILED...)' form for compiled
> font-lock keywords while XEmacs uses the `(t COMPILED...)' form.
> However, in XEmacs 21.5, `font-lock-add-keywords' and
> `font-lock-remove-keywords' assume the form of the Emacs style
> for compiled keywords mistakenly.  Because those function
> definitions are now the same as the ones in Emacs 22.  And I
> partially copied them for XEmacs 21.4 and SXEmacs from XEmacs
> 21.5 into gnus-cite.el.

> I've added the test checking `f-l-add-k' and `f-l-remove-k' that
> XEmacs provide work correctly.  I've also fixed the emulating
> version of them.  Currently not only 21.4 but also XEmacs 21.5
> uses them.  Could you try the latest CVS?

> Regards,

Things seem to work better now.  At least, they work the way they did before.  When I do a reply with citation included I see this:

Fontifying mail to ding@gnus.org...
Fontifying mail to ding@gnus.org... (regexps)....
Fontifying mail to ding@gnus.org... (regexps)........
Fontifying mail to ding@gnus.org... (regexps)........
Fontifying mail to ding@gnus.org... (regexps).........
Fontifying mail to ding@gnus.org... (regexps)..........
Fontifying mail to ding@gnus.org... (regexps)............
Fontifying mail to ding@gnus.org... (regexps)..............
Fontifying mail to ding@gnus.org... (regexps)...............
Fontifying mail to ding@gnus.org... (regexps)...............
Fontifying mail to ding@gnus.org... (regexps)...............
Fontifying mail to ding@gnus.org... (regexps)...............
Fontifying mail to ding@gnus.org... (regexps)...............
Fontifying mail to ding@gnus.org... (regexps)................
Fontifying mail to ding@gnus.org... aborted.aborted.

In the minibuffer, but I do appear to be getting at least the same
fontification I had before this update.

Thanks,
-- 
Dave Goldberg
david.goldberg6@verizon.net




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] Fix gnus-message-citation-mode for (S)XEmacs
  2007-02-08 17:48           ` Dave Goldberg
@ 2007-02-08 23:29             ` Katsumi Yamaoka
  2007-02-13 12:46               ` Katsumi Yamaoka
  0 siblings, 1 reply; 16+ messages in thread
From: Katsumi Yamaoka @ 2007-02-08 23:29 UTC (permalink / raw)
  To: ding

>>>>> In <m1r6t0mtg9.fsf@davestoy.homelinux.org> Dave Goldberg wrote:

> Things seem to work better now.  At least, they work the way they
> did before.  When I do a reply with citation included I see this:

> Fontifying mail to ding@gnus.org...

[...]

> Fontifying mail to ding@gnus.org... aborted.aborted.

I see them if I set `progress-feedback-use-echo-area' to t.
Though it is probably no matter, you can customize
`font-lock-verbose' to stop font-lock from issuing such messages.

> In the minibuffer, but I do appear to be getting at least the same
> fontification I had before this update.

With the pc in the office, all are going well.  However, honestly
I have the same problem as yours with the home pc.  The symptom
is that `font-lock-keywords' will never have the keyword containing
the gnus-cite-* faces whatever I do.  Both Emacs and XEmacs don't.
I'm going to locate the cause this weekend (now I'm in the office).

Regards,



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] Fix gnus-message-citation-mode for (S)XEmacs
  2007-02-07  9:25     ` Katsumi Yamaoka
  2007-02-07 15:33       ` Dave Goldberg
@ 2007-02-09 23:48       ` Steve Youngs
  1 sibling, 0 replies; 16+ messages in thread
From: Steve Youngs @ 2007-02-09 23:48 UTC (permalink / raw)
  To: Gnus List

[-- Attachment #1: Type: text/plain, Size: 632 bytes --]

* Katsumi Yamaoka <yamaoka@jpl.org> writes:

  > Hi,
  > I've made changes in the trunk so that this feature may work
  > even with XEmacs 21.4/5 and SXEmacs (it cannot have worked with
  > XEmacs 21.5 even if `font-lock-add-keywords' is available).  Now
  > `gnus-message-highlight-citation' always defaults to t.

Works great in SXEmacs.  Thanks very much, Katsumi.

-- 
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
|       SXEmacs - The only _______ you'll ever need.       |
|         Fill in the blank, yes, it's THAT good!          |
|------------------------------------<steve@sxemacs.org>---|

[-- Attachment #2: Type: application/pgp-signature, Size: 312 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] Fix gnus-message-citation-mode for (S)XEmacs
  2007-02-08 23:29             ` Katsumi Yamaoka
@ 2007-02-13 12:46               ` Katsumi Yamaoka
  2007-02-13 19:49                 ` Dave Goldberg
  0 siblings, 1 reply; 16+ messages in thread
From: Katsumi Yamaoka @ 2007-02-13 12:46 UTC (permalink / raw)
  To: ding

>>>>>> In <m1r6t0mtg9.fsf@davestoy.homelinux.org> Dave Goldberg wrote:

>> but I do appear to be getting at least the same fontification I had
>> before this update.

>>>>> In <b4mirecp6sb.fsf@jpl.org> Katsumi Yamaoka wrote:

> I have the same problem as yours with the home pc.

I seem to have solved this problem.  Could you try it?

Formerly `gnus-message-citation-mode' modified the value of
`font-lock-keywords' directly.  However, the value is determined
according to the value of `font-lock-defaults' normally and the
variables listed in `font-lock-defaults' don't have the keywords
for `gnus-message-citation-mode'.  So, it is possible that
`gnus-message-citation-mode' is invalidated if some program[1]
resets font-lock-keywords' according to `font-lock-defaults' for
some purpose or a user resets it in order to apply the value of
`message-font-lock-keywords' that a user customized using
`gnus-message-setup-hook'[2] for example.

I've made changes to make `gnus-message-citation-mode' work in
the different way.  Now `message-font-lock-keywords' is buffer
local in message buffers and gains the elements of
`gnus-message-citation-keywords'.  `font-lock-add-keywords' and
`font-lock-remove-keywords' are no longer used.

[1] At least develock.el does it.
[2] Take care not to disregard the values added to
    `message-font-lock-keywords' by `gnus-message-citation-mode'
    if you do something in `gnus-message-setup-hook'.

Regards,



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] Fix gnus-message-citation-mode for (S)XEmacs
  2007-02-13 12:46               ` Katsumi Yamaoka
@ 2007-02-13 19:49                 ` Dave Goldberg
  2007-02-14  0:29                   ` Katsumi Yamaoka
  0 siblings, 1 reply; 16+ messages in thread
From: Dave Goldberg @ 2007-02-13 19:49 UTC (permalink / raw)
  To: ding

>>>>> On Tue, 13 Feb 2007 21:46:09 +0900, Katsumi Yamaoka <yamaoka@jpl.org> said:

>>>>>>> In <m1r6t0mtg9.fsf@davestoy.homelinux.org> Dave Goldberg wrote:
>>> but I do appear to be getting at least the same fontification I had
>>> before this update.

>>>>> In <b4mirecp6sb.fsf@jpl.org> Katsumi Yamaoka wrote:

>> I have the same problem as yours with the home pc.

> I seem to have solved this problem.  Could you try it?

It's odd.  When working on my linux machine at home I get the same messages:

Fontifying *wide reply to Katsumi Yamaoka on ding@gnus.org*...
Fontifying *wide reply to Katsumi Yamaoka on ding@gnus.org*... done.
Fontifying mail to ding@gnus.org...
Fontifying mail to ding@gnus.org... (regexps)....
Fontifying mail to ding@gnus.org... (regexps)........
Fontifying mail to ding@gnus.org... (regexps)........
Fontifying mail to ding@gnus.org... (regexps).........
Fontifying mail to ding@gnus.org... (regexps)..........
Fontifying mail to ding@gnus.org... (regexps).............
Fontifying mail to ding@gnus.org... (regexps)..............
Fontifying mail to ding@gnus.org... (regexps)...............
Fontifying mail to ding@gnus.org... (regexps)...............
Fontifying mail to ding@gnus.org... (regexps)...............
Fontifying mail to ding@gnus.org... (regexps)...............
Fontifying mail to ding@gnus.org... (regexps)...............
Fontifying mail to ding@gnus.org... (regexps)................
Fontifying mail to ding@gnus.org... aborted.aborted.

I don't see them at all when using my machine at work, which is
running Windows XP with XEmacs under cygwin (locally compiled).  I use
the same .xemacs/init.el, .xemacs/custom.el and .gnus on both
machines.  I cannot explain the difference.  However, the message
buffers look equivalent with fontified headers and included text
(though it's all one color whereas it sounds like this change is
supposed to make included text look nicer).

Thanks,
-- 
Dave Goldberg
david.goldberg6@verizon.net




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] Fix gnus-message-citation-mode for (S)XEmacs
  2007-02-13 19:49                 ` Dave Goldberg
@ 2007-02-14  0:29                   ` Katsumi Yamaoka
  2007-02-28 21:14                     ` Dave Goldberg
  0 siblings, 1 reply; 16+ messages in thread
From: Katsumi Yamaoka @ 2007-02-14  0:29 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 2421 bytes --]

>>>>> In <m1ps8dg7ne.fsf@davestoy.homelinux.org> Dave Goldberg wrote:

>>>>>> On Tue, 13 Feb 2007 21:46:09 +0900, Katsumi Yamaoka <yamaoka@jpl.org> said:

>> I seem to have solved this problem.  Could you try it?

> It's odd.  When working on my linux machine at home I get the same messages:

> Fontifying *wide reply to Katsumi Yamaoka on ding@gnus.org*...
> Fontifying *wide reply to Katsumi Yamaoka on ding@gnus.org*... done.

Those were issued when you typed `S W' (or similar) to start a
reply to me, and the fontification was successful (because of
the last `done').  The next ones were issued when you started
another mail, but fontification was not successful.  Am I right?

> Fontifying mail to ding@gnus.org...
> Fontifying mail to ding@gnus.org... (regexps)....
> Fontifying mail to ding@gnus.org... (regexps)........
> Fontifying mail to ding@gnus.org... (regexps)........
> Fontifying mail to ding@gnus.org... (regexps).........
> Fontifying mail to ding@gnus.org... (regexps)..........
> Fontifying mail to ding@gnus.org... (regexps).............
> Fontifying mail to ding@gnus.org... (regexps)..............
> Fontifying mail to ding@gnus.org... (regexps)...............
> Fontifying mail to ding@gnus.org... (regexps)...............
> Fontifying mail to ding@gnus.org... (regexps)...............
> Fontifying mail to ding@gnus.org... (regexps)...............
> Fontifying mail to ding@gnus.org... (regexps)...............
> Fontifying mail to ding@gnus.org... (regexps)................

`font-lock-fontify-keywords-region' issued those messages using:

  (progress-feedback-with-label 'font-lock
                                "Fontifying %s... (regexps)"
                                progress bufname))

But, in message.el there seems to be no function to make the
buffer name which is not surrounded with "*...*".  How do you
start a "mail to ding@gnus.org"?  All those questions might be
fruitless, though.

> Fontifying mail to ding@gnus.org... aborted.aborted.

Well, I might have misunderstood this message.  The reason the
fontification was aborted was not because you typed `C-g', was
it?  If so, it was terminated by an error and we can use the
debugger.  To do that, copy lisp/font-lock.el to the tmp
directory, apply the patch attached in this message, load the
patched font-lock.el, set `debug-on-error' to t, and start a
reply.

You may do it later of course.  Have a good vacation! ;)


[-- Attachment #2: Type: text/x-patch, Size: 511 bytes --]

--- font-lock.el~	2006-02-05 21:54:43 +0000
+++ font-lock.el	2007-02-14 00:27:17 +0000
@@ -1133,11 +1133,8 @@
       ;; much more frequently) I'm afraid of the bad consequences of stealing
       ;; the interrupt character at inopportune times.
       ;;
-      (condition-case nil
 	  (save-excursion
 	    (font-lock-fontify-region (point-min) (point-max)))
-	(t
-	 (setq aborted t)))
 
       (or was-on			; turn it off if it was off.
 	  (let ((font-lock-fontified nil)) ; kludge to prevent defontification

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] Fix gnus-message-citation-mode for (S)XEmacs
  2007-02-14  0:29                   ` Katsumi Yamaoka
@ 2007-02-28 21:14                     ` Dave Goldberg
  2007-02-28 22:32                       ` Katsumi Yamaoka
  0 siblings, 1 reply; 16+ messages in thread
From: Dave Goldberg @ 2007-02-28 21:14 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: ding

>>>>> On Wed, 14 Feb 2007 09:29:10 +0900, Katsumi Yamaoka <yamaoka@jpl.org> said:

>>>>> In <m1ps8dg7ne.fsf@davestoy.homelinux.org> Dave Goldberg wrote:

>>>>>>> On Tue, 13 Feb 2007 21:46:09 +0900, Katsumi Yamaoka <yamaoka@jpl.org> said:

>>> I seem to have solved this problem.  Could you try it?

>> It's odd.  When working on my linux machine at home I get the same messages:

>> Fontifying *wide reply to Katsumi Yamaoka on ding@gnus.org*...
>> Fontifying *wide reply to Katsumi Yamaoka on ding@gnus.org*... done.

> Those were issued when you typed `S W' (or similar) to start a
> reply to me, and the fontification was successful (because of
> the last `done').  The next ones were issued when you started
> another mail, but fontification was not successful.  Am I right?

Nope, all of them come when I run `F' or `S W'.  I'm not doing another
mail.

>> Fontifying mail to ding@gnus.org...
>> Fontifying mail to ding@gnus.org... (regexps)....
>> Fontifying mail to ding@gnus.org... (regexps)........
>> Fontifying mail to ding@gnus.org... (regexps)........
>> Fontifying mail to ding@gnus.org... (regexps).........
>> Fontifying mail to ding@gnus.org... (regexps)..........
>> Fontifying mail to ding@gnus.org... (regexps).............
>> Fontifying mail to ding@gnus.org... (regexps)..............
>> Fontifying mail to ding@gnus.org... (regexps)...............
>> Fontifying mail to ding@gnus.org... (regexps)...............
>> Fontifying mail to ding@gnus.org... (regexps)...............
>> Fontifying mail to ding@gnus.org... (regexps)...............
>> Fontifying mail to ding@gnus.org... (regexps)...............
>> Fontifying mail to ding@gnus.org... (regexps)................

> `font-lock-fontify-keywords-region' issued those messages using:

>   (progress-feedback-with-label 'font-lock
>                                 "Fontifying %s... (regexps)"
>                                 progress bufname))

> But, in message.el there seems to be no function to make the
> buffer name which is not surrounded with "*...*".  How do you
> start a "mail to ding@gnus.org"?  All those questions might be
> fruitless, though.

No idea.  I don't think I'm doing anything odd.

>> Fontifying mail to ding@gnus.org... aborted.aborted.

> Well, I might have misunderstood this message.  The reason the
> fontification was aborted was not because you typed `C-g', was
> it?  If so, it was terminated by an error and we can use the
> debugger.  To do that, copy lisp/font-lock.el to the tmp
> directory, apply the patch attached in this message, load the
> patched font-lock.el, set `debug-on-error' to t, and start a
> reply.

Nope, not a C-g.  So I ran the patched font-lock.el and here's the
resulting backtrace (from this very reply, in fact):

Debugger entered--Lisp error: (void-function line-beginning-position)
  line-beginning-position()
  gnus-message-search-citation-line(4031)
  funcall(gnus-message-search-citation-line 4031)
  (if (stringp matcher) (re-search-forward matcher end t) (funcall matcher end))
  (and (< (point) end) (if (stringp matcher) (re-search-forward matcher end t) (funcall matcher end)))
  (while (and (< ... end) (if ... ... ...)) (setq progress (+ ... ... 5)) (when (and loudly ...) (progress-feedback-with-label ... "Fontifying %s... (regexps)" progress bufname)) (setq old-progress progress) (setq highlights (cdr keyword)) (while highlights (if ... ... ...) (setq highlights ...)))
  (while keywords (setq keyword (car keywords) matcher (car keyword)) (goto-char start) (while (and ... ...) (setq progress ...) (when ... ...) (setq old-progress progress) (setq highlights ...) (while highlights ... ...)) (setq iter (1+ iter)) (setq keywords (cdr keywords)))
  (let* ((case-fold-search font-lock-keywords-case-fold-search) (keywords ...) (bufname ...) (progress 5) (old-progress 5) (iter 0) (nkeywords ...) keyword matcher highlights) (while keywords (setq keyword ... matcher ...) (goto-char start) (while ... ... ... ... ... ...) (setq iter ...) (setq keywords ...)))
  (let ((loudly ...)) (unless (eq ... t) (setq font-lock-keywords ...)) (let* (... ... ... ... ... ... ... keyword matcher highlights) (while keywords ... ... ... ... ...)) (if loudly (progress-feedback-with-label ... "Fontifying %s... " 100 ...)))
  font-lock-fontify-keywords-region(1 4031 nil)
  (progn (if font-lock-syntax-table (set-syntax-table font-lock-syntax-table)) (font-lock-unfontify-region beg end) (when font-lock-syntactic-keywords (font-lock-fontify-syntactic-keywords-region beg end)) (unless font-lock-keywords-only (font-lock-fontify-syntactically-region beg end loudly)) (font-lock-fontify-keywords-region beg end loudly))
  (unwind-protect (progn (if font-lock-syntax-table ...) (font-lock-unfontify-region beg end) (when font-lock-syntactic-keywords ...) (unless font-lock-keywords-only ...) (font-lock-fontify-keywords-region beg end loudly)) (set-syntax-table old-syntax-table) (and (not modified) (buffer-modified-p) (set-buffer-modified-p nil)))
  (let ((modified ...) (buffer-undo-list t) (inhibit-read-only t) (old-syntax-table ...) buffer-file-name buffer-file-truename) (unwind-protect (progn ... ... ... ... ...) (set-syntax-table old-syntax-table) (and ... ... ...)))
  font-lock-default-fontify-region(1 4031 nil)
  funcall(font-lock-default-fontify-region 1 4031 nil)
  font-lock-fontify-region(1 4031)
  (save-excursion (font-lock-fontify-region (point-min) (point-max)))
  (let ((was-on font-lock-mode) (font-lock-verbose ...) (font-lock-message-threshold 0) (aborted nil)) (or was-on (font-lock-mode 1)) (font-lock-unfontify-region (point-min) (point-max) t) (save-excursion (font-lock-fontify-region ... ...)) (or was-on (let ... ...)) (set (make-local-variable ...) t) (when (and aborted font-lock-verbose) (progress-feedback-with-label ... "Fontifying %s... aborted." ... ...)))
  (save-restriction (widen) (let (... ... ... ...) (or was-on ...) (font-lock-unfontify-region ... ... t) (save-excursion ...) (or was-on ...) (set ... t) (when ... ...)) (run-hooks (quote font-lock-after-fontify-buffer-hook)))
  font-lock-default-fontify-buffer()
  funcall(font-lock-default-fontify-buffer)
  (let ((font-lock-verbose ...)) (funcall font-lock-fontify-buffer-function))
  font-lock-fontify-buffer()
  gnus-message-citation-mode(1)
  byte-code("..." [gnus-setup-message-winconf mbl mbl1 gnus-setup-message-group gnus-setup-message-article mml-buffer-list gnus-inews-add-send-actions reply-yank reply make-local-variable gnus-message-group-art gnus-newsgroup-name gnus-message-citation-mode 1 gnus-run-hooks gnus-message-setup-hook message-mode gnus-make-local-hook kill-buffer-hook change-major-mode-hook add-hook mml-destroy-buffers nil t gnus-setup-message-buffer yank gnus-setup-yanked-articles gnus-message-buffer gnus-message-highlight-citation major-mode] 6)
  gnus-summary-reply((3557) t)
  gnus-summary-reply-with-original(nil t)
  gnus-summary-wide-reply-with-original(nil)
  call-interactively(gnus-summary-wide-reply-with-original)

Thanks,
-- 
Dave Goldberg
david.goldberg6@verizon.net




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] Fix gnus-message-citation-mode for (S)XEmacs
  2007-02-28 21:14                     ` Dave Goldberg
@ 2007-02-28 22:32                       ` Katsumi Yamaoka
  2007-03-01 16:29                         ` Dave Goldberg
  0 siblings, 1 reply; 16+ messages in thread
From: Katsumi Yamaoka @ 2007-02-28 22:32 UTC (permalink / raw)
  To: ding

>>>>> In <m1fy8qt275.fsf@davestoy.homelinux.org> Dave Goldberg wrote:

> So I ran the patched font-lock.el and here's the resulting backtrace
> (from this very reply, in fact):

> Debugger entered--Lisp error: (void-function line-beginning-position)
>   line-beginning-position()
>   gnus-message-search-citation-line(4031)

I see.  That's just the cause of the trouble, I think.
`line-beginning-position' and `line-end-position' are new in
XEmacs 21.4.20.  I've replaced them into `point-at-bol' and
`point-at-eol' in the Gnus trunk just now.  Please try it.

Regards,



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] Fix gnus-message-citation-mode for (S)XEmacs
  2007-02-28 22:32                       ` Katsumi Yamaoka
@ 2007-03-01 16:29                         ` Dave Goldberg
  2007-03-02 15:28                           ` Dave Goldberg
  0 siblings, 1 reply; 16+ messages in thread
From: Dave Goldberg @ 2007-03-01 16:29 UTC (permalink / raw)
  To: ding

>>>>> On Thu, 01 Mar 2007 07:32:30 +0900, Katsumi Yamaoka <yamaoka@jpl.org> said:

>>>>> In <m1fy8qt275.fsf@davestoy.homelinux.org> Dave Goldberg wrote:
>> So I ran the patched font-lock.el and here's the resulting backtrace
>> (from this very reply, in fact):

>> Debugger entered--Lisp error: (void-function line-beginning-position)
>> line-beginning-position()
>> gnus-message-search-citation-line(4031)

> I see.  That's just the cause of the trouble, I think.
> `line-beginning-position' and `line-end-position' are new in
> XEmacs 21.4.20.  I've replaced them into `point-at-bol' and
> `point-at-eol' in the Gnus trunk just now.  Please try it.

That fixed it, thanks!  Of course, now that I'm aware there's an
XEmacs upgrade available I'll upgrade in the next week or so :-)

I still can't figure out how or why the buffer name is changing,
though.  I don't see anything in my hooks that might do it.  I'll have
to step through it, I suppose.

-- 
Dave Goldberg
david.goldberg6@verizon.net




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] Fix gnus-message-citation-mode for (S)XEmacs
  2007-03-01 16:29                         ` Dave Goldberg
@ 2007-03-02 15:28                           ` Dave Goldberg
  0 siblings, 0 replies; 16+ messages in thread
From: Dave Goldberg @ 2007-03-02 15:28 UTC (permalink / raw)
  To: ding

>>>>> On Thu, 01 Mar 2007 11:29:53 -0500, Dave Goldberg <david.goldberg6@verizon.net> said:

> I still can't figure out how or why the buffer name is changing,
> though.  I don't see anything in my hooks that might do it.  I'll have
> to step through it, I suppose.

I found it.  The culprit was bbdb-define-all-aliases, which I had on
message-setup-hook.  Removing it fixed the problem.  I then noted that
running it by hand in the message buffer did not have the ill effect
and therefore put it on message-mode-hook, so I now have the same
functionality without the unexpected buffer name change.

Thanks,
-- 
Dave Goldberg
david.goldberg6@verizon.net




^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2007-03-02 15:28 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-31  7:18 [PATCH] Fix gnus-message-citation-mode for (S)XEmacs Steve Youngs
2006-12-31 11:52 ` Reiner Steib
2007-01-01  7:26   ` Katsumi Yamaoka
2007-02-07  9:25     ` Katsumi Yamaoka
2007-02-07 15:33       ` Dave Goldberg
2007-02-08  4:42         ` Katsumi Yamaoka
2007-02-08 17:48           ` Dave Goldberg
2007-02-08 23:29             ` Katsumi Yamaoka
2007-02-13 12:46               ` Katsumi Yamaoka
2007-02-13 19:49                 ` Dave Goldberg
2007-02-14  0:29                   ` Katsumi Yamaoka
2007-02-28 21:14                     ` Dave Goldberg
2007-02-28 22:32                       ` Katsumi Yamaoka
2007-03-01 16:29                         ` Dave Goldberg
2007-03-02 15:28                           ` Dave Goldberg
2007-02-09 23:48       ` Steve Youngs

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).