[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: after-change-functions called when menu action
From: |
David Reitter |
Subject: |
Re: after-change-functions called when menu action |
Date: |
Mon, 6 Jun 2005 13:47:59 +0100 |
On 6 Jun 2005, at 13:25, Richard Stallman wrote:
The hooks in after-change-functions seem to be called even when I
just open a menu from the menu bar with the mouse (before even
selecting a menu item!). Clearly, no change has been made to the
buffer in such a situation. I think that after-change-functions
shouldn't be called.
I agree, but I could not reproduce this problem. Would you please
send a precise, self-contained test case?
Fine:
(defun yell-at-me ( beg end len)
(ding)
(print "after-change-functions called!")
(print (current-buffer))
(print (list beg end len))
)
(add-hook 'after-change-functions 'yell-at-me)
When I open a menu from the menu bar, I get lots of 'ding's.
The changed buffer turns out to be *code-conversion-work*, which is
a temporary buffer.
If you say: well, that buffer has changed at the point, and after-
change-functions are executed even for some internal, temporary
buffers, then I'll say: fair enough.
Note that this refers to the Carbon port. Your mileage may vary!