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)
This commit is contained in:
parent
f0d58d976a
commit
ce28916282
2 changed files with 21 additions and 2 deletions
7
etc/NEWS
7
etc/NEWS
|
@ -531,6 +531,13 @@ This user option controls the width of the type column on the bookmark
|
|||
menu 'bookmark-bmenu-list'. The default value is 8 which is backwards
|
||||
compatible.
|
||||
|
||||
** Recentf
|
||||
|
||||
---
|
||||
*** New user option 'recentf-show-messages'.
|
||||
'recentf-save-list' can print a message when saving the recentf list.
|
||||
The new option, if set to nil, suppresses this message.
|
||||
|
||||
** Saveplace
|
||||
|
||||
---
|
||||
|
|
|
@ -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
|
||||
;;
|
||||
|
@ -1331,8 +1339,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)
|
||||
|
|
Loading…
Add table
Reference in a new issue