Commit graph

76 commits

Author SHA1 Message Date
smile13241324 5fdb89d61d Optimise spacemacs/last-error further
Noticed that I have used if instead of when
and added an obsolete progn.
2019-11-03 20:35:49 +01:00
smile13241324 e74fc70de8 Revise spacemacs/last-error function and change key binding 2019-11-03 20:14:10 +01:00
Benoit Coste 93ac5203b4 Add function 'spacemacs/last-error
Sometimes it is useful to go directly to the last error message in the buffer.
This function recursively calls 'spacemacs/next-error until the last error is
reached.
The binding "SPC e l" is associated with it
2019-11-03 20:14:10 +01:00
syl20bnr b12bc7c857 [core] Avoid graphical glitches with empty modeline
It is important that the stable elpa download message in the modeline is always
visible to the user as the donwload can take a while depending on the connection
speed.
2019-08-21 23:30:55 -04:00
Thanh Vuong 0e9866efce spacemacs-layout layer: limit commmands to work within layouts
Add options to restrict some functions to current layout's buffers

Thanks smile13241324 and duianto for suggestions and fixing typos
2019-08-12 21:41:12 +02:00
Miciah Masters ab893e3af0 Restore point in spacemacs/alternate-buffer
* core/core-funcs.el (spacemacs/alternate-buffer): Instead of using
switch-to-buffer, use set-window-buffer-start-and-point, specifying the
previous window start position and point if known.  Replace use of
cl-find-if with cl-find.
* CHANGELOG.develop: Add entry for change to spacemacs/alternate-buffer.
2019-07-01 12:56:31 +02:00
Ag Ibragimov cf796a4224 spacemacs/recompile-elpa with argument deletes all existing *.elc files
Rationale: very often users required to find and delete all *.elc files
manually. That's a bit tedious.
2019-06-12 20:15:51 +02:00
Thanh Vuong 02bf928815 [core] fix spacemacs/error-delegate
determine flycheck or emacs error backend using next-error-function instead of
next-error-find-buffer
2019-06-09 17:21:04 +02:00
RockyRoad cc1764b2ad Recompiling Elpa: don't skip missing .elc files 2018-12-04 21:57:31 -05:00
deb0ch afd3c8c127 alternate-buffer without purpose 2018-10-27 12:54:02 +03:00
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 bd316f4c30 core: add new macro spacemacs|add-transient-hook
Transient hooks vanishes when they are evaluated.
2018-06-11 01:30:18 -04:00
syl20bnr b282e553ba Use dotspacemacs backward compatibility macro instead of aliases 2018-06-08 02:24:38 -04:00
Benjamin Reynolds 6c7e9f9a73 Fix typo in spacemacs/plist-get docstring (#10803) 2018-06-07 00:55:37 -04:00
syl20bnr 2df4db5c60 core: new function spacemacs/plist-get
Made to play well with modified plist. Replace spacemacs/mplist-get by
spacemacs/plist-get in spacemacs|add-company-backends
2018-06-04 01:19:44 -04:00
syl20bnr d7a5137c56 Rename function to dump variables
Remove potential ambiguity with an actual whole spacemacs dump
2018-05-20 03:58:48 -04:00
syl20bnr d8479b8f72 core: add optional append local paremeters to spacemacs/add-to-hooks 2018-05-12 00:18:51 -04:00
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