Commit graph

1208 commits

Author SHA1 Message Date
Robert O'Connor e9ff9f09c6 Remove trailing whitespace from all files 2017-03-26 13:06:43 -04:00
deb0ch 8226f0070f do not filter for alternating buffers 2017-03-24 22:29:52 +03:00
Steven Allen 6b08224ad7 Always return t from use-package pre/post hooks.
Hooks that don't do this will prevent any further configuration of the package.

Docs: 53bf803f1d/use-package.el (L125)
Context: https://github.com/syl20bnr/spacemacs/pull/8543/files#r106792261
2017-03-24 14:26:56 +03:00
syl20bnr 0a338d03ed core: jump-handers, :async can now take a predicate function
Allow to check wether a precondition is met before actually executing an async
jump handler.
2017-03-19 12:40:36 -04:00
bmag e624e8f0fa Update spacemacs-theme
Updated to commit:
80f40d21ff
2017-03-13 21:13:37 +02:00
bmag a1c02ba323 dsm-line-numbers: support parent modes, fix mode restriction
Specifying parent modes (e.g. prog-mode) in :enabled-for-modes and
:disabled-for-modes keys in dotspacemacs-line-numbers catches derived
modes (e.g. c-mode) as well.

Fix bug where an empty :disabled-for-modes and a non-empty :enabled-for-modes
enabled line numbers everywhere, instead of only in modes specified in
:enabled-for-modes. (see https://github.com/syl20bnr/spacemacs/issues/8482)

Add auxiliary function spacemacs/derived-mode-p, similar to derived-mode-p but
takes a major-mode as an argument instead of using the current major-mode.
2017-03-13 21:04:00 +02:00
syl20bnr 6212795523 core: allow users to set custom-file variable
In this case Spacemacs won't write custom variables to the
dotspacemacs/emacs-custom-settings variable.

Move setq and add-advice to spacemacs/initialize-custom-file which is now
called in spacemacs/init function just after dotspacemacs/user-init function.
2017-03-12 12:10:21 -04:00
syl20bnr af6727c617 core: fix indentation rules for declare-prefix functions 2017-02-12 23:44:52 -05:00
syl20bnr c5fd3dac04 core: fix theme application
Force theme do be disabled when applying them at the end of loading.
Fix computation of theme package directory when theme is a symbol.

Fixes #8319
2017-02-11 17:23:14 -05:00
syl20bnr 252547aa81 core: add support for :location keyword in dotspacemacs-themes
New functions:
- configuration-layer/get-location-directory which return the location on disk
given a location
- spacemacs//get-theme-directory which returns the location on disk of the
theme

Add note in documentation to warn about the directory name when :location local
is used, the directory name is the package name not the theme name.
2017-02-05 23:47:17 -05:00
syl20bnr be7ba7f920 core: filter out private vars in dotspacemacs/get-variable-string-list 2017-02-05 20:28:10 -05:00
syl20bnr ddfb996b20 line number: broke enable-p condition into functions
Also remove the docstring about SPC h SPC as it is already implied for the other
options in the dotfile.

Note that this commit modifies one condition, namely disabled mode condition.
It removes the first test:

    (not (spacemacs/mplist-get dotspacemacs-line-numbers :enabled-for-modes))

as it is not necessary since we have a `or` in the enable-p condition. Disabled
modes will be checked only if the current major mode is not explicitly enabled
(as intented).
2017-02-05 13:10:30 -05:00
deb0ch a28e17c4d3 line numbers: finer configuration of line numbers activation 2017-02-05 12:47:19 -05:00
syl20bnr a85634cd5a core: display message in mode-line while uninstalling packages 2017-02-03 11:40:19 -05:00
syl20bnr 5b9d368a5f core: fix loading of some themes
Fix loading of some themes like sanityinc-tomorrow-night
2017-02-02 18:28:51 -05:00
syl20bnr 747bd7c6fb core: fix broken theme application in terminal
Fixes #8252
2017-02-01 23:26:22 -05:00
syl20bnr 415b29b140 core: dotspacemacs-themes entries now accept package properties
It is now possible to use package properties like :location in
dotspacemacs-themes.

Added hooks ran at the beginning and end of configuration-layer/sync:
- configuration-layer-pre-sync-hook
- configuration-layer-post-sync-hook

configuration-layer-pre-sync-hook is used to hook the new function
spacemacs//add-theme-packages-to-additional-packages. This new function updates
dotspacemacs--additional-theme-packages variables.

Update documentation to mention the new feature.
2017-02-01 22:59:03 -05:00
deb0ch a23761c383 minor elisp convention fix 2017-01-31 17:54:19 +01:00
syl20bnr b3c8ebc816 core: improve theme application
Add all theme packages defined in dotspacemacs-themes to the variable
dotspacemacs-additional-packages and delay the application of user theme at the
end of startup (only when user theme cannot be applied at the very beginning
of Emacs startup).

This has nice properties:
- we leverage the layer system to handle the theme packages installation and
  cleanup.
- theme packages are automatically owned by the dotfile preventing them from
being garbage collected.
- the protected package mechanism is now obsolete since themes were the last
packages using it. This mechanism may be removed in a near future.

Thanks to TheBB for the initial idea.
2017-01-25 23:37:57 -05:00
syl20bnr 05c8ac8ba7 core: don't reset mode-line when displaying text in spacemacs home buffer 2017-01-25 23:37:57 -05:00
syl20bnr 90fe6074eb core: add some feedback test in mode-line during startup
A message is displayed while indexing layers and installing packages.
2017-01-25 23:37:57 -05:00
d12frosted 5be07e90d2 temporarily fix value of configuration-layer--elpa-archives 2017-01-25 10:38:59 +02:00
syl20bnr 9ac779a2e4 core: import spacemacs-theme into libs
Distribute spacemacs-theme with Spacemacs so we don't need to download the
package of the theme at startup. It was delaying the display of the home buffer.

Now Spacemacs fallback to spacemacs-dark theme if the user theme cannot be
applied. Spacemacs then tries to install and reapply the user theme. If
successful, at the subsequent startups the user theme is applied right away
instead of spacemacs-dark. If the installation failed then we display a warning
informing the user and suggesting some actions.

There is now no package left to be installed manually at the start of Spacemacs.
2017-01-25 00:30:31 -05:00
syl20bnr dcfa00488e Minor comment change 2017-01-25 00:28:15 -05:00
syl20bnr 66d359f364 core: fix startup graphical glitch
Since Emacs 25.1 I got screen flickering when packages are installed on
startup.
Shuffling the UI elements removal seems to fix it on my system using X.

It may have the opposite effect on other users setup.
2017-01-25 00:24:02 -05:00
syl20bnr 973f6fe5ae core: import ido-vertical-mode into core/libs
It provides more intuitive way to display the wizard.
2017-01-23 23:52:57 -05:00
syl20bnr 1afa0f8faa core: import quelpa and package-build into core/libs
Remove the need to fetch these libs from the internet.
2017-01-23 23:52:57 -05:00
syl20bnr 1a9c5ea8ad core: force installation of org-contrib-plus instead of org
Thanks to the power provided by Lisp, hack package-install to patch on the
fly org and org dependencies installations in order to install org-plus-contrib
instead.
2017-01-22 23:23:39 -05:00
syl20bnr 65fea08de3 core: add support for local elpa repositories
It is now possible to add local elpa repositories to private variable
configuration-layer--elpa-archives for instance:

(defvar configuration-layer--elpa-archives
  '(("spacelpa" . "~/.emacs.d/.cache/spacelpa/"))
  "List of ELPA archives required by Spacemacs.")

New functions:
- configuration-layer//package-archive-absolute-pathp
- configuration-layer//package-archive-local-pathp
2017-01-22 17:55:59 -05:00
syl20bnr 1846984bd0 core: add support for interpreter-mode-alist to layer lazy installation
Update python lazy declaration as an example.
Still need to update the auto-layer.el file for other modes.
2017-01-22 13:41:04 -05:00
syl20bnr 220bbabd36 core: fix computation of package installation lazyness
Fix computation of package installation lazyness when the variable
dotspacemacs-enable-lazy-installation is set to all.

Improve methods on cfgl-layer class to be able to return a list of packages with
or without their properties.

Update tests to reflect the changes.
2017-01-22 13:37:12 -05:00
syl20bnr 7dde962ec8 core: Improve configuration-layer/create-elpa-repository
Fetch the archives before creating the elpa repository.
2017-01-22 00:40:02 -05:00
syl20bnr 984a3f956b core: fix delayed warning display in emacs 25.5
Discard the warnings produced when packages are byte-compiled which fix the
popup of the *Compile-Log* window at the end of the installation.
If emacs has been launch with argument `--debug-init` we don't discard the
warnings.
2017-01-22 00:37:10 -05:00
syl20bnr 6dac7d8ce9 core: correctly index packages installed by spacemacs core
Function configuration-layer/load-or-install-package now correctly add the
installed packages to indexed-package hash map.
Those packages are put under the special layer `system`.
2017-01-22 00:34:08 -05:00
syl20bnr 9909a95ad3 core: add ~ character to detect local package archives 2017-01-22 00:32:34 -05:00
syl20bnr 333f762b36 core: name startup-hook function and move spacemacs-buffer//startup-hook 2017-01-22 00:31:30 -05:00
syl20bnr c6bf7f7664 core: new functions to synchronize distant ELPA packages with local repo
New functions:
configuration-layer//download-elpa-file
configuration-layer//sync-elpa-packages-files
2017-01-18 00:24:14 -05:00
syl20bnr 273e1e94d6 core: add function to create spacelpa archive-contents
This is the first stone toward Spacemacs own ELPA repository.
New function configuration-layer/create-spacelpa-repository which creates the
archive-contents file for the Spacelpa repository containing all the ELPA
packages supported by Spacemacs (and only them).
2017-01-17 00:24:32 -05:00
syl20bnr afb2efcf56 core: minor functions renaming in core-configuration-layer.el
configuration-layer//get-packages-dependencies --> configuration-layer//get-packages-upstream-dependencies-from-alist
 configuration-layer//get-implicit-packages --> configuration-layer//get-implicit-packages-from-alist
2017-01-17 00:23:04 -05:00
syl20bnr cf5dac00ad core: move and rename spacemacs//get-package-directory
Move it to core-configuration-layer.el
Rename it to configuration-layer/get-elpa-package-install-directory
2017-01-17 00:20:59 -05:00
syl20bnr 14e690d82c core: add parameter to configuration-layer/make-all-packages
New parameter `skip-layer-discovery', if non-nil then rediscovery of layers
is skipped (used essentialy for the tests).
2017-01-15 23:14:20 -05:00
syl20bnr 2875ed4b0c Speedup SPC h SPC for both helm and ivy
The layer files were loaded twice because the global variable controlling
the loading of layer files was not explicity set at the layer discovery phase.
2017-01-15 22:19:56 -05:00
syl20bnr 3162f0e19b core: factorize code in configuration-layer/make-all-packages 2017-01-15 22:19:56 -05:00
syl20bnr c66f13b7cb core: fix preparation-function signature in publish-doc and exclude dockerfiles
Also respect 80 chars per lines a various places
2017-01-12 23:19:53 -05:00
syl20bnr 105a0a1ad8 Fix variable is void: system-info in spacemacs/report-issue
Fixes #8028
2017-01-12 22:19:39 -05:00
syl20bnr fb27ede558 Bump year in copyright headers
Happy New Year 2017!
2017-01-05 23:08:17 -05:00
d12frosted e87a251138
align list of supported themes 2017-01-04 22:12:14 +02:00
Jeffrey Enns 0a418c6286
Add missing base16 themes 2017-01-04 22:10:56 +02:00
syl20bnr 74fdbb6795 Refactor and simplify company backends declaration
Enabling a company backend for a specific mode was a tedious tasks with code
scattered at different locations, one for local variable definitions, one for
company hook function definitions and another where the backends were pushed to
the local variables (which was problematic, since we ended up pushing the same
backends over and over again with `SPC f e R`, pushes have been replaced by
add-to-list calls in the new macro).

All these steps are now put together at one place with the new macro
spacemacs|add-company-backends, check its docstring for more info on its
arguments.

This macro also allows to define arbitrary buffer local variables to tune
company for specific modes (similar to layer variables via a keyword :variables)

The code related to company backends management has been moved to the
auto-completion layer in the funcs.el file. A nice side effect of this move is
that it enforces correct encapsulation of company backends related code. We can
now easily detect if there is some configuration leakage when the
auto-completion layer is not used. But we loose macro expansion at file loading
time (not sue it is a big concern though).

The function spacemacs|enable-auto-complete was never used so it has been
deleted which led to the deletion of the now empty file core-auto-completion.el.

The example in LAYERS.org regarding auto-completion is now out of date and has
been deleted. An example to setup auto-completion is provided in the README.org
file of the auto-completion layer.
2017-01-02 00:39:04 -05:00
Adel Qalieh 8e7fe6e1f2
Add keybinding for spacemacs/alternate-window
spacemacs/alternate-window was suggested to switch between the last selected
window, or the window-analog of SPC TAB (spacemacs/alternate-buffer). This is
part of a larger family of functions, such as spacemacs/jump-to-last-layout on
SPC l TAB and eyebrowse-last-window-config on SPC l w TAB.

Resolves #7845
2016-12-27 09:50:10 +02:00