all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juanma <juanma_bellon@yahoo.es>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Mode for files visited by GUD
Date: Fri, 18 Jul 2008 01:54:59 +0200	[thread overview]
Message-ID: <200807180154.59785.juanma_bellon@yahoo.es> (raw)
In-Reply-To: <18558.36526.630474.990664@kahikatea.snap.net.nz>

Hello, Nick.

Thanks for your help.

> = Nick Roberts
>  > = Juan Bellon

>  > Is there any mode (and it's hook) run when GUD visits a source code file
>  > during debugging?
> 
> gdb-find-file-hook is run when GUD visits a source code file.  You could
> advise that function

Great, it worked.

This is sort of peculiar way to do it. I mean, hooks are normally variables,
and one uses add-hook with them. But in this case it is a function,
documented on a user level, while the variable was not. Maybe the variable
was created by my mistake only, as I hooked my function on it?

So, yes, I can advice that function, but, anything against using a hook
variable instead?

Another question: is there an "exit hook", for the time when debugging goes
into a different file? I guess it doesn't make a lot of sense, but I'm curious.

> or create your own hook using find-file-hook (see the Elisp manual).

I'm also curious about this. What did you mean? Why should I create my own
hook instead of hooking my minor mode or function into that existing hook?
And how can I tell if the file is being found by GUD and not by user request?

Best regards,
-- 
Juanma

"Having a smoking section in a restaurant is like
 having a peeing section in a swimming pool."
       -- Edward Burr








  reply	other threads:[~2008-07-17 23:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-16 23:35 Mode for files visited by GUD Juanma
2008-07-17  0:13 ` Nick Roberts
2008-07-17 23:54   ` Juanma [this message]
2008-07-18  0:21     ` Juanma
2008-07-18  0:30     ` Nick Roberts
2008-07-18  1:08       ` Juanma
2008-07-18  1:32         ` Nick Roberts
2008-07-19  1:40           ` Juanma
2008-07-19  2:20             ` Nick Roberts

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=200807180154.59785.juanma_bellon@yahoo.es \
    --to=juanma_bellon@yahoo.es \
    --cc=help-gnu-emacs@gnu.org \
    --cc=nickrob@snap.net.nz \
    /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.