GNU bug report logs -
#4136
23.1; delete-pair
Previous Next
Reported by: Eli Barzilay <eli <at> barzilay.org>
Date: Thu, 13 Aug 2009 06:30:04 UTC
Severity: normal
Tags: fixed, moreinfo
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #70 received at 4136 <at> emacsbugs.donarmstrong.com (full text, mbox):
>> It seems you and Martin prefer checking against the
>> `insert-pair-alist' because the function name `delete-pair' suggests
>> it should be a counterpart of `insert-pair'.
>
> ...this is exactly the issue: it is much better if `delete-foo' is
> always an operation that reverts what `insert-foo' does.
The exact reverse is impossible. For instance, put the cursor
on the letter `f' in:
foo "" bar
and type `M-3 M-"' where M-" is bound to `insert-pair'.
The result will be:
"foo "" bar"
Now what `delete-pair' should do to revert this back to the original?
> The current state of `delete-pair' is so bad that my guess is that
> hardly anyone used it, so adding another command doesn't make much
> sense. How about making it do the proper thing (removing only
> balanced pairs as specified by `insert-pair-alist'), and ignoring
> errors with a prefix argument?
I've been using `delete-pair' for many years several times a day
without any problem because my lists are always correctly balanced
thanks to `insert-pair' that I exclusively use to create balanced
lists and strings.
That's why even in the current state of `delete-pair' it is the useful
reverse of `insert-pair' because the latter creates balanced lists
and the former deletes them.
>> This is fixed in the following version:
>> [...]
>
> This version doesn't make much sense as an operation you'd want to do
> on code:
>
> (foo '(x y z))
> -->
> (foo 'x y z)
It makes sense when `foo' is a multi-argument function like `list', e.g.
(list 'x y z)
So I see no reason to introduce more restrictions to decide what
parens the user is allowed to delete in his/her code.
--
Juri Linkov
http://www.jurta.org/emacs/
This bug report was last modified 4 years and 181 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.