Commit graph

59 commits

Author SHA1 Message Date
syl20bnr
46c5dfa4a7 cl-loop instead of loop 2018-01-06 21:38:13 -05:00
syl20bnr
326965d4ce Happy New Year 2018! 2018-01-04 02:00:25 -05:00
syl20bnr
e2e532bb49 core: change <function>p to <function>-p suffixes for consistency
Also defined aliases for backward compatibility with `usedp` functions.
2017-07-02 10:09:39 -04:00
JAremko
907306a117 optimize space-doc-mode 2017-06-25 00:14:29 +03:00
deb0ch
8226f0070f do not filter for alternating buffers 2017-03-24 22:29:52 +03: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
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
fb27ede558 Bump year in copyright headers
Happy New Year 2017!
2017-01-05 23:08:17 -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
syl20bnr
703f78c2b8 Cleanup pass on file spacemacs-base/funcs.el
- Apply `/` and `//` rules (double / is for private functions)
- Add missing `spacemacs/` prefixes
- Move functions used outside of spacemacs-base layer to
  core/core-funcs.el
- Remove unused functions

Commit originally intented to only rename linum-update-window-scale-fix
to spacemacs/linum-update-window-scale-fix :-)
2016-10-09 13:14:41 -04:00
Andrew Schwartzmeyer
6a08e2f65e Fix get-package-directory regex
Previous change in 5d6e9ab789 dropped the
"/" marker to match at beginning of string. Since directory-files
matches a regex, use "\\`" to indicate match at beginning of string.
2016-09-02 21:44:43 +02:00
ivanbrennan
5d6e9ab789 optimize spacemacs//get-package-directory
Saving a pkg-match regex to a temporary variable lets us avoid recomputing it on each
iteration. I didn't benchmark the performance impact, but unless there's a downside to
using `let*` vs `let`, it seems like a no-brainer.

Passing pkg-match to `directory-files` reduces the returned files to those that match the
regex rolling our own reduction.
2016-08-17 19:57:47 +02:00
Eivind Fonn
38814881dc Allow user more control over space-doc mode 2016-06-26 13:27:51 -04:00
Eivind Fonn
07829f8e43 Allow space-doc to be excluded 2016-06-24 10:41:10 +02:00
bmag
47e0951a1c spacemacs/dump-vars-to-file: don't visit dump file
Visiting the dump file before writing to it is slow, because it triggers
all the regular actions that happen when a user opens a file, e.g.
enable major mode and minor modes. We don't need all that,
with-temp-file is what we really want.
2016-05-05 13:03:26 +02:00
JAremko
0b9add2f0d Redesign space-doc 2016-04-29 20:00:12 -04:00
JAremko
6b24d059dd Add function spacemacs/prettify-org-buffer
Move Spacemacs documentation prettifiers to a separate function
so they can be used by users.
2016-04-12 23:18:10 -04:00
syl20bnr
f211d3dc28 Update docstring for spacemacs/view-org-file
Respecting convention of upercase function parameter in docstring.
2016-04-12 23:14:31 -04:00
JAremko
78f6b64ae1 Update spacemacs/view-org-file doc string 2016-04-12 23:12:01 -04:00
JAremko
625f1a098e view-org-file emits error for non .org files
Now spacemacs/view-org-file emits user-error if used on non *.org file.
2016-04-12 23:08:10 -04:00
Eivind Fonn
bcea630826 Make matlab quasi-derived from prog-mode
Also make this a named function.
2016-04-12 22:48:34 -04:00
syl20bnr
d60228219f core: ensure quelpa is available when installing packages 2016-04-03 02:51:01 -04:00
syl20bnr
eb14645d0f Lazy require space-doc-mode 2016-04-03 00:36:27 -04:00
syl20bnr
05a04768b1 core: new function spacemacs/window-system-is-mac
Use if to disable the menu-bar
2016-03-31 00:34:28 -04:00
syl20bnr
8f3494d83c core: move system functions to core-funcs.el 2016-03-31 00:33:56 -04:00
syl20bnr
ff941e4348 core: fix activation of space-doc-mode 2016-03-31 00:11:36 -04:00
JAremko
8c3d05ee47 Add org-mode link-type "https" to open local copies
The https link-type opens the local copies of the Spacemacs documentation files with
the spacemacs/view-org-file function. It supports GitHub style heading links

For example, the link:

https://github.com/syl20bnr/spacemacs/blob/develop/layers/org/README.org#links

Will be handled similary to as if it was:

file:~/.emacs.d/layers/org/README.org::*links

