Mercurial > emacs
comparison lisp/faces.el @ 40351:a44d4a7dd8de
(internal-get-face): Use facep instead of the obsolete
internal-find-face.
(internal-frob-font-weight, internal-frob-font-slant): New
defailiases for obsolete functions.
(x-make-font-bold, x-make-font-demibold, x-make-font-unbold)
(x-make-font-italic, x-make-font-oblique, x-make-font-unitalic)
(x-make-font-bold-italic): Use internal-frob-font-weight and
internal-frob-font-slant aliases instead of the obsolete
x-frob-... functions.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Fri, 26 Oct 2001 21:16:09 +0000 |
parents | aed9c3afb7ed |
children | 3e67855bb4bf |
comparison
equal
deleted
inserted
replaced
40350:69db29c9019b | 40351:a44d4a7dd8de |
---|---|
198 If FRAME is the symbol t, then the global, non-frame face is returned. | 198 If FRAME is the symbol t, then the global, non-frame face is returned. |
199 If NAME is already a face, it is simply returned. | 199 If NAME is already a face, it is simply returned. |
200 | 200 |
201 This function is defined for compatibility with Emacs 20.2. It | 201 This function is defined for compatibility with Emacs 20.2. It |
202 should not be used anymore." | 202 should not be used anymore." |
203 (or (internal-find-face name frame) | 203 (or (facep name) |
204 (check-face name))) | 204 (check-face name))) |
205 (make-obsolete 'internal-get-face "See `facep' and `check-face'." "21.1") | 205 (make-obsolete 'internal-get-face "See `facep' and `check-face'." "21.1") |
206 | 206 |
207 | 207 |
208 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 208 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1948 ((string-match x-font-regexp-slant font) | 1948 ((string-match x-font-regexp-slant font) |
1949 (concat (substring font 0 (match-beginning 1)) which | 1949 (concat (substring font 0 (match-beginning 1)) which |
1950 (substring font (match-end 1))))))) | 1950 (substring font (match-end 1))))))) |
1951 (make-obsolete 'x-frob-font-slant 'make-face-... "21.1") | 1951 (make-obsolete 'x-frob-font-slant 'make-face-... "21.1") |
1952 | 1952 |
1953 ;; These aliases are here so that we don't get warnings about obsolete | |
1954 ;; functions from the byte compiler. | |
1955 (defalias 'internal-frob-font-weight 'x-frob-font-weight) | |
1956 (defalias 'internal-frob-font-slant 'x-frob-font-slant) | |
1957 | |
1953 (defun x-make-font-bold (font) | 1958 (defun x-make-font-bold (font) |
1954 "Given an X font specification, make a bold version of it. | 1959 "Given an X font specification, make a bold version of it. |
1955 If that can't be done, return nil." | 1960 If that can't be done, return nil." |
1956 (x-frob-font-weight font "bold")) | 1961 (internal-frob-font-weight font "bold")) |
1957 (make-obsolete 'x-make-font-bold 'make-face-bold "21.1") | 1962 (make-obsolete 'x-make-font-bold 'make-face-bold "21.1") |
1958 | 1963 |
1959 (defun x-make-font-demibold (font) | 1964 (defun x-make-font-demibold (font) |
1960 "Given an X font specification, make a demibold version of it. | 1965 "Given an X font specification, make a demibold version of it. |
1961 If that can't be done, return nil." | 1966 If that can't be done, return nil." |
1962 (x-frob-font-weight font "demibold")) | 1967 (internal-frob-font-weight font "demibold")) |
1963 (make-obsolete 'x-make-font-demibold 'make-face-bold "21.1") | 1968 (make-obsolete 'x-make-font-demibold 'make-face-bold "21.1") |
1964 | 1969 |
1965 (defun x-make-font-unbold (font) | 1970 (defun x-make-font-unbold (font) |
1966 "Given an X font specification, make a non-bold version of it. | 1971 "Given an X font specification, make a non-bold version of it. |
1967 If that can't be done, return nil." | 1972 If that can't be done, return nil." |
1968 (x-frob-font-weight font "medium")) | 1973 (internal-frob-font-weight font "medium")) |
1969 (make-obsolete 'x-make-font-unbold 'make-face-unbold "21.1") | 1974 (make-obsolete 'x-make-font-unbold 'make-face-unbold "21.1") |
1970 | 1975 |
1971 (defun x-make-font-italic (font) | 1976 (defun x-make-font-italic (font) |
1972 "Given an X font specification, make an italic version of it. | 1977 "Given an X font specification, make an italic version of it. |
1973 If that can't be done, return nil." | 1978 If that can't be done, return nil." |
1974 (x-frob-font-slant font "i")) | 1979 (internal-frob-font-slant font "i")) |
1975 (make-obsolete 'x-make-font-italic 'make-face-italic "21.1") | 1980 (make-obsolete 'x-make-font-italic 'make-face-italic "21.1") |
1976 | 1981 |
1977 (defun x-make-font-oblique (font) ; you say tomayto... | 1982 (defun x-make-font-oblique (font) ; you say tomayto... |
1978 "Given an X font specification, make an oblique version of it. | 1983 "Given an X font specification, make an oblique version of it. |
1979 If that can't be done, return nil." | 1984 If that can't be done, return nil." |
1980 (x-frob-font-slant font "o")) | 1985 (internal-frob-font-slant font "o")) |
1981 (make-obsolete 'x-make-font-oblique 'make-face-italic "21.1") | 1986 (make-obsolete 'x-make-font-oblique 'make-face-italic "21.1") |
1982 | 1987 |
1983 (defun x-make-font-unitalic (font) | 1988 (defun x-make-font-unitalic (font) |
1984 "Given an X font specification, make a non-italic version of it. | 1989 "Given an X font specification, make a non-italic version of it. |
1985 If that can't be done, return nil." | 1990 If that can't be done, return nil." |
1986 (x-frob-font-slant font "r")) | 1991 (internal-frob-font-slant font "r")) |
1987 (make-obsolete 'x-make-font-unitalic 'make-face-unitalic "21.1") | 1992 (make-obsolete 'x-make-font-unitalic 'make-face-unitalic "21.1") |
1988 | 1993 |
1989 (defun x-make-font-bold-italic (font) | 1994 (defun x-make-font-bold-italic (font) |
1990 "Given an X font specification, make a bold and italic version of it. | 1995 "Given an X font specification, make a bold and italic version of it. |
1991 If that can't be done, return nil." | 1996 If that can't be done, return nil." |
1992 (and (setq font (x-make-font-bold font)) | 1997 (and (setq font (internal-frob-font-weight font "bold")) |
1993 (x-make-font-italic font))) | 1998 (internal-frob-font-slant font "i"))) |
1994 (make-obsolete 'x-make-font-bold-italic 'make-face-bold-italic "21.1") | 1999 (make-obsolete 'x-make-font-bold-italic 'make-face-bold-italic "21.1") |
1995 | 2000 |
1996 (provide 'faces) | 2001 (provide 'faces) |
1997 | 2002 |
1998 ;;; faces.el ends here | 2003 ;;; faces.el ends here |