[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master b6884820963 1/3: Remove dictionary-color-support compat code
From: |
Stefan Kangas |
Subject: |
master b6884820963 1/3: Remove dictionary-color-support compat code |
Date: |
Sat, 12 Aug 2023 10:53:13 -0400 (EDT) |
branch: master
commit b6884820963d4a5f15cb771894f3cf9a7fdb5195
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
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