- 论坛徽章:
- 0
|
有关Emacs的一个问题。
You might want to look into Sebastian Kremer's `auto-save'
package, available from the Lisp Code Archive (*note Packages that do
not come with Emacs: . This package also allows you to place all
auto-save files in one directory, such as `/tmp'.
To disable or change how `auto-save-mode' works, *note (emacs)Auto
Save::.
Or put following code i in your ~/.emacs file.(you may modify it)
- ;; Put autosave files (ie #foo#) in one place, *not* scattered all over the
- ;; file system! (The make-autosave-file-name function is invoked to determine
- ;; the filename of an autosave file.)
- (defvar autosave-dir (concat "/tmp/emacs_autosaves/" (user-login-name) "/"))
- (make-directory autosave-dir t)
- (defun auto-save-file-name-p (filename) (string-match "^#.*#$" (file-name-nondirectory filename)))
- (defun make-auto-save-file-name () (concat autosave-dir (if buffer-file-name (concat "#" (file-name-nondirectory buffer-file-name) "#") (expand-file-name (concat "#%" (buffer-name) "#")))))
复制代码 |
|