help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Mode for files visited by GUD


From: Juanma
Subject: Re: Mode for files visited by GUD
Date: Fri, 18 Jul 2008 02:21:01 +0200
User-agent: KMail/1.9.6 (enterprise 0.20070907.709405)

> > gdb-find-file-hook is run when GUD visits a source code file.  You could
> > advise that function
> 
> Great, it worked.

No, wait. Now find-file-hook contains gdb-find-file-hook, so Emacs is
running my gdb-specific minor mode for every file "found" into Emacs.

This is what I did:

----------------------------------------
  (defun activate-my-guding-mode ()
    (source-guding-mode 1)
    (message "*GUDing* mode activated"))
  
  (defadvice gdb-find-file-hook (after activate-guding activate)
    (activate-my-guding-mode))
----------------------------------------

Did I do something wrong?
-- 
Juanma

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






reply via email to

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