Changeset 4169 for trunk/lisp/font-lock.el
- Timestamp:
- 09/30/06 09:12:06 (2 years ago)
- Files:
-
- trunk/lisp (modified) (1 prop)
- trunk/lisp/font-lock.el (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp
- Property svn:ignore changed from
*.elc
MANIFEST
Makefile
Makefile.unix
makefile
elc.tar.gz
cus-load.el
finder-inf.el
subdirs.el
loaddefs.el
to
*.elc
MANIFEST
Makefile
Makefile.unix
makefile
elc.tar.gz
cus-load.el
finder-inf.el
subdirs.el
loaddefs.el
pre-mh-loaddefs.el-CMD
- Property svn:ignore changed from
trunk/lisp/font-lock.el
r4166 r4169 1169 1169 ;; (setq beg (progn (goto-char beg) (line-beginning-position)) 1170 1170 ;; end (progn (goto-char end) (line-beginning-position 2))) 1171 ) 1171 (unless (eq end (point-max)) 1172 ;; Rounding up to a whole number of lines should include the 1173 ;; line right after `end'. Typical case: the first char of 1174 ;; the line was deleted. Or a \n was inserted in the middle 1175 ;; of a line. 1176 (setq end (1+ end)))) 1172 1177 (font-lock-fontify-region beg end))))) 1173 1178 … … 1206 1211 beg 'font-lock-multiline) 1207 1212 (point-min)))) 1208 (setq end (or (text-property-any end (point-max) 1209 'font-lock-multiline nil) 1210 (point-max))) 1213 (when (< end (point-max)) 1214 (setq end 1215 (if (get-text-property end 'font-lock-multiline) 1216 (or (text-property-any end (point-max) 1217 'font-lock-multiline nil) 1218 (point-max)) 1219 ;; Rounding up to a whole number of lines should include the 1220 ;; line right after `end'. Typical case: the first char of 1221 ;; the line was deleted. Or a \n was inserted in the middle 1222 ;; of a line. 1223 (1+ end)))) 1211 1224 ;; Finally, pre-enlarge the region to a whole number of lines, to try 1212 1225 ;; and anticipate what font-lock-default-fontify-region will do, so as to … … 1218 1231 font-lock-extend-region-functions) 1219 1232 (goto-char beg) 1220 (forward-line 0) 1221 (setq jit-lock-start (min jit-lock-start (point))) 1233 (setq jit-lock-start (min jit-lock-start (line-beginning-position))) 1222 1234 (goto-char end) 1223 (forward-line 1) 1224 (setq jit-lock-end (max jit-lock-end (point))))))) 1235 (setq jit-lock-end 1236 (max jit-lock-end 1237 (if (bolp) (point) (line-beginning-position 2)))))))) 1225 1238 1226 1239 (defun font-lock-fontify-block (&optional arg) … … 1647 1660 (mapcar 'font-lock-compile-keyword keywords)))) 1648 1661 (if (and (not syntactic-keywords) 1649 (eq (or syntax-begin-function 1650 font-lock-beginning-of-syntax-function) 1651 'beginning-of-defun) 1662 (let ((beg-function 1663 (or font-lock-beginning-of-syntax-function 1664 syntax-begin-function))) 1665 (or (eq beg-function 'beginning-of-defun) 1666 (get beg-function 'font-lock-syntax-paren-check))) 1652 1667 (not beginning-of-defun-function)) 1653 1668 ;; Try to detect when a string or comment contains something that
