Mercurial > emacs
comparison lisp/font-lock.el @ 42449:b4510b1b83f3
(initializing from font-lock-face-attributes):
Use :weight and :slant, not :bold and :italic.
(various face definitions): Likewise.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 31 Dec 2001 20:16:46 +0000 |
parents | bedadfb75588 |
children | 448551584591 |
comparison
equal
deleted
inserted
replaced
42448:5269e6fd0fbc | 42449:b4510b1b83f3 |
---|---|
1786 (when foreground | 1786 (when foreground |
1787 (setq face-spec (cons ':foreground (cons foreground face-spec)))) | 1787 (setq face-spec (cons ':foreground (cons foreground face-spec)))) |
1788 (when background | 1788 (when background |
1789 (setq face-spec (cons ':background (cons background face-spec)))) | 1789 (setq face-spec (cons ':background (cons background face-spec)))) |
1790 (when bold-p | 1790 (when bold-p |
1791 (setq face-spec (append '(:bold t) face-spec))) | 1791 (setq face-spec (append '(:weight bold) face-spec))) |
1792 (when italic-p | 1792 (when italic-p |
1793 (setq face-spec (append '(:italic t) face-spec))) | 1793 (setq face-spec (append '(:slant italic) face-spec))) |
1794 (when underline-p | 1794 (when underline-p |
1795 (setq face-spec (append '(:underline t) face-spec))) | 1795 (setq face-spec (append '(:underline t) face-spec))) |
1796 (custom-declare-face face (list (list t face-spec)) nil))))))) | 1796 (custom-declare-face face (list (list t face-spec)) nil))))))) |
1797 | 1797 |
1798 ;; But now we do it the custom way. Note that `defface' will not overwrite any | 1798 ;; But now we do it the custom way. Note that `defface' will not overwrite any |
1799 ;; faces declared above via `custom-declare-face'. | 1799 ;; faces declared above via `custom-declare-face'. |
1800 (defface font-lock-comment-face | 1800 (defface font-lock-comment-face |
1801 '((((type tty pc) (class color) (background light)) (:foreground "red")) | 1801 '((((type tty pc) (class color) (background light)) (:foreground "red")) |
1802 (((type tty pc) (class color) (background dark)) (:foreground "red1")) | 1802 (((type tty pc) (class color) (background dark)) (:foreground "red1")) |
1803 (((class grayscale) (background light)) | 1803 (((class grayscale) (background light)) |
1804 (:foreground "DimGray" :bold t :italic t)) | 1804 (:foreground "DimGray" :weight bold :slant italic)) |
1805 (((class grayscale) (background dark)) | 1805 (((class grayscale) (background dark)) |
1806 (:foreground "LightGray" :bold t :italic t)) | 1806 (:foreground "LightGray" :weight bold :slant italic)) |
1807 (((class color) (background light)) (:foreground "Firebrick")) | 1807 (((class color) (background light)) (:foreground "Firebrick")) |
1808 (((class color) (background dark)) (:foreground "chocolate1")) | 1808 (((class color) (background dark)) (:foreground "chocolate1")) |
1809 (t (:bold t :italic t))) | 1809 (t (:weight bold :slant italic))) |
1810 "Font Lock mode face used to highlight comments." | 1810 "Font Lock mode face used to highlight comments." |
1811 :group 'font-lock-highlighting-faces) | 1811 :group 'font-lock-highlighting-faces) |
1812 | 1812 |
1813 (defface font-lock-string-face | 1813 (defface font-lock-string-face |
1814 '((((type tty) (class color)) (:foreground "green")) | 1814 '((((type tty) (class color)) (:foreground "green")) |
1815 (((class grayscale) (background light)) (:foreground "DimGray" :italic t)) | 1815 (((class grayscale) (background light)) (:foreground "DimGray" :slant italic)) |
1816 (((class grayscale) (background dark)) (:foreground "LightGray" :italic t)) | 1816 (((class grayscale) (background dark)) (:foreground "LightGray" :slant italic)) |
1817 (((class color) (background light)) (:foreground "RosyBrown")) | 1817 (((class color) (background light)) (:foreground "RosyBrown")) |
1818 (((class color) (background dark)) (:foreground "LightSalmon")) | 1818 (((class color) (background dark)) (:foreground "LightSalmon")) |
1819 (t (:italic t))) | 1819 (t (:slant italic))) |
1820 "Font Lock mode face used to highlight strings." | 1820 "Font Lock mode face used to highlight strings." |
1821 :group 'font-lock-highlighting-faces) | 1821 :group 'font-lock-highlighting-faces) |
1822 | 1822 |
1823 (defface font-lock-doc-face | 1823 (defface font-lock-doc-face |
1824 '((t :inherit font-lock-string-face)) | 1824 '((t :inherit font-lock-string-face)) |
1825 "Font Lock mode face used to highlight documentation." | 1825 "Font Lock mode face used to highlight documentation." |
1826 :group 'font-lock-highlighting-faces) | 1826 :group 'font-lock-highlighting-faces) |
1827 | 1827 |
1828 (defface font-lock-keyword-face | 1828 (defface font-lock-keyword-face |
1829 '((((type tty) (class color)) (:foreground "cyan" :weight bold)) | 1829 '((((type tty) (class color)) (:foreground "cyan" :weight bold)) |
1830 (((class grayscale) (background light)) (:foreground "LightGray" :bold t)) | 1830 (((class grayscale) (background light)) (:foreground "LightGray" :weight bold)) |
1831 (((class grayscale) (background dark)) (:foreground "DimGray" :bold t)) | 1831 (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold)) |
1832 (((class color) (background light)) (:foreground "Purple")) | 1832 (((class color) (background light)) (:foreground "Purple")) |
1833 (((class color) (background dark)) (:foreground "Cyan")) | 1833 (((class color) (background dark)) (:foreground "Cyan")) |
1834 (t (:bold t))) | 1834 (t (:weight bold))) |
1835 "Font Lock mode face used to highlight keywords." | 1835 "Font Lock mode face used to highlight keywords." |
1836 :group 'font-lock-highlighting-faces) | 1836 :group 'font-lock-highlighting-faces) |
1837 | 1837 |
1838 (defface font-lock-builtin-face | 1838 (defface font-lock-builtin-face |
1839 '((((type tty) (class color)) (:foreground "blue" :weight light)) | 1839 '((((type tty) (class color)) (:foreground "blue" :weight light)) |
1840 (((class grayscale) (background light)) (:foreground "LightGray" :bold t)) | 1840 (((class grayscale) (background light)) (:foreground "LightGray" :weight bold)) |
1841 (((class grayscale) (background dark)) (:foreground "DimGray" :bold t)) | 1841 (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold)) |
1842 (((class color) (background light)) (:foreground "Orchid")) | 1842 (((class color) (background light)) (:foreground "Orchid")) |
1843 (((class color) (background dark)) (:foreground "LightSteelBlue")) | 1843 (((class color) (background dark)) (:foreground "LightSteelBlue")) |
1844 (t (:bold t))) | 1844 (t (:weight bold))) |
1845 "Font Lock mode face used to highlight builtins." | 1845 "Font Lock mode face used to highlight builtins." |
1846 :group 'font-lock-highlighting-faces) | 1846 :group 'font-lock-highlighting-faces) |
1847 | 1847 |
1848 (defface font-lock-function-name-face | 1848 (defface font-lock-function-name-face |
1849 '((((type tty) (class color)) (:foreground "blue" :weight bold)) | 1849 '((((type tty) (class color)) (:foreground "blue" :weight bold)) |
1850 (((class color) (background light)) (:foreground "Blue")) | 1850 (((class color) (background light)) (:foreground "Blue")) |
1851 (((class color) (background dark)) (:foreground "LightSkyBlue")) | 1851 (((class color) (background dark)) (:foreground "LightSkyBlue")) |
1852 (t (:inverse-video t :bold t))) | 1852 (t (:inverse-video t :weight bold))) |
1853 "Font Lock mode face used to highlight function names." | 1853 "Font Lock mode face used to highlight function names." |
1854 :group 'font-lock-highlighting-faces) | 1854 :group 'font-lock-highlighting-faces) |
1855 | 1855 |
1856 (defface font-lock-variable-name-face | 1856 (defface font-lock-variable-name-face |
1857 '((((type tty) (class color)) (:foreground "yellow" :weight light)) | 1857 '((((type tty) (class color)) (:foreground "yellow" :weight light)) |
1858 (((class grayscale) (background light)) | 1858 (((class grayscale) (background light)) |
1859 (:foreground "Gray90" :bold t :italic t)) | 1859 (:foreground "Gray90" :weight bold :slant italic)) |
1860 (((class grayscale) (background dark)) | 1860 (((class grayscale) (background dark)) |
1861 (:foreground "DimGray" :bold t :italic t)) | 1861 (:foreground "DimGray" :weight bold :slant italic)) |
1862 (((class color) (background light)) (:foreground "DarkGoldenrod")) | 1862 (((class color) (background light)) (:foreground "DarkGoldenrod")) |
1863 (((class color) (background dark)) (:foreground "LightGoldenrod")) | 1863 (((class color) (background dark)) (:foreground "LightGoldenrod")) |
1864 (t (:bold t :italic t))) | 1864 (t (:weight bold :slant italic))) |
1865 "Font Lock mode face used to highlight variable names." | 1865 "Font Lock mode face used to highlight variable names." |
1866 :group 'font-lock-highlighting-faces) | 1866 :group 'font-lock-highlighting-faces) |
1867 | 1867 |
1868 (defface font-lock-type-face | 1868 (defface font-lock-type-face |
1869 '((((type tty) (class color)) (:foreground "green")) | 1869 '((((type tty) (class color)) (:foreground "green")) |
1870 (((class grayscale) (background light)) (:foreground "Gray90" :bold t)) | 1870 (((class grayscale) (background light)) (:foreground "Gray90" :weight bold)) |
1871 (((class grayscale) (background dark)) (:foreground "DimGray" :bold t)) | 1871 (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold)) |
1872 (((class color) (background light)) (:foreground "ForestGreen")) | 1872 (((class color) (background light)) (:foreground "ForestGreen")) |
1873 (((class color) (background dark)) (:foreground "PaleGreen")) | 1873 (((class color) (background dark)) (:foreground "PaleGreen")) |
1874 (t (:bold t :underline t))) | 1874 (t (:weight bold :underline t))) |
1875 "Font Lock mode face used to highlight type and classes." | 1875 "Font Lock mode face used to highlight type and classes." |
1876 :group 'font-lock-highlighting-faces) | 1876 :group 'font-lock-highlighting-faces) |
1877 | 1877 |
1878 (defface font-lock-constant-face | 1878 (defface font-lock-constant-face |
1879 '((((type tty) (class color)) (:foreground "magenta")) | 1879 '((((type tty) (class color)) (:foreground "magenta")) |
1880 (((class grayscale) (background light)) | 1880 (((class grayscale) (background light)) |
1881 (:foreground "LightGray" :bold t :underline t)) | 1881 (:foreground "LightGray" :weight bold :underline t)) |
1882 (((class grayscale) (background dark)) | 1882 (((class grayscale) (background dark)) |
1883 (:foreground "Gray50" :bold t :underline t)) | 1883 (:foreground "Gray50" :weight bold :underline t)) |
1884 (((class color) (background light)) (:foreground "CadetBlue")) | 1884 (((class color) (background light)) (:foreground "CadetBlue")) |
1885 (((class color) (background dark)) (:foreground "Aquamarine")) | 1885 (((class color) (background dark)) (:foreground "Aquamarine")) |
1886 (t (:bold t :underline t))) | 1886 (t (:weight bold :underline t))) |
1887 "Font Lock mode face used to highlight constants and labels." | 1887 "Font Lock mode face used to highlight constants and labels." |
1888 :group 'font-lock-highlighting-faces) | 1888 :group 'font-lock-highlighting-faces) |
1889 | 1889 |
1890 (defface font-lock-warning-face | 1890 (defface font-lock-warning-face |
1891 '((((type tty) (class color)) (:foreground "red")) | 1891 '((((type tty) (class color)) (:foreground "red")) |
1892 (((class color) (background light)) (:foreground "Red" :bold t)) | 1892 (((class color) (background light)) (:foreground "Red" :weight bold)) |
1893 (((class color) (background dark)) (:foreground "Pink" :bold t)) | 1893 (((class color) (background dark)) (:foreground "Pink" :weight bold)) |
1894 (t (:inverse-video t :bold t))) | 1894 (t (:inverse-video t :weight bold))) |
1895 "Font Lock mode face used to highlight warnings." | 1895 "Font Lock mode face used to highlight warnings." |
1896 :group 'font-lock-highlighting-faces) | 1896 :group 'font-lock-highlighting-faces) |
1897 | 1897 |
1898 ;;; End of Colour etc. support. | 1898 ;;; End of Colour etc. support. |
1899 | 1899 |