CVS update by kupfer packages/xemacs-packages/gnus/lisp ...
xemacs-cvs at xemacs.org
xemacs-cvs at xemacs.org
Tue Jan 1 19:55:45 EST 2008
User: kupfer
Date: 08/01/02 01:55:45
Modified: packages/xemacs-packages/gnus/lisp gnus-sum.el gnus-xmas.el
Log:
Aidan Kehoe's patch to define and use {get,put}-display-table
("Abstract out a display-table-specific API (2)",
<18288.3344.67997.394271 at parhasard.net>).
Revision Changes Path
1.104 +12 -0 XEmacs/packages/xemacs-packages/gnus/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/gnus/ChangeLog,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -p -r1.103 -r1.104
--- ChangeLog 2007/03/06 14:11:33 1.103
+++ ChangeLog 2008/01/02 00:55:40 1.104
@@ -1,3 +1,15 @@
+2007-12-24 Aidan Kehoe <kehoea at parhasard.net>
+
+ * lisp/gnus-sum.el:
+ * lisp/gnus-sum.el (put-display-table): New.
+ * lisp/gnus-sum.el (get-display-table): New.
+ Provide with #'defun-when-void, so as to not override the 21.5
+ implementation.
+ * lisp/gnus-sum.el (gnus-summary-set-display-table):
+ * lisp/gnus-xmas.el (gnus-xmas-summary-set-display-table):
+ Use #'put-display-table, not #'aref, to deal with the case where
+ the display table is a char table and not a vector.
+
2007-03-06 Norbert Koch <viteno at xemacs.org>
* Makefile (VERSION): XEmacs package 1.91 released.
1.12 +22 -6 XEmacs/packages/xemacs-packages/gnus/lisp/gnus-sum.el
Index: gnus-sum.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/gnus/lisp/gnus-sum.el,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- gnus-sum.el 2007/03/05 18:07:04 1.11
+++ gnus-sum.el 2008/01/02 00:55:43 1.12
@@ -54,6 +54,22 @@
(autoload 'gnus-article-outlook-repair-attribution "deuglify" nil t)
(autoload 'gnus-article-outlook-rearrange-citation "deuglify" nil t)
+(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))))
+
+(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))))
+
(defcustom gnus-kill-summary-on-exit t
"*If non-nil, kill the summary buffer when you exit from it.
If nil, the summary will become a \"*Dead Summary*\" buffer, and
@@ -3091,13 +3107,13 @@ display only a single character."
(i 32))
;; Nix out all the control chars...
(while (>= (setq i (1- i)) 0)
- (aset table i [??]))
+ (put-display-table i [??] table))
;; ... but not newline and cr, of course. (cr is necessary for the
;; selective display).
- (aset table ?\n nil)
- (aset table ?\r nil)
+ (put-display-table ?\n nil table)
+ (put-display-table ?\r nil table)
;; We keep TAB as well.
- (aset table ?\t nil)
+ (put-display-table ?\t nil table)
;; We nix out any glyphs 127 through 255, or 127 through 159 in
;; Emacs 23 (unicode), that are not set already.
(let ((i (if (ignore-errors (= (make-char 'latin-iso8859-1 160) 160))
@@ -3105,8 +3121,8 @@ display only a single character."
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)))
(defun gnus-summary-set-article-display-arrow (pos)
1.11 +6 -6 XEmacs/packages/xemacs-packages/gnus/lisp/gnus-xmas.el
Index: gnus-xmas.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/gnus/lisp/gnus-xmas.el,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -r1.10 -r1.11
--- gnus-xmas.el 2006/03/16 04:17:55 1.10
+++ gnus-xmas.el 2008/01/02 00:55:44 1.11
@@ -184,18 +184,18 @@ displayed, no centering will be performe
(i 32))
;; Nix out all the control chars...
(while (>= (setq i (1- i)) 0)
- (aset table i [??]))
+ (put-display-table i [??] table))
;; ... but not newline and cr, of course. (cr is necessary for the
;; selective display).
- (aset table ?\n nil)
- (aset table ?\r nil)
+ (put-display-table ?\n nil table)
+ (put-display-table ?\r nil table)
;; We keep TAB as well.
- (aset table ?\t nil)
+ (put-display-table ?\t nil table)
;; We nix out any glyphs over 126 below ctl-arrow.
(let ((i (if (integerp ctl-arrow) ctl-arrow 160)))
(while (>= (setq i (1- i)) 127)
- (unless (aref table i)
- (aset table i [??]))))
+ (unless (get-display-table i table)
+ (put-display-table i [??] table))))
;; Can't use `set-specifier' because of a bug in 19.14 and earlier
(add-spec-to-specifier current-display-table table (current-buffer) nil)))
More information about the XEmacs-CVS
mailing list