我通常设置一个重要的编译命令,然后频繁调用'recompile. 有没有办法抑制保存文件的提示,类似于 auctex 调用的方法(setq TeX-save-query nil)?我发现总是必须手动保存或按y提示按下非常烦人。当我点击重新编译时,我希望在必要时保存所有文件。
compilation-ask-about-save is a variable defined in `compile.el'.
Its value is t
Documentation:
Non-nil means M-x compile asks which buffers to save before compiling.
Otherwise, it saves all modified buffers without asking.
You can customize this variable.
Run Code Online (Sandbox Code Playgroud)
这是函数recompile,它演示了它也使用变量compilation-ask-about-save:
compilation-ask-about-save is a variable defined in `compile.el'.
Its value is t
Documentation:
Non-nil means M-x compile asks which buffers to save before compiling.
Otherwise, it saves all modified buffers without asking.
You can customize this variable.
Run Code Online (Sandbox Code Playgroud)
另请参阅文档字符串save-some-buffers:“可选参数(前缀)非 nil 意味着毫无疑问地保存所有内容。 ”
save-some-buffers is an interactive compiled Lisp function in
`files.el'.
It is bound to C-x s.
(save-some-buffers &optional ARG PRED)
Save some modified file-visiting buffers. Asks user about each one.
You can answer `y' to save, `n' not to save, `C-r' to look at the
buffer in question with `view-buffer' before deciding or `d' to
view the differences using `diff-buffer-with-file'.
This command first saves any buffers where `buffer-save-without-query' is
non-nil, without asking.
Optional argument (the prefix) non-nil means save all with no questions.
Optional second argument PRED determines which buffers are considered:
If PRED is nil, all the file-visiting buffers are considered.
If PRED is t, then certain non-file buffers will also be considered.
If PRED is a zero-argument function, it indicates for each buffer whether
to consider it or not when called with that buffer current.
See `save-some-buffers-action-alist' if you want to
change the additional actions you can take on files.
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
961 次 |
| 最近记录: |