Commit Graph

359 Commits

Author SHA1 Message Date
Benjamin Reynolds 594fdc8f05 Rename spacemacs/mplist-get functions to be more descriptive
* spacemacs/mplist-get -> spacemacs/mplist-get-values
* spacemacs/plist-get -> spacemacs/mplist-get-value
* refactor spacemacs/mplist-get-value to be defined in terms of mplist-get-values

Ref #10803 See [comment]

[comment]: https://github.com/syl20bnr/spacemacs/pull/10803#issuecomment-395292606
2018-06-14 00:15:49 -04:00
syl20bnr ac247396f3 core: avoid unecessary output in message buffer at startup
Unless in debug mode.
2018-06-10 02:49:51 -04:00
syl20bnr c2211b32e3 core: new function configuration-layer/load-file 2018-06-10 02:46:16 -04:00
syl20bnr 39bf9e516c core: fix warning about quoted lambda in core-configuration-layer.el 2018-06-10 02:45:34 -04:00
syl20bnr a0a3ff0c20 core: refactor the progress bar
Spacemacs is slow to startup so better give it a not buggy progress bar :-)

* Move progress bar code to core-progress-bar.el file
* Remove the counters at the end of the progress bar
* Fix update of the progress bar value
* Fix progress bar size when staring Emacs maximized
2018-06-10 02:32:29 -04:00
Miciah Masters e0b751bee3 Avoid non-idempotent use of push in init code
Replace push with add-to-list in layer init functions and related code.

Modify spacemacs|add-toggle to check for and update an existing toggle in
spacemacs-toggles and only create a new toggle if none already existed.

Replace a conditional push onto erc-packages with use of :toggle.

When initializing which-key, set which-key-replacement-alist to its default
or customized setting before adding all the Spacemacs replacements.  We
want to keep the stock replacements but avoid adding duplicates of the
Spacemacs replacements.

Replace the emacs-lisp-mode-hook lambda with a named function to avoid
adding duplicate hooks (which can add duplicate definitions of the
evil-surround pair).
2018-06-05 22:17:13 -04:00
syl20bnr 92fac263a8 core: re-evaluate layer variables after package configuration
It allows to put package variable with a default value set by spacemacs in
the layer variables. For instance to set treemacs position to the right, you can
now do it like this:

(treemacs :variables treemacs-position 'right)
2018-05-28 11:23:57 -04:00
Miciah Dashiel Butler Masters 78297be625 Fix various typos
* Fix various isolated typos

"apppend" -> "append"

"availabe" -> "available"

"Descripti using ternon" -> "Description"

"you have not them" -> "you don't have them"

"new on" -> "new one"

"plained" -> "curved"

"repel" -> "REPL"

"vairable" -> "variable"

* Fix a few errors in the CoffeeScript layer readme

Add a missing "the".

Correct a reference to the layer as "javascript" to "coffeescript".

Fix the syntax on the link to CoffeeLint.

* Fix typos: "dofile" -> "dotfile"

* Fix typos: "formated" and "formating"

"formated" -> "formatted"

"formating" -> "formatting"

* hy: Fix docstrings in funcs.el

Fix copy-and-pasted docstring text for
spacemacs/hy-shell-eval-current-form-and-go and
spacemacs/hy-shell-eval-region-and-go.

* Fix typos: "indendation" -> "indentation"

* Fix typos: "the the", "a a"

Fix duplicated (or misplaced) articles.

* Fix typos: "wether" -> "whether"

* Fix typos: "intialize" -> "initialize"
2018-05-23 22:12:30 -04:00
syl20bnr 3fa3311985 dump: add function spacemacs/emacs-with-pdumper-set-p 2018-05-20 03:58:48 -04:00
syl20bnr ea1b4815b8 dump: improve messages feedback when dumping 2018-05-20 03:58:48 -04:00
syl20bnr 4f75fe5e3b dump: add command line parameter --force-dump
If provided on the command line then force a redump of Emacs not matter what.
2018-05-20 03:58:48 -04:00
syl20bnr af4b4df031 dump: fix warning about layer list changed outside of dotfile func. 2018-05-20 03:58:48 -04:00
syl20bnr 5dec672861 dump: new function configuration-layer/message 2018-05-20 03:58:48 -04:00
syl20bnr fe0e743ab5 dump: dump Emacs only if the layer list has changed 2018-05-20 03:58:48 -04:00
syl20bnr 89035d837b dump: add dotspacemacs variables to control the dump
* new dotvariable dotspacemacs-emacs-pdumper-executable-file
* new dotvariable dotspacemacs-emacs-dumper-dump-file
* dump emacs if dotspacemacs-emacs-pdumper-executable-file is non nil
2018-05-20 03:58:48 -04:00
syl20bnr 14b71afb42 dump: auto-dump emacs on load if layer list has changed
* rename core-dump.el to core-dumper.el
* add function spacemacs/dump-emacs
* explicitly load core-dumper.el file in init.el
* asynchronously dump emacs if layer list has changed, see special buffer
  *spacemacs-dumper* for the output.
2018-05-20 03:58:48 -04:00
syl20bnr 2580e43c66 Add support for dumping Spacemacs
Create dump with:

   ./emacs --batch -l ~/.emacs.d/dump-init.el \
           -eval '(dump-emacs-portable "spacemacs.pdmp")'

Load dump with:

   ./emacs --dump-file=spacemacs.pdmp

User can require/load additional libraries in new dotfile function:

   dotspacemacs/user-load
2018-05-20 03:57:54 -04:00
syl20bnr 862e81e49a core: hide loading message at startup unless --debug-init 2018-05-20 02:44:34 -04:00
syl20bnr e9b8ed34c5 core: fix bug where layers.el files could be loaded multiple times 2018-05-20 02:33:28 -04:00
syl20bnr b58a1d7b73 core: fix bug where packages.el files were loaded multiple times 2018-05-20 02:32:57 -04:00
syl20bnr 59d8be19d8 core: fix not found packages with dotspacemacs-install-packages all
Temporary fix, need to find the root cause.
2018-01-25 00:11:15 -05:00
Aaron Jensen c86940c4f0 core: Use https for org package repo 2018-01-22 23:34:54 -05:00
syl20bnr 617d63095a core: install bootstrap and pre packages first
Fix issues with built-in org being lodaed before org-plus-contrib.
2018-01-22 11:33:13 -05:00
syl20bnr 1580dfd094 core: fix path to rollback slots 2018-01-22 11:23:59 -05:00
syl20bnr 723604d904 core: initialize Org earlier to prevent version conflicts
Should resolved all our issues with the wrong version of Org being loaded
before Org-plus-contrib! 🎉
2018-01-21 12:15:51 -05:00
syl20bnr 4ecd015fe8 core: process all post-init function after all the init functions
With this commit, the new loading order for package configuration is:
- pre-init functions for all packages
- init function of all packages
- post-init functions for all packages
2018-01-11 23:52:18 -05:00
syl20bnr 80a10f79db core: fix alphabetical order of package configuration loading
It was reversed in commit e9fb5285f4
2018-01-11 10:43:44 -05:00
syl20bnr e9fb5285f4 core: execute all pre-init function before init and post-init
Fixes loading order issues when declaring use-package hooks.

Fixes #9979
2018-01-10 23:33:15 -05:00
Igor Avdeev 709782bdc1 Fix handling of windows paths of package archives
- the configuration-layer//resolve-package-archives function was adding
  extra `http://` for windows paths
2018-01-10 00:13:01 -05:00
syl20bnr 326965d4ce Happy New Year 2018! 2018-01-04 02:00:25 -05:00
syl20bnr 2ed3946d7b emacs-lisp: improve nameless configuration
- Change nameless prefix to > instead of default :
- Change toggle to SPC m >
- Set nameless separator to nil in order to make it work with any type or separator
- Add diminish unicode ⧁
- Define some default global aliases for Spacemacs source code
- Rename layer variable emacs-lisp-nameless-mode to emacs-lisp-hide-namespace-prefix
- Make variable nameless-current-name safe as a local variable for string values
- Set nameless prefix for core-configuration-layer.el
2017-12-17 23:30:24 -05:00
duianto 26c6623148 Remove stray characters from output-dir argument
The output-dir argument seems to have gotten some stray characters.
2017-12-01 18:44:28 +02:00
syl20bnr f290565098 core: new dotfile variable dotspacemacs-use-spacelpa
If non-nil then Spacelpa repository is the primary source to install
a locked version of packages. If nil then Spacemacs will install the lastest
version of packages from MELPA. (default nil)

The default value will be true when we bust all the major bugs.
2017-11-12 09:33:58 -05:00
syl20bnr a363f85d33 core: for elpa dir, replace branch name by a variable set in .lock
New variable configuration-layer-elpa-subdirectory set in .lock file.
Now users creating a branch based on develop or master won't reinstall
all the packages in a new elpa directory.
2017-11-01 23:23:34 -04:00
syl20bnr 8a5771559e core: change scope of elpa stable variables
make them public when they are used outside of core-configuration-layer.el
make them private when they are used only on this file.
2017-11-01 23:23:34 -04:00
syl20bnr 0ea72bcde7 core: fix computation of elpa directory
Use const input for function configuration-layer/elpa-directory
New const variables used as input:
- configuration-layer--elpa-root-directory
- configuration-layer--rollback-root-directory

Fix computation of elpa directory by using expand-file-name.

Fixes #9805
2017-10-31 00:35:18 -04:00
syl20bnr d15772fadc core: add support for GnuPG signed Spacelpa archives
New dotfile variable dotspacemacs-verify-spacelpa-archives
Default value is nil for now, users wanting to help testing this feature can
set it to t and delete the directory ~/.emacs.d/.cache/stable-elpa and restart
Emacs to download the Spacelpa archive and verify it.

Update function configuration-layer/stable-elpa-download-tarball to download
signature files as well.

Update function configuration-layer//stable-elpa-untar-archive to verify the
downloaded archive using epg library.

Example of signature files can be found here:
https://github.com/syl20bnr/spacelpa/releases/tag/v0.300
2017-10-30 00:57:48 -04:00
syl20bnr 41dcccc22b core: add spacemacs-buffer/error like spacemacs-buffer/warning
New function spacemacs-buffer/error that gather all the errors and then display
them in the startup buffer under a new list entry `Errors:`.
Add shortcut `e` to go to errors list entry.
New private function configuration-layer//error to wrap spacemacs-buffer/error
and increment the startup error count that is displayed in a red mode-line when
startup process finishes.
2017-10-29 22:01:39 -04:00
syl20bnr 247b63dac1 core: add `(please wait)` msg when downloading spacelpa 2017-10-29 21:47:08 -04:00
syl20bnr e63febeafd core: add optional parameter to spacemacs/set-mode-line
redisplay: it non nil then force refresh of the display
2017-10-29 21:43:43 -04:00
syl20bnr 2a11da4ad7 core: add check for gzip executable on Windows to install spacelpa 2017-10-29 21:39:35 -04:00
syl20bnr 65d5e42b8e core: add support for stable ELPA repository hosted on GitHub
Use the official spacelpa ELPA repository.
address: https://github.com/syl20bnr/spacelpa

ELPA repository configuration is now in a file called .lock at the root of the
git repository. Its goal is to setup the ELPA repositories for a given branch
and it should not be modified! The philosophy of Spacemacs is to never fork the
git repository and this lock file has been put in the repo on purpose.

Only the master branch will have a .lock file that points to spacelpa, the
develop branch won't use the stable ELPA repository and will continue to behave
like it always did.

BUT for testing purpose and until the first major version of Spacemacs that uses
the stable ELPA repo is released I push a .lock file to develop branch that
points to spacelpa.

I understand that some people can be annoyed by this so the variable
configuration-layer--elpa-archives can be overriden by putting a setq in your
dotfile in the user-init function like this:

  (setq configuration-layer--elpa-archives
        '(("melpa"    . "melpa.org/packages/")
          ("org"      . "orgmode.org/elpa/")
          ("gnu"      . "elpa.gnu.org/packages/")))
2017-10-29 01:20:25 -04:00
syl20bnr dc58801c7d core: refactor shadow mechanism
Shadowing is now control by layer property ':can-shadow' only.
can-shadow is a commutative relation, if layer1 can shadow layer2 then layer2
can shadow layer1.
the shadow operator is a binary operator accepting two layer names, it is not
commutative and the order of the operands is determined by the order of the
layers in the dotfile (like the ownership stealing mechanism).

If ':can-shadow' is set explicity to nil in the dotfile then the layer won't
shadow any layer.
For instance to install both ivy and helm layer:

   (setq dotspacemacs-configuration-layers
   '(
     ivy
     (helm :can-shadow nil)
     )

note that due to the commutative relation the above example can also be
written (in this case, ':can-shadow' should be read ':can-be-shawdowed'):

   (setq dotspacemacs-configuration-layers
   '(
     (ivy :can-shadow nil)
     helm
     )
2017-09-25 23:07:22 -04:00
syl20bnr 95699ee61c core: add layer shadowing system
Layers can now declare in their layers.el file that they shadow one or more
layers using the following functions:

- configuration-layer/shadow-layers
- configuration-layer/shadow-layer

Those function are commutative so:
    (configuration-layer/shadow-layer 'layer1 'layer2)
is the same as
    (configuration-layer/shadow-layer 'layer2 'layer1)
