From 585cdecbd5ab779c3d6950aecca56154870466c2 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 . (cherry picked from commit 9d62dbc1f798f65d480c6b8e6255a33e124995d0) --- 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 89212119f88..7dc8cb26409 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -2922,8 +2922,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.39.2