| Age | Commit message (Collapse) | Author |
|
Especially, fixes the following warning when `expand-region.el` is
installed:
package-quickstart.el:***:2: Warning: defvar
`expand-region-exclude-text-mode-expansions' docstring wider than 80
characters
|
|
er-basic-expansions.el (er/mark-ts-node): New function for expanding
the region using Tree-sitter parse tree nodes when Tree-sitter is
available and can parse the buffer around point. The new function is
safe to add to the global base value of `er/try-expand-list` since it
leaves the region unchanged when Tree-sitter information is not
available.
|
|
This reverts commit e1b099a62ff3c718d1bd8a100f516b3dff035dd2.
|
|
This reverts commit af2916b89d8b5e520ff4ee7214bab62a0fdb3cec.
|
|
expand-region-core.el (er--expand-region-1, er--saved-expansions): Use
a new buffer-local variable, `er--saved-expansions`, to hold
information about the point/mark returned by `er/try-expand-list'. If
using `er/expand-region' or `er/contract-region' repeatedly, use this
memoized data instead of recomputing all expansions. This speeds up
expand-region significantly when there are a large number of or
expensive functions in `er/try-expand-list'.
expand-region.el (er/expand-region): Clear the saved expansion data in
`er--saved-expansions` on the first (non-chained) invocation of
`er/expand-region' or `er-contract-region`.
|
|
expand-region-core.el (er--expand-region-1, er--save-excursion): When
`er-save-excursion` is expensive, such as when using Org-mode's
`org-save-outline-visibility`, calling it repeatedly for each function
in `er/try-expand-list' is prohibitive. Fix by only calling it once
around the expansion trials, and using `save-mark-and-excursion`
around each expansion function.
|
|
|
|
externals/expand-region
|
|
Activate `lexical-binding`. Use `advice-add` rather than `defadvice`.
Avoid deprectaed `point-at-bol/eol`. Prefer #' to quote function names.
Fix a few docstrings to silence compiler warnings.
* cc-mode-expansions.el (er/c-define-construct): Fix ' in docstring.
* enh-ruby-mode-expansions.el: Require `expand-region-core`.
* er-basic-expansions.el (er/mark-next-accessor): Remove unused var
`symbol-regexp`.
* expand-region-core.el: Don't require `cl`.
(er--show-expansion-message): Declare it.
(er--first-invocation): Move before first use.
(er--expand-region-1): Remove unused var `set-mark-default-inactive`.
(er/set-temporary-overlay-map): Hoist definition outside of `if`.
* expand-region-custom.el (expand-region-preferred-python-mode): Fix
custom type.
* expand-region.el: Explicitly require Emacs-24.4.
* js-mode-expansions.el: Require `er-basic-expansions`.
* ruby-mode-expansions.el (expand-region-core): Require `cl-lib` rather
than `cl`. Require `er-basic-expansions`.
(er/ruby-backward-up): Use `cl-loop`.
(er/get-ruby-block): Remove unused vars `beg` and `end`.
* the-org-mode-expansions.el (er-basic-expansions):
Require `er-basic-expansions`.
* yaml-mode-expansions.el: Re-add now that the author signed the paperwork.
|
|
|
|
After upgrading from Emacs 27 to 28.1, loading expand-region
breaks with the error message "Wrong type argument: stringp, (require .
package)"
This is due to using eval-after-load with a string argument. This odd
call style was introduced in
https://github.com/magnars/expand-region.el/pull/213
However, the assertion that text-mode is missing a provide call hasn't
been true in 6 years:
https://github.com/emacs-mirror/emacs/commit/f70f9a58c438d8b0677b1649ea7084d688ed53c8
|
|
|
|
|
|
|
|
`er/mark-yaml-inner-block`""
This reverts commit 4419d5d52e24db530ec407f33cef361f485f46b9.
|
|
This reverts commit 1c291daf14d4a763a28d3b19f32a2443c1e6dd82.
|
|
idiomatic code""
This reverts commit dc161a33951e7a74020a71592f66f340477074f0.
|
|
This reverts commit 09ebc2df5ce3aac05e82367b2e42e7d0f3ff1656.
|
|
This reverts commit 4168da1b9d1ea5fda64754e2226af15c11140889.
|
|
This reverts commit 8f1e82537dd633b09a764943d62c8da613a486b4.
|
|
This reverts commit 2690fd46026de87a416beab56bf9896422a0a189.
|
|
This reverts commit 6ed37a7c58549da761f5d9b6864192ff5e535bec.
|
|
|
|
This also makes some fixes to marking for list items
|
|
|
|
|
|
|
|
Include a copy/paste example for installation via `use-package`.
|
|
|
|
|
|
|
|
* expand-region.el: Add `Version:` and `URL:` headers.
* expand-region-pkg.el: Delete since GNU ELPA auto-generates it.
* ruby-mode-expansions.el: Require `cl` to fix miscompilation.
* .gitignore: Add ELPA-generated files.
* <foo>.el files: Fix copyright header.
|
|
- Don't call (forward-char 1) when point is at end of buffer.
- If there are trailing spaces and tabs in comment, include them.
- Don't include the non-whitespace char right before the comment
prefix.
In the following C function declaration, when the point is in the
comment, calling er/mark-comment now selects the region between the
two slashes (including the slashes). Without this fix, the region
would start at the '('.
void func(/* int arg */);
|
|
|
|
|
|
|
|
Adds customizable variable `expand-region-subword-enabled` to control
whether subword expansions are used, nil by default. Also adds a check
so that subword expansions are disabled after leaving `subword-mode`.
|
|
This reverts commit 672e7c1842234f8c2d68bd98dc539e2180f69317.
|
|
Adds a new variable `er/save-mode-excursion` which will be used to wrap
expansion attempts if set. In `org-mode` buffers this facility is used
to wrap actions with `org-save-outline-visibility`.
|
|
Reverted this since (require 'org) breaks spacemacs for some reason.
This reverts commit 53233a0bbaffe5094dd91152bcfce7b027aefd3c.
|
|
|
|
|
|
|
|
|
|
Thanks to @kevinjfoley
Closes #241
|
|
To disable subword mode: `(setq er/enable-subword-mode? nil)`
Closes #254
|
|
|
|
|
|
Attempt to clarify contract-region. I misunderstood this at first and wasted time attempting to define another `global-set-key` for contracting.
|
|
This works much better on web-mode.
|