From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ralf Angeli Newsgroups: gmane.emacs.devel Subject: Re: Autoloading comment-forward Date: Mon, 09 Jul 2007 20:55:29 +0200 Message-ID: <87bqel4db2.fsf@neutrino.caeruleus.net> References: <87k5tck9yn.fsf@neutrino.caeruleus.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1184007340 31116 80.91.229.12 (9 Jul 2007 18:55:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 9 Jul 2007 18:55:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 09 20:55:39 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I7yOZ-00013A-2T for ged-emacs-devel@m.gmane.org; Mon, 09 Jul 2007 20:55:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I7yOY-00078R-Kv for ged-emacs-devel@m.gmane.org; Mon, 09 Jul 2007 14:55:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I7yOV-00076V-HD for emacs-devel@gnu.org; Mon, 09 Jul 2007 14:55:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I7yOU-00075t-UM for emacs-devel@gnu.org; Mon, 09 Jul 2007 14:55:35 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I7yOU-00075k-R0 for emacs-devel@gnu.org; Mon, 09 Jul 2007 14:55:34 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.171]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I7yOU-00072t-1W for emacs-devel@gnu.org; Mon, 09 Jul 2007 14:55:34 -0400 Original-Received: from [84.165.18.55] (helo=neutrino.caeruleus.net) by mrelayeu.kundenserver.de (node=mrelayeu6) with ESMTP (Nemesis), id 0ML29c-1I7yOQ2H5i-0002pe; Mon, 09 Jul 2007 20:55:31 +0200 In-Reply-To: (Stefan Monnier's message of "Sun, 08 Jul 2007 09:55:39 -0400") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) X-Provags-ID: V01U2FsdGVkX1/t3CiIBcy8KJ7sQFurnc7QGnHUR0J7NTvg+x/ AIR2h2VFAooGj2et359T0futp3sV1AvgfQr2gVl2729HVP/PNM ekLoxTdcCoEmzRncmE0Dg== X-detected-kernel: Linux 2.6? (barebone, rare!) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:74518 Archived-At: * 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. Okay. >> 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. -- Ralf