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

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

bug#17558: 24.4.50; global-subword-mode breaks ERC


From: Daniel Colascione
Subject: bug#17558: 24.4.50; global-subword-mode breaks ERC
Date: Mon, 27 Apr 2015 16:30:15 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 04/27/2015 04:24 PM, Drew Adams wrote:
>>>> Indeed, with the new implementation of subword-mode, most of the
>>>> word-operating commands should be marked as "interactive use
>>>> only", since their behavior is too unreliable for use in Lisp code.
>>>
>>> Sounds to me like it will be a PITA to review/replace every
>>> non-interactive usage of those commands.
>>> Are people certain they want to go down this road?
>>
>> I am. It's the only way we can make sure that interactive commands
>> that move by words *indirectly* do the right thing in the presence of
>> user customizations.
> 
> Mille excuses - I have not been following this thread.
> 
> Just what is meant by "non-interactive use of `forward-word'
> and `backward-word'"?  Any call to either of them in Lisp code?
> And what is meant by "*indirectly*".

Lisp code has no right to expect that "words" mean anything in
particular. The scheme for detecting word boundaries is a user
customization point. find-word-boundary-function-table has been
supported for a while now, if not heavily used.

> Will you be telling users (e.g. in NEWS) precisely *how* they
> need to modify existing non-interactive calls to those functions?
> Saying that they should be used only interactively from now on
> does not tell users how to fix existing code that calls them.

Code can either use sexp movement or bind
find-word-boundary-function-table (which has been in Emacs for ages, by
the way) to a value they expect.

> And just what is unsafe about calling these two functions from
> Lisp?

Nothing: what's unsafe is expecting that users haven't customized word
boundaries.

> 
> Sorry, but this is not clear to me.  (And why not create new
> functions/commands, instead of changing the meaning/behavior
> of these longstanding ones?)

Because lots of packages invoke word movement commands on the user's
behalf, expecting that movement happens by words. By changing word
boundaries, we make subword mode work as expected everywhere instead of
making everyone that deals with word movement handle the possibility of
subword-mode separately.

The behavior of forward-word hasn't changed. We now make use of an Emacs
core feature that was not heavily used before. Code that relied on this
core feature going unused has always been broken. It's worth mentioning
in NEWS, sure, but I'm against just rebinding the movement commands.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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