Mercurial > hg > xemacs-beta
diff lisp/gnus/gnus-xmas.el @ 116:9f59509498e1 r20-1b10
Import from CVS: tag r20-1b10
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:23:06 +0200 |
parents | fe104dbd9147 |
children | 7d55a9ba150c |
line wrap: on
line diff
--- a/lisp/gnus/gnus-xmas.el Mon Aug 13 09:21:56 2007 +0200 +++ b/lisp/gnus/gnus-xmas.el Mon Aug 13 09:23:06 2007 +0200 @@ -181,6 +181,26 @@ (gnus-horizontal-recenter) (select-window selected)))))) +(defun gnus-xmas-summary-set-display-table () + ;; Setup the display table -- like gnus-summary-setup-display-table, + ;; but done in an XEmacsish way. + (let ((table (make-display-table)) + ;; Nix out all the control chars... + (i 32)) + (while (>= (setq i (1- i)) 0) + (aset table i [??])) + ;; ... but not newline and cr, of course. (cr is necessary for the + ;; selective display). + (aset table ?\n nil) + (aset table ?\r nil) + ;; We nix out any glyphs over 126 that are not set already. + (let ((i 256)) + (while (>= (setq i (1- i)) 127) + ;; Only modify if the entry is nil. + (or (aref table i) + (aset table i [??])))) + (add-spec-to-specifier current-display-table table (current-buffer) nil))) + (defun gnus-xmas-add-hook (hook function &optional append local) (add-hook hook function)) @@ -442,7 +462,7 @@ (defun gnus-xmas-redefine () "Redefine lots of Gnus functions for XEmacs." - (fset 'gnus-summary-make-display-table 'ignore) + (fset 'gnus-summary-set-display-table 'gnus-xmas-summary-set-display-table) (fset 'gnus-visual-turn-off-edit-menu 'identity) (fset 'gnus-summary-recenter 'gnus-xmas-summary-recenter) (fset 'gnus-extent-start-open 'gnus-xmas-extent-start-open)