[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19940: 25.0.50; Infinite loop in `studlify-word' with Subword mode
From: |
Marcin Borkowski |
Subject: |
bug#19940: 25.0.50; Infinite loop in `studlify-word' with Subword mode |
Date: |
Sun, 03 Apr 2016 05:49:10 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
On 2015-02-24, at 21:19, Simen Heggestøyl <simenheg@gmail.com> wrote:
> An infinite loop occurs when Subword mode is active and
>
> `studlify-word' is run on a word with more than one subword. The bug
>
>
> seems to have been introduced by changes made to subword.el in commit
>
>
> 6ddc44225e743e2b2a0d5c192f50aefd7a4a915b.
>
>
> Here is a recipe that triggers the bug, starting from emacs -Q:
>
>
> 1. Open a new buffer, and type in "subWord".
>
>
> 2. Activate Subword mode by `M-x subword-mode'.
>
>
> 3. Move point to the beginning of the line, and run `M-x
>
>
> studlify-word'.
Hi,
I can confirm this behavior on GNU Emacs 25.1.50.7 (commit 7570b35).
The problem seems to be that `studlify-region' assumes that
`forward-word' and `backward-word' will stop at non-word characters (in
the sense of the regex `\W').
One possible solution would be to temporarily switch `subword-mode' off
in `studlify-region'. Given the nonsensicality of the latter, and the
fact that it breaks studlyCapsIdentifiers anyway, this might be the
preferred solution. If nobody proposes anything better, I'll tryto
prepare such a patch within a few days.
--
Marcin Borkowski
- bug#19940: 25.0.50; Infinite loop in `studlify-word' with Subword mode,
Marcin Borkowski <=