From 9d62dbc1f798f65d480c6b8e6255a33e124995d0 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 1 Jul 2024 01:44:38 +0200 Subject: [PATCH] Backport file backup FAQ item to Emacs <28 * doc/misc/efaq.texi (Not writing files to the current directory): Backport recommendation to Emacs 27 or older. Problem reported by David Hedlund . --- doc/misc/efaq.texi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index 7ab9731ff8f..93b3d48f6f1 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -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 -- 2.30.2