Also the `space-doc' mode will be applied.

Refactored GH style anchor search.
2016-03-30 22:38:18 -04:00
syl20bnr
30f971d89c reformat some code to respect 80chars per line 2016-03-30 22:35:07 -04:00
JAremko
014bbfd921 Add Spacemacs docs minor mode to hide meta tags.
`space-doc-mode` - Buffer local minor mode for Spacemacs documentation files. The mode hides org meta tags.
Enabled when viewing documentation via `SPC` `h` `SPC`
2016-03-30 22:31:38 -04:00
bmag
0daba08781 Use package-user-dir where appropriate
Elpa dir is no longer hard-coded to <user-emacs-directory>/elpa/. Users
can change the location of Elpa dir by changing the value of
package-user-dir.
2016-03-10 23:13:19 -05:00
Eivind Fonn
66ed054a15 Better implementation of previous commit 2016-03-03 21:43:33 +01:00
Eivind Fonn
067ac63f15 Avoid using condition-case during pkg load 2016-03-03 21:37:42 +01:00
justbur
39e06feba9 Use unless-debug version of condition-case
It's not possible to get full backtraces in these instances when an
error is signaled, and I think we should generate full backtraces when
debug-on-error is enabled as a general rule.

I had to make this change at one place to track down the root of problem
2 in #5200.
2016-03-03 20:30:30 +01:00
justbur
0f4105d09d core-funcs: Cleaner expansion of create-key-binding-forms 2016-01-26 01:21:00 -05:00
Eivind Fonn
e8a10c3d54 Clean up REPL code 2016-01-22 16:31:37 +01:00
Alejandro Catalina Feliú
fb99f3ff19 Add global access to all available REPLs
Enable a global binding to access a list of available REPLs to run
everywhere. If the requested REPL depends on a major-mode that hasn't
been loaded, it will be loaded along its dependencies.

To make this work, a new `spacemacs/register-repl` function is included.
This function adds a major-mode and its repl function to a global
variable.
2016-01-22 16:01:19 +01:00
syl20bnr
046d86800c Clean copyrights and update for year 2016 2016-01-11 21:42:17 -05:00
justbur
1c61e35e93 core: Add recompile-elpa function
This is easier than "nuking elpa" when changing versions of Emacs since
we don't need to fetch the packages again, only recompile them.
2015-12-21 00:43:02 -05:00
justbur
a713e8d71e core: Fix free variable references
Most are innocuous. One is update-packages-alist in config layer. Define
the variable and give it a docstring with an explanation of its purpose.
2015-12-21 00:25:41 -05:00
justbur
39760a1cfe core: Update to preferred versions of functions
1. Don't use beginning-of-buffer (or end):
   These are for interactive use only according to compiler

2. reduce => cl-reduce

3. next-line => forward-line
   next-line is only for interactive use

4. set-default-font => set-frame-font
   set-default-font is obsolete since 23.1

5. show-subtree => outline-show-subtree (alias)

6. show-all => outline-show-all (alias)
2015-12-21 00:25:41 -05:00
syl20bnr
4a6fd1b364 core: hide mode-line at startup 2015-12-11 03:07:15 -05:00
justbur
812ba329f2 core: move spacemacs-mode to core-spacemacs-buffer.el
The rationale is to keep the spacemacs buffer related code contained in
the core-spacemacs-buffer.el file.
2015-12-11 02:25:22 -05:00
syl20bnr
61707e593d core: improve installation speed of themes and bootstrap packages
package-refresh-packages was called every time a bootstrap package or
a theme was installed

Use configuration-layer/retrieve-package-archives to install bootstrap
packages and themes
Add a reentrance boolean to configuration-layer/retrieve-package-archives
Add force and quiet optional arguments to configuration-layer/retrieve-package-archives
Force refresh of archive when the user requests an update of packages
2015-12-02 23:53:02 -05:00
justbur
ee6a486d4c core: Add new set-key functions to core-keybindings
Set up to use bind-map instead of evil-leader for leader key
functionality.

Alias evil-leader funcs and remove package
2015-11-21 18:18:01 +01:00
Eivind Fonn
4f2b08154c core: Don't delete bootstrap packages as orphans 2015-11-04 20:21:42 +01:00
Yen-Chin Lee
2a983671af Fix some cl-lib function with prefix
Since emacs 24.3, function in cl-lib should with cl- prefix.

Signed-off-by: Yen-Chin Lee <coldnew.tw@gmail.com>
2015-10-07 15:51:39 -04:00
syl20bnr
773076a1be core: remove core-evilify-keymap.el
Move its contents to core-evilified-state.el
2015-09-26 00:26:16 -04:00
justbur
a30695c459 Convert dotspacemacs-tests to org-mode output 2015-08-31 21:26:10 -04:00
justbur
51022543a8 Add tests for correctness of .spacemacs
Note this makes a critical (but backwards compatible) change
to .spacemacs.template
2015-08-31 21:26:03 -04:00
Tu H Do
19ad82215d Move org-emphasis-regexp-components to spacemacs/view-org-file
If we put this in Org layer, new users won't have that layer and thus
this fix will not be applied.
2015-06-14 22:31:37 -04:00