[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] malabarba/package.el-reload-files-on-upgrade 300dbb1 1
Re: [Emacs-diffs] malabarba/package.el-reload-files-on-upgrade 300dbb1 1/2: * emacs-lisp/package.el (package--list-loaded-files): New function
Wed, 10 Dec 2014 22:15:38 -0500
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
> -(defun package-built-in-p (package &optional min-version)
> - "Return true if PACKAGE is built-in to Emacs.
> -Optional arg MIN-VERSION, if non-nil, should be a version list
> -specifying the minimum acceptable version."
> - (if (package-desc-p package) ;; was built-in and then was converted
> - (eq 'builtin (package-desc-dir package))
> - (let ((bi (assq package package--builtin-versions)))
> - (cond
> - (bi (version-list-<= min-version (cdr bi)))
> - ((remove 0 min-version) nil)
> - (t
> - (require 'finder-inf nil t) ; For `package--builtins'.
> - (assq package package--builtins))))))
Why remove this function?
> +(defun package-list-loaded-files (dir)
> + "List all files in DIR which correspond to loaded features.
> +Returns the `file-name-base' of each file, sorted by most recently
> +loaded last."
I don't really like the assumption that package names don't have slash
in them (this is false for CEDET, for example, and I think that AUCTeX
also uses names with slash for its style files).
But I guess it's OK for now.
> + (mapcar (lambda (x) (let* ((path (file-name-sans-extension
> + (file-truename
> + (find-library-name (file-name-base
We follow the convention to only use "path" to mean a list of
directories such as $PATH, load-path, and things like that.
I.e. "/foo/bar/baz" is a *file* name, not a "path".
- Re: [Emacs-diffs] malabarba/package.el-reload-files-on-upgrade 300dbb1 1/2: * emacs-lisp/package.el (package--list-loaded-files): New function,
Stefan Monnier <=