From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Le Wang Newsgroups: gmane.emacs.help Subject: Re: Jump to autoconf macro documentation Date: Sun, 30 Jan 2011 23:09:29 +0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=90e6ba5bbb7f921f80049b11af3d X-Trace: dough.gmane.org 1296400213 14593 80.91.229.12 (30 Jan 2011 15:10:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 30 Jan 2011 15:10:13 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Andrea Crotti Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 30 16:10:07 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PjYul-0002qN-6R for geh-help-gnu-emacs@m.gmane.org; Sun, 30 Jan 2011 16:10:07 +0100 Original-Received: from localhost ([127.0.0.1]:55447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjYuk-00085z-9W for geh-help-gnu-emacs@m.gmane.org; Sun, 30 Jan 2011 10:10:06 -0500 Original-Received: from [140.186.70.92] (port=36561 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjYuG-00085L-Gq for help-gnu-emacs@gnu.org; Sun, 30 Jan 2011 10:09:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PjYuD-0007QC-Ch for help-gnu-emacs@gnu.org; Sun, 30 Jan 2011 10:09:36 -0500 Original-Received: from mail-ey0-f169.google.com ([209.85.215.169]:61281) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PjYuD-0007Pq-0E for help-gnu-emacs@gnu.org; Sun, 30 Jan 2011 10:09:33 -0500 Original-Received: by eyh6 with SMTP id 6so2129729eyh.0 for ; Sun, 30 Jan 2011 07:09:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Zum9gzgrW4/RxUutC8Qt2KA6SXI5+441zaA6l3bR4JI=; b=hB9Pmi3aeDlYkYRCmSt0XXQd9UEIcVkfZX6vfXPE4EnRjtayT1tu2WMeqcebGCoOYz pKXq6G7gjt3Oms1WR0fRhnCYNiiHnry+7QBZUB6t2D7bRoFqQruIxM4nHM/reTRqgP/y PjNNOKjtZ8N/uoT28OOcuWZ9MptVn5+nb7Z3Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=LQk/xbjw5Xmre8fAIbGuzloeEMsI+3cwGnuE5LxQ27ZeuuscKwKV+a3BceHK2FUnrB nsrD7PYf/FNOz0eB/AZr+a/EpOMLvBoB7PyDiuedt6WPXYGqyyOSt51AiUIJjTQ5lAmW SqO3J3fvrJZZnT71DvZDCR35kQFeLh0cClGPg= Original-Received: by 10.14.37.130 with SMTP id y2mr2392390eea.24.1296400169180; Sun, 30 Jan 2011 07:09:29 -0800 (PST) Original-Received: by 10.14.119.11 with HTTP; Sun, 30 Jan 2011 07:09:29 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.215.169 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78848 Archived-At: --90e6ba5bbb7f921f80049b11af3d Content-Type: text/plain; charset=ISO-8859-1 You want to change the syntax table to rexognize ?_ as a word constituent. see http://www.emacswiki.org/emacs/EmacsSyntaxTable (defvar my-wacky-syntax-table (modify-syntax-entry ?_ "w" (make-syntax-table))) (defun get-word () (interactive) (message "%s" (with-syntax-table my-wacky-syntax-table (thing-at-point 'word)))) I don't know much about info, but "g" is bound to `Info-goto-node' On Sun, Jan 30, 2011 at 6:47 PM, Andrea Crotti wrote: > > I would like to help myself to understand and write correct Configure.ac > files. > > Now one idea would be to be able to jump from the macro to its > definition. > > So I found that the definition of every macro is given in the autoconf > Info page, for example under with the string: > > Macro: AC_ARG_ENABLE > > so it would be easy to jump to. > > Only one problem, how (thing-at-point 'word) doesn't work well with > > AC_ARG_ENABLE for example, so or I redefine locally how a word should be > (if possible), or I have to do some other regexp trick to get it. > > Another problem is that I don't get how to look for, if I have an Info > buffer already open it uses that position. So maybe it's better if I > create a new Info buffer and use it. > > And also how do I jump to an info page from the TOC: RET is bound to > this: > > (Info-follow-nearest-node &optional FORK) > > But I think there is a smarter way than doing a search-regexp and then > use that function, right? > > > -- Le --90e6ba5bbb7f921f80049b11af3d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
You want to change the syntax table to rexognize= ?_ as a word constituent. see=A0http://www.emacswiki.org/emacs/EmacsSyntaxTable
=

(defvar my-= wacky-syntax-table
=A0=A0 =A0(modify-syntax= -entry ?_ "w" (make-syntax-table)))

(defun get-word ()
=A0=A0(interactive)
=A0=A0(message "= ;%s"
=A0=A0 =A0 =A0 =A0 =A0 (with-synt= ax-table my-wacky-syntax-table
=A0=A0 =A0 =A0 =A0 =A0 =A0 (thing-at-point '= word))))

I don't know much about info, but "g" is bound to `Info-go= to-node'
=A0
On Sun= , Jan 30, 2011 at 6:47 PM, Andrea Crotti <andrea.crotti.0@gmail.com> w= rote:

I would like to help myself to understand and write correct Configure.ac files.

Now one idea would be to be able to jump from the macro to its
definition.

So I found that the definition of every macro is given in the autoconf
Info page, for example under with the string:

Macro: AC_ARG_ENABLE

so it would be easy to jump to.

Only one problem, how (thing-at-point 'word) doesn't work well with=

AC_ARG_ENABLE for example, so or I redefine locally how a word should be (if possible), or I have to do some other regexp trick to get it.

Another problem is that I don't get how to look for, if I have an Info<= br> buffer already open it uses that position. =A0So maybe it's better if I=
create a new Info buffer and use it.

And also how do I jump to an info page from the TOC: RET is bound to
this:

(Info-follow-nearest-node &optional FORK)

But I think there is a smarter way than doing a search-regexp and then
use that function, right?





--
Le
--90e6ba5bbb7f921f80049b11af3d--