[emacs] add straight setup

This commit is contained in:
Kaz Saita(raspi4) 2024-03-19 15:23:58 +09:00
parent 490c0cd6a4
commit 032ad387c4
2 changed files with 37 additions and 0 deletions

View file

@ -0,0 +1,25 @@
;; init.el - part of dotfiles
;; https://git.kinoshita-lab.org/kazbo/dotfiles
;; setup strait
;; cf. https://github.com/radian-software/straight.el
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name
"straight/repos/straight.el/bootstrap.el"
(or (bound-and-true-p straight-base-dir)
user-emacs-directory)))
(bootstrap-version 7))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
;; use-package
(straight-use-package 'use-package)
(setq straight-use-package-by-default t)

View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
echo "configuring emacs.."
src_emacs_dir=`pwd`/../emacs.d
dest=${HOME}/.emacs.d
if [ -d ${dest} ]; then
echo "~/.emacs.d/ exists. abort"
exit 1
fi
ln -s ${src_emacs_dir} ${dest}
echo "done."