(py-forward-into-nomenclature): Slightly better regex for stopping on
underscore.
This commit is contained in:
parent
6aadd26419
commit
c5a8cbd35d
|
@ -1728,10 +1728,12 @@ A `nomenclature' is a fancy way of saying AWordWithMixedCaseNotUnderscores."
|
||||||
(interactive "p")
|
(interactive "p")
|
||||||
(let ((case-fold-search nil))
|
(let ((case-fold-search nil))
|
||||||
(if (> arg 0)
|
(if (> arg 0)
|
||||||
(re-search-forward "\\W*\\([A-Z_]*[a-z0-9]*\\)" (point-max) t arg)
|
(re-search-forward
|
||||||
|
"\\(\\W\\|[_]\\)*\\([A-Z]*[a-z0-9]*\\)"
|
||||||
|
(point-max) t arg)
|
||||||
(while (and (< arg 0)
|
(while (and (< arg 0)
|
||||||
(re-search-backward
|
(re-search-backward
|
||||||
"\\(\\(\\W\\|[a-z0-9]\\)[A-Z]+\\|\\W\\w+\\)"
|
"\\(\\W\\|[a-z0-9]\\)[A-Z]+\\|\\(\\W\\|[_]\\)\\w+"
|
||||||
(point-min) 0))
|
(point-min) 0))
|
||||||
(forward-char 1)
|
(forward-char 1)
|
||||||
(setq arg (1+ arg)))))
|
(setq arg (1+ arg)))))
|
||||||
|
|
Loading…
Reference in New Issue