emacs-devel
[Top][All Lists]
Advanced

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

before-change-functions called twice at yank


From: Lars Hansen
Subject: before-change-functions called twice at yank
Date: Tue, 11 Apr 2006 00:37:47 +0200
User-agent: Debian Thunderbird 1.0.2 (X11/20051002)

Do emacs -q and evaluate

(progn
  (add-hook 'before-change-functions
            (lambda (b e)
              (message "before-change: '%s'" (buffer-substring b e))) nil t)
  (add-hook 'after-change-functions
            (lambda (b e l)
              (message "after-change: '%s'" (buffer-substring b e))) nil t))


in the *scratch* buffer. If you press the letter a, the message buffer
will get

before-change: ''
after-change: 'a'

as expected. Now yank the string "foo". Then the message buffer gets

before-change: ''
after-change: 'foo'
before-change: 'foo'

This seems as a bug to me. Am I missing something?





reply via email to

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