diff options
| author | Eli Zaretskii | 2001-10-26 21:16:09 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2001-10-26 21:16:09 +0000 |
| commit | 3fc67165a0d8f83e07768c64ee9dbb773cbc0dc7 (patch) | |
| tree | dc972215e41da0a11f9a7139e989d76ca740d709 | |
| parent | e5d1dee9111cd8088bfbff62c831e3345d14c99b (diff) | |
| download | emacs-3fc67165a0d8f83e07768c64ee9dbb773cbc0dc7.tar.gz emacs-3fc67165a0d8f83e07768c64ee9dbb773cbc0dc7.zip | |
(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.
| -rw-r--r-- | lisp/faces.el | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/lisp/faces.el b/lisp/faces.el index 2a116d5ad9b..6cbe12230bf 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -200,7 +200,7 @@ 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 | ||
| @@ -1950,47 +1950,52 @@ also the same size as FACE on FRAME, or fail." | |||
| 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) |