Mercurial > hg > xemacs-beta
changeset 4452:82f8351e71c8
Improve portable sample implementations for #'{put,get}-display-table
2008-05-11 Aidan Kehoe <kehoea@parhasard.net>
* disp-table.el (make-display-table):
Update the example code to make it more general, and more
compatible with GNU.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 11 May 2008 11:20:24 +0200 |
parents | e214ff9f9507 |
children | 29efd169efe7 |
files | lisp/ChangeLog lisp/disp-table.el |
diffstat | 2 files changed, 13 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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 <kehoea@parhasard.net> + + * 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 <kehoea@parhasard.net> * mule/cyril-util.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