dieggsy / eterm-256color

Customizable 256 colors for emacs term and ansi-term
GNU General Public License v3.0
69 stars 3 forks source link

On initial install, prompt for compilation happens twice. #3

Open dieggsy opened 6 years ago

dieggsy commented 6 years ago

This is because term-mode-hook seems to be running twice, which you can confirm in emacs -q with:

(add-hook 'term-mode-hook (lambda () (message "TIME: %s" (format-time-string "%3N"))))

Then running M-x term (or ansi-term) and checking the *Messages* buffer, which shows two separate messages TIME: ... messages.

dieggsy commented 6 years ago

huh, maybe this isn't a bug. weirdly, it shouldn't really matter - the second time around all the necessary files should already have been compiled.

dieggsy commented 6 years ago

huh, maybe this isn't a bug. weirdly, it shouldn't really matter - the second time around all the necessary files should already have been compiled.

This probably is cause compilation-start is asynchronous, and the hook is run twice only milliseconds apart. So the second time around, it compilation probably still hasn't finished.