Skip to main content
added 25 characters in body
Source Link

I'm looking for a way to reduce what Emacs kills when I use backward-kill-word.

protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
{
    if (PropertyChanged != null)
        PropertyChanged(this, e);
}

If I'm editing the above code in Emacs and I place my cursor on the very last character (the }) and I call backward-kill-word, the entirety of e); is killed, since Emacs only considers the e to be a word.

Another example is if you place your cursor on the 'P' of PropertyChanged(this, e) and call backward-kill-word, the entirety of null) before it is killed. The closed parenthesis is simply considered to not be a word.

My question is how I can eliminate this behavior. I want characters like ), ', }, etc. to be treated as words by backward-kill-word. This means that backward-kill-word kills these characters are killed and the cursor replaces them, just how backward-kill-word typically behaves for one-character-long words like e. One possible solution I've thought of is to somehow edit what Emacs considers to be words and simply add the characters I want to the list. Regardless, thanks for the help!

I'm looking for a way to reduce what Emacs kills when I use backward-kill-word.

protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
{
    if (PropertyChanged != null)
        PropertyChanged(this, e);
}

If I'm editing the above code in Emacs and I place my cursor on the very last character (the }) and I call backward-kill-word, the entirety of e); is killed, since Emacs only considers the e to be a word.

Another example is if you place your cursor on the 'P' of PropertyChanged(this, e) and call backward-kill-word, the entirety of null) before it is killed. The closed parenthesis is simply considered to not be a word.

My question is how I can eliminate this behavior. I want characters like ), ', }, etc. to be treated as words by backward-kill-word. This means that these characters are killed and the cursor replaces them, just how backward-kill-word typically behaves for one-character-long words. One possible solution I've thought of is to somehow edit what Emacs considers to be words and simply add the characters I want to the list. Regardless, thanks for the help!

I'm looking for a way to reduce what Emacs kills when I use backward-kill-word.

protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
{
    if (PropertyChanged != null)
        PropertyChanged(this, e);
}

If I'm editing the above code in Emacs and I place my cursor on the very last character (the }) and I call backward-kill-word, the entirety of e); is killed, since Emacs only considers the e to be a word.

Another example is if you place your cursor on the 'P' of PropertyChanged(this, e) and call backward-kill-word, the entirety of null) before it is killed. The closed parenthesis is simply considered to not be a word.

My question is how I can eliminate this behavior. I want characters like ), ', }, etc. to be treated as words by backward-kill-word. This means that backward-kill-word kills these characters and the cursor replaces them, just how backward-kill-word typically behaves for one-character-long words like e. One possible solution I've thought of is to somehow edit what Emacs considers to be words and simply add the characters I want to the list. Regardless, thanks for the help!

added 94 characters in body
Source Link

I'm looking for a way to tellreduce what Emacs that certain characters should not be "overlooked"kills when killing wordsI use backward-kill-word.

protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
{
    if (PropertyChanged != null)
        PropertyChanged(this, e);
}

If I'm editing the above code in Emacs and I place my cursor on the very last character (the '}'}) and I press C-backspacecall (backward-kill-word), the entirety of e); is killed, since Emacs only considers the e to be a word.

Another example is if you place your cursor on the 'P' of PropertyChanged(this, e) and call backward-kill-word, the entirety of null) before it is killed. The closed parenthesis is simply considered to not be a word.

My question is how I can eliminate this behavior. I want characters like )), '', }}, etc. to not be "ignored"treated as words by backward-kill-word. This means that these characters are killed and the cursor replaces them, just how backward-kill-word typically behaves for one-character-long words. One possible solution I've thought of is to somehow edit what Emacs considers to be words and simply add the characters I want to the list. Regardless, thanks for the help!

I'm looking for a way to tell Emacs that certain characters should not be "overlooked" when killing words.

protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
{
    if (PropertyChanged != null)
        PropertyChanged(this, e);
}

If I'm editing the above code in Emacs and I place my cursor on the very last character (the '}') and I press C-backspace (backward-kill-word), the entirety of e); is killed, since Emacs only considers the e to be a word.

Another example is if you place your cursor on the 'P' of PropertyChanged(this, e) and call backward-kill-word, the entirety of null) before it is killed. The closed parenthesis is simply considered to not be a word.

My question is how I can eliminate this behavior. I want characters like ), ', }, etc. to not be "ignored" by backward-kill-word. One possible solution I've thought of is to somehow edit what Emacs considers to be words and simply add the characters I want to the list. Regardless, thanks for the help!

I'm looking for a way to reduce what Emacs kills when I use backward-kill-word.

protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
{
    if (PropertyChanged != null)
        PropertyChanged(this, e);
}

If I'm editing the above code in Emacs and I place my cursor on the very last character (the }) and I call backward-kill-word, the entirety of e); is killed, since Emacs only considers the e to be a word.

Another example is if you place your cursor on the 'P' of PropertyChanged(this, e) and call backward-kill-word, the entirety of null) before it is killed. The closed parenthesis is simply considered to not be a word.

My question is how I can eliminate this behavior. I want characters like ), ', }, etc. to be treated as words by backward-kill-word. This means that these characters are killed and the cursor replaces them, just how backward-kill-word typically behaves for one-character-long words. One possible solution I've thought of is to somehow edit what Emacs considers to be words and simply add the characters I want to the list. Regardless, thanks for the help!

edited title
Link
Dan
  • 33.4k
  • 7
  • 106
  • 171

Changing what Emacs considers a word backward-kill-word kills too much, how to make it more intelligent?

Source Link
Loading