[PATCH] Support opaque display-table objects on XEmacs
Reiner Steib
reinersteib+gmane at imap.cc
Tue May 27 16:34:08 EDT 2008
On Thu, May 22 2008, Miles Bader wrote:
> Aidan Kehoe <kehoea at parhasard.net> writes:
>> This patch adds support for the non-sequence display tables of XEmacs 21.5,
>> without any run-time overhead on GNU. A patch that’s equivalent in
>> functionality for that version has been integrated into the XEmacs package
>> repository; this conflicts with that, though--sorry Mike!--and is more
>> compatible with GNU.
I gather that it should be applied to the stable and development
branch. Right?
>> I’ve tested this (somewhat superficially) with XEmacs 21.5, 21.4
>> and GNU.
(Just call the later "Emacs".)
>> Please advise me if this is the wrong list to submit this to.
It's the right list. Thanks.
>> I have papers on file with the FSF for Gnus and for GNU Emacs as a
>> whole, so that shouldn’t be an issue.
Confirmed.
>> * gnus-util.el (gnus-put-display-table): New.
>> (gnus-get-display-table): New.
>> Macros that expand to an #'aset call under GNU, and to a runtime choice
>> under XEmacs.
Is writing “#'” a new XEmacsy ChangeLog convention?
>> * gnus-sum.el (gnus-summary-set-display-table):
>> Use #'gnus-{put,get}-display-table, gnus-set-display-table for the
>> display table, instead of #'aset.
>> * gnus-xmas.el (gnus-xmas-summary-set-display-table):
>> Use #'gnus-{put,get}-display-table, gnus-set-display-table for the
>> display table.
It's better (e.g. for searching) to spell out the macro names (not
using {put,get}).
>> @@ -3431,8 +3431,8 @@
>> 256)))
>> (while (>= (setq i (1- i)) 127)
>> ;; Only modify if the entry is nil.
>> - (unless (aref table i)
>> - (aset table i [??]))))
>> + (unless (get-display-table i table)
>> + (put-display-table i [??] table))))
>> (setq buffer-display-table table)))
>
> Should those be `gnus-get-display-table' and `gnus-put-display-table'?
Aidan?
>> +(defmacro gnus-put-display-table (range value display-table)
>> + "Set the value for char RANGE to VALUE in DISPLAY-TABLE. "
>> + (if (featurep 'xemacs)
>> + (progn
Useless `progn'?
>> + `(if (fboundp 'put-display-table)
>> + (put-display-table ,range ,value ,display-table)
>> + (if (sequencep ,display-table)
>> + (aset ,display-table ,range ,value)
>> + (put-char-table ,range ,value ,display-table))))
`cond' would be more readable than an `if'-cascade, IMHO.
>> + `(aset ,display-table ,range ,value)))
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
More information about the XEmacs-Patches
mailing list