mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 04:21:24 +00:00
Fix last change in recentf.el
* lisp/recentf.el (recentf-exclude-ignored-extensions): Doc fix. (recentf-exclude-file-by-extension-p): Rename from `recentf-exclude-ignored-extensions'; all references changed. Doc fix. * etc/NEWS: Improve wording of the entry which announces the above.
This commit is contained in:
parent
c86b60c214
commit
5c1ef38b5b
2 changed files with 20 additions and 15 deletions
13
etc/NEWS
13
etc/NEWS
|
|
@ -1798,11 +1798,14 @@ messages. To suppress these messages, customize the user option
|
|||
option is nil.
|
||||
|
||||
---
|
||||
*** New user option and function 'recentf-exclude-ignored-extensions'.
|
||||
Add the new function 'recentf-exclude-ignored-extensions' to the list
|
||||
'recentf-exclude' to ignore files whose extensions are listed in the
|
||||
user option of the same name 'recentf-exclude-ignored-extensions'. If
|
||||
that option is nil, 'completion-ignored-extensions' is used.
|
||||
*** New user option 'recentf-exclude-ignored-extensions'.
|
||||
Add the new predicate function 'recentf-exclude-file-by-extension-p' to
|
||||
the list that is the value of the user option 'recentf-exclude' to
|
||||
ignore files with certain extensions. By default, adding this function
|
||||
to 'recentf-exclude' ignores files whose extensions are listed in
|
||||
'completion-ignored-extensions'; you can specify a different list of
|
||||
extensions by customizing the new user option
|
||||
'recentf-exclude-ignored-extensions'.
|
||||
|
||||
** Saveplace
|
||||
|
||||
|
|
|
|||
|
|
@ -116,20 +116,22 @@ must return non-nil to exclude it."
|
|||
:type '(repeat (choice regexp function)))
|
||||
|
||||
(defcustom recentf-exclude-ignored-extensions nil
|
||||
"Optionally ignore file names ending in any string in this list.
|
||||
To use this, add the function `recentf-exclude-ignored-extensions' to
|
||||
the list `recentf-exclude'.
|
||||
If this option is nil, use the values from the variable
|
||||
`completion-ignored-extensions', which see."
|
||||
"List of file-name extensions that `recentf' should ignore.
|
||||
This has effect only if the function `recentf-exclude-file-by-extension-p'
|
||||
is in the list that is the value of `recentf-exclude'.
|
||||
If this option is nil and `recentf-exclude-file-by-extension-p' is a
|
||||
member of `recentf-exclude', a file will be ignored if its extension is
|
||||
in `completion-ignored-extensions', which see."
|
||||
:group 'recentf
|
||||
:version "31.1"
|
||||
:type '(repeat string))
|
||||
|
||||
(defun recentf-exclude-ignored-extensions (file-name)
|
||||
"Return non-nil if FILE-NAME has an ignored extension.
|
||||
The user option `completion-ignored-extensions' determines whether or
|
||||
not a file extension counts as ignored. You can add this function to
|
||||
`recentf-exclude'."
|
||||
(defun recentf-exclude-file-by-extension-p (file-name)
|
||||
"Whether to ignore FILE-NAME due to its file-name extension.
|
||||
This predicate function is meant to be added to the list in `recentf-exclude'.
|
||||
It returns non-nil if FILE-NAME's extension is in the list that is
|
||||
the value of `recentf-exclude-ignored-extensions'; if that variable
|
||||
is nil, this function consults `completion-ignored-extensions' instead."
|
||||
(and-let* ((extension (file-name-extension file-name)))
|
||||
(string-match-p
|
||||
(regexp-opt (or recentf-exclude-ignored-extensions
|
||||
|
|
|
|||
Loading…
Reference in a new issue