From: Daniel Colascione Date: Sat, 24 May 2014 20:43:40 +0000 (-0700) Subject: Fix subword-mode motion X-Git-Tag: emacs-25.0.90~2612^2~709^2~893 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=166aaa37beb96446c5dae693c64e473a5fde3c1a;p=emacs.git Fix subword-mode motion * lisp/progmodes/subword.el (subword-find-word-boundary): Move point to correct spot before search. Fixes: debbugs:17580 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a14af45cc74..94918f99725 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2014-05-24 Daniel Colascione + * 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. diff --git a/lisp/progmodes/subword.el b/lisp/progmodes/subword.el index 50e4b42d5de..a8455c50064 100644 --- a/lisp/progmodes/subword.el +++ b/lisp/progmodes/subword.el @@ -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))))))