# HG changeset patch # User Kenichi Handa # Date 901762478 0 # Node ID dfb255fb91c8cf75c53fdb24e41fd925870f677e # Parent 2c2eb47ec8e39adbef434064c0c691d22ee59ea7 (mouse-skip-word): If point is at word constituent characters, pay attention to word-separating-categories by using forward-word instead of skip-syntax-forward/backward. diff -r 2c2eb47ec8e3 -r dfb255fb91c8 lisp/mouse.el --- a/lisp/mouse.el Wed Jul 29 23:04:24 1998 +0000 +++ b/lisp/mouse.el Thu Jul 30 01:34:38 1998 +0000 @@ -639,7 +639,18 @@ If DIR is positive skip forward; if negative, skip backward." (let* ((char (following-char)) (syntax (char-to-string (char-syntax char)))) - (cond ((or (string= syntax "w") (string= syntax " ")) + (cond ((string= syntax "w") + ;; Here, we can't use skip-syntax-forward/backward because + ;; they don't pay attention to word-separating-categories, + ;; and thus they will skip over a true word boundary. So, + ;; we simularte the original behaviour by using + ;; forward-word. + (if (< dir 0) + (if (not (looking-at "\\<")) + (forward-word -1)) + (if (or (looking-at "\\<") (not (looking-at "\\>"))) + (forward-word 1)))) + ((string= syntax " ") (if (< dir 0) (skip-syntax-backward syntax) (skip-syntax-forward syntax)))