From 166aaa37beb96446c5dae693c64e473a5fde3c1a Mon Sep 17 00:00:00 2001 From: Daniel Colascione Date: Sat, 24 May 2014 13:43:40 -0700 Subject: [PATCH] Fix subword-mode motion * lisp/progmodes/subword.el (subword-find-word-boundary): Move point to correct spot before search. Fixes: debbugs:17580 --- lisp/ChangeLog | 3 +++ lisp/progmodes/subword.el | 2 ++ 2 files changed, 5 insertions(+) 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)))))) -- 2.11.4.GIT