[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: enriched-mode and switching major modes.
From: |
Kim F. Storm |
Subject: |
Re: enriched-mode and switching major modes. |
Date: |
Mon, 20 Sep 2004 16:23:04 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) |
Some of the existing hook properties may also be used to handle
"delete hard newline betwee paragraphs with different categories" in
some sensible way.
If nothing else, such hooks could set some global value which causes a
post-command-hook to fix whatever conflicts are created by the last
modification -- at least I think that would be more efficient that
relying on jit-lock to run "all the time".
`modification-hooks'
If a character has the property `modification-hooks', then its
value should be a list of functions; modifying that character
calls all of those functions. Each function receives two
arguments: the beginning and end of the part of the buffer being
modified. Note that if a particular modification hook function
appears on several characters being modified by a single
primitive, you can't predict how many times the function will be
called.
`insert-in-front-hooks'
`insert-behind-hooks'
The operation of inserting text in a buffer also calls the
functions listed in the `insert-in-front-hooks' property of the
following character and in the `insert-behind-hooks' property of
the preceding character. These functions receive two arguments,
the beginning and end of the inserted text. The functions are
called _after_ the actual insertion takes place.
See also *Note Change Hooks::, for other hooks that are called
when you change text in a buffer.
`point-entered'
`point-left'
The special properties `point-entered' and `point-left' record
hook functions that report motion of point. Each time point
moves, Emacs compares these two property values:
* the `point-left' property of the character after the old
location, and
* the `point-entered' property of the character after the new
location.
If these two values differ, each of them is called (if not `nil')
with two arguments: the old value of point, and the new one.
The same comparison is made for the characters before the old and
new locations. The result may be to execute two `point-left'
functions (which may be the same function) and/or two
`point-entered' functions (which may be the same function). In
any case, all the `point-left' functions are called first,
followed by all the `point-entered' functions.
It is possible with `char-after' to examine characters at various
buffer positions without moving point to those positions. Only an
actual change in the value of point runs these hook functions.
--
Kim F. Storm <address@hidden> http://www.cua.dk
- Re: enriched-mode and switching major modes., (continued)
- Re: enriched-mode and switching major modes., Robert J. Chassell, 2004/09/20
- Re: enriched-mode and switching major modes., Richard Stallman, 2004/09/17
- Re: enriched-mode and switching major modes., Oliver Scholz, 2004/09/18
- Re: enriched-mode and switching major modes., Oliver Scholz, 2004/09/18
- Re: enriched-mode and switching major modes., Richard Stallman, 2004/09/19
- Re: enriched-mode and switching major modes., Oliver Scholz, 2004/09/20
- Re: enriched-mode and switching major modes., Kim F. Storm, 2004/09/20
- Re: enriched-mode and switching major modes., Oliver Scholz, 2004/09/20
- Re: enriched-mode and switching major modes.,
Kim F. Storm <=
- Re: enriched-mode and switching major modes., Oliver Scholz, 2004/09/20
- Re: enriched-mode and switching major modes., Oliver Scholz, 2004/09/20
- Re: enriched-mode and switching major modes., Kim F. Storm, 2004/09/20
- Re: enriched-mode and switching major modes., Oliver Scholz, 2004/09/21
- Re: enriched-mode and switching major modes., Kim F. Storm, 2004/09/21
- Re: enriched-mode and switching major modes., Richard Stallman, 2004/09/22
- Re: enriched-mode and switching major modes., Richard Stallman, 2004/09/21
- Re: enriched-mode and switching major modes., Miles Bader, 2004/09/21
- Re: enriched-mode and switching major modes., James Clark, 2004/09/21
- Re: enriched-mode and switching major modes., Richard Stallman, 2004/09/23