]> git.eshelyaron.com Git - emacs.git/commitdiff
Make XEmacs compat code in gamegrid.el obsolete
authorStefan Kangas <stefan@marxist.se>
Tue, 31 May 2022 13:20:44 +0000 (15:20 +0200)
committerStefan Kangas <stefan@marxist.se>
Wed, 1 Jun 2022 13:29:35 +0000 (15:29 +0200)
* 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

index 256b4e19ce8c969c7442c866704c349b70601386..55c9244f2e4bbd1c6adf2f177e87c4d94c008e29 100644 (file)
@@ -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)))))