Mark Emacs 20 color support compat aliases obsolete

* lisp/faces.el (x-defined-colors, x-color-defined-p)
(x-color-values, x-display-color-p): Make Emacs 20 compat aliases
obsolete.  Update one caller to use the new names.
* doc/lispref/frames.texi (Color Names): Do not document above
obsolete aliases.
This commit is contained in:
Stefan Kangas 2023-08-06 11:35:02 +02:00
parent 67650c9c11
commit 3135007bf1
4 changed files with 14 additions and 26 deletions

View file

@ -4461,20 +4461,12 @@ really supports that color. When using X, you can ask for any defined
color on any kind of display, and you will get some result---typically,
the closest it can do. To determine whether a frame can really display
a certain color, use @code{color-supported-p} (see below).
@findex x-color-defined-p
This function used to be called @code{x-color-defined-p},
and that name is still supported as an alias.
@end defun
@defun defined-colors &optional frame
This function returns a list of the color names that are defined
and supported on frame @var{frame} (default, the selected frame).
If @var{frame} does not support colors, the value is @code{nil}.
@findex x-defined-colors
This function used to be called @code{x-defined-colors},
and that name is still supported as an alias.
@end defun
@defun color-supported-p color &optional frame background-p
@ -4526,10 +4518,6 @@ The color values are returned for @var{frame}'s display. If
@var{frame} is omitted or @code{nil}, the information is returned for
the selected frame's display. If the frame cannot display colors, the
value is @code{nil}.
@findex x-color-values
This function used to be called @code{x-color-values},
and that name is still supported as an alias.
@end defun
@defun color-name-to-rgb color &optional frame
@ -4714,10 +4702,7 @@ This function returns @code{t} if @var{display} has a mouse available,
@end defun
@defun display-color-p &optional display
@findex x-display-color-p
This function returns @code{t} if the screen is a color screen.
It used to be called @code{x-display-color-p}, and that name
is still supported as an alias.
@end defun
@defun display-grayscale-p &optional display

View file

@ -701,6 +701,11 @@ Instead, the Lisp reader approximates an infinity with the nearest
finite value, and a NaN with some other non-numeric object that
provokes an error if used numerically.
+++
** X color support compatibility aliases are now marked obsolete.
The compatibility aliases 'x-defined-colors', 'x-color-defined-p',
'x-color-values', and 'x-display-color-p' are now obsolete.
* Lisp Changes in Emacs 30.1

View file

@ -4724,15 +4724,15 @@ Please, specify your level now: "))
(defun viper-submit-report ()
"Submit bug report on Viper."
(interactive)
(defvar x-display-color-p)
(defvar display-color-p)
(defvar viper-frame-parameters)
(defvar viper-minibuffer-emacs-face)
(defvar viper-minibuffer-vi-face)
(defvar viper-minibuffer-insert-face)
(let ((reporter-prompt-for-summary-p t)
(x-display-color-p (if (viper-window-display-p)
(x-display-color-p)
'non-x))
(display-color-p (if (viper-window-display-p)
(display-color-p)
'non-x))
(viper-frame-parameters (frame-parameters (selected-frame)))
(viper-minibuffer-emacs-face (if (viper-has-face-support-p)
(facep
@ -4790,7 +4790,7 @@ Please, specify your level now: "))
'viper-expert-level
'major-mode
'window-system
'x-display-color-p
'display-color-p
'viper-frame-parameters
'viper-minibuffer-vi-face
'viper-minibuffer-insert-face

View file

@ -1850,7 +1850,6 @@ If there is neither a user setting nor a default for FACE, return nil."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Frame-type independent color support.
;;; We keep the old x-* names as aliases for back-compatibility.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun defined-colors (&optional frame)
@ -1862,7 +1861,6 @@ If FRAME is nil, that stands for the selected frame."
(if (display-graphic-p frame)
(xw-defined-colors frame)
(mapcar 'car (tty-color-alist frame))))
(defalias 'x-defined-colors 'defined-colors)
(defun defined-colors-with-face-attributes (&optional frame foreground)
"Return a list of colors supported for a particular FRAME.
@ -1946,7 +1944,6 @@ If FRAME is omitted or nil, use the selected frame."
(if (display-graphic-p frame)
(xw-color-defined-p color frame)
(numberp (tty-color-translate color frame)))))
(defalias 'x-color-defined-p 'color-defined-p)
(declare-function xw-color-values "xfns.c" (color &optional frame))
@ -1974,8 +1971,6 @@ return value is nil."
(t
(tty-color-values color frame))))
(defalias 'x-color-values 'color-values)
(declare-function xw-display-color-p "xfns.c" (&optional terminal))
(defun display-color-p (&optional display)
@ -1986,7 +1981,6 @@ If omitted or nil, that stands for the selected frame's display."
(if (display-graphic-p display)
(xw-display-color-p display)
(tty-display-color-p display)))
(defalias 'x-display-color-p 'display-color-p)
(declare-function x-display-grayscale-p "xfns.c" (&optional terminal))
@ -3221,6 +3215,10 @@ also the same size as FACE on FRAME, or fail."
(define-obsolete-function-alias 'face-background-pixmap #'face-stipple "29.1")
(define-obsolete-function-alias 'set-face-background-pixmap #'set-face-stipple "29.1")
(define-obsolete-function-alias 'x-defined-colors #'defined-colors "30.1")
(define-obsolete-function-alias 'x-color-defined-p #'color-defined-p "30.1")
(define-obsolete-function-alias 'x-color-values #'color-values "30.1")
(define-obsolete-function-alias 'x-display-color-p #'display-color-p "30.1")
(provide 'faces)