diff options
author | Stefan Kangas <stefan@marxist.se> | 2022-08-09 22:28:08 +0200 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2022-08-09 22:28:08 +0200 |
commit | 32d8fc999c070a4fa1539ebba6a6310bca58c5ef (patch) | |
tree | 46707165901b39a9a2c2c4dc6e84575a79d18f04 /lisp/emulation | |
parent | 06cb954ae30f9e3e032b964df09215a788670aed (diff) | |
download | emacs-32d8fc999c070a4fa1539ebba6a6310bca58c5ef.tar.gz emacs-32d8fc999c070a4fa1539ebba6a6310bca58c5ef.tar.bz2 emacs-32d8fc999c070a4fa1539ebba6a6310bca58c5ef.zip |
Avoid using aliases for color functions
* lisp/emulation/viper-init.el (viper-has-face-support-p):
* lisp/emulation/viper-util.el (viper-save-cursor-color)
(viper-change-cursor-color):
* lisp/faces.el (read-color):
* lisp/net/dictionary.el (dictionary-color-support):
* lisp/obsolete/gs.el (gs-set-ghostview-colors-window-prop):
* lisp/progmodes/cperl-mode.el (cperl-choose-color):
* lisp/woman.el (woman-fontify): Avoid using aliases for
color-defined-p, display-color-p, and color-values.
Diffstat (limited to 'lisp/emulation')
-rw-r--r-- | lisp/emulation/viper-init.el | 2 | ||||
-rw-r--r-- | lisp/emulation/viper-util.el | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index 5430cd700bd..df2487a4477 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el @@ -71,7 +71,7 @@ In all likelihood, you don't need to bother with this setting." (defun viper-has-face-support-p () (cond ((viper-window-display-p)) (viper-force-faces) - ((x-display-color-p)) + ((display-color-p)) (t (memq window-system '(pc))))) diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el index c9e4fa70d0a..25c55acf96c 100644 --- a/lisp/emulation/viper-util.el +++ b/lisp/emulation/viper-util.el @@ -57,7 +57,7 @@ (define-obsolete-function-alias 'viper-int-to-char #'identity "27.1") (define-obsolete-function-alias 'viper-get-face #'facep "27.1") (define-obsolete-function-alias 'viper-color-defined-p - #'x-color-defined-p "27.1") + #'color-defined-p "27.1") (define-obsolete-function-alias 'viper-iconify #'iconify-or-deiconify-frame "27.1") @@ -71,7 +71,7 @@ (= char char1)) (t nil))) -(define-obsolete-function-alias 'viper-color-display-p #'x-display-color-p "29.1") +(define-obsolete-function-alias 'viper-color-display-p #'display-color-p "29.1") (defun viper-get-cursor-color (&optional _frame) (cdr (assoc 'cursor-color (frame-parameters)))) @@ -89,8 +89,8 @@ Otherwise return the normal value." ;; cursor colors (defun viper-change-cursor-color (new-color &optional frame) - (if (and (viper-window-display-p) (x-display-color-p) - (stringp new-color) (x-color-defined-p new-color) + (if (and (viper-window-display-p) (display-color-p) + (stringp new-color) (color-defined-p new-color) (not (string= new-color (viper-get-cursor-color)))) (modify-frame-parameters (or frame (selected-frame)) @@ -121,9 +121,9 @@ Otherwise return the normal value." ;; By default, saves current frame cursor color before changing viper state (defun viper-save-cursor-color (before-which-mode) - (if (and (viper-window-display-p) (x-display-color-p)) + (if (and (viper-window-display-p) (display-color-p)) (let ((color (viper-get-cursor-color))) - (if (and (stringp color) (x-color-defined-p color) + (if (and (stringp color) (color-defined-p color) ;; there is something fishy in that the color is not saved if ;; it is the same as frames default cursor color. need to be ;; checked. |