aboutsummaryrefslogtreecommitdiffstats
path: root/lispref
diff options
context:
space:
mode:
authorKaroly Lorentey2006-03-15 17:22:12 +0000
committerKaroly Lorentey2006-03-15 17:22:12 +0000
commitb336ee388ed5300440e7bab24bf9eec9f250911a (patch)
tree62c9058bd403d158d7d18d1cbd4ead3abf36a7aa /lispref
parent47f3c6b4dbed851762dca99273d78642c3794188 (diff)
parent4034b0e259dd59eda180bd0683876c9d0110f719 (diff)
downloademacs-b336ee388ed5300440e7bab24bf9eec9f250911a.tar.gz
emacs-b336ee388ed5300440e7bab24bf9eec9f250911a.zip
Merged from emacs@sv.gnu.org
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-153 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-154 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-155 Remove nick-abbrevs stuff from rcirc.el * emacs@sv.gnu.org/emacs--devo--0--patch-156 rcirc.el update from Ryan Yeske * emacs@sv.gnu.org/emacs--devo--0--patch-157 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-158 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-159 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-532
Diffstat (limited to 'lispref')
-rw-r--r--lispref/ChangeLog18
-rw-r--r--lispref/display.texi44
-rw-r--r--lispref/modes.texi50
3 files changed, 83 insertions, 29 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index 23e6b78b130..9d07a2d59c8 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,21 @@
12006-03-14 Bill Wohler <wohler@newt.com>
2
3 * display.texi (Defining Images): In image-load-path-for-library,
4 always return list of directories. Update example.
5
62006-03-14 Alan Mackenzie <acm@muc.de>
7
8 * modes.texi: New node, "Region to Fontify" (for Font Lock).
9 This describes font-lock-extend-region-function.
10 ("Other Font Lock Variables"): move "font-lock-lines-before" to
11 the new node "Region to Fontify".
12
132006-03-13 Richard Stallman <rms@gnu.org>
14
15 * display.texi (Invisible Text): The impossible position is
16 now before the invisible text, not after.
17 (Defining Images): Clean up last change.
18
12006-03-11 Bill Wohler <wohler@newt.com> 192006-03-11 Bill Wohler <wohler@newt.com>
2 20
3 * display.texi (Defining Images): Add image-load-path-for-library. 21 * display.texi (Defining Images): Add image-load-path-for-library.
diff --git a/lispref/display.texi b/lispref/display.texi
index cd46be95b05..294a6d64e7e 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -800,15 +800,15 @@ explicitly ignore invisible newlines if
800@code{line-move-ignore-invisible} is non-@code{nil} (the default), but 800@code{line-move-ignore-invisible} is non-@code{nil} (the default), but
801only because they are explicitly programmed to do so. 801only because they are explicitly programmed to do so.
802 802
803 However, if a command ends with point inside or immediately after 803 However, if a command ends with point inside or immediately before
804invisible text, the main editing loop moves point further forward or 804invisible text, the main editing loop moves point further forward or
805further backward (in the same direction that the command already moved 805further backward (in the same direction that the command already moved
806it) until that condition is no longer true. Thus, if the command 806it) until that condition is no longer true. Thus, if the command
807moved point back into an invisible range, Emacs moves point back to 807moved point back into an invisible range, Emacs moves point back to
808the beginning of that range, following the previous visible character. 808the beginning of that range, and then back one more character. If the
809If the command moved point forward into an invisible range, Emacs 809command moved point forward into an invisible range, Emacs moves point
810moves point forward past the first visible character that follows the 810forward up to the first visible character that follows the invisible
811invisible text. 811text.
812 812
813 Incremental search can make invisible overlays visible temporarily 813 Incremental search can make invisible overlays visible temporarily
814and/or permanently when a match includes invisible text. To enable 814and/or permanently when a match includes invisible text. To enable
@@ -4127,30 +4127,32 @@ should specify the image as follows:
4127 4127
4128@defun image-load-path-for-library library image &optional path no-error 4128@defun image-load-path-for-library library image &optional path no-error
4129@tindex image-load-path-for-library 4129@tindex image-load-path-for-library
4130Return a suitable search path for images relative to @var{library}. 4130This function returns a suitable search path for images relative to
4131@var{library}.
4131 4132
4132Images for @var{library} are searched for in @file{../../etc/images} 4133First it searches for @var{image} in a path suitable for
4133and @file{../etc/images} relative to the files in 4134@var{library}, which includes @file{../../etc/images} and
4134@file{lisp/@var{library}} as well as in @code{image-load-path} and 4135@file{../etc/images} relative to the library file itself, followed by
4135@var{load-path}. 4136@code{image-load-path} and @code{load-path}.
4136 4137
4137This function returns the value of @code{load-path} augmented with the 4138Then this function returns a list of directories which contains first
4138directory containing @var{image}. If @var{path} is given, it is used 4139the directory in which @var{image} was found, followed by the value of
4139instead of @code{load-path}. If @code{path} is @code{t}, just return 4140@code{load-path}. If @var{path} is given, it is used instead of
4140the directory that contains @var{image}. 4141@code{load-path}.
4141 4142
4142If @var{no-error} is non-nil, this function returns @code{nil} if a 4143If @var{no-error} is non-@code{nil} and a suitable path can't be
4143suitable path can't be found rather than signaling an error. 4144found, don't signal an error. Instead, return a list of directories as
4145before, except that @code{nil} appears in place of the image directory.
4144 4146
4145Here is an example that uses a common idiom to provide compatibility 4147Here is an example that uses a common idiom to provide compatibility
4146with versions of Emacs that lack the variable @code{image-load-path}: 4148with versions of Emacs that lack the variable @code{image-load-path}:
4147 4149
4148@example 4150@example
4149(let ((load-path 4151;; Avoid errors on Emacsen without `image-load-path'.
4150 (image-load-path-for-library "mh-e" "mh-logo.xpm")) 4152(if (not (boundp 'image-load-path)) (defvar image-load-path nil))
4151 (image-load-path 4153
4152 (image-load-path-for-library "mh-e" "mh-logo.xpm" 4154(let* ((load-path (image-load-path-for-library "mh-e" "mh-logo.xpm"))
4153 'image-load-path))) 4155 (image-load-path (cons (car load-path) image-load-path)))
4154 (mh-tool-bar-folder-buttons-init)) 4156 (mh-tool-bar-folder-buttons-init))
4155@end example 4157@end example
4156@end defun 4158@end defun
diff --git a/lispref/modes.texi b/lispref/modes.texi
index b9eb33dcb88..e15392ac85a 100644
--- a/lispref/modes.texi
+++ b/lispref/modes.texi
@@ -2337,6 +2337,8 @@ Search-based fontification happens second.
2337* Font Lock Basics:: Overview of customizing Font Lock. 2337* Font Lock Basics:: Overview of customizing Font Lock.
2338* Search-based Fontification:: Fontification based on regexps. 2338* Search-based Fontification:: Fontification based on regexps.
2339* Customizing Keywords:: Customizing search-based fontification. 2339* Customizing Keywords:: Customizing search-based fontification.
2340* Region to Fontify:: Controlling which region gets refontified
2341 after a buffer change.
2340* Other Font Lock Variables:: Additional customization facilities. 2342* Other Font Lock Variables:: Additional customization facilities.
2341* Levels of Font Lock:: Each mode can define alternative levels 2343* Levels of Font Lock:: Each mode can define alternative levels
2342 so that the user can select more or less. 2344 so that the user can select more or less.
@@ -2717,6 +2719,46 @@ C mode @emph{and} all modes derived from it, do this instead:
2717 font-lock-keyword-face))))) 2719 font-lock-keyword-face)))))
2718@end smallexample 2720@end smallexample
2719 2721
2722@node Region to Fontify
2723@subsection Region to Fontify after a Buffer Change
2724
2725 When a buffer is changed, the region that Font Lock refontifies is by
2726default the smallest sequence of whole lines that spans the change.
2727While this works well most of the time, sometimes it doesn't---for
2728example, when a buffer change has changed the syntactic meaning of text
2729on an earlier line.
2730
2731You can enlarge (or even reduce) the region to fontify by setting either
2732of the following variables:
2733
2734@defvar font-lock-lines-before
2735This variable specifies the number of extra lines to consider when
2736refontifying the buffer after each text change. Font lock begins
2737refontifying from that number of lines before the changed region. The
2738default is 0, but using a larger value can be useful for coping with
2739multi-line patterns. This variable is ignored whenever
2740@code{font-lock-extend-region-function} is set and returns a
2741non-@code{nil} value.
2742@end defvar
2743
2744@defvar font-lock-extend-region-function
2745This buffer-local variable is either @code{nil} or is a function that
2746determines the region to fontify, which Emacs then calls after each
2747buffer change.
2748
2749The function is given three parameters, the standard @var{beg},
2750@var{end}, and @var{old-len} from after-change-functions (@pxref{Change
2751Hooks}). It should return either a cons of the beginning and end buffer
2752positions (in that order) of the region to fontify, or @code{nil} (which
2753directs the caller to fontify the default region). This function need
2754not preserve point or the match-data, but must preserve the current
2755restriction. The region it returns may start or end in the middle of a
2756line.
2757
2758Since this function is called after every buffer change, it should be
2759reasonably fast.
2760@end defvar
2761
2720@node Other Font Lock Variables 2762@node Other Font Lock Variables
2721@subsection Other Font Lock Variables 2763@subsection Other Font Lock Variables
2722 2764
@@ -2772,14 +2814,6 @@ arguments, the beginning and end of the region. The default value is
2772@code{font-lock-default-unfontify-region}. 2814@code{font-lock-default-unfontify-region}.
2773@end defvar 2815@end defvar
2774 2816
2775@defvar font-lock-lines-before
2776This variable specifies the number of extra lines to consider when
2777refontifying the buffer after each text change. Font lock begins
2778refontifying from that number of lines before the changed region. The
2779default is 0, but using a larger value can be useful for coping with
2780multi-line patterns.
2781@end defvar
2782
2783@ignore 2817@ignore
2784@defvar font-lock-inhibit-thing-lock 2818@defvar font-lock-inhibit-thing-lock
2785List of Font Lock mode related modes that should not be turned on. 2819List of Font Lock mode related modes that should not be turned on.