From b6884820963d4a5f15cb771894f3cf9a7fdb5195 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 12 Aug 2023 16:06:10 +0200 Subject: [PATCH] Remove dictionary-color-support compat code * lisp/net/dictionary.el (dictionary-color-support): Make obsolete in favor of 'display-color-p'. Update single caller. --- lisp/net/dictionary.el | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el index 8d81b3ec9d8..d583f8157eb 100644 --- a/lisp/net/dictionary.el +++ b/lisp/net/dictionary.el @@ -417,12 +417,6 @@ Otherwise, `dictionary-search' displays definitions in a *Dictionary* buffer." nil "Stores the point position while buffer display.") -(defvar dictionary-color-support - (condition-case nil - (display-color-p) - (error nil)) - "Determines if the Emacs has support to display color.") - (defvar dictionary-word-history '() "History list of searched word.") @@ -900,7 +894,7 @@ them with buttons to perform a new search." (if (search-forward-regexp regexp nil t) (let ((match-start (match-beginning 2)) (match-end (match-end 2))) - (if dictionary-color-support + (if (display-color-p) ;; Compensate for the replacement (let ((brace-match-length (- (match-end 1) (match-beginning 1)))) @@ -1559,5 +1553,9 @@ Further arguments are currently ignored." (match-string 1) dictionary)))))) +(defvar dictionary-color-support (display-color-p) + "Determines if the Emacs has support to display color.") +(make-obsolete-variable 'dictionary-color-support 'display-color-p "30.1") + (provide 'dictionary) ;;; dictionary.el ends here -- 2.39.5