Fix #23
- Porting to new advice syntax for
crux-with-region-or-line. - Add parameter
removetocrux-with-region-or-lineallowing the user to remove such advice.
Apart from my inline comments - please capitalize the word fix in the commit messages - [Fix #23] ....
Actually there is a small bug in Emacs. comment-or-uncomment uses (interactive "*r\nP"), for the formatter r, if local mark ring is empty, it will show an error message The mark is not set now, so there is no region without executing the function and advice at all. kill-ring-save does not use this r formatter, so it works fine. The only work-around is to push some random mark (C-SPC C-SPC) into local mark ring before comment or uncomment some lines.
That's unfortunate. Did you report this upstream?
FWIW define-advice wraps (defun ...) (advice-add ...) and has a nice function-name@advice-name naming convention, which I think is handy if you use a completion system like helm or ivy, since searching for the original function will bring up the advice function too. So it'd be e.g. fill-region@crux-with-region-or-buffer.
@dieggsy Is define-advice some new Emacs addition?
@bbatsov Ah yeah, it's probably new to emacs 25, so it may not be a good idea to incorporate yet?