[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What is a word?
From: |
Eli Zaretskii |
Subject: |
Re: What is a word? |
Date: |
Tue, 12 May 2015 23:01:25 +0300 |
> From: Florian Lindner <mailinglists@xgm.de>
> Date: Tue, 12 May 2015 21:55:44 +0200
>
> ofter I find it, that the emacs function acting on a word not behave like I
> expect.
>
> I'm not sure if the definiton of a word is major-mode dependent?
>
> Talking about kill-word, forward-word and alike.
>
> Example, | represents cursor position, shell-script mode:
>
> cd $BASE| -> backward-kill-word cd $|
> ;; what I expected
>
> cd $| -> backward-kill-word -> |
> ;; not what I expected, rather expected only the $, with or without the
> whitespace between cd, same for "cd .."
Each major mode defines its own word-constituent characters. In
general, any character that can appear in a symbol recognized by the
programming language of the mode is a word-constituent character in
that mode.
So "word" has different meanings in different major modes. For
example, the '-' character is word-constituent in Lisp, but not in C.
- What is a word?, Florian Lindner, 2015/05/12
- Re: What is a word?,
Eli Zaretskii <=