Gnus development mailing list
 help / color / mirror / Atom feed
* Native character types and marks
@ 1996-12-31  1:12 Sudish Joseph
  0 siblings, 0 replies; only message in thread
From: Sudish Joseph @ 1996-12-31  1:12 UTC (permalink / raw)


Having read articles automatically marked as expirable stopped working
for me in XEmacs 20.0.  The reason being that 20.0 has a `native'
character type that no longer satisfies 'numberp.  Here's a patch
against 0.76.  

Per, custom-quote needs to test this as well.  Patch included.

I did a lame grep for numberp and don't see any other candidates for
this.  There's bound to be more, though.

-Sudish

diff -ru tmp/rgnus-0.76/lisp/gnus-sum.el lisp/gnus-sum.el
--- tmp/rgnus-0.76/lisp/gnus-sum.el	Mon Dec 16 12:32:25 1996
+++ lisp/gnus-sum.el	Mon Dec 30 19:43:40 1996
@@ -7452,7 +7452,7 @@
   (and (not no-expire)
        gnus-newsgroup-auto-expire
        (or (not mark)
-	   (and (numberp mark)
+	   (and (gnus-characterp mark)
 		(or (= mark gnus-killed-mark) (= mark gnus-del-mark)
 		    (= mark gnus-catchup-mark) (= mark gnus-low-score-mark)
 		    (= mark gnus-read-mark) (= mark gnus-souped-mark)
diff -ru tmp/rgnus-0.76/lisp/gnus-util.el lisp/gnus-util.el
--- tmp/rgnus-0.76/lisp/gnus-util.el	Thu Dec 12 23:30:20 1996
+++ lisp/gnus-util.el	Mon Dec 30 19:58:24 1996
@@ -86,6 +86,14 @@
   (or (and (symbolp form) (fboundp form))
       (and (listp form) (eq (car form) 'lambda))))
 
+(defmacro gnus-characterp (c)
+  "Return non-nil if C is a character.
+Handles the primitive character type in XEmacs 20.0 correctly."
+  (cond ((fboundp 'characterp)
+	 `(characterp ,c))
+	(t
+	 `(numberp ,c))))
+  
 (defsubst gnus-goto-char (point)
   (and point (goto-char point)))
 
@@ -482,6 +490,7 @@
 (defun gnus-read-event-char ()
   "Get the next event."
   (let ((event (read-event)))
+    ;; should be gnus-characterp, but this can't be called in XEmacs anyway
     (cons (and (numberp event) event) event)))
 
 (defun gnus-sortable-date (date)

--- custom-edit.el~	Sun Dec  8 20:38:21 1996
+++ custom-edit.el	Mon Dec 30 20:09:33 1996
@@ -31,7 +31,9 @@
 	  (and (listp sexp)
 	       (memq (car sexp) '(lambda)))
 	  (stringp sexp)
-	  (numberp sexp))
+	  (numberp sexp)
+	  (and (fboundp 'characterp)
+	       (characterp sexp)))
       sexp
     (list 'quote sexp)))
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-12-31  1:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-12-31  1:12 Native character types and marks Sudish Joseph

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).