all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Le Wang <l26wang@gmail.com>
To: Andrea Crotti <andrea.crotti.0@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Jump to autoconf macro documentation
Date: Mon, 31 Jan 2011 08:46:59 +0800	[thread overview]
Message-ID: <AANLkTikRyLQYWFGvJGyQeYVipVr8Odq+n8-ne-uoxJi6@mail.gmail.com> (raw)
In-Reply-To: <m1tygqym7z.fsf@82-089.eduroam.rwth-aachen.de>

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

You haven't said why it doesn't work.  Maybe you need to look into error
handling?

http://www.gnu.org/software/emacs/elisp/html_node/Handling-Errors.html

<http://www.gnu.org/software/emacs/elisp/html_node/Handling-Errors.html>In
the future, please try harder to use the built-in help system *and* Google
first before posting to this list.  This list should not be your first line
of defense when you come across an issue.

Also when you post your issue, describe it in detail; and demonstrate that
you've tried the obvious avenues to resolve it yourself, i.e. describe your
attempts at solving the problem, and why you are stuck

"I thought the issue might be xxx, so I tried A, B and C.  But now I'm
stuck."

Giving more details will help others in the future who Google similar
issues, It also shows people that you are sincere and willing to invest your
own time before bothering others.

People who persistently spray terse "stream of thought" style questions into
mailing lists get filtered out.  I like it when people show respect for
others' time.

Please understand that I'm not trying to offend you, just trying to help you
get more answers to your questions in the future.


On Mon, Jan 31, 2011 at 8:02 AM, Andrea Crotti <andrea.crotti.0@gmail.com>wrote:

> To be more complete I thought that I could do the following thing, first I
> try
> to look for the macro definition in aclocal.m4, and if it's not there I try
> in the Info page.
>
> So I came up with something like
> --8<---------------cut here---------------start------------->8---
>
>  (setq autoconf-macro-syntax-table (make-syntax-table))
>  (modify-syntax-entry ?_ "w" autoconf-macro-syntax-table)
>
>  (defun get-autoconf-macro-definition ()
>    "jump to the definition of a macro"
>    (interactive)
>    (let
>        ((macro (with-syntax-table autoconf-macro-syntax-table
> (thing-at-point 'word))))
>       (unless (get-autoconf-macro-local macro)
>         (info "autoconf" (concat "*autconf*<" macro ">"))
>         (Info-index macro))))
>
>  (defun get-autoconf-macro-local (macro)
>    "Look for the definition of the macro in aclocal.m4 before"
>    (let
>        ((local-macro-file "aclocal.m4"))
>      (if (file-exists-p local-macro-file)
>          (save-excursion
>            (find-file local-macro-file)
>            (search-forward (format "AC_DEFUN([%s])" macro)))
>        nil)))
>
>  (add-hook 'autoconf-mode-hook
>            (lambda ()
>              (local-set-key "\C-j" 'get-autoconf-macro-definition)))
> --8<---------------cut here---------------end--------------->8---
>
> What doesn't work yet is how to return false (and thus return to the
> previous state in case
> the macro is not found anywhere.
>
> And I should give an error message if I don't find the macro with
> Info-index as well, any idea?
>
>
>


-- 
Le

[-- Attachment #2: Type: text/html, Size: 3765 bytes --]

  reply	other threads:[~2011-01-31  0:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-30 10:47 Jump to autoconf macro documentation Andrea Crotti
2011-01-30 15:09 ` Le Wang
2011-01-30 16:03   ` Andrea Crotti
2011-01-30 16:09   ` Thien-Thi Nguyen
2011-01-30 16:16 ` Kevin Rodgers
2011-01-30 17:31   ` Andrea Crotti
2011-01-31  0:02     ` Andrea Crotti
2011-01-31  0:46       ` Le Wang [this message]
2011-01-31 10:18         ` Andrea Crotti
2011-01-31 10:31           ` Thien-Thi Nguyen
2011-01-31 22:11           ` Kevin Rodgers
     [not found] <mailman.1.1296384469.21090.help-gnu-emacs@gnu.org>
2011-01-31 16:14 ` Stefan Monnier
2011-01-31 23:19   ` Andrea Crotti
2011-02-01 15:24     ` Oleksandr Gavenko

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=AANLkTikRyLQYWFGvJGyQeYVipVr8Odq+n8-ne-uoxJi6@mail.gmail.com \
    --to=l26wang@gmail.com \
    --cc=andrea.crotti.0@gmail.com \
    --cc=help-gnu-emacs@gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.