From 035137bc92ec4b3ceab43409d4b8ea0deb975459 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Sat, 18 Apr 2020 09:04:13 +0100 Subject: [PATCH] Use lisp-data-mode in 5 more places Thanks to Juri Linkov and Basil L. Contovounesios for the list and the indication of the function that needed to be changed. * lisp/bookmark.el (bookmark-insert-file-format-version-stamp): Use lisp-data-mode. * lisp/saveplace.el (save-place-alist-to-file): Use lisp-data-mode. * lisp/net/eww.el (eww-write-bookmarks): Use lisp-data-mode. * lisp/net/nsm.el (nsm-write-settings): Use lisp-data-mode. * lisp/net/tramp-cache.el (tramp-dump-connection-properties): Use lisp-data-mode. --- lisp/bookmark.el | 6 ++++-- lisp/net/eww.el | 2 +- lisp/net/nsm.el | 1 + lisp/net/tramp-cache.el | 2 +- lisp/saveplace.el | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 720ad18c16f..f2384973e9c 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -734,8 +734,10 @@ CODING is the symbol of the coding-system in which the file is encoded." (if (memq (coding-system-base coding) '(undecided prefer-utf-8)) (setq coding 'utf-8-emacs)) (insert - (format ";;;; Emacs Bookmark Format Version %d ;;;; -*- coding: %S -*-\n" - bookmark-file-format-version (coding-system-base coding))) + (format + ";;;; Emacs Bookmark Format Version %d\ +;;;; -*- coding: %S mode: lisp-data -*-\n" + bookmark-file-format-version (coding-system-base coding))) (insert ";;; This format is meant to be slightly human-readable;\n" ";;; nevertheless, you probably don't want to edit it.\n" ";;; " diff --git a/lisp/net/eww.el b/lisp/net/eww.el index c83884fd259..a4544023f61 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1733,7 +1733,7 @@ If CHARSET is nil then use UTF-8." (defun eww-write-bookmarks () (with-temp-file (expand-file-name "eww-bookmarks" eww-bookmarks-directory) - (insert ";; Auto-generated file; don't edit\n") + (insert ";; Auto-generated file; don't edit -*- mode: lisp-data -*-\n") (pp eww-bookmarks (current-buffer)))) (defun eww-read-bookmarks () diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el index 2d36c5e2571..cc22427e6d1 100644 --- a/lisp/net/nsm.el +++ b/lisp/net/nsm.el @@ -964,6 +964,7 @@ protocol." (defun nsm-write-settings () (with-temp-file nsm-settings-file + (insert ";;;; -*- mode: lisp-data -*-\n") (insert "(\n") (dolist (setting nsm-permanent-host-settings) (insert " ") diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index 09e30f000f4..6d87ce297bc 100644 --- a/lisp/net/tramp-cache.el +++ b/lisp/net/tramp-cache.el @@ -472,7 +472,7 @@ used to cache connection properties of the local machine." ;; Dump it. (with-temp-file tramp-persistency-file-name (insert - ";; -*- emacs-lisp -*-" + ";; -*- lisp-data -*-" ;; `time-stamp-string' might not exist in all Emacs flavors. (condition-case nil (progn diff --git a/lisp/saveplace.el b/lisp/saveplace.el index fa0e181bb10..f78639db246 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el @@ -248,7 +248,7 @@ may have changed) back to `save-place-alist'." (delete-region (point-min) (point-max)) (when save-place-forget-unreadable-files (save-place-forget-unreadable-files)) - (insert (format ";;; -*- coding: %s -*-\n" + (insert (format ";;; -*- coding: %s mode: lisp-data -*-\n" (symbol-name coding-system-for-write))) (let ((print-length nil) (print-level nil)) -- 2.39.2