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

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

RE: Killing punctuation chars enclosed with delimiters via backward-kill


From: Doug Lewan
Subject: RE: Killing punctuation chars enclosed with delimiters via backward-kill-word
Date: Tue, 6 Aug 2013 14:46:36 +0000

Dmitry,

M-d invokes delete-word. The deletion is based on word-syntax.

You could write an different command using `skip-syntax-forward' and map the 
new command to M-d.

`backward-kill-word' will have the same issue.

(FYI M-h runs mark-paragraph for me. I'm using emacs 24.3.)

,Douglas
Douglas Lewan
Shubert Ticketing
(201) 489-8600 ext 224

These are my principles and if you don't like them... well, I have others. - 
Groucho Marx

-----Original Message-----
From: help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org 
[mailto:help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org] On Behalf Of 
Dmitry Cherkassov
Sent: Tuesday, 2013 August 06 06:29
To: help-gnu-emacs@gnu.org
Subject: Killing punctuation chars enclosed with delimiters via 
backward-kill-word

Hi list. Here is my question.

Suppose this text:

int variable;
[
 ^
 |
 +- Pressing M-h here will erase ``variable;''. I don't like this behavior.

Is there a functionality to kill only punctuation char if it is enclosed by
delimiters or newlines?

More examples:

int array [
          ^
          |
          + - Pressing M-h here kills ``array'' as well

int array []
            ^
            |
            + - Pressing M-h here kills ``array'' as well


         + - pressing M-d Here kills ``int''
         |
         V
int array [];
int val;


Any ideas?

Could this be resolved by hacking syntax-table? Or we should rewrite
``backward-kill-ford'' and ``kill-word'' functions?


reply via email to

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