Ar an naoiú lá de mí Méan Fómhair, scríobh Alan Mackenzie:
I'm most impressed (though I haven't tried it out, yet). Any
chance of
some explanation? I don't think there's anything invalid about a naked
`set-buffer', is there? How did you come upon this fix?
In general, there’s no particular problem with it, but you’re interfering
with the guts of byte-compilation in cc-defs.el, we don’t (and can’t really)
guarantee that functions with side effects like #'set-buffer won’t cause
problems if those side effects aren’t wrapped, when you do something like
that.
I came on the fix by applying the following patch to bytecomp.el, setting a
GDB breakpoint on Fdenominator, once that tripped setting a breakpoint on
set_buffer_internal, and then looking at the Lisp and C context for
unexpected values of the buffer.
--- bytecomp.el~ 2011-09-09 18:28:36.000000000 +0100
+++ bytecomp.el 2011-09-09 20:05:21.000000000 +0100
@@ -1886,15 +1878,21 @@
(goto-char (point-max byte-compile-outbuffer) byte-compile-outbuffer)
(set-buffer byte-compile-inbuffer)
(goto-char 1)
-
;; Compile the forms from the input buffer.
- (while (progn
- (while (progn (skip-chars-forward " \t\n\^L")
- (looking-at ";"))
- (forward-line 1))
- (not (eobp)))
- (byte-compile-file-form (read byte-compile-inbuffer)))
-
+ (debug-print "byte-compile-inbuffer is %S" byte-compile-inbuffer)
+ (setq my-global-variable (denominator 50))
+ (let (read)
+ (while (progn
+ (while (progn (skip-chars-forward " \t\n\^L")
+ (looking-at ";"))
+ (forward-line 1))
+ (not (eobp)))
+ (setq read (read byte-compile-inbuffer))
+ (debug-print "read is %S" read)
+ (byte-compile-file-form read)))
+ (debug-print "past the reading, current-buffer %S point is %S, eobp is
%S"
+ (current-buffer) (point) (eobp))
+
;; Compile pending forms at end of file.
(byte-compile-flush-pending)
(byte-compile-insert-header filename byte-compile-inbuffer
--
‘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