help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disabling save-all-buffers on M-x compile


From: Óscar Fuentes
Subject: Re: Disabling save-all-buffers on M-x compile
Date: Sat, 06 Feb 2010 02:20:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux)

Nathaniel Flath <flat0103@gmail.com> writes:

> When I do M-x compile, emacs prompts me about all unsaved files I have
> opened and whether I wish to save them.  Is there a way to disable
> this so it goes straight to compilation?

There is the variable `compilation-ask-about-save'. If it is `nil', it
saves without prompting, but maybe this is not what you want.

Your other option is to define a `compile' replacement that does not
call `save-some-buffers':

(defun my-compile (command &optional comint)
  (interactive
   (list
    (let ((command (eval compile-command)))
      (if (or compilation-read-command current-prefix-arg)
          (compilation-read-command command)
        command))
    (consp current-prefix-arg)))
  (unless (equal command (eval compile-command))
    (setq compile-command command))
  ;; (save-some-buffers (not compilation-ask-about-save) nil)
  (setq-default compilation-directory default-directory)
  (compilation-start command comint))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]