File: startup-auto-save-file-name-transforms.diff

package info (click to toggle)
emacs21 21.4a%2B1-3etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 59,104 kB
  • ctags: 58,909
  • sloc: lisp: 493,229; ansic: 237,175; xml: 4,262; sh: 4,109; makefile: 2,479; perl: 1,069; cs: 776; asm: 254; csh: 9; sed: 4
file content (26 lines) | stat: -rw-r--r-- 1,171 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
* The value of auto-save-file-name-transforms is now set correctly at run-time.
  Patch: startup-auto-save-file-name-transforms.diff
  Added-by: Jerome Marant <jerome@debian.org>
  Date: Sat,  5 Jun 2004 20:10:50 +0200
  Status: has been fixed upstream

  The value of the auto-save-file-name-transforms variable is now set
  at run-time in order to override the value that was autogenerated at
  build-time.

diff -urNad /home/jerome/pkg/emacs21/svn/emacs21/lisp/startup.el emacs21/lisp/startup.el
--- /home/jerome/pkg/emacs21/svn/emacs21/lisp/startup.el	2004-06-05 15:24:51.000000000 +0200
+++ emacs21/lisp/startup.el	2004-06-05 15:24:51.000000000 +0200
@@ -629,6 +629,12 @@
   (setq small-temporary-file-directory
 	(if (eq system-type 'ms-dos)
 	    (getenv "TMPDIR")))
+  (setq auto-save-file-name-transforms
+	(list (list "\\`/[^/]*:\\(.+/\\)*\\(.*\\)"
+		    ;; Don't put "\\2" inside expand-file-name, since
+		    ;; it will be transformed to "/2" on DOS/Windows.
+		    (concat (expand-file-name temporary-file-directory)
+			    "\\2"))))
 
   ;; See if we should import version-control from the environment variable.
   (let ((vc (getenv "VERSION_CONTROL")))