bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#4136: 23.1; delete-pair


From: Juri Linkov
Subject: bug#4136: 23.1; delete-pair
Date: Sat, 15 Aug 2009 01:45:03 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)

>> 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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]