]> code.delx.au - gnu-emacs/commitdiff
Fix subword-mode motion
authorDaniel Colascione <dancol@dancol.org>
Sat, 24 May 2014 20:43:40 +0000 (13:43 -0700)
committerDaniel Colascione <dancol@dancol.org>
Sat, 24 May 2014 20:43:40 +0000 (13:43 -0700)
* lisp/progmodes/subword.el (subword-find-word-boundary): Move point to
correct spot before search.

Fixes: debbugs:17580
lisp/ChangeLog
lisp/progmodes/subword.el

index a14af45cc7431b8bf0b3d39ce6eb348af08fe9f4..94918f99725ddc0b155c5e9efd0b399d43875e70 100644 (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.
 
index 50e4b42d5de726a61b8aba09aeef19816918b8f4..a8455c500643fd1771207c193c77ed790a5dfe4e 100644 (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))))))