mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-16 21:41:27 +00:00
More package-local nicknames
* lisp/emacs-lisp/pkg.el (find-package): Search in local nicknames. * src/pkg.c (pkg_find_package): Fix last change.
This commit is contained in:
parent
e79ff2b6e5
commit
0a107bfd44
2 changed files with 10 additions and 4 deletions
|
|
@ -503,8 +503,11 @@ returned if found.
|
|||
Value is nil if no package with the given name is found. "
|
||||
(if (packagep package)
|
||||
package
|
||||
(let ((name (pkg--stringify-name package "package name")))
|
||||
(gethash name *package-registry*))))
|
||||
(let* ((name (pkg--stringify-name package "package name"))
|
||||
(local (assoc name (package-local-nicknames *package*))))
|
||||
(if local
|
||||
(cdr local)
|
||||
(gethash name *package-registry*)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun delete-package (package)
|
||||
|
|
|
|||
|
|
@ -143,9 +143,12 @@ pkg_find_package (Lisp_Object name)
|
|||
= XPACKAGE (Vearmuffs_package)->local_nicknames;
|
||||
if (!NILP (local_nicknames))
|
||||
{
|
||||
const Lisp_Object entry = CALLN (Fassoc, name, local_nicknames);
|
||||
const Lisp_Object entry = Fassoc (name, local_nicknames, Qnil);
|
||||
if (!NILP (entry))
|
||||
return XCDR (entry);
|
||||
{
|
||||
eassert (PACKAGEP (XCDR (entry)));
|
||||
return XCDR (entry);
|
||||
}
|
||||
}
|
||||
|
||||
return Fgethash (name, Vpackage_registry, Qnil);
|
||||
|
|
|
|||
Loading…
Reference in a new issue