1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-20 13:00:51 -07:00

Fix subword-mode motion

* lisp/progmodes/subword.el (subword-find-word-boundary): Move point to
correct spot before search.

Fixes: debbugs:17580
This commit is contained in:
Daniel Colascione 2014-05-24 13:43:40 -07:00
parent 8bb17f6471
commit 166aaa37be
2 changed files with 5 additions and 0 deletions

View file

@ -1,5 +1,8 @@
2014-05-24 Daniel Colascione <dancol@dancol.org>
* progmodes/subword.el (subword-find-word-boundary): Move point to
correct spot before search. (Bug#17580)
* emacs-lisp/nadvice.el (defun): Write in eval-and-compile to avoid
breaking the build.

View file

@ -355,8 +355,10 @@ searching subwords in order to avoid unwanted reentrancy.")
(save-restriction
(if (< pos limit)
(progn
(goto-char pos)
(narrow-to-region (point-min) limit)
(funcall subword-forward-function))
(goto-char (1+ pos))
(narrow-to-region limit (point-max))
(funcall subword-backward-function))
(point))))))