[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autoloading comment-forward

From: Ralf Angeli
Subject: Re: Autoloading comment-forward
Date: Mon, 09 Jul 2007 20:55:29 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux)

* Stefan Monnier (2007-07-08) writes:

>> Oh, okay.  Thanks for the hint.  Is this documented somewhere?  Should
>> it be done everytime `comment-forward' is called?
> Once is enough: It simply should be called at some point after the major
> mode is set but before internal functions such as comment-forward are used.


>> I saw that other functions in newcomment.el call
>> `comment-normalize-vars' themselves.  Would it make sense if
>> `comment-forward' did the same (and was autoloaded)?
> Could be.  What kind of situation do you have in mind where this is useful?

I'm not sure I understand the question.  AUCTeX uses `comment-forward'
to skip empty or commented lines when traversing LaTeX macro arguments.
So for me `comment-forward' is not so much an internal function of
newcomment.el but rather one which is useful for other parts of Emacs or
packages like AUCTeX.  That's also why I think it makes sense for it to
be autoloaded.

Anyway, I will put a call to `comment-normalize-vars' into the
compatibility function for `comment-forward' in AUCTeX before
`comment-forward' is actually called (if available).  This will get rid
of the issue.  And the call to `comment-forward' in RefTeX has actually
only been present in my local copy.  RefTeX actually uses a different
mechanism for skipping over comments.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]