APPROVE COMMIT
NOTE: This patch has been committed.
xemacs-packages/xemacs-base/ChangeLog addition:
2007-12-24 Aidan Kehoe <kehoea(a)parhasard.net>
* enriched.el:
* enriched.el (put-display-table): New.
* enriched.el (get-display-table): New.
Both made available with #'defun-when-void, so the native
implementation on 21.5 overrides them.
* enriched.el (?\f):
Use put-display-table instead of aset to configure how ?\f is
displayed.
xemacs-packages/misc-games/ChangeLog addition:
2007-12-24 Aidan Kehoe <kehoea(a)parhasard.net>
* rot13.el:
* rot13.el (put-display-table): New.
Function provided with #'defun-when-void, so as not to override
21.5's native implementation.
* rot13.el (rot13-display-table):.
Call #'put-display-table, not #'aset, to modify the display table.
XEmacs Packages source patch:
Diff command: cvs -q diff -Nu
Files affected: xemacs-packages/misc-games/rot13.el
===================================================================
RCS xemacs-packages/xemacs-base/enriched.el
===================================================================
RCS
Index: xemacs-packages/xemacs-base/enriched.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-base/enriched.el,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 enriched.el
--- xemacs-packages/xemacs-base/enriched.el 1998/01/14 06:32:19 1.1.1.1
+++ xemacs-packages/xemacs-base/enriched.el 2007/12/24 19:15:58
@@ -54,6 +54,14 @@
(provide 'enriched)
+(defun-when-void put-display-table (range value display-table)
+ "Set the value for char RANGE to VALUE in DISPLAY-TABLE. "
+ (ecase (type-of display-table)
+ (vector
+ (aset display-table range value))
+ (char-table
+ (put-char-table range value display-table))))
+
;;;
;;; Variables controlling the display
;;;
@@ -93,7 +101,7 @@
;; (or (copy-sequence standard-display-table)
;; (make-display-table)))
(make-display-table))
-(aset enriched-display-table ?\f (make-vector (1- (frame-width)) ?-))
+(put-display-table ?\f (make-vector (1- (frame-width)) ?-) enriched-display-table)
(defconst enriched-par-props '(left-margin right-margin justification)
"Text-properties that usually apply to whole paragraphs.
Index: xemacs-packages/misc-games/rot13.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/misc-games/rot13.el,v
retrieving revision 1.2
diff -u -u -r1.2 rot13.el
--- xemacs-packages/misc-games/rot13.el 2000/09/25 03:16:51 1.2
+++ xemacs-packages/misc-games/rot13.el 2007/12/24 19:15:58
@@ -35,15 +35,23 @@
;;; Code:
+(defun-when-void put-display-table (range value display-table)
+ "Set the value for char RANGE to VALUE in DISPLAY-TABLE. "
+ (ecase (type-of display-table)
+ (vector
+ (aset display-table range value))
+ (char-table
+ (put-char-table range value display-table))))
+
(defvar rot13-display-table
(let ((i -1)
(a (char-to-int ?a))
(A (char-to-int ?A))
(table (make-display-table)))
(while (< (incf i) 26)
- (aset table (+ i a) (char-to-string (int-to-char (+ (% (+ i 13) 26) a))))
- (aset table (+ i A) (char-to-string (int-to-char (+ (% (+ i 13) 26) A)))))
- table)
+ (put-display-table (+ i a) (char-to-string (int-to-char (+ (% (+ i 13) 26) a)))
table)
+ (put-display-table (+ i A) (char-to-string (int-to-char (+ (% (+ i 13) 26) A)))
table)
+ table))
"Char table for rot 13 display.")
;;;###autoload
--
¿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