unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: byte-compiling .emacs
Date: Tue, 12 Apr 2005 15:45:29 -0600	[thread overview]
Message-ID: <d3hfc0$1jf$1@sea.gmane.org> (raw)
In-Reply-To: <20050412184800.32635.qmail@web51903.mail.yahoo.com>

Ryan Bowman wrote:
 > Please suggest improvements.

Only add your auto-compile function to after-save-hook locally in
emacs-lisp-mode buffers, and only those buffers that are actually
visiting files.  Don't bother with message, since Emacs already
generates "Compiling /path/to/file.el...done" and "Wrote
/path/to/file.elc" messages.

(defun byte-compile-visited-file ()
   (let ((byte-compile-verbose t))
     (byte-compile-file buffer-file-name)))

(add-hook 'emacs-lisp-mode-hook
           (lambda ()
             (when buffer-file-name
               (add-hook (make-local-hook 'after-save-hook)
                         'byte-compile-visited-file
                         nil t))))

-- 
Kevin Rodgers

  reply	other threads:[~2005-04-12 21:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-12 18:48 byte-compiling .emacs Ryan Bowman
2005-04-12 21:45 ` Kevin Rodgers [this message]
2005-04-12 22:24   ` Joe Corneli
     [not found] <mailman.931.1113065284.2895.help-gnu-emacs@gnu.org>
2005-04-09 18:34 ` how can I tell emacs to treat a text file as html? Stefan Monnier
     [not found]   ` <mailman.951.1113084713.2895.help-gnu-emacs@gnu.org>
2005-04-10  1:15     ` Pascal Bourguignon
     [not found]       ` <mailman.961.1113108735.2895.help-gnu-emacs@gnu.org>
2005-04-11 11:40         ` byte-compiling .emacs (was: how can I tell emacs to treat a text file as html?) Reiner Steib
2005-04-11 13:10           ` Joe Corneli
     [not found]             ` <mailman.1067.1113227351.2895.help-gnu-emacs@gnu.org>
2005-04-11 17:19               ` byte-compiling .emacs David Kastrup
2005-04-11 19:41                 ` Peter Dyballa
     [not found]           ` <mailman.1061.1113223276.2895.help-gnu-emacs@gnu.org>
2005-04-11 13:40             ` byte-compiling .emacs (was: how can I tell emacs to treat a text file as html?) Phillip Lord
2005-04-11 14:33               ` byte-compiling .emacs Jay Belanger
2005-04-12  0:58                 ` Barry Margolin
2005-04-14 12:48                 ` Stefan Monnier
2005-04-14 17:43                   ` Jay Belanger
2005-04-12  1:31               ` Quokka

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='d3hfc0$1jf$1@sea.gmane.org' \
    --to=ihs_4664@yahoo.com \
    /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).