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

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

bug#32237: 27.0.50; Function in before-change-functions is called with f


From: Michał Kondraciuk
Subject: bug#32237: 27.0.50; Function in before-change-functions is called with first argument greater than the second
Date: Sat, 21 Jul 2018 18:39:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

If I eveluate the sexp below with M-: in emacs -Q, I get the message
"before change 4 1", which is unexpected.  The second argument should be
greater than the first one, according to the documentation.

(with-current-buffer "*scratch*"
  (erase-buffer)
  (insert "foo")
  (add-hook 'before-change-functions
            (lambda (beg end)
              (message "before change %d %d" beg end))
            nil t)
  (with-temp-buffer
    (insert "foo")
    (let ((temp (current-buffer)))
      (with-current-buffer "*scratch*"
        (replace-buffer-contents temp)))))


Repository revision: 2c242cb1a2956ecfa894d0110b837d4ecc43a69c






reply via email to

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