155 Commits

Author SHA1 Message Date
Leo Gaskin
16223efc2d Fix byte compiler warnings by moving variable declarations 2023-01-13 09:35:03 +01:00
Leo Gaskin
351eb6cbb5 Add multiple-cursors support to execute-extended-command
Also add three new tests for this functionality and adapt some existing
tests as well as the testing harness.
2022-12-24 13:26:12 +01:00
Troy Brown
fe0d516745 Detect cursor bar type when specified by the frame.
When the 'cursor-type' for the buffer is specified by the frame, this
was not detected by the current logic as 'cursor-type' will be set to
't' and thus not explicitly match 'bar'.  This update checks to see if
'cursor-type' is specified by the frame and will pull the parameter
from the frame if it is, prior to subsequent checks.
2022-11-26 08:43:42 +01:00
Ryan Davis
225fc0e889 Extend advising functions for read-char and quoted-read-char w/ macro
Add register-read-with-preview and read-char-from-minibuffer to cover
insert-register and zap-to-char, respectively.

Also add mc--reset-read-variables to for mc--reset-read-prompts to use
dynamically so these can be further extended via the macro.
2022-06-13 23:22:50 +02:00
Will B Chang
fd8441bfc8 support undo-fu commands
https://github.com/emacsmirror/undo-fu
2022-05-28 14:15:14 +02:00
Jason May
aae47aebc0 eliminate byte-compilation warnings
- long docstrings
- "defcustom fails to specify type" - use '(sexp)
- keyword arguments in define-minor-mode
- deprecations
2022-03-28 19:24:00 +02:00
Johannes Lippmann
b139bb6b30 introduce function mc/disable-multiple-cursors-mode 2021-11-12 23:23:42 +01:00
Johannes Lippmann
4975afedb3 Run hook when mc is disabled 2021-11-12 23:23:42 +01:00
Zach Kost-Smith
a9d7764f80
Add option to disable bar-style fake cursors (#367) 2020-12-15 07:59:00 -08:00
Masahiro Nakamura
7763f4f9d7 Load mc-cycle-cursors and mc-hide-unmatched-lines-mode after loading multiple-cursors-core
This is useful with autoloaded commands.
2020-10-18 07:38:52 +02:00
Damien Cassou
b880554d04 Fix typos (#359)
Typos found with codespell.
2019-12-10 09:59:45 -08:00
Renato Ferreira
b39e9631d6 Faster line-number-at-pos calculation 2019-08-18 13:44:55 -03:00
Andrew Whatson
d27870dff3 Load mc/list-file as late as possible
Previously the list file was loaded immediately upon loading
`multiple-cursors-core`.  This doesn't work well with modern autoloading
emacs configurations, where customisation is mostly done in
`eval-after-load` hooks; the default file location is loaded, *then*
the value of `mc/list-file` is changed, and everyone is confused.
2019-03-13 13:40:58 +10:00
Joel Rosdahl
9980faa21f Add dabbrev state variables to mc/cursor-specific-vars
Fixes #142.
2019-02-24 13:28:36 +01:00
Magnar Sveen
e419903612
Merge pull request #324 from mkcms/master
Always call `mark` with `mark-even-if-inactive` set to t
2018-04-06 14:47:29 +02:00
Peder Stray
eba10208fc Add temporary-goal-column to mc/cursor-specific-vars 2018-03-20 11:25:08 +01:00
Michał K
f628df72a1 Always call mark with mark-even-if-inactive set to t 2018-03-12 16:18:22 +01:00
bb2020
1075270008 Added mc/interactive-repeating-commands (#303)
* Added mc/interactive-repeating-commands

* simplify mc/interactive-repeating-commands

* simplify mc/interactive-repeating-commands

* removed mc/interactive-repeating-commands

* added mc/repeat-command

* rebound mc/repeat-command

* blacklisted repeat-complex-command

* added mc/always-repeat-command

* added mc/repeat-command tests
2017-09-08 14:52:47 -07:00
Jules Tamagnan
e048e04bd8 Fix #271: The command yank can't work
It seems that this may be a windows specific issue given the version
strings that @moyotar and @dertuxmalwieder have posted. As a
workaround it should be safe to add the arguments that current-kill
needs to the defadvice. current-kill has had the same arguments for
the past 25 years, since it was first added.
2017-08-31 16:33:49 -07:00
Radon Rosborough
fa91dfb9bd Don't display message while loading mc/list-file 2017-06-15 16:12:28 -07:00
Torsten Marek
616fd84891 Add ivy-done (from ivy) to the list of commands that are only executed once by default.
ivy-done is the value of this-original-command when invoking mc/ functions when ivy mode is active.
2017-02-14 17:40:47 +01:00
Matus Goljer
277aef4f0b Make mc/list-file into defcustom 2016-09-22 17:56:48 +02:00
Andrea Orru
6d8c6fcc83 Pass tests. 2016-07-18 14:56:26 +02:00
jules tamagnan
ad95d287c7 Update docstring of mc/cursor-is-bar 2016-07-05 10:07:06 -04:00
jules tamagnan
d9a6047d1a Fix mc/cursor-is-bar as per @cpitclaudel 2016-07-05 06:07:57 -04:00
Jules Tamangan
8413969a97 Merge pull request #253 from jtamagnan/fake-bar-cursor
When cursor-type is bar, mc/cursors appear as bars
2016-06-16 17:04:58 -04:00
bb2020
d26cecd53a added always-run-for-all 2016-06-09 23:06:48 +03:00
bb2020
2329611a41 Merge remote-tracking branch 'upstream/master' 2016-06-09 22:45:19 +03:00
bb2020
fd847ae6e7 added mc/always-run-for-all 2016-06-09 22:41:51 +03:00
Jules Tamagnan
3112e61824 When cursor-type is bar, mc/cursors appear as bars 2016-05-20 15:36:13 -04:00
Bozhidar Batsov
741eec6766 Update some copyright years 2016-05-19 20:29:36 -07:00
bb2020
1686630fd6 try to implement blacklist 2016-05-12 14:41:38 +03:00
Steve Purcell
4bf9860bcc Use cl-lib instead of shimming, which breaks in older emacsen
Aliasing built-in (cl) functions to cl-lib versions when they are
available in older Emacs versions can seemingly lead to problems
including infinite loops during byte compilation.

Since cl-lib works with all Emacs versions supported by
multiple-cursors, just depend on this directly instead.

This commit makes the necessary changes, both to code, documentation and
package metadata.
2016-04-25 11:19:06 +12:00
Magnar Sveen
54c05c3e24 Add more aliases for cl stuff
Issue #120
2016-02-29 06:49:59 +01:00
Magnar Sveen
68961b4cf3 Avoid requiring cl at runtime
Closes #120
2016-02-13 17:17:28 +01:00
Magnar Sveen
a393384b35 Merge pull request #227 from jtamagnan/insert_letters
Add mc/insert-letters function and test cases
2015-12-05 21:25:04 +01:00
Jules Tamagnan
8703b19872 Add mark-next-like-this-symbol function
* README.md: Update readme to include mark-next-like-this symbol
 * features/step-definitions/multiple-cursors-steps.el: Add phrase for
   mark-next-like-this-symbol
 * features/support/env.el: Add keyboard shortcut for
   mark-next-like-this-symbol and fix shortcut for
   mark-next-like-this-word
 * mc-mark-more.el: Add mc/mark-next-like-this-symbol function
 * multiple-cursors-core.el: Add mc/mark-next-like-this-symbol to
   functions to run only once
 * multiple-cursors.el: Add to readme section.
2015-12-04 16:56:50 -05:00
Jules Tamagnan
36b7025a35 Add alternative to mc/mark-next-like-this
* README.md: Add mc/mark-next-like-this-word tidbits to readme.
 * features/step-definitions/multiple-cursors-steps.el: Add
   mc/mark-next-like-this-word call.
 * features/support/env.el: Add shortcut for mc/mark-next-like-this-word
   as "C-S-c C->".
 * mc-mark-more.el: Add to mc/mark-next-like-this description to explain
   what happens when no region is selected. Add
   mc/mark-next-like-this-word function.
 * multiple-cursors-core.el: Add mc/mark-next-like-this-word to commands
   to run once.
 * multiple-cursors.el: Add information about mc/mark-next-like-this-word.
2015-12-04 13:34:47 -05:00
Jules Tamagnan
ca822cd0d0 Add mc/insert-letters function and test cases
* README.md: Add to readme, under special section.
 * features/insert-letters.feature: Add scenarios.
 * features/step-definitions/multiple-cursors-steps.el: Add call.
 * features/support/env.el: Add keybinding for insert-letters to H-3.
 * mc-separate-operations.el: Add function and helper functions.
 * multiple-cursors-core.el: Add insert-letters to functions that run once.
 * multiple-cursors.el: Add to readme.
2015-12-02 19:13:39 -05:00
Sean Allred
3f1611c7cb Factor out a superfluous variable
`mc--active-cursor-count' was effectively duplicating the purpose of
`mc/num-cursors'.  While the latter is necessarily slower (being a
function), it is well-tested and stable.
2015-06-27 09:38:02 -05:00
Sean Allred
cd967e720f Small optimization
If we remove the ceiling entirely, we won't even enter the form that
checks values, etc.
2015-06-26 21:33:48 -05:00
Sean Allred
2e904a0be2 Add safety ceiling to cursor count at creation
The customizable option `mc/max-cursors' now provides a soft maximum for
the number of cursors allowable.  This is helpful for slower emacsen who
may freeze up when adding too many cursors (as in `mark-all' variants).

Fix: #206
2015-06-26 21:17:53 -05:00
Magnar Sveen
142fdd6534 Use locate-user-emacs-file to find directory for .mc-lists.el 2015-05-26 09:07:50 +02:00
kissge
4969d382de Move mc/list-file to the user-emacs-directory 2015-05-24 13:06:21 +09:00
Magnar Sveen
dc1bfbf816 Add cua-delete-region to default run-for-all 2015-01-01 23:31:38 +01:00
Magnar Sveen
952877fc5b Revert undo-feature for multiple-cursors
re #169
2014-12-26 19:42:01 +01:00
Aleksei
ff0ac1fc75 Add function to disable mc undo into undo-list.
When user enables mc mode we need to add function to disable mc mode
into undo-list. When users starts to hit 'undo' at some point mc-mode
will be disabled.
2014-12-23 00:26:21 +03:00
lexa
19f842d60a Undo after leaving mc mode will restore cursors as they was 2014-10-26 12:35:39 +03:00
Magnar Sveen
66eefa2963 Add cperl-electric-backspace to default run-for-all list
See #87
2014-10-22 12:39:32 +02:00
Philippe Vaucher
912342ed85 Add missing ###autoload markers 2014-10-03 14:21:18 +02:00