From 59910c320a8e786ccb53b2dff6dac47caaff3527 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 31 May 2022 15:20:44 +0200 Subject: [PATCH] Make XEmacs compat code in gamegrid.el obsolete * lisp/play/gamegrid.el (gamegrid-make-glyph): Warn on using obsolete XEmacs style glyph. (This is currently unused in the Emacs tree.) (gamegrid-make-image-from-vector): Make obsolete. --- lisp/play/gamegrid.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el index 256b4e19ce8..55c9244f2e4 100644 --- a/lisp/play/gamegrid.el +++ b/lisp/play/gamegrid.el @@ -343,11 +343,17 @@ format." (gamegrid-colorize-glyph color)) ((listp data) (find-image data)) ;untested! - ((vectorp data) - (gamegrid-make-image-from-vector data))))) + ;; Remove when `gamegrid-make-image-from-vector' is removed: + ((vectorp data) + (lwarn 'gamegrid :warning + "Using obsolete XEmacs style \"glyph\"; \ +convert to an Emacs image-spec instead") + (with-suppressed-warnings ((obsolete gamegrid-make-image-from-vector)) + (gamegrid-make-image-from-vector data)))))) (defun gamegrid-make-image-from-vector (vect) "Convert an XEmacs style \"glyph\" to an image-spec." + (declare (obsolete nil "29.1")) (let ((l (list 'image :type))) (dotimes (n (length vect)) (setf l (nconc l (list (aref vect n))))) -- 2.39.2