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

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

Re: advising setq


From: Miles Bader
Subject: Re: advising setq
Date: 28 Jun 2002 10:50:26 +0900

address@hidden (bigfaceworm) writes:
> Ok.  I advised 'setq-default, set the value to `nil,
> (advice worked).  Checked the value, it was in fact nil globally.
> 
> Three hours later, it's back to " >".
> 
> setq-default was apparently not called.

`Advice' on built-in functions/forms (like setq and setq-default) only
works for calls from lisp, not on calls made from C code.

Maybe the easiest thing to do is run gdb on your emacs (assuming you've
compiled it from source), put a breakpoint on Fset or Fset_default, and
make the breakpoint conditional on the symbol being `fill-prefix'.

[Probably the easiest way to make the breakpoint conditional on the
symbol being `fill-prefix' is to intentionally call setq yourself from
lisp after you've added the unconditional breakpoint, and when gdb hits
the breakpoint, make sure it's the correct symbol (using the special
emacs gdb command `xprintsym symbol'), and if so, just look at the C
value for the `symbol' argument and then use `cond symbol == ...' (where
...  is the value gdb printed).]

-Miles
-- 
Run away!  Run away!



reply via email to

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