NOTE: This patch has been committed.
Glynn, this is the patch of
http://mid.gmane.org/18288.3344.67997.394271@parhasard.net of December last
year, which you didn’t apply, slightly modified with a better
#'put-display-table implementation. I now have the access to apply it
myself, please reply if you disagree or if you would like to be no longer
listed as the maintaner of the XEmacs games package.
xemacs-packages/games/ChangeLog addition:
2008-07-13 Aidan Kehoe <kehoea(a)parhasard.net>
* gamegrid.el:
* gamegrid.el (put-display-table): New.
* gamegrid.el (get-display-table): New.
Provide with #'defun-when-void, so as to not override the 21.5
implementation.
* gamegrid.el (gamegrid-setup-default-font):
* gamegrid.el (gamegrid-initialize-display):
Use #'put-display-table, #'get-display-table instead of #'aset,
#'aref.
XEmacs Packages source patch:
Diff command: cvs -q diff -Nu
Files affected: xemacs-packages/games/gamegrid.el
===================================================================
RCS
Index: xemacs-packages/games/gamegrid.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/games/gamegrid.el,v
retrieving revision 1.6
diff -u -u -r1.6 gamegrid.el
--- xemacs-packages/games/gamegrid.el 2005/11/12 00:29:49 1.6
+++ xemacs-packages/games/gamegrid.el 2008/07/13 14:04:58
@@ -38,6 +38,18 @@
(eval-when-compile
(require 'cl))
+(defun-when-void put-display-table (range value display-table)
+ "Set the value for char RANGE to VALUE in DISPLAY-TABLE. "
+ (if (sequencep display-table)
+ (aset display-table range value)
+ (put-char-table range value display-table)))
+
+(defun-when-void get-display-table (character display-table)
+ "Find value for CHARACTER in DISPLAY-TABLE. "
+ (if (sequencep display-table)
+ (aref display-table character)
+ (get-char-table character display-table)))
+
;; ;;;;;;;;;;;;; buffer-local variables ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar gamegrid-use-glyphs t
@@ -302,7 +314,7 @@
(name (font-name font-spec))
(max-height nil))
(loop for c from 0 to 255 do
- (let ((glyph (aref gamegrid-display-table c)))
+ (let ((glyph (get-display-table c gamegrid-display-table)))
(cond ((glyphp glyph)
(let ((height (glyph-height glyph)))
(if (or (null max-height)
@@ -327,7 +339,7 @@
(glyph (gamegrid-make-glyph (car spec) (caddr spec)))
(face (gamegrid-make-face (cadr spec) (caddr spec))))
(aset gamegrid-face-table c face)
- (aset gamegrid-display-table c glyph)))
+ (put-display-table c glyph gamegrid-display-table)))
(gamegrid-setup-default-font)
(gamegrid-set-display-table)
(gamegrid-hide-cursor))
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches