1

Update user/download-latest-init-file function

This commit is contained in:
Jessie Hildebrandt 2022-12-19 20:51:16 -05:00
parent 2ec6a8d7bd
commit 5fbc709f3f

14
init.el
View File

@ -212,12 +212,16 @@ init file, which initializes the package manager during compile time."
(defun user/download-latest-init-file () (defun user/download-latest-init-file ()
"Download the latest user init file from jessieh.net/emacs. "Download the latest user init file from jessieh.net/emacs.
The user init file will be automatically recompiled after downloading." The user init file will be automatically recompiled after downloading.
If `user/init-file' points to a symlink, nothing will be downloaded."
(interactive) (interactive)
(when (yes-or-no-p "Download latest init file from jessieh.net/emacs? ") (if (file-symlink-p user/init-file)
(message "Updating init file...") (message "%s is a symlink, operation aborted. Please update the init file manually." user/init-file)
(url-copy-file "https://jessieh.net/emacs" user/init-file :ok-if-already-exists) (when (yes-or-no-p "Download latest init file from jessieh.net/emacs? ")
(user/byte-compile-init-files))) (message "Updating init file...")
(url-copy-file "https://jessieh.net/emacs" user/init-file :ok-if-already-exists)
(user/byte-compile-init-files))))
(defun user/select-minibuffer-window () (defun user/select-minibuffer-window ()
"Select the minibuffer window if it is active." "Select the minibuffer window if it is active."