and means that
layer1 shadows layer2
and
layer2 shadows layer1

The typical use-case is helm and ivy layers. Helm shadows the ivy layer and
Ivy shadows the helm layer.

Shadowing is sensitive to the order of declaration of layers in the dotfile,
for instance:

    (setq dotspacemacs-configuration-layers '(
      helm
      ivy
     ))

means that ivy shadows helm so helm layer is effectively ignored,
whereas

    (setq dotspacemacs-configuration-layers '(
      ivy
      helm
     ))

means that helm shadows ivy so ivy layer is effectively ignored.

This mechanism can be turned off using the :can-shadow keyword:

    (setq dotspacemacs-configuration-layers '(
      ivy
      (helm :can-shadow nil)
     ))

means that both ivy and helm layers will be installed (not recommended in this
case)

Note that the `:can-shadow` mechanism will be fully implemented in a next
commit.
2017-09-21 23:56:09 -04:00
syl20bnr 82220fce3a Remove old wording "contribution layer" 2017-08-28 11:33:55 -04:00
Alex Coventry 937a7c3f0c Fix reference to cfgl-package-distant-p 2017-08-27 22:12:58 -04:00
syl20bnr 2bd08116aa core: fix update of packages
t parameter is not needed anymore since the passed list distant-packages is
already filtered to contain only used packages.

Fixes #9420
2017-08-13 13:21:54 -04:00
syl20bnr 06d7ddbeea core rename argument to NO-CONFIRMATION
instead of `always-upate`.
2017-08-12 20:48:35 -04:00
syl20bnr 6afa753848 core: remove variable configuration-layer--used-distant-packages
- remove variable configuration-layer--used-distant-packages
- rename function configuration-layer//get-distant-packages to
  configuration-layer//filter-distant-packages to better reflect what it does
- Add argument PREDICATE to configuration-layer//filter-distant-packages
- New cfgl-package methods: cfgl-package-used-p and cfgl-package-distant-p
- Add unit tests
2017-08-12 20:48:35 -04:00
JAremko b7955d66d4 Assume "no" for lazy installation in the --batch mode 2017-07-25 01:56:13 +03:00