# HG changeset patch # User Aidan Kehoe # Date 1210497624 -7200 # Node ID 82f8351e71c88a406868ece693e521789c8a7441 # Parent e214ff9f9507794f61ad09d81e5f9272447c87d2 Improve portable sample implementations for #'{put,get}-display-table 2008-05-11 Aidan Kehoe * disp-table.el (make-display-table): Update the example code to make it more general, and more compatible with GNU. diff -r e214ff9f9507 -r 82f8351e71c8 lisp/ChangeLog --- a/lisp/ChangeLog Mon Dec 24 20:22:08 2007 +0100 +++ b/lisp/ChangeLog Sun May 11 11:20:24 2008 +0200 @@ -1,3 +1,9 @@ +2008-05-11 Aidan Kehoe + + * disp-table.el (make-display-table): + Update the example code to make it more general, and more + compatible with GNU. + 2007-07-21 Aidan Kehoe * mule/cyril-util.el: diff -r e214ff9f9507 -r 82f8351e71c8 lisp/disp-table.el --- a/lisp/disp-table.el Mon Dec 24 20:22:08 2007 +0100 +++ b/lisp/disp-table.el Sun May 11 11:20:24 2008 +0200 @@ -48,23 +48,19 @@ \(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)))) + (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. \" - (ecase (type-of display-table) - (vector - (aref display-table character)) - (char-table - (get-char-table character display-table)))) + (if (sequencep display-table) + (aref display-table character) + (get-char-table character display-table))) In this implementation, `put-display-table' and `get-display-table' are aliases of `put-char-table' and `get-char-table' respectively, and are -always available. " +always available." (make-char-table 'generic)) ;;;###autoload