Hi Alan,
Ar an naoiú lá de mí Méan Fómhair, scríobh Alan Mackenzie:
Download CC Mode 5.32 from
<
http://sourceforge.net/projects/cc-mode/files/cc-mode/cc-mode-5.32.tar.gz...;.
Unpack the archive and byte compile it as instructed in the README,
i.e.:
xemacs -batch -no-site-file -q -f batch-byte-compile cc-*.el
, where xemacs is, e.g., 21.4.22.
Note that the resulting cc-align.elc is only 576 bytes big and, on
closer examination, is content free. This is a bug.
Note: in an actual XEmacs session, M-x byte-compile-file compiles
cc-align.el properly.
Thanks for the detailed bug report. I can avoid the error with the following
patch to CC mode, and am about to commit a change to XEmacs which will make
any such bugs fail with an error message at compile time rather than
silently at runtime.
It appears not to have affected this bug, but there’s a similar set-buffer
without save-excursion in #'c-tnt-chng-cleanup; maybe that could bear
wrapping as well. The change below is to the initialisation of
c-emacs-features.
--- cc-mode-5.32/cc-defs.el 2011-08-24 16:09:20.000000000 +0100
+++ cc-mode-5.32-modified/cc-defs.el 2011-09-09 21:29:05.000000000 +0100
@@ -1839,20 +1839,21 @@
(if (let ((buf1 (generate-new-buffer " test1"))
(buf2 (generate-new-buffer " test2"))
changed)
- (set-buffer buf1)
- (add-hook 'after-change-functions
- (lambda (beg end old-len) (setq changed t))
- nil
- t)
- (set-buffer buf2)
- (insert ?c)
- (set-buffer buf1)
- (remove-hook 'after-change-functions
- (lambda (beg end old-len) (setq changed t))
- t)
- (kill-buffer buf1)
- (kill-buffer buf2)
- (not changed))
+ (save-excursion
+ (set-buffer buf1)
+ (add-hook 'after-change-functions
+ (lambda (beg end old-len) (setq changed t))
+ nil
+ t)
+ (set-buffer buf2)
+ (insert ?c)
+ (set-buffer buf1)
+ (remove-hook 'after-change-functions
+ (lambda (beg end old-len) (setq changed t))
+ t)
+ (kill-buffer buf1)
+ (kill-buffer buf2)
+ (not changed)))
(setq list (cons 'add-hook-local list)))
Best,
Aidan
--
‘Iodine deficiency was endemic in parts of the UK until, through what has been
described as “an unplanned and accidental public health triumph”, iodine was
added to cattle feed to improve milk production in the 1930s.’
(EN Pearce, Lancet, June 2011)
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta