Commit a24b9961 authored by Dima Kogan's avatar Dima Kogan Committed by Stefan Monnier
Browse files

* lisp/progmodes/subword.el (subword-capitalize): Fix Stefan's mess.

Fixes: debbugs:15580
parent 0283d6b0
2013-10-16 Dima Kogan <dima@secretsauce.net> (tiny change)
* progmodes/subword.el (subword-capitalize): Fix Stefan's mess
(bug#15580).
2013-10-16 Glenn Morris <rgm@gnu.org>
* ansi-color.el (ansi-color-drop-regexp):
......
......@@ -257,7 +257,7 @@ Optional argument ARG is the same as for `upcase-word'."
See the command `subword-mode' for a description of subwords.
Optional argument ARG is the same as for `capitalize-word'."
(interactive "p")
(catch 'search-failed
(condition-case nil
(let ((count (abs arg))
(start (point))
(advance (>= arg 0)))
......@@ -265,7 +265,7 @@ Optional argument ARG is the same as for `capitalize-word'."
(dotimes (i count)
(if advance
(progn
(search-forward "[[:alpha:]]")
(re-search-forward "[[:alpha:]]")
(goto-char (match-beginning 0)))
(subword-backward))
(let* ((p (point))
......@@ -275,7 +275,8 @@ Optional argument ARG is the same as for `capitalize-word'."
(downcase-region pp np)
(goto-char (if advance np p))))
(unless advance
(goto-char start)))))
(goto-char start)))
(search-failed nil)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment