all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nikolaj Schumacher <n_schumacher@web.de>
To: bug-gnu-emacs@gnu.org
Subject: modification hooks called only once in c-mode
Date: Mon, 16 Jul 2007 23:13:53 +0200	[thread overview]
Message-ID: <m2veckuk4u.fsf@nschum.de> (raw)

Hello,


occasionally modification hooks seem to be called only once in c-mode
(and derivatives).

This happens in both released and CVS version of Emacs 22, but not in
Emacs 21.


To reproduce, evaluate the following:

(defun test-bug-hook (overlay afterp beg end &optional r)
  (message "%s hook called" (if afterp "after" "before")))

(defun test-bug ()
  (let ((beg (point))
        ov)
    (insert "foobar")
    (setq ov (make-overlay beg (point)))
    (overlay-put ov 'face 'highlight)
    (overlay-put ov 'insert-in-front-hooks '(test-bug-hook))))


1) Create a new buffer in fundamental-mode, evaluate (test-bug), and
insert a char before the overlay.

Result:
before hook called
after hook called


1) Create a new buffer in c-mode, evaluate (test-bug), and insert a char
before the overlay.

Result:
before hook called


The hook is never called after the change.



In GNU Emacs 22.1.1 (i386-apple-darwin8.10.1, Carbon Version 1.6.0)
 of 2007-07-16 on wednesday
Windowing system distributor `Apple Inc.', version 10.4.10
configured using `configure  '--prefix=/Applications/Emacs.app/Contents/Resources' '--with-carbon' '--without-x' '--libexecdir=/Applications/Emacs.app/Contents/MacOS/libexec' 'CFLAGS=-arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -DUSE_ATSUI -O2''


regards,
Nikolaj Schumacher

                 reply	other threads:[~2007-07-16 21:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2veckuk4u.fsf@nschum.de \
    --to=n_schumacher@web.de \
    --cc=bug-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.