Changeset 3988 for vendor/emacs-CVS_HEAD/lisp/font-lock.el
- Timestamp:
- 2005年11月26日 08時33分26秒 (3 years ago)
- Files:
-
- vendor/emacs-CVS_HEAD/lisp/font-lock.el (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
vendor/emacs-CVS_HEAD/lisp/font-lock.el
r3939 r3988 217 217 :group 'faces) 218 218 219 (defgroup font-lock- highlighting-faces nil219 (defgroup font-lock-faces nil 220 220 "Faces for highlighting text." 221 221 :prefix "font-lock-" … … 1647 1647 ;;; Colour etc. support. 1648 1648 1649 ;; Originally face attributes were specified via `font-lock-face-attributes'. 1650 ;; Users then changed the default face attributes by setting that variable. 1651 ;; However, we try and be back-compatible and respect its value if set except 1652 ;; for faces where M-x customize has been used to save changes for the face. 1653 (when (boundp 'font-lock-face-attributes) 1654 (let ((face-attributes font-lock-face-attributes)) 1655 (while face-attributes 1656 (let* ((face-attribute (pop face-attributes)) 1657 (face (car face-attribute))) 1658 ;; Rustle up a `defface' SPEC from a `font-lock-face-attributes' entry. 1659 (unless (get face 'saved-face) 1660 (let ((foreground (nth 1 face-attribute)) 1661 (background (nth 2 face-attribute)) 1662 (bold-p (nth 3 face-attribute)) 1663 (italic-p (nth 4 face-attribute)) 1664 (underline-p (nth 5 face-attribute)) 1665 face-spec) 1666 (when foreground 1667 (setq face-spec (cons ':foreground (cons foreground face-spec)))) 1668 (when background 1669 (setq face-spec (cons ':background (cons background face-spec)))) 1670 (when bold-p 1671 (setq face-spec (append '(:weight bold) face-spec))) 1672 (when italic-p 1673 (setq face-spec (append '(:slant italic) face-spec))) 1674 (when underline-p 1675 (setq face-spec (append '(:underline t) face-spec))) 1676 (custom-declare-face face (list (list t face-spec)) nil))))))) 1677 1678 ;; But now we do it the custom way. Note that `defface' will not overwrite any 1679 ;; faces declared above via `custom-declare-face'. 1649 ;; Note that `defface' will not overwrite any faces declared above via 1650 ;; `custom-declare-face'. 1680 1651 (defface font-lock-comment-face 1681 1652 '((((class grayscale) (background light)) … … 1697 1668 (t (:weight bold :slant italic))) 1698 1669 "Font Lock mode face used to highlight comments." 1699 :group 'font-lock- highlighting-faces)1670 :group 'font-lock-faces) 1700 1671 1701 1672 (defface font-lock-comment-delimiter-face … … 1708 1679 :foreground "red1")) 1709 1680 "Font Lock mode face used to highlight comment delimiters." 1710 :group 'font-lock- highlighting-faces)1681 :group 'font-lock-faces) 1711 1682 1712 1683 (defface font-lock-string-face … … 1720 1691 (t (:slant italic))) 1721 1692 "Font Lock mode face used to highlight strings." 1722 :group 'font-lock- highlighting-faces)1693 :group 'font-lock-faces) 1723 1694 1724 1695 (defface font-lock-doc-face 1725 1696 '((t :inherit font-lock-string-face)) 1726 1697 "Font Lock mode face used to highlight documentation." 1727 :group 'font-lock- highlighting-faces)1698 :group 'font-lock-faces) 1728 1699 1729 1700 (defface font-lock-keyword-face … … 1737 1708 (t (:weight bold))) 1738 1709 "Font Lock mode face used to highlight keywords." 1739 :group 'font-lock- highlighting-faces)1710 :group 'font-lock-faces) 1740 1711 1741 1712 (defface font-lock-builtin-face … … 1749 1720 (t (:weight bold))) 1750 1721 "Font Lock mode face used to highlight builtins." 1751 :group 'font-lock- highlighting-faces)1722 :group 'font-lock-faces) 1752 1723 1753 1724 (defface font-lock-function-name-face … … 1759 1730 (t (:inverse-video t :weight bold))) 1760 1731 "Font Lock mode face used to highlight function names." 1761 :group 'font-lock- highlighting-faces)1732 :group 'font-lock-faces) 1762 1733 1763 1734 (defface font-lock-variable-name-face … … 1773 1744 (t (:weight bold :slant italic))) 1774 1745 "Font Lock mode face used to highlight variable names." 1775 :group 'font-lock- highlighting-faces)1746 :group 'font-lock-faces) 1776 1747 1777 1748 (defface font-lock-type-face … … 1785 1756 (t (:weight bold :underline t))) 1786 1757 "Font Lock mode face used to highlight type and classes." 1787 :group 'font-lock- highlighting-faces)1758 :group 'font-lock-faces) 1788 1759 1789 1760 (defface font-lock-constant-face … … 1799 1770 (t (:weight bold :underline t))) 1800 1771 "Font Lock mode face used to highlight constants and labels." 1801 :group 'font-lock- highlighting-faces)1772 :group 'font-lock-faces) 1802 1773 1803 1774 (defface font-lock-warning-face 1804 1775 '((((class color) (min-colors 88) (background light)) (:foreground "Red1" :weight bold)) 1805 1776 (((class color) (min-colors 88) (background dark)) (:foreground "Pink" :weight bold)) 1806 (((class color) (min-colors 16) (background light)) (:foreground "Red " :weight bold))1777 (((class color) (min-colors 16) (background light)) (:foreground "Red1" :weight bold)) 1807 1778 (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :weight bold)) 1808 1779 (((class color) (min-colors 8)) (:foreground "red")) 1809 1780 (t (:inverse-video t :weight bold))) 1810 1781 "Font Lock mode face used to highlight warnings." 1811 :group 'font-lock- highlighting-faces)1782 :group 'font-lock-faces) 1812 1783 1813 1784 (defface font-lock-negation-char-face 1814 1785 '((t nil)) 1815 1786 "Font Lock mode face used to highlight easy to overlook negation." 1816 :group 'font-lock- highlighting-faces)1787 :group 'font-lock-faces) 1817 1788 1818 1789 (defface font-lock-preprocessor-face 1819 1790 '((t :inherit font-lock-builtin-face)) 1820 1791 "Font Lock mode face used to highlight preprocessor directives." 1821 :group 'font-lock- highlighting-faces)1792 :group 'font-lock-faces) 1822 1793 1823 1794 (defface font-lock-regexp-grouping-backslash 1824 1795 '((t :inherit bold)) 1825 1796 "Font Lock mode face for backslashes in Lisp regexp grouping constructs." 1826 :group 'font-lock- highlighting-faces)1797 :group 'font-lock-faces) 1827 1798 1828 1799 (defface font-lock-regexp-grouping-construct 1829 1800 '((t :inherit bold)) 1830 1801 "Font Lock mode face used to highlight grouping constructs in Lisp regexps." 1831 :group 'font-lock- highlighting-faces)1802 :group 'font-lock-faces) 1832 1803 1833 1804 ;;; End of Colour etc. support.
