Changeset 4166 for trunk/lisp/font-lock.el
- Timestamp:
- 09/18/06 20:48:14 (2 years ago)
- Files:
-
- trunk/lisp/font-lock.el (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/font-lock.el
r4148 r4166 719 719 (if was-compiled 720 720 (setq font-lock-keywords 721 (font-lock-compile-keywords font-lock-keywords t)))))))721 (font-lock-compile-keywords font-lock-keywords))))))) 722 722 723 723 (defun font-lock-update-removed-keyword-alist (mode keywords how) … … 826 826 (if was-compiled 827 827 (setq font-lock-keywords 828 (font-lock-compile-keywords font-lock-keywords t)))))))828 (font-lock-compile-keywords font-lock-keywords))))))) 829 829 830 830 ;;; Font Lock Support mode. … … 1415 1415 (unless (eq (car font-lock-syntactic-keywords) t) 1416 1416 (setq font-lock-syntactic-keywords (font-lock-compile-keywords 1417 font-lock-syntactic-keywords))) 1417 font-lock-syntactic-keywords 1418 t))) 1418 1419 ;; Get down to business. 1419 1420 (let ((case-fold-search font-lock-keywords-case-fold-search) … … 1571 1572 (unless (eq (car font-lock-keywords) t) 1572 1573 (setq font-lock-keywords 1573 (font-lock-compile-keywords font-lock-keywords t)))1574 (font-lock-compile-keywords font-lock-keywords))) 1574 1575 (let ((case-fold-search font-lock-keywords-case-fold-search) 1575 1576 (keywords (cddr font-lock-keywords)) … … 1627 1628 ;; Various functions. 1628 1629 1629 (defun font-lock-compile-keywords (keywords &optional regexp)1630 (defun font-lock-compile-keywords (keywords &optional syntactic-keywords) 1630 1631 "Compile KEYWORDS into the form (t KEYWORDS COMPILED...) 1631 1632 Here each COMPILED is of the form (MATCHER HIGHLIGHT ...) as shown in the 1632 1633 `font-lock-keywords' doc string. 1633 If REGEXPis non-nil, it means these keywords are used for1634 `font-lock- keywords' rather than for `font-lock-syntactic-keywords'."1634 If SYNTACTIC-KEYWORDS is non-nil, it means these keywords are used for 1635 `font-lock-syntactic-keywords' rather than for `font-lock-keywords'." 1635 1636 (if (not font-lock-set-defaults) 1636 1637 ;; This should never happen. But some external packages sometimes … … 1645 1646 (cons t (cons keywords 1646 1647 (mapcar 'font-lock-compile-keyword keywords)))) 1647 (if (and regexp1648 (if (and (not syntactic-keywords) 1648 1649 (eq (or syntax-begin-function 1649 1650 font-lock-beginning-of-syntax-function) … … 1775 1776 (unless (eq (car font-lock-keywords) t) 1776 1777 (setq font-lock-keywords 1777 (font-lock-compile-keywords font-lock-keywords t))))))1778 (font-lock-compile-keywords font-lock-keywords)))))) 1778 1779 1779 1780 ;;; Colour etc. support.
