core: new variable spacemacs-insecure
Revert "Parse CLI args after dotspacemacs/init"
This reverts commit 0a35502de4
.
We cannot delay the parsing of CLI params since we need their values
early during the loading process (i.e. debug info).
Replace the previous commit with a new variable `spacemacs-insecure`
which takes the value of --insecure boolean parameter.
This commit is contained in:
parent
0a35502de4
commit
419eb51836
|
@ -13,6 +13,9 @@
|
|||
"If non-nil force the current emacs instance to resume layouts
|
||||
at start time despite the value of `dotspacemacs-auto-resume-layouts'.")
|
||||
|
||||
(defvar spacemacs-insecure nil
|
||||
"If non-nil force Spacemacs to operate without secured protocols.")
|
||||
|
||||
(defun spacemacs//parse-command-line (args)
|
||||
"Handle Spacemacs specific command line arguments.
|
||||
The reason why we don't use the Emacs hooks for processing user defined
|
||||
|
@ -42,7 +45,7 @@ arguments is that we want to process these arguments as soon as possible."
|
|||
i (1+ 1)))
|
||||
(setq spacemacs-debugp t))
|
||||
("--insecure"
|
||||
(setq dotspacemacs-elpa-https nil))
|
||||
(setq spacemacs-insecure t))
|
||||
("--no-layer"
|
||||
(setq configuration-layer-no-layer t))
|
||||
("--distribution"
|
||||
|
|
|
@ -236,6 +236,7 @@ The returned list has a `package-archives' compliant format."
|
|||
(if (string-match-p "http" (cdr x))
|
||||
(cdr x)
|
||||
(concat (if (and dotspacemacs-elpa-https
|
||||
(not spacemacs-insecure)
|
||||
;; for now org ELPA repository does
|
||||
;; not support HTTPS
|
||||
;; TODO when org ELPA repo support
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
(require 'subr-x nil 'noerror)
|
||||
(require 'page-break-lines)
|
||||
(require 'core-debug)
|
||||
(require 'core-command-line)
|
||||
(require 'core-dotspacemacs)
|
||||
(require 'core-emacs-backports)
|
||||
(require 'core-release-management)
|
||||
|
@ -78,7 +79,6 @@ the final step of executing code in `emacs-startup-hook'.")
|
|||
(dotspacemacs/load-file)
|
||||
(require 'core-configuration-layer)
|
||||
(dotspacemacs|call-func dotspacemacs/init "Calling dotfile init...")
|
||||
(require 'core-command-line)
|
||||
(dotspacemacs|call-func dotspacemacs/user-init "Calling dotfile user init...")
|
||||
(setq dotspacemacs-editing-style (dotspacemacs//read-editing-style-config
|
||||
dotspacemacs-editing-style))
|
||||
|
|
Loading…
Reference in New Issue