From: Xah Lee <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Byte Compile Question
Date: Tue, 31 Jul 2012 05:52:48 -0700 (PDT) [thread overview]
Message-ID: <4e8bb8c4-e64b-4efb-bcd8-40a7c7177b0d@h8g2000pbt.googlegroups.com> (raw)
In-Reply-To: mailman.5757.1343400279.855.help-gnu-emacs@gnu.org
byte-compile elisp buffer on save, only if a byte-compiled file
exists.
(defun byte-compile-current-buffer ()
"`byte-compile' current buffer if it's emacs-lisp-mode and compiled
file exists."
(interactive)
(when (and (eq major-mode 'emacs-lisp-mode)
(file-exists-p (byte-compile-dest-file buffer-file-
name)))
(byte-compile-file buffer-file-name)))
(add-hook 'after-save-hook 'byte-compile-current-buffer)
code part from Adolfo Benedetti.
some other tips:
〈Organize Your “dot emacs” Init File in 5 Minutes〉
http://ergoemacs.org/emacs/organize_your_dot_emacs.html
btw, there's lots alternatives on emacswiki.
Xah
On Jul 27, 7:44 am, Perry Smith <pedz...@gmail.com> wrote:
> Hi,
>
> I have the belief that byte compiling only helps with loading files and that once they are loaded, the code will execute at the same speed.
>
> Is that correct?
>
> Byte compiling all my personal files is a bit awkward for a couple of reasons. I considering not doing it any more but wanted to know all the tradeoffs.
>
> If you can, please CC me on your replies.
>
> Thank you,
> Perry Smith
next prev parent reply other threads:[~2012-07-31 12:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.5757.1343400279.855.help-gnu-emacs@gnu.org>
2012-07-27 16:04 ` Byte Compile Question Pascal J. Bourguignon
2012-07-31 12:52 ` Xah Lee [this message]
2012-07-27 14:44 Perry Smith
2012-07-27 15:12 ` Christopher Schmidt
2012-07-27 15:18 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4e8bb8c4-e64b-4efb-bcd8-40a7c7177b0d@h8g2000pbt.googlegroups.com \
--to=xahlee@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).