Subject: Re: bug#4136: 23.1; delete-pair

From: Juri Linkov <[email-masked]>
Date: Sat, 15 Aug 2009 01:45:03 +0300

>> This is rather vague semantics.  I suggest to keep the current simple
>> semantics and just to fix it with the patch I sent.
>
> Before a quoted object your fixed version deletes the last character of
> the object and the first quote character.  Handling quote or prefix
> syntax characters via (delete-char 1) doesn't strike me as very clean.

This is fixed in the following version:

(defun delete-pair ()
  "Delete a pair of characters enclosing the sexp that follows point."
  (interactive)
  (save-excursion
    (forward-sexp 1)
    (save-excursion
      (backward-sexp 1)
      (skip-syntax-forward "'")
      (delete-char 1))
    (delete-char -1)))

-- 
Juri Linkov
http://www.jurta.org/emacs/