Backport file backup FAQ item to Emacs <28
authorStefan Kangas <stefankangas@gmail.com>
Sun, 30 Jun 2024 23:44:38 +0000 (01:44 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Sun, 30 Jun 2024 23:50:51 +0000 (01:50 +0200)
* doc/misc/efaq.texi (Not writing files to the current directory):
Backport recommendation to Emacs 27 or older.
Problem reported by David Hedlund <davidh@gnu.org>.

doc/misc/efaq.texi

index 7ab9731ff8fe80df55b3367f0380aeb1b7d29c77..93b3d48f6f1704b0be708ba6b9da6c71a7de94e4 100644 (file)
@@ -2932,8 +2932,9 @@ For instance, to write all these things to
 @file{~/.emacs.d/aux/}:
 
 @lisp
-(setq lock-file-name-transforms
-      '(("\\`/.*/\\([^/]+\\)\\'" "~/.emacs.d/aux/\\1" t)))
+(when (>= emacs-major-version 28)
+  (setq lock-file-name-transforms
+        '(("\\`/.*/\\([^/]+\\)\\'" "~/.emacs.d/aux/\\1" t))))
 (setq auto-save-file-name-transforms
       '(("\\`/.*/\\([^/]+\\)\\'" "~/.emacs.d/aux/\\1" t)))
 (setq backup-directory-alist