]> code.delx.au - gnu-emacs/blobdiff - lisp/savehist.el
Improve regex to not trigger stack overflow
[gnu-emacs] / lisp / savehist.el
index 692ee2e586fd9784654c7eb0839fe30b332232d9..607138ca31a50e936478ae026d7603a2f4a01da2 100644 (file)
@@ -270,8 +270,12 @@ If AUTO-SAVE is non-nil, compare the saved contents to the one last saved,
   (interactive)
   (with-temp-buffer
     (insert
-     (format ";; -*- mode: emacs-lisp; coding: %s -*-\n" savehist-coding-system)
-     ";; Minibuffer history file, automatically generated by `savehist'.\n\n")
+     (format-message
+      (concat
+       ";; -*- mode: emacs-lisp; coding: %s -*-\n"
+       ";; Minibuffer history file, automatically generated by `savehist'.\n"
+       "\n")
+      savehist-coding-system))
     (run-hooks 'savehist-save-hook)
     (let ((print-length nil)
          (print-string-length nil)