diff options
| author | Karoly Lorentey | 2006-03-15 17:22:12 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2006-03-15 17:22:12 +0000 |
| commit | b336ee388ed5300440e7bab24bf9eec9f250911a (patch) | |
| tree | 62c9058bd403d158d7d18d1cbd4ead3abf36a7aa /lispref | |
| parent | 47f3c6b4dbed851762dca99273d78642c3794188 (diff) | |
| parent | 4034b0e259dd59eda180bd0683876c9d0110f719 (diff) | |
| download | emacs-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/ChangeLog | 18 | ||||
| -rw-r--r-- | lispref/display.texi | 44 | ||||
| -rw-r--r-- | lispref/modes.texi | 50 |
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 @@ | |||
| 1 | 2006-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 | |||
| 6 | 2006-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 | |||
| 13 | 2006-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 | |||
| 1 | 2006-03-11 Bill Wohler <wohler@newt.com> | 19 | 2006-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 |
| 801 | only because they are explicitly programmed to do so. | 801 | only 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 |
| 804 | invisible text, the main editing loop moves point further forward or | 804 | invisible text, the main editing loop moves point further forward or |
| 805 | further backward (in the same direction that the command already moved | 805 | further backward (in the same direction that the command already moved |
| 806 | it) until that condition is no longer true. Thus, if the command | 806 | it) until that condition is no longer true. Thus, if the command |
| 807 | moved point back into an invisible range, Emacs moves point back to | 807 | moved point back into an invisible range, Emacs moves point back to |
| 808 | the beginning of that range, following the previous visible character. | 808 | the beginning of that range, and then back one more character. If the |
| 809 | If the command moved point forward into an invisible range, Emacs | 809 | command moved point forward into an invisible range, Emacs moves point |
| 810 | moves point forward past the first visible character that follows the | 810 | forward up to the first visible character that follows the invisible |
| 811 | invisible text. | 811 | text. |
| 812 | 812 | ||
| 813 | Incremental search can make invisible overlays visible temporarily | 813 | Incremental search can make invisible overlays visible temporarily |
| 814 | and/or permanently when a match includes invisible text. To enable | 814 | and/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 |
| 4130 | Return a suitable search path for images relative to @var{library}. | 4130 | This function returns a suitable search path for images relative to |
| 4131 | @var{library}. | ||
| 4131 | 4132 | ||
| 4132 | Images for @var{library} are searched for in @file{../../etc/images} | 4133 | First it searches for @var{image} in a path suitable for |
| 4133 | and @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 | ||
| 4137 | This function returns the value of @code{load-path} augmented with the | 4138 | Then this function returns a list of directories which contains first |
| 4138 | directory containing @var{image}. If @var{path} is given, it is used | 4139 | the directory in which @var{image} was found, followed by the value of |
| 4139 | instead 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 |
| 4140 | the directory that contains @var{image}. | 4141 | @code{load-path}. |
| 4141 | 4142 | ||
| 4142 | If @var{no-error} is non-nil, this function returns @code{nil} if a | 4143 | If @var{no-error} is non-@code{nil} and a suitable path can't be |
| 4143 | suitable path can't be found rather than signaling an error. | 4144 | found, don't signal an error. Instead, return a list of directories as |
| 4145 | before, except that @code{nil} appears in place of the image directory. | ||
| 4144 | 4146 | ||
| 4145 | Here is an example that uses a common idiom to provide compatibility | 4147 | Here is an example that uses a common idiom to provide compatibility |
| 4146 | with versions of Emacs that lack the variable @code{image-load-path}: | 4148 | with 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 | ||
| 2726 | default the smallest sequence of whole lines that spans the change. | ||
| 2727 | While this works well most of the time, sometimes it doesn't---for | ||
| 2728 | example, when a buffer change has changed the syntactic meaning of text | ||
| 2729 | on an earlier line. | ||
| 2730 | |||
| 2731 | You can enlarge (or even reduce) the region to fontify by setting either | ||
| 2732 | of the following variables: | ||
| 2733 | |||
| 2734 | @defvar font-lock-lines-before | ||
| 2735 | This variable specifies the number of extra lines to consider when | ||
| 2736 | refontifying the buffer after each text change. Font lock begins | ||
| 2737 | refontifying from that number of lines before the changed region. The | ||
| 2738 | default is 0, but using a larger value can be useful for coping with | ||
| 2739 | multi-line patterns. This variable is ignored whenever | ||
| 2740 | @code{font-lock-extend-region-function} is set and returns a | ||
| 2741 | non-@code{nil} value. | ||
| 2742 | @end defvar | ||
| 2743 | |||
| 2744 | @defvar font-lock-extend-region-function | ||
| 2745 | This buffer-local variable is either @code{nil} or is a function that | ||
| 2746 | determines the region to fontify, which Emacs then calls after each | ||
| 2747 | buffer change. | ||
| 2748 | |||
| 2749 | The function is given three parameters, the standard @var{beg}, | ||
| 2750 | @var{end}, and @var{old-len} from after-change-functions (@pxref{Change | ||
| 2751 | Hooks}). It should return either a cons of the beginning and end buffer | ||
| 2752 | positions (in that order) of the region to fontify, or @code{nil} (which | ||
| 2753 | directs the caller to fontify the default region). This function need | ||
| 2754 | not preserve point or the match-data, but must preserve the current | ||
| 2755 | restriction. The region it returns may start or end in the middle of a | ||
| 2756 | line. | ||
| 2757 | |||
| 2758 | Since this function is called after every buffer change, it should be | ||
| 2759 | reasonably 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 | ||
| 2776 | This variable specifies the number of extra lines to consider when | ||
| 2777 | refontifying the buffer after each text change. Font lock begins | ||
| 2778 | refontifying from that number of lines before the changed region. The | ||
| 2779 | default is 0, but using a larger value can be useful for coping with | ||
| 2780 | multi-line patterns. | ||
| 2781 | @end defvar | ||
| 2782 | |||
| 2783 | @ignore | 2817 | @ignore |
| 2784 | @defvar font-lock-inhibit-thing-lock | 2818 | @defvar font-lock-inhibit-thing-lock |
| 2785 | List of Font Lock mode related modes that should not be turned on. | 2819 | List of Font Lock mode related modes that should not be turned on. |