Subject: Re: bug#19940: 25.0.50; Infinite loop in `studlify-word' with Subword mode

From: Marcin Borkowski <[email-masked]>
Date: Wed, 06 Apr 2016 13:49:23 +0200

On 2016-04-03, at 18:07, Marcin Borkowski <[email-masked]> wrote:

> I'll make a patch tomorrow.

Sorry it took me so long, here's the patch.  I'm also closing this bug.

Best,

--
Marcin
>From 1e8cd05ba1c83fa48831e234bb3a2893252ca238 Mon Sep 17 00:00:00 2001
From: Marcin Borkowski <[email-masked]>
Date: Mon, 4 Apr 2016 22:12:23 +0200
Subject: [PATCH] Fix bug #19940

* lisp/play/studly.el (studlify-region): Change
  \(forward\|backward\)-word to \1-word-strictly.  Should fix
  bug#19940.
---
 lisp/play/studly.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/play/studly.el b/lisp/play/studly.el
index f6aae45..ff1bf03 100644
--- a/lisp/play/studly.el
+++ b/lisp/play/studly.el
@@ -25,10 +25,10 @@ studlify-region
     (setq begin (point))
     (while (and (<= (point) end)
 		(not (looking-at "\\W*\\'")))
-      (forward-word 1)
-      (backward-word 1)
+      (forward-word-strictly 1)
+      (backward-word-strictly 1)
       (setq begin (max (point) begin))
-      (forward-word 1)
+      (forward-word-strictly 1)
       (let ((offset 0)
 	    (word-end (min (point) end))
 	    c)
@@ -55,7 +55,7 @@ studlify-word
   "Studlify-case the current word, or COUNT words if given an argument."
   (interactive "*p")
   (let ((begin (point)) end rb re)
-    (forward-word count)
+    (forward-word-strictly count)
     (setq end (point))
     (setq rb (min begin end) re (max begin end))
     (studlify-region rb re)))
-- 
2.4.3