Use lisp-data-mode in recentf-save-file
authorStefan Kangas <stefankangas@gmail.com>
Sat, 8 Mar 2025 13:00:42 +0000 (14:00 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 12 Mar 2025 18:47:52 +0000 (19:47 +0100)
* lisp/recentf.el (recentf-save-file-header): Add cookie to use
lisp-data-mode in recentf-save-file.

(cherry picked from commit a6523599f985eae5f884834bf15bd714c1cf557b)

lisp/recentf.el

index ea2a066f920470a20c156f5e51aed386b8bfbb86..339ba13a3ce63412e2f5c871bc9d711dcb69dd26 100644 (file)
@@ -1329,7 +1329,7 @@ Optional argument N must be a valid digit number.  It defaults to 1.
 ;;; Save/load/cleanup the recent list
 ;;
 (defconst recentf-save-file-header
-  ";;; Automatically generated by `recentf' on %s.\n"
+  ";;; Automatically generated by `recentf' on %s.  -*- mode: lisp-data -*-\n"
   "Header to be written into the `recentf-save-file'.")
 
 (defconst recentf-save-file-coding-system
@@ -1357,7 +1357,7 @@ Write data into the file specified by `recentf-save-file'."
                       (point-max)
                       (expand-file-name recentf-save-file) nil
                       (unless (or (called-interactively-p 'interactive)
-                                 recentf-show-messages)
+                                  recentf-show-messages)
                         'quiet))
         (when recentf-save-file-modes
           (set-file-modes recentf-save-file recentf-save-file-modes))