X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/09aba8153a8297e415477dbfa9a8c7e999fb3457..a749f1c648f2b9bf1a0b0b10e2da4c1c4e3d431d:/lisp/progmodes/subword.el diff --git a/lisp/progmodes/subword.el b/lisp/progmodes/subword.el index 50e4b42d5d..a279e294fe 100644 --- a/lisp/progmodes/subword.el +++ b/lisp/progmodes/subword.el @@ -1,6 +1,6 @@ ;;; subword.el --- Handling capitalized subwords in a nomenclature -*- lexical-binding: t -*- -;; Copyright (C) 2004-2014 Free Software Foundation, Inc. +;; Copyright (C) 2004-2015 Free Software Foundation, Inc. ;; Author: Masatake YAMATO @@ -88,7 +88,7 @@ ;;;###autoload (define-obsolete-function-alias - 'capitalized-words-mode 'subword-mode "24.5") + 'capitalized-words-mode 'subword-mode "25.1") ;;;###autoload (define-minor-mode subword-mode @@ -113,7 +113,7 @@ called a `subword'. Here are some examples: NSGraphicsContext => \"NS\", \"Graphics\" and \"Context\" This mode changes the definition of a word so that word commands -treat nomenclature boundaries as word bounaries. +treat nomenclature boundaries as word boundaries. \\{subword-mode-map}" :lighter " ," @@ -130,7 +130,7 @@ treat nomenclature boundaries as word bounaries. ;; N.B. These commands aren't used unless explicitly invoked; they're ;; here for compatibility. Today, subword-mode leaves motion commands ;; alone and uses `find-word-boundary-function-table' to change how -;; `forward-word' and other low-level commands detect word bounaries. +;; `forward-word' and other low-level commands detect word boundaries. ;; This way, all word-related activities, not just the images we ;; imagine here, get subword treatment. @@ -334,7 +334,7 @@ as parts of words: e.g., in `superword-mode', tab) "Assigned to `find-word-boundary-function-table' in `subword-mode' and `superword-mode'; defers to -`subword-find-word-bounary'.") +`subword-find-word-boundary'.") (defconst subword-empty-char-table (make-char-table nil) @@ -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))))))