Mercurial > emacs
comparison lisp/font-lock.el @ 83492:203c9b24206b
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
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Wed, 15 Mar 2006 17:22:12 +0000 |
parents | a380ca43a190 0c2790d73955 |
children | b901f4f12f33 |
comparison
equal
deleted
inserted
replaced
83491:16813e8005ce | 83492:203c9b24206b |
---|---|
1037 (unless font-lock-dont-widen (widen)) | 1037 (unless font-lock-dont-widen (widen)) |
1038 ;; Use the fontification syntax table, if any. | 1038 ;; Use the fontification syntax table, if any. |
1039 (when font-lock-syntax-table | 1039 (when font-lock-syntax-table |
1040 (set-syntax-table font-lock-syntax-table)) | 1040 (set-syntax-table font-lock-syntax-table)) |
1041 (goto-char beg) | 1041 (goto-char beg) |
1042 (setq beg (line-beginning-position (- 1 font-lock-lines-before))) | 1042 (setq beg (line-beginning-position)) |
1043 ;; check to see if we should expand the beg/end area for | 1043 ;; check to see if we should expand the beg/end area for |
1044 ;; proper multiline matches | 1044 ;; proper multiline matches |
1045 (when (and (> beg (point-min)) | 1045 (when (and (> beg (point-min)) |
1046 (get-text-property (1- beg) 'font-lock-multiline)) | 1046 (get-text-property (1- beg) 'font-lock-multiline)) |
1047 ;; We are just after or in a multiline match. | 1047 ;; We are just after or in a multiline match. |
1088 '(face font-lock-multiline))))) | 1088 '(face font-lock-multiline))))) |
1089 | 1089 |
1090 ;; Called when any modification is made to buffer text. | 1090 ;; Called when any modification is made to buffer text. |
1091 (defun font-lock-after-change-function (beg end old-len) | 1091 (defun font-lock-after-change-function (beg end old-len) |
1092 (let ((inhibit-point-motion-hooks t) | 1092 (let ((inhibit-point-motion-hooks t) |
1093 (inhibit-quit t)) | 1093 (inhibit-quit t) |
1094 (region (font-lock-extend-region beg end old-len))) | |
1094 (save-excursion | 1095 (save-excursion |
1095 (save-match-data | 1096 (save-match-data |
1096 ;; Rescan between start of lines enclosing the region. | 1097 (if region |
1097 (font-lock-fontify-region | 1098 ;; Fontify the region the major mode has specified. |
1098 (progn (goto-char beg) (forward-line 0) (point)) | 1099 (setq beg (car region) end (cdr region)) |
1099 (progn (goto-char end) (forward-line 1) (point))))))) | 1100 ;; Fontify the whole lines which enclose the region. |
1101 (setq beg (progn (goto-char beg) | |
1102 (forward-line (- font-lock-lines-before))) | |
1103 end (progn (goto-char end) (forward-line 1) (point)))) | |
1104 (font-lock-fontify-region beg end))))) | |
1100 | 1105 |
1101 (defun font-lock-fontify-block (&optional arg) | 1106 (defun font-lock-fontify-block (&optional arg) |
1102 "Fontify some lines the way `font-lock-fontify-buffer' would. | 1107 "Fontify some lines the way `font-lock-fontify-buffer' would. |
1103 The lines could be a function or paragraph, or a specified number of lines. | 1108 The lines could be a function or paragraph, or a specified number of lines. |
1104 If ARG is given, fontify that many lines before and after point, or 16 lines if | 1109 If ARG is given, fontify that many lines before and after point, or 16 lines if |