From a3f1ac2e3b546951f3182a7b42cad7f64a94e0b8 Mon Sep 17 00:00:00 2001 From: Marcin Borkowski Date: Fri, 8 Apr 2016 10:57:21 +0300 Subject: [PATCH] Avoid infinite loop in 'studlify-word' * lisp/play/studly.el (studlify-region): Call 'forward-word-strictly' and 'backward-word-strictly' instead of 'forward-word' and 'backward-word'. (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 f6aae4548b1..ff1bf03e118 100644 --- a/lisp/play/studly.el +++ b/lisp/play/studly.el @@ -25,10 +25,10 @@ (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-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.39.5