unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Ergus <spacibba@aol.com>
To: help-gnu-emacs@gnu.org
Subject: package-installed-p issue.
Date: Sat, 9 Jan 2021 03:47:56 +0100	[thread overview]
Message-ID: <20210109024756.en34g7b7ol45qtqs@Ergus> (raw)
In-Reply-To: 20210109024756.en34g7b7ol45qtqs.ref@Ergus

Hi I'm trying to simplify some of my code in the init file and
something like:

(package-installed-p 'use-package)

Triggers an error so I need to do something like:

(unless (fboundp 'package-installed-p)
     (require 'package))

(unless (package-installed-p 'use-package)
   ...
)

My question is: Shouldn't package-installed-p be an autoload?

Is there a reason why it is not an autoload?

Some time ago package-installed-p was loaded when calling package-initialize
but now such call is not required anymore. So what's the right way?

Thanks in advance,
Ergus



       reply	other threads:[~2021-01-09  2:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210109024756.en34g7b7ol45qtqs.ref@Ergus>
2021-01-09  2:47 ` Ergus [this message]
2021-01-09 16:53   ` package-installed-p issue Stefan Monnier
2021-01-09 18:02   ` Philipp Stephani

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=20210109024756.en34g7b7ol45qtqs@Ergus \
    --to=spacibba@aol.com \
    --cc=help-gnu-emacs@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).