comparison lisp/font-lock.el @ 90044:cb7f41387eb3

Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-70 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-669 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-678 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-679 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-680 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-688 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-690 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-691 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-69 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-70 - miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-71 Update from CVS
author Miles Bader <miles@gnu.org>
date Fri, 12 Nov 2004 02:53:04 +0000
parents ff0e824afa37 5451548f1bd9
children b637c617432f
comparison
equal deleted inserted replaced
90043:e24e2e78deda 90044:cb7f41387eb3
1 ;;; font-lock.el --- Electric font lock mode 1 ;;; font-lock.el --- Electric font lock mode
2 2
3 ;; Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999, 2000, 2001, 02, 2003, 2004 3 ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4 ;; Free Software Foundation, Inc. 4 ;; 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
5 5
6 ;; Author: jwz, then rms, then sm 6 ;; Author: jwz, then rms, then sm
7 ;; Maintainer: FSF 7 ;; Maintainer: FSF
8 ;; Keywords: languages, faces 8 ;; Keywords: languages, faces
9 9
1287 START should be at the beginning of a line." 1287 START should be at the beginning of a line."
1288 (let (state face beg) 1288 (let (state face beg)
1289 (if loudly (message "Fontifying %s... (syntactically...)" (buffer-name))) 1289 (if loudly (message "Fontifying %s... (syntactically...)" (buffer-name)))
1290 (goto-char start) 1290 (goto-char start)
1291 ;; 1291 ;;
1292 ;; Find the state at the `beginning-of-line' before `start'. 1292 ;; Find the `start' state.
1293 (setq state (or ppss (syntax-ppss start))) 1293 (setq state (or ppss (syntax-ppss start)))
1294 ;; 1294 ;;
1295 ;; Find each interesting place between here and `end'. 1295 ;; Find each interesting place between here and `end'.
1296 (while 1296 (while
1297 (progn 1297 (progn
1298 (setq state (parse-partial-sexp (point) end nil nil state
1299 'syntax-table))
1298 (when (or (nth 3 state) (nth 4 state)) 1300 (when (or (nth 3 state) (nth 4 state))
1299 (setq face (funcall font-lock-syntactic-face-function state)) 1301 (setq face (funcall font-lock-syntactic-face-function state))
1300 (setq beg (max (nth 8 state) start)) 1302 (setq beg (max (nth 8 state) start))
1301 (setq state (parse-partial-sexp (point) end nil nil state 1303 (setq state (parse-partial-sexp (point) end nil nil state
1302 'syntax-table)) 1304 'syntax-table))
1303 (when face (put-text-property beg (point) 'face face))) 1305 (when face (put-text-property beg (point) 'face face)))
1304 (setq state (parse-partial-sexp (point) end nil nil state
1305 'syntax-table))
1306 (< (point) end))))) 1306 (< (point) end)))))
1307 1307
1308 ;;; End of Syntactic fontification functions. 1308 ;;; End of Syntactic fontification functions.
1309 1309
1310 ;;; Keyword regexp fontification functions. 1310 ;;; Keyword regexp fontification functions.
2002 (defvar lisp-font-lock-keywords lisp-font-lock-keywords-1 2002 (defvar lisp-font-lock-keywords lisp-font-lock-keywords-1
2003 "Default expressions to highlight in Lisp modes.") 2003 "Default expressions to highlight in Lisp modes.")
2004 2004
2005 (provide 'font-lock) 2005 (provide 'font-lock)
2006 2006
2007 ;;; arch-tag: 682327e4-64d8-4057-b20b-1fbb9f1fc54c 2007 ;; arch-tag: 682327e4-64d8-4057-b20b-1fbb9f1fc54c
2008 ;;; font-lock.el ends here 2008 ;;; font-lock.el ends here