Ar an naoú lá déag de mí na Nollaig, scríobh Marcus Crestani:
I've just installed lastet XEmacs 21.5 (the CVS date in the
Installation file attached doesn't reflect this, though) and updated
to latest CVS packages on MacOSX 10.5.1. Now, my gnus configuration
causes trouble.
My gnus.el file contains `(require 'pgg)'. This fails with "Symbol's
value as variable is void: pgg-parse-crc24". The new build seems to
have problems with CCL, since the definition of `pgg-parse-crc24' in
pgg-parse.el is wrapped with "(when (fboundp 'define-ccl-program)
...".
Which is wrong, independent of this bug. define-ccl-program is a macro, and
whether it’s available at run time is mostly irrelevant.
Strangely, `(fboundp 'define-ccl-program)' evaluates to
`t' in my
*scratch* buffer, but it does not seem to do this when pgg-parse.el is
loaded from my gnus.el.
It works when I put
(load-file "/SOME/PATH/xemacs-packages/lisp/pgg/pgg-parse.el")
in my gnus.el.
Which isn’t byte compiled, and doesn’t choke on compile time versus run time
incompatibilities. Whence the difference, I think.
I’d be interested in seeing your compiled pgg-parse.elc , if you can post it
somewhere. Did you
How can I avoid this kludge and fix this for real?
Can someone help?
Try this patch, which is analagous to what I’m doing in lisp/unicode.el
where there’s also a CCL program that needs to be compilable by under
non-Mule:
--- pgg-parse.el~ Fri Sep 23 15:31:43 2005
+++ pgg-parse.el Wed Dec 19 11:42:59 2007
@@ -35,7 +35,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl) (when (featurep 'mule) (require 'ccl)))
(defgroup pgg-parse ()
"OpenPGP packet parsing."
@@ -159,25 +159,42 @@
(defmacro pgg-set-alist (alist key value)
`(setq ,alist (nconc ,alist (list (cons ,key ,value)))))
-(when (fboundp 'define-ccl-program)
+(defconst pgg-parse-crc24
+ (eval-when-compile
+ (let ((pre-existing
+ [1 30 14 114744 114775 0 161 131127 1 148217 15 82167 1 1848
+ 131159 1 1595 5 256 114743 390 114775 19707 1467 16 7 183 1 -5628
+ -7164 22]))
+ (when (fboundp #'ccl-compile)
+ (assert
+ (equal
+ pre-existing
+ (ccl-compile
+ '(1
+ ((loop
+ (read r0) (r1 ^= r0) (r2 ^= 0)
+ (r5 = 0)
+ (loop
+ (r1 <<= 1)
+ (r1 += ((r2 >> 15) & 1))
+ (r2 <<= 1)
+ (if (r1 & 256)
+ ((r1 ^= 390) (r2 ^= 19707)))
+ (if (r5 < 7)
+ ((r5 += 1)
+ (repeat))))
+ (repeat))))))
+ nil
+ "The pre-compiled CCL program appears broken, or the implementation
+of `ccl-compile' has changed versus to when this code was written. "))
+ pre-existing))
+ "A CCL program to parse CRC 24 checksums. See `define-ccl-program'.")
- (define-ccl-program pgg-parse-crc24
- '(1
- ((loop
- (read r0) (r1 ^= r0) (r2 ^= 0)
- (r5 = 0)
- (loop
- (r1 <<= 1)
- (r1 += ((r2 >> 15) & 1))
- (r2 <<= 1)
- (if (r1 & 256)
- ((r1 ^= 390) (r2 ^= 19707)))
- (if (r5 < 7)
- ((r5 += 1)
- (repeat))))
- (repeat)))))
+(put 'pgg-parse-crc24 'ccl-program-idx
+ (register-ccl-program 'pgg-parse-crc24 pgg-parse-crc24))
- (defun pgg-parse-crc24-string (string)
+(defun pgg-parse-crc24-string (string)
+ (when (fboundp #'ccl-execute-on-string)
(let ((h (vector nil 183 1230 nil nil nil nil nil nil)))
(ccl-execute-on-string pgg-parse-crc24 h string)
(format "%c%c%c"
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta