all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Pittman <daniel@rimspace.net>
Subject: Re: advising jde-compile -- a better way?
Date: Tue, 26 Oct 2004 11:04:00 +1000	[thread overview]
Message-ID: <871xfm9tof.fsf@enki.rimspace.net> (raw)
In-Reply-To: uoeiqy9p4.fsf@terrapin.northbound-train.com

On 26 Oct 2004, Joe Casadonte wrote:
> jde-compile prompts me to save buffers before compiling, a practice
> that I find personally annoying.  I've come up with the following, but
> it seems ugly:
>
> (defadvice jde-compile (around jde-compile-no-save-prompt act)
> "Supresses the save-buffer prompting." (fset 'save-some-buffers-old-fn-def
> 	(symbol-function 'save-some-buffers)) (fset 'save-some-buffers
> 	'ignore) ad-do-it (fset 'save-some-buffers (symbol-function
> 	'save-some-buffers-old-fn-def)))

(require 'cl)
(defadvice jde-compile (around jde-compile-no-save-prompt act)
  "Supresses the save-buffer prompting." 
    (flet ((save-some-buffers (&rest)))
      ad-do-it))

> Is there a better or more elegant way to accomplish the same thing?

Untested, but Common Lisp flet is a way of doing what you wrote
automatically.  There may even be a non-CL mechanism, named something
else, in Emacs somewhere.

          Daniel

-- 
Yet, I am the necessary angel of earth,
Since, in my sight, you see the earth again...
        -- Wallace Stevens

      parent reply	other threads:[~2004-10-26  1:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-25 17:44 advising jde-compile -- a better way? Joe Casadonte
2004-10-25 21:43 ` Kevin Rodgers
2004-10-25 23:13 ` Michael Slass
2004-10-26  1:04 ` Daniel Pittman [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871xfm9tof.fsf@enki.rimspace.net \
    --to=daniel@rimspace.net \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.