diff options
| author | Daniel Colascione | 2014-05-24 13:43:40 -0700 |
|---|---|---|
| committer | Daniel Colascione | 2014-05-24 13:43:40 -0700 |
| commit | 166aaa37beb96446c5dae693c64e473a5fde3c1a (patch) | |
| tree | 47f0a7b7566cdc416a18095f5253390480e2d226 | |
| parent | 8bb17f6471522c30630d0571a8b31d09554a17c2 (diff) | |
| download | emacs-166aaa37beb96446c5dae693c64e473a5fde3c1a.tar.gz emacs-166aaa37beb96446c5dae693c64e473a5fde3c1a.zip | |
Fix subword-mode motion
* lisp/progmodes/subword.el (subword-find-word-boundary): Move point to
correct spot before search.
Fixes: debbugs:17580
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/progmodes/subword.el | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a14af45cc74..94918f99725 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2014-05-24 Daniel Colascione <dancol@dancol.org> | 1 | 2014-05-24 Daniel Colascione <dancol@dancol.org> |
| 2 | 2 | ||
| 3 | * progmodes/subword.el (subword-find-word-boundary): Move point to | ||
| 4 | correct spot before search. (Bug#17580) | ||
| 5 | |||
| 3 | * emacs-lisp/nadvice.el (defun): Write in eval-and-compile to avoid | 6 | * emacs-lisp/nadvice.el (defun): Write in eval-and-compile to avoid |
| 4 | breaking the build. | 7 | breaking the build. |
| 5 | 8 | ||
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.") | |||
| 355 | (save-restriction | 355 | (save-restriction |
| 356 | (if (< pos limit) | 356 | (if (< pos limit) |
| 357 | (progn | 357 | (progn |
| 358 | (goto-char pos) | ||
| 358 | (narrow-to-region (point-min) limit) | 359 | (narrow-to-region (point-min) limit) |
| 359 | (funcall subword-forward-function)) | 360 | (funcall subword-forward-function)) |
| 361 | (goto-char (1+ pos)) | ||
| 360 | (narrow-to-region limit (point-max)) | 362 | (narrow-to-region limit (point-max)) |
| 361 | (funcall subword-backward-function)) | 363 | (funcall subword-backward-function)) |
| 362 | (point)))))) | 364 | (point)))))) |