GNU bug report logs - #15692
24.3.50; rcirc activity mode-line indicator gets cleared automatically

Previous Next

Package: emacs;

Reported by: Tassilo Horn <tsdh <at> gnu.org>

Date: Wed, 23 Oct 2013 08:20:02 UTC

Severity: normal

Found in version 24.3.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 15692 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: 15692 <at> debbugs.gnu.org, Leo Liu <sdl.web <at> gmail.com>
Subject: Re: bug#15692: 24.3.50;
 rcirc activity mode-line indicator gets cleared automatically
Date: Wed, 23 Oct 2013 16:10:25 -0400
>> No.  It wouldn't be very hard to add, tho.
> It's definititely not the first time where I could need something like
> that.  Maybe it could also be a bit more general, e.g., one could add a
> watcher function to a symbol that's called whenever the symbol-value is
> set.

The way to implement it, I think is to take the "read-only" bit of
symbols, and extend it with a third value ("watched").
So assignment to such a variable would be a variation of "read-only",
except that instead of signally an error, it would call some Elisp code.
The point being that the "normal execution path" can stay unchanged, so
we don't slow down normal execution.

Of course, it wouldn't work on those Elisp variable that are defined in
C (i.e. defined via DEFVAR_LISP, DEFVAR_BOOL, or DEFVAR_INT), where the
value can be directly changed by the C code without going through
those tests.  Kind of like advice on subrs.


        Stefan




This bug report was last modified 11 years and 212 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.