[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 2bf96389f7 3/3: Make recentf-elements obsolete
From: |
Stefan Kangas |
Subject: |
master 2bf96389f7 3/3: Make recentf-elements obsolete |
Date: |
Wed, 22 Jun 2022 19:21:58 -0400 (EDT) |
branch: master
commit 2bf96389f7e28a2a0ba74606e84fc0aafd3009e6
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
Make recentf-elements obsolete
* lisp/recentf.el (recentf-elements): Make obsolete. Update
callers.
---
lisp/recentf.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/lisp/recentf.el b/lisp/recentf.el
index fa467afa00..b10f4d0ed0 100644
--- a/lisp/recentf.el
+++ b/lisp/recentf.el
@@ -515,10 +515,6 @@ If non-nil it must contain a list of valid menu-items to
be appended
to the recent file list part of the menu. Before calling a menu
filter function this variable is reset to nil.")
-(defun recentf-elements (n)
- "Return a list of the first N elements of the recent list."
- (seq-take recentf-list n))
-
(defsubst recentf-make-menu-element (menu-item menu-value)
"Create a new menu-element.
A menu element is a pair (MENU-ITEM . MENU-VALUE), where MENU-ITEM is
@@ -558,7 +554,7 @@ This a menu element (FILE . FILE)."
"Return a list of the first N default menu elements from the recent list.
See also `recentf-make-default-menu-element'."
(mapcar #'recentf-make-default-menu-element
- (recentf-elements n)))
+ (seq-take recentf-list n)))
(defun recentf-apply-menu-filter (filter l)
"Apply function FILTER to the list of menu-elements L.
@@ -1395,6 +1391,11 @@ buffers you switch to a lot, you can say something like
the following:
(define-obsolete-function-alias 'recentf-trunc-list #'seq-take "28.1")
+(defun recentf-elements (n)
+ "Return a list of the first N elements of the recent list."
+ (declare (obsolete "use `(seq-take recentf-list n)'." "29.1"))
+ (seq-take recentf-list n))
+
(provide 'recentf)
(run-hooks 'recentf-load-hook)