all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: emacs-devel@gnu.org
Cc: Artur Malabarba <bruce.connor.am@gmail.com>
Subject: Re: [Emacs-diffs] malabarba/package.el-reload-files-on-upgrade 300dbb1 1/2: * emacs-lisp/package.el (package--list-loaded-files): New function
Date: Wed, 10 Dec 2014 22:15:38 -0500	[thread overview]
Message-ID: <jwvzjauq3xv.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <E1XyrMO-0005Hb-Rx@vcs.savannah.gnu.org> (Artur Malabarba's message of "Thu, 11 Dec 2014 00:12:00 +0000")

> -(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 x)))))

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".


        Stefan



       reply	other threads:[~2014-12-11  3:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20141211001200.20245.22729@vcs.savannah.gnu.org>
     [not found] ` <E1XyrMO-0005Hb-Rx@vcs.savannah.gnu.org>
2014-12-11  3:15   ` Stefan Monnier [this message]
     [not found]     ` <CAAdUY-KmGHmVmoqH-hwSafd2v+EA3JnFijYb=QSyHsYASr0Trg@mail.gmail.com>
2014-12-11  8:34       ` [Emacs-diffs] malabarba/package.el-reload-files-on-upgrade 300dbb1 1/2: * emacs-lisp/package.el (package--list-loaded-files): New function Artur Malabarba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvzjauq3xv.fsf-monnier+emacsdiffs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=bruce.connor.am@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.