Skip to content

Commit 58db206

Browse files
authored
Move errors outside of progn (#78)
Otherwise `dl/download-default-config` always fails.
1 parent 28ec31f commit 58db206

File tree

3 files changed

+9
-6
lines changed
  • modules/shared/config/emacs
  • templates
    • starter/modules/shared/config/emacs
    • starter-with-secrets/modules/shared/config/emacs

3 files changed

+9
-6
lines changed

modules/shared/config/emacs/init.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,10 @@
123123
(lambda (_status)
124124
;; delete-region removes the HTTP headers from the downloaded content.
125125
(delete-region (point-min) (1+ url-http-end-of-headers))
126+
;; save the contents of the buffer to the file.
126127
(write-file default-config-file)))
127-
(message "Default configuration downloaded successfully."))
128-
(error (message "Error occurred while downloading the default configuration.")))))
128+
(message "Default configuration downloaded successfully.")))
129+
(error (message "Error occurred while downloading the default configuration."))))
129130

130131
;; -------------------------
131132
;; Load Org Config or Default

templates/starter-with-secrets/modules/shared/config/emacs/init.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,10 @@
123123
(lambda (_status)
124124
;; delete-region removes the HTTP headers from the downloaded content.
125125
(delete-region (point-min) (1+ url-http-end-of-headers))
126+
;; save the contents of the buffer to the file.
126127
(write-file default-config-file)))
127-
(message "Default configuration downloaded successfully."))
128-
(error (message "Error occurred while downloading the default configuration.")))))
128+
(message "Default configuration downloaded successfully.")))
129+
(error (message "Error occurred while downloading the default configuration."))))
129130

130131
;; -------------------------
131132
;; Load Org Config or Default

templates/starter/modules/shared/config/emacs/init.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,10 @@
123123
(lambda (_status)
124124
;; delete-region removes the HTTP headers from the downloaded content.
125125
(delete-region (point-min) (1+ url-http-end-of-headers))
126+
;; save the contents of the buffer to the file.
126127
(write-file default-config-file)))
127-
(message "Default configuration downloaded successfully."))
128-
(error (message "Error occurred while downloading the default configuration.")))))
128+
(message "Default configuration downloaded successfully.")))
129+
(error (message "Error occurred while downloading the default configuration."))))
129130

130131
;; -------------------------
131132
;; Load Org Config or Default

0 commit comments

Comments
 (0)