From: Lockywolf Date: Thu, 13 Feb 2025 03:51:50 +0000 (+0800) Subject: recentf.el: Add verbosity option X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9eb05114d35af429bc035c1a67d45d90e9ae0492;p=emacs.git recentf.el: Add verbosity option * lisp/recentf.el (recentf-show-messages): New defcustom to control verbosity. (recentf-save-list): Use that to control verbosity. (Bug#67946) (cherry picked from commit ce28916282800b2e4a5f8e244616e25f9e81831a) --- diff --git a/lisp/recentf.el b/lisp/recentf.el index 611a8ee1844..9ee576c5c99 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -321,6 +321,14 @@ If non-nil, `recentf-open-files' will show labels for keys that can be used as shortcuts to open the Nth file." :group 'recentf :type 'boolean) + +(defcustom recentf-show-messages t + "Whether to show verbose messages about low-level recentf actions. +nil means to not show messages related to the recentf machinery. +t means show messages that were printed by default on Emacs <= 31.1." + :group 'recentf + :type 'boolean + :version "31.1") ;;; Utilities ;; @@ -1344,8 +1352,12 @@ Write data into the file specified by `recentf-save-file'." (insert "\n \n;; Local Variables:\n" (format ";; coding: %s\n" recentf-save-file-coding-system) ";; End:\n") - (write-region (point-min) (point-max) - (expand-file-name recentf-save-file)) + (write-region (point-min) + (point-max) + (expand-file-name recentf-save-file) nil + (unless (or (called-interactively-p 'interactive) + recentf-show-messages) + 'quiet)) (when recentf-save-file-modes (set-file-modes recentf-save-file recentf-save-file-modes)) nil)