unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* How to track changes to a variable?
@ 2002-03-27 10:37 Juanma Barranquero
  0 siblings, 0 replies; only message in thread
From: Juanma Barranquero @ 2002-03-27 10:37 UTC (permalink / raw)


I'm designing an elisp module that uses jit-lock to highlight text that
goes beyond the fill-column.

Supposedly, the module should somehow track (user) changes to the
variable fill-column. As there aren't change hooks for variables, what's
the best way to do it?

I've thought of:

 - Advising set-fill-column: not entirely right because programmatic
changes to the variable fill-column won't be detected, but that's OK
because my module is a user-level convenience. However, advising is not
recommended, I think.

 - Redefining set-fill-column, storing its original value and calling it
from my function: Ugly, and I don't know what is the gain wrt advising.

 - Installing a post-command-hook to check the value of fill-column: OK,
but too heavy-duty (I assume the user is not going to change the fill
column very often).

Any other option that I've overlooked?

Thanks,


                                                           /L/e/k/t/u


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-03-27 10:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-27 10:37 How to track changes to a variable? Juanma Barranquero

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).