With a nil value for dotspacemacs-switch-to-buffer-prefers-purpose,
switch-to-buffer prefers using the current window, same as vanilla
Emacs. With a non-nil value, switch-to-buffer prefers another window
with the same purpose as the buffer. This affects actions like
spacemacs/alternate-buffer, and opening buffers from Dired.
spacemacs/disable-vi-tilde-fringe and
spacemacs/disable-vi-tilde-fringe-read-only are used by spacemacs-evil,
but were defined in spacemacs-ui-visual. Move the definitions to the
correct place.
Both the spacemacs/neotree-expand-or-open and spacemacs/neotree-collapse
functions had the same comment: "Collapse a neotree node."
This renames the spacemacs/neotree-expand-or-open function to:
"Expand or open a neotree node."
Also remove the check on purpose-mode. Using the purpose layer without
purpose-mode does not make sense so I prefer to throw an error is such
case happens.
Update README.org and add spacemacs-purpose layer to spacemacs
distribution.
Move functions of the layer to funcs.el and prefix variables and
functions introduced by the layer with `spacemacs`.
Update current layout's workspaces before saving layouts to file (fixes
7214).
Load current layout's workspaces after loading layouts from file, if it's
one of the loaded layouts (fixes 6979).
This commit defines:
- spacemacs-default-jump-handlers: a list of functions that can jump to
definition in ALL modes.
- spacemacs-jump-handlers-MODE: a list of functions that can jump to
definition in MODE.
- spacemacs-jump-handlers: a buffer-local list of functions that can
jump to definition. This is made up of the values of the two previous
variables whenever a given major mode is activated.
- spacemacs/jump-to-definition: a function that tries each function in
spacemacs-jump-handlers in order, and stops when one of them takes us
somewhere new.
- spacemacs|define-jump-handlers: a macro that
* defines spacemacs-jump-handlers-MODE, possibly filled with initial
functions
* defines a function that is added to the hook of the given MODE
* binds “SPC m g g” of that MODE to spacemacs/jump-to-definition
This is an attempt to harmonize all the different approaches to jumping.
Specifically,
- Existing intelligent jump packages that work for only a single mode
should go to the beginning of spacemacs-jump-handlers-MODE. E.g.
anaconda for python, ensime for scala, etc.
- Packages like gtags that work for several modes (but potentially not
all) and which is dumber than the intelligent jumpers should go the
the END of spacemacs-jump-handlers-MODE.
- Packages like dumb-jump that work for all modes should go to
spacemacs-default-jump-handlers.
In all cases the order of the jump handlers in each list should be from
most to least intelligent.
Fixes#6619
This fixes two issues regarding layouts.
1. Since Bad-ptr/persp-mode.el@e950bf15, persp-mode requires setting
persp-hook-up-emacs-buffer-completion in order to install the hooks for
ido & friends. This variable is nil by default, making SPB b b not
restrict to layout-local buffers.
2. The function spacemacs-layouts/non-restricted-buffer-list removes a
hook and re-adds it later. This makes the assumption that the hook was
already present. If it was not (due to 1) then SPC B b changes global
state by adding that hook. Instead, just let-bind the hook variable
for the scope we need it changed.
This explains and partially fixes#5788 and #6266. It does not fix the
dependency on ido-mode. If ido-mode is excluded, persp-mode will not
install the hook for ido, and SPB b b will still be unrestricted.