Skip to content

Commit

Permalink
Fix use-package not being installed on first run
Browse files Browse the repository at this point in the history
  • Loading branch information
jordan4ibanez committed Sep 6, 2023
1 parent 3af5ac2 commit db58921
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
;; I hope the user followed the directions or this ain't gonna work. :T
(add-to-list 'load-path "~/.emacs.d/vmacs/")

;; This will automatically fix use-package not being installed!
(let ((cool-file ".vmacs-fully-initialized"))
(unless (file-exists-p cool-file)
(progn
(write-region "" "" cool-file)
(package-initialize)
(package-refresh-contents)
(package-install 'use-package)
(print "Vmacs first time run initialized!"))))

;;pd Enable MELPA.
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
Expand Down

2 comments on commit db58921

@olnw
Copy link

@olnw olnw commented on db58921 Sep 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use-package is included with Emacs since ver. 29.1 (which you should really be using). You might want to conditionally install it based on the Emacs version.

And you don't need a progn inside that unless form.

@jordan4ibanez
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Progn is a habit for me :P I'm going to copy this into the re-opened issue

Please sign in to comment.