[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scratch/pkg 9b3711f2d06: Make some parameters &optional

From: Gerd Moellmann
Subject: scratch/pkg 9b3711f2d06: Make some parameters &optional
Date: Wed, 20 Dec 2023 05:15:23 -0500 (EST)

branch: scratch/pkg
commit 9b3711f2d06d24f46714d509b91116f46038146c
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>

    Make some parameters &optional
 lisp/emacs-lisp/pkg.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/emacs-lisp/pkg.el b/lisp/emacs-lisp/pkg.el
index 9f84874f4e2..f905e6c390b 100644
--- a/lisp/emacs-lisp/pkg.el
+++ b/lisp/emacs-lisp/pkg.el
@@ -179,7 +179,7 @@ Otherwise assume that "
              (package-name package) name))))
-(cl-defun buffer-package (buffer)
+(cl-defun buffer-package (&optional (buffer (current-buffer)))
   "Return the value of *package* set in BUFFER."
   (default-buffer-local-value '*package* buffer))
@@ -401,8 +401,9 @@ registered package."
   (package-%nicknames (pkg--package-or-lose package)))
-(defun package-local-nicknames (package)
+(cl-defun package-local-nicknames (&optional (package *package*))
   "Return an alist of package-local nicknames of PACKAGE.
+Optional PACKAGE defaults to the current package.
 If PACKAGE is not a package object already, it must be the name of a
 registered package."
   (package-%local-nicknames (pkg--package-or-lose package)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]