Commits

Anonymous committed 220cf55

Abstract out a display-table-specific API.

  • Participants
  • Parent commits d708947

Comments (0)

Files changed (2)

+2007-12-24  Aidan Kehoe  <kehoea@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. 
+
 2007-12-18  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 2.12 released.
 
 (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
 ;;;
   ;; (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.