[issue]: file.el compiles to null file.elc
acm at muc.de
Sat Sep 10 13:02:58 EDT 2011
On Fri, Sep 09, 2011 at 11:14:29PM +0100, Aidan Kehoe wrote:
> 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
OK. But cc-defs.el is included in every other cc-*.el, yet only causes
(?appears to cause?) problems in cc-align.el. This worries me a bit.
And it doesn't interfere with M-x byte-compile-file. That might worry
you a bit. ;-)
The cc-defs.el fix does indeed work for me. I'll get CC Mode 5.32.1
released as soon as I can, which might be the middle of next week.
> 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-insert-header filename byte-compile-inbuffer
Alan Mackenzie (Nuremberg, Germany).
More information about the XEmacs-Beta