Commit graph

20 commits

Author SHA1 Message Date
Henrik Lissner
06392a723f refactor: rename orig-fn arg in advice to fn
A minor tweak to our naming conventions for the first argument of an
:around advice.
2021-08-04 01:53:12 -04:00
Henrik Lissner
c049480cbd Fix evil-join filling non-comments poorly 2021-02-25 13:59:43 -05:00
Saulius Menkevicius
198712060a Fix +evil--insert-new-line advice when opening new line inside a comment.
`comment-line-break-function` requires a single `soft-newlines` argument.
2021-01-17 15:53:23 +02:00
Henrik Lissner
765b6dcfca
Unset unused markers
In case of overlay leaks.
2020-12-12 15:56:36 -05:00
Henrik Lissner
d149c59d2e
Add emacs mode checks to insert mode checks
This is to accommodate users who default to emacs mode, rather than
insert mode. The two are also very alike, so many of these checks should
apply to both (almost) equally.
2020-12-11 17:38:09 -05:00
Henrik Lissner
40cf6139ed
Make evil-join remove comment delimiters
See emacs-evil/evil#606
2020-08-09 01:50:41 -04:00
Henrik Lissner
d12752324a
Introduce letf! convenience macro
A more succinct cl-letf, which allows for local functions and macros.
2020-04-29 23:48:21 -04:00
Henrik Lissner
50ff934ff2
Fix #2832: filename modifiers replaced with empty strings 2020-04-26 04:12:33 -04:00
Henrik Lissner
dbf9c92b48
Fix +evil-resolve-vim-path-a not removing excess backslashes 2020-02-20 00:51:55 -05:00
Henrik Lissner
1b779bf716
Fix evil ex fname modifiers consuming char just before #/%
':e test-%:t.el' in filename.el should open test-filename.el, but
instead opened testfilename.el.
2020-01-20 19:14:25 -05:00
Henrik Lissner
26c8f5c6ef
Bytecompiler bytecompiler, won't you shut up 2019-11-23 01:21:25 -05:00
Henrik Lissner
449ddb986c
Minor refactors & reformatting across the board 2019-11-15 22:17:31 -05:00
Henrik Lissner
03e9dc1daf
Follow up on 64222c69c
To fix cases where comment-line-break-function's first argument isn't
optional.
2019-11-15 22:17:31 -05:00
Henrik Lissner
1d09e4655a
Fix split-window & update docstring 2019-10-29 18:27:19 -04:00
Henrik Lissner
43030c789e
editor/evil: revert focus-on-split behavior (and refactor advice)
Focus-on-split is being disabled to achieve vim parity. The advice is
still necessary to ensure splitting updates the window buffer list, so
operations like winner-undo undoes correctly.
2019-10-29 01:09:14 -04:00
Henrik Lissner
149b2617b0
💥 revise hook/var fns naming convention (2/2)
This is second of three big naming convention changes. In this commit,
we change the naming conventions for hook functions and variable
functions:

1. Replace the bar | to indicate a hook function with a -h suffix, e.g.

     doom|init-ui -> doom-init-ui-h
     doom|run-local-var-hooks -> doom-run-local-var-hooks-h

2. And add a -fn suffix for functions meant to be set on variables,
   e.g.

     (setq magit-display-buffer-function #'+magit-display-buffer-fn)

See ccf327f8 for the reasoning behind these changes.
2019-07-22 02:30:38 +02:00
Henrik Lissner
51d3b1b424
💥 revise advice naming convention (1/2)
This is first of three big naming convention updates that have been a
long time coming. With 2.1 on the horizon, all the breaking updates will
batched together in preparation for the long haul.

In this commit, we do away with the asterix to communicate that a
function is an advice function, and we replace it with the '-a' suffix.
e.g.

  doom*shut-up -> doom-shut-up-a
  doom*recenter -> doom-recenter-a
  +evil*static-reindent -> +evil--static-reindent-a

The rationale behind this change is:

1. Elisp's own formatting/indenting tools would occasionally struggle
   with | and * (particularly pp and cl-prettyprint). They have no
   problem with / and :, fortunately.
2. External syntax highlighters (like pygmentize, discord markdown or
   github markdown) struggle with it, sometimes refusing to highlight
   code beyond these symbols.
3. * and | are less expressive than - and -- in communicating the
   intended visibility, versatility and stability of a function.
4. It complicated the regexps we must use to search for them.
5. They were arbitrary and over-complicated to begin with, decided
   on haphazardly way back when Doom was simply "my private config".

Anyhow, like how predicate functions have the -p suffix, we'll adopt the
-a suffix for advice functions, -h for hook functions and -fn for
variable functions.

Other noteable changes:
- Replaces advice-{add,remove}! macro with new def-advice!
  macro. The old pair weren't as useful. The new def-advice! saves on a
  lot of space.
- Removed "stage" assertions to make sure you were using the right
  macros in the right place. Turned out to not be necessary, we'll
  employ better checks later.
2019-07-22 02:27:45 +02:00
Henrik Lissner
9a02bd8ac8
Minor refactors across the board
- when-let* -> when-let
- Fix projectile-locate-dominating-file for connected remote files
2019-06-26 14:31:06 +02:00
Henrik Lissner
a4c5396558
Add better-jumper
Replaces evil's jumplist; makes its functionality available for non evil
users.
2019-04-24 18:16:04 -04:00
Henrik Lissner
77e4cc4d58
💥 Remove :feature category
:feature was a "catch-all" category. Many of its modules fit better in
other categories, so they've been moved:

- feature/debugger -> tools/debugger
- feature/evil -> editor/evil
- feature/eval -> tools/eval
- feature/lookup -> tools/lookup
- feature/snippets -> editor/snippets
- feature/file-templates -> editor/file-templates
- feature/workspaces -> ui/workspaces

More potential changes in the future:

- A new :term category for terminal emulation modules (eshell, term and
  vterm).
- A new :os category for modules dedicated to os-specific functionality.
  The :tools macos module would fit here, but so would modules for nixos
  and arch.
- A new :services category for web-service integration, like wakatime,
  twitter, elfeed, gist and pastebin services.
2019-04-24 18:16:04 -04:00
Renamed from modules/feature/evil/autoload/advice.el (Browse further)