[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: byte-compile making erroneous *Compile Log*
From: |
martin rudalics |
Subject: |
Re: byte-compile making erroneous *Compile Log* |
Date: |
Tue, 02 Jun 2009 08:23:36 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (Windows/20090302) |
> I did (edebug-on-entry (quote fill-region) nil) and the debugger did not
start,
> so I must be missing something. (E.g., do I have to recompile fill-region
with
> debugging enabled, or something like that?)
Sorry, I should have told you. Try
M-x find-function RET fill-region RET
followed by C-u C-M-x which calls `edebug-defun` and is also on the
Emacs-Lisp menu.
> Looking for "fill" in my initialization I found that
> fill-individual-varying-indent and paragraph-ignore-fill-prefix were set to t.
> However, setting both to nil did not help. I did not see anything else that
> looks like suspicious.
Let's see what happens when you debug this with and without your .emacs
(obviously the bug may be caused by something else than filling).
> I am satisfied with my workaround, which took remarkably little code.
However,
> Martin, if you are trying to debug this, I'll continue to pursue it for you -
> just give me another clue.
I hope `edebug-defun' works for you. You can use the following function
(defun make-empty-compile-log ()
(interactive)
(let ((inhibit-read-only t))
(with-current-buffer (get-buffer-create "*Compile-Log*")
(delete-region (point-min) (point-max))
(display-buffer (current-buffer)))))
to create, empty and display the *Compile-Log* buffer.
Here I can't do anything because I have no recipe to reproduce your bug.
> (Incidentally, I had poked around in the byte compiler code trying to find
where
> it was inserting the warnings - and I could not find it. At least Martin has
> pointed me to where it happens now.)
It's a bit tricky indeed. `display-warning' which is in the file
warnings.el has the call
(if warning-prefix-function
(setq level-info (funcall warning-prefix-function
level level-info)))
where `warning-prefix-function' is set by `byte-compile-log-warning' to
`byte-compile-warning-prefix'. If you edebug-defun both
`display-warning' and `byte-compile-warning-prefix' you can observe how
these functions and the "funcall" interact when compiling a file.
martin