I'm trying to configuring Emacs on Windows and there is one package "use-package" which I wanna to insert in this on my configuration, but when I press to execute on Emacs show the message "Symbol's function definition is void: use-package"
(setq inhibit-startup-message t)
(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/"))
(package-initialize)
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
Sometimes I receive error message "use-package is unavailable."
Debugger entered--Lisp error: (void-function package-installed-p)
(package-installed-p (quote use-package))
(if (package-installed-p (quote use-package)) nil (package-refresh-contents) (package-install (quote use-package)))
eval((if (package-installed-p (quote use-package)) nil (package-refresh-contents) (package-install (quote use-package))) nil)
elisp--eval-last-sexp(nil)
eval-last-sexp(nil)
funcall-interactively(eval-last-sexp nil)
call-interactively(eval-last-sexp nil nil)
command-execute(eval-last-sexp)
You should be able to find use-package
in the list produced with M-x package-list-packages
. If that is the case, then (package-install 'use-package)
should succeed: the package is available on MELPA.
To use it, you have to add
(require 'use-package)
to your .emacs (or equivalent).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With