nflath / hungry-delete

Enables hungry deletion in all modes.
98 stars 16 forks source link

latest melpa dist is #14

Closed fommil closed 6 years ago

fommil commented 10 years ago

with version hungry-delete-20140729.2231 I'm seeing this :-(

if: Wrong number of arguments: #[(n &optional killflag) "¨„ÆÇÈD\"ˆÉ ƒ.   ƒ.ÊUƒ.  Ë=ƒ(ÌÍ Î \"‡Í Î |‡
ƒ]ÏX„]`SfÐ>„]m„]ÑfÒ=„]iÓ[\"ˆŠÔÕiZÑ#*‡
ƒgÓ[\"‡Ö ‡" [n delete-active-region overwrite-mode ocol killflag current-prefix-arg signal wrong-type-argument integerp use-region-p ...] 4 ("/home/hallisam/.emacs.d/elpa/hungry-delete-20140729.2231/hungry-delete.elc" . 2759) "p
P"], 0

was working fine until very recently on emacs 24.3.1 and reverting to the 3-year-old version still works.

This is my .emacs

nflath commented 10 years ago

Can you do (setq debug-on-error t) and see if a backtrace is printed?

What do you do to get this behaviour

fommil commented 10 years ago

this is in a call to (hungry-delete-backward)

nflath commented 10 years ago

I think the issue is in your .emacs actually, specificall you have:

(defun contextual-backspace () "Hungry whitespace or delete word depending on context" (interactive) (if (looking-back "[\t\s\n\r]{2,}" (- (point) 3)) (hungry-delete-backward) (backward-kill-word 1)))

hungry-delete-backward now takes an argument, so I think it should be:

(defun contextual-backspace () "Hungry whitespace or delete word depending on context" (interactive) (if (looking-back "[\t\s\n\r]{2,}" (- (point) 3)) (hungry-delete-backward 1) (backward-kill-word 1)))

On Thu, Jul 31, 2014 at 11:20 AM, Sam Halliday notifications@github.com wrote:

this is in a call to (hungry-delete-backward)

— Reply to this email directly or view it on GitHub https://github.com/nflath/hungry-delete/issues/14#issuecomment-50797942.

fommil commented 10 years ago

aah, you changed the API. perhaps you could give the argument a default value incase it catches anybody else out?

nflath commented 10 years ago

Maybe...right now the interface was changed to match that of delete-char (which it replaces)