aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2016-03-21 17:42:35 -0700
committerPaul Eggert2016-03-21 17:47:22 -0700
commit7dba17670f42cdaa73424a2bf60925ef49671fad (patch)
tree3accf314646edd564d5a53bbd3999d7d19e290f8
parent22cd92a0f3ab9b901d738b9b4cc236d16c97153f (diff)
downloademacs-7dba17670f42cdaa73424a2bf60925ef49671fad.tar.gz
emacs-7dba17670f42cdaa73424a2bf60925ef49671fad.zip
Fix problems caused by new implementation of sub-word mode
* lisp/subr.el (forward-word-strictly, backward-word-strictly): New functions. (word-move-empty-char-table): New variable. * etc/NEWS: Mention 'forward-word-strictly' and 'backward-word-strictly'. * doc/lispref/positions.texi (Word Motion): Document 'find-word-boundary-function-table', 'forward-word-strictly', and 'backward-word-strictly'. (Bug#22560) * src/syntax.c (syms_of_syntax) <find-word-boundary-function-table>: Doc fix. * lisp/wdired.el (wdired-xcase-word): * lisp/textmodes/texnfo-upd.el (texinfo-copy-node-name) (texinfo-copy-section-title, texinfo-start-menu-description) (texinfo-copy-menu-title, texinfo-specific-section-type) (texinfo-insert-node-lines, texinfo-copy-next-section-title): * lisp/textmodes/texinfo.el (texinfo-clone-environment) (texinfo-insert-@end): * lisp/textmodes/texinfmt.el (texinfo-format-scan) (texinfo-anchor, texinfo-multitable-widths) (texinfo-multitable-item): * lisp/textmodes/tex-mode.el (latex-env-before-change): * lisp/textmodes/flyspell.el (texinfo-mode-flyspell-verify): * lisp/skeleton.el (skeleton-insert): * lisp/simple.el (count-words): * lisp/progmodes/vhdl-mode.el (vhdl-beginning-of-libunit) (vhdl-beginning-of-defun, vhdl-beginning-of-statement-1) (vhdl-update-sensitivity-list, vhdl-template-block) (vhdl-template-break, vhdl-template-case, vhdl-template-default) (vhdl-template-default-indent, vhdl-template-for-loop) (vhdl-template-if-then-use, vhdl-template-bare-loop) (vhdl-template-nature, vhdl-template-procedural) (vhdl-template-process, vhdl-template-selected-signal-asst) (vhdl-template-type, vhdl-template-variable) (vhdl-template-while-loop, vhdl-beginning-of-block) (vhdl-hooked-abbrev, vhdl-port-copy, vhdl-hs-forward-sexp-func): * lisp/progmodes/verilog-mode.el (verilog-backward-sexp) (verilog-forward-sexp, verilog-beg-of-statement) (verilog-set-auto-endcomments, verilog-backward-token) (verilog-do-indent): * lisp/progmodes/vera-mode.el (vera-guess-basic-syntax) (vera-indent-block-closing): * lisp/progmodes/simula.el (simula-context) (simula-backward-up-level, simula-forward-down-level) (simula-previous-statement, simula-next-statement) (simula-skip-comment-backward, simula-calculate-indent) (simula-find-if, simula-electric-keyword): * lisp/progmodes/sh-script.el (sh-smie--rc-newline-semi-p): * lisp/progmodes/ruby-mode.el (ruby-smie--redundant-do-p) (ruby-smie--forward-token, ruby-smie--backward-token) (ruby-singleton-class-p, ruby-calculate-indent) (ruby-forward-sexp, ruby-backward-sexp): * lisp/progmodes/ps-mode.el (ps-run-goto-error): * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function) (perl-syntax-propertize-special-constructs) (perl-backward-to-start-of-continued-exp): * lisp/progmodes/pascal.el (pascal-indent-declaration): * lisp/progmodes/octave.el (octave-function-file-p): * lisp/progmodes/mantemp.el (mantemp-insert-cxx-syntax): * lisp/progmodes/js.el (js--forward-function-decl): * lisp/progmodes/idlwave.el (idlwave-show-begin-check) (idlwave-beginning-of-block, idlwave-end-of-block) (idlwave-block-jump-out, idlwave-determine-class): * lisp/progmodes/icon.el (icon-is-continuation-line) (icon-backward-to-start-of-continued-exp, end-of-icon-defun): * lisp/progmodes/hideif.el (hide-ifdef-define): * lisp/progmodes/f90.el (f90-change-keywords): * lisp/progmodes/cperl-mode.el (cperl-electric-pod) (cperl-linefeed, cperl-electric-terminator) (cperl-find-pods-heres, cperl-fix-line-spacing) (cperl-invert-if-unless): * lisp/progmodes/cc-engine.el (c-forward-<>-arglist-recur): * lisp/progmodes/cc-align.el (c-lineup-java-inher): * lisp/progmodes/ada-mode.el (ada-compile-goto-error) (ada-adjust-case-skeleton, ada-create-case-exception) (ada-create-case-exception-substring) (ada-case-read-exceptions-from-file, ada-after-keyword-p) (ada-scan-paramlist, ada-get-current-indent, ada-get-indent-end) (ada-get-indent-if, ada-get-indent-block-start) (ada-get-indent-loop, ada-get-indent-type) (ada-search-prev-end-stmt, ada-check-defun-name) (ada-goto-decl-start, ada-goto-matching-start) (ada-goto-matching-end, ada-looking-at-semi-or) (ada-looking-at-semi-private, ada-in-paramlist-p) (ada-search-ignore-complex-boolean, ada-move-to-start) (ada-move-to-end, ada-which-function, ada-gen-treat-proc): * lisp/net/quickurl.el (quickurl-grab-url): * lisp/mail/sendmail.el (mail-do-fcc): * lisp/mail/rmail.el (rmail-resend): * lisp/mail/mailabbrev.el (mail-abbrev-complete-alias): * lisp/mail/mail-extr.el (mail-extract-address-components): * lisp/json.el (json-read-keyword): * lisp/files.el (insert-directory): * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): * lisp/completion.el (symbol-under-point, symbol-before-point) (symbol-before-point-for-complete, next-cdabbrev) (add-completions-from-c-buffer): * lisp/cedet/semantic/texi.el (semantic-up-context) (semantic-beginning-of-context): * lisp/cedet/semantic/bovine/el.el (semantic-get-local-variables): use 'forward-word-strictly' and 'backward-word-strictly' instead of 'forward-word' and 'backward-word'. [This reapplies commit c1d32a65372c72d7de4808d620eefd3214a8e92a, which was inadvertently lost by merge commit c71e7cc113ed0d5f01aaa2e441a3e3c9fbeb9fa5.]
-rw-r--r--doc/lispref/positions.texi60
-rw-r--r--etc/NEWS8
-rw-r--r--lisp/cedet/semantic/bovine/el.el2
-rw-r--r--lisp/cedet/semantic/texi.el4
-rw-r--r--lisp/completion.el20
-rw-r--r--lisp/emacs-lisp/checkdoc.el4
-rw-r--r--lisp/files.el2
-rw-r--r--lisp/json.el4
-rw-r--r--lisp/mail/mail-extr.el4
-rw-r--r--lisp/mail/mailabbrev.el2
-rw-r--r--lisp/mail/rmail.el2
-rw-r--r--lisp/mail/sendmail.el2
-rw-r--r--lisp/net/quickurl.el2
-rw-r--r--lisp/progmodes/ada-mode.el106
-rw-r--r--lisp/progmodes/cc-align.el2
-rw-r--r--lisp/progmodes/cc-engine.el2
-rw-r--r--lisp/progmodes/cperl-mode.el24
-rw-r--r--lisp/progmodes/f90.el3
-rw-r--r--lisp/progmodes/hideif.el2
-rw-r--r--lisp/progmodes/icon.el9
-rw-r--r--lisp/progmodes/idlwave.el12
-rw-r--r--lisp/progmodes/js.el2
-rw-r--r--lisp/progmodes/mantemp.el4
-rw-r--r--lisp/progmodes/octave.el2
-rw-r--r--lisp/progmodes/pascal.el2
-rw-r--r--lisp/progmodes/perl-mode.el7
-rw-r--r--lisp/progmodes/ps-mode.el2
-rw-r--r--lisp/progmodes/ruby-mode.el23
-rw-r--r--lisp/progmodes/sh-script.el2
-rw-r--r--lisp/progmodes/simula.el40
-rw-r--r--lisp/progmodes/vera-mode.el6
-rw-r--r--lisp/progmodes/verilog-mode.el24
-rw-r--r--lisp/progmodes/vhdl-mode.el61
-rw-r--r--lisp/simple.el2
-rw-r--r--lisp/skeleton.el3
-rw-r--r--lisp/subr.el33
-rw-r--r--lisp/textmodes/flyspell.el2
-rw-r--r--lisp/textmodes/tex-mode.el3
-rw-r--r--lisp/textmodes/texinfmt.el8
-rw-r--r--lisp/textmodes/texinfo.el4
-rw-r--r--lisp/textmodes/texnfo-upd.el20
-rw-r--r--lisp/wdired.el2
-rw-r--r--src/syntax.c6
43 files changed, 313 insertions, 221 deletions
diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi
index b88e76e8230..1d748b87529 100644
--- a/doc/lispref/positions.texi
+++ b/doc/lispref/positions.texi
@@ -191,18 +191,25 @@ in the opposite direction.
191@node Word Motion 191@node Word Motion
192@subsection Motion by Words 192@subsection Motion by Words
193 193
194 These functions for parsing words use the syntax table to decide 194 The functions for parsing words described below use the syntax table
195whether a given character is part of a word. @xref{Syntax Tables}. 195to decide whether a given character is part of a word. @xref{Syntax
196Tables}.
196 197
197@deffn Command forward-word &optional count 198@deffn Command forward-word &optional count
198This function moves point forward @var{count} words (or backward if 199This function moves point forward @var{count} words (or backward if
199@var{count} is negative). If @var{count} is omitted or @code{nil}, it 200@var{count} is negative). If @var{count} is omitted or @code{nil}, it
200defaults to 1. 201defaults to 1. In an interactive call, @var{count} is specified by
202the numeric prefix argument.
201 203
202``Moving one word'' means moving until point crosses a 204``Moving one word'' means moving until point crosses a
203word-constituent character and then encounters a word-separator 205word-constituent character, which indicates the beginning of a word,
204character. However, this function cannot move point past the boundary 206and then continue moving until the word ends. By default, characters
205of the accessible portion of the buffer, or across a field boundary 207that begin and end words, known as @dfn{word boundaries}, are defined
208by the current buffer's syntax table (@pxref{Syntax Class Table}), but
209modes can override that by setting up a suitable
210@code{find-word-boundary-function-table}, described below. In any
211case, this function cannot move point past the boundary of the
212accessible portion of the buffer, or across a field boundary
206(@pxref{Fields}). The most common case of a field boundary is the end 213(@pxref{Fields}). The most common case of a field boundary is the end
207of the prompt in the minibuffer. 214of the prompt in the minibuffer.
208 215
@@ -214,8 +221,6 @@ the buffer boundary or field boundary.
214If @code{inhibit-field-text-motion} is non-@code{nil}, 221If @code{inhibit-field-text-motion} is non-@code{nil},
215this function ignores field boundaries. 222this function ignores field boundaries.
216 223
217In an interactive call, @var{count} is specified by the numeric prefix
218argument.
219@end deffn 224@end deffn
220 225
221@deffn Command backward-word &optional count 226@deffn Command backward-word &optional count
@@ -225,10 +230,10 @@ backward until encountering the front of a word, rather than forward.
225 230
226@defopt words-include-escapes 231@defopt words-include-escapes
227@c Emacs 19 feature 232@c Emacs 19 feature
228This variable affects the behavior of @code{forward-word} and everything 233This variable affects the behavior of @code{forward-word} and
229that uses it. If it is non-@code{nil}, then characters in the 234@code{backward-word}, and everything that uses them. If it is
230escape and character-quote syntax classes count as part of 235non-@code{nil}, then characters in the escape and character-quote
231words. Otherwise, they do not. 236syntax classes count as part of words. Otherwise, they do not.
232@end defopt 237@end defopt
233 238
234@defvar inhibit-field-text-motion 239@defvar inhibit-field-text-motion
@@ -237,6 +242,37 @@ If this variable is non-@code{nil}, certain motion functions including
237@code{forward-paragraph} ignore field boundaries. 242@code{forward-paragraph} ignore field boundaries.
238@end defvar 243@end defvar
239 244
245@defvar find-word-boundary-function-table
246This variable affects the behavior of @code{forward-word} and
247@code{backward-word}, and everything that uses them. Its value is a
248char-table (@pxref{Char-Tables}) of functions to search for word
249boundaries. If a character has a non-@code{nil} entry in this table,
250then when a word starts or ends with that character, the corresponding
251function will be called with 2 arguments: @var{pos} and @var{limit}.
252The function should return the position of the other word boundary.
253Specifically, if @var{pos} is smaller than @var{limit}, then @var{pos}
254is at the beginning of a word, and the function should return the
255position after the last character of the word; otherwise, @var{pos} is
256at the last character of a word, and the function should return the
257position of that word's first character.
258@end defvar
259
260@defun forward-word-strictly &optional count
261This function is like @code{forward-word}, but it is not affected by
262@code{find-word-boundary-function-table}. Lisp programs that should
263not change behavior when word movement is modified by modes which set
264that table, such as @code{subword-mode}, should use this function
265instead of @code{forward-word}.
266@end defun
267
268@defun backward-word-strictly &optional count
269This function is like @code{backward-word}, but it is not affected by
270@code{find-word-boundary-function-table}. Like with
271@code{forward-word-strictly}, use this function instead of
272@code{backward-word} when movement by words should only consider
273syntax tables.
274@end defun
275
240@node Buffer End Motion 276@node Buffer End Motion
241@subsection Motion to an End of the Buffer 277@subsection Motion to an End of the Buffer
242@cindex move to beginning or end of buffer 278@cindex move to beginning or end of buffer
diff --git a/etc/NEWS b/etc/NEWS
index 57bd110116b..4414625eacd 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1630,6 +1630,14 @@ Removed font-lock-beginning-of-syntax-function and the SYNTAX-BEGIN
1630slot in font-lock-defaults. 1630slot in font-lock-defaults.
1631 1631
1632+++ 1632+++
1633** The new implementation of Subword mode affects word movement everywhere.
1634When Subword mode is turned on, `forward-word', `backward-word', and
1635everything that uses them will move by sub-words, effectively
1636overriding the buffer's syntax table. Lisp programs that shouldn't be
1637affected by Subword mode should call the new functions
1638`forward-word-strictly' and `backward-word-strictly' instead.
1639
1640+++
1633** `package-initialize' now sets `package-enable-at-startup' to nil if 1641** `package-initialize' now sets `package-enable-at-startup' to nil if
1634called during startup. Users who call this function in their init 1642called during startup. Users who call this function in their init
1635file and still expect it to be run after startup should set 1643file and still expect it to be run after startup should set
diff --git a/lisp/cedet/semantic/bovine/el.el b/lisp/cedet/semantic/bovine/el.el
index 7824942d96f..6f41ba3064f 100644
--- a/lisp/cedet/semantic/bovine/el.el
+++ b/lisp/cedet/semantic/bovine/el.el
@@ -700,7 +700,7 @@ of `let' or `let*', grab those variable names."
700 ;; Snart args... 700 ;; Snart args...
701 (up-list -1) 701 (up-list -1)
702 (forward-char 1) 702 (forward-char 1)
703 (forward-word 1) 703 (forward-word-strictly 1)
704 (skip-chars-forward "* \t\n") 704 (skip-chars-forward "* \t\n")
705 (let ((arglst (read (buffer-substring-no-properties 705 (let ((arglst (read (buffer-substring-no-properties
706 (point) 706 (point)
diff --git a/lisp/cedet/semantic/texi.el b/lisp/cedet/semantic/texi.el
index 8b4f6f4e14b..cbb7705f9d1 100644
--- a/lisp/cedet/semantic/texi.el
+++ b/lisp/cedet/semantic/texi.el
@@ -258,7 +258,7 @@ can handle the @menu environment.")
258 (when (not parenthetical) 258 (when (not parenthetical)
259 ;; We are in parentheses. Are they the types of parens 259 ;; We are in parentheses. Are they the types of parens
260 ;; belonging to a texinfo construct? 260 ;; belonging to a texinfo construct?
261 (forward-word -1) 261 (forward-word-strictly -1)
262 (when (looking-at "@\\w+{") 262 (when (looking-at "@\\w+{")
263 (setq done (point)))))) 263 (setq done (point))))))
264 ;; If we are not in a parenthetical node, then find a block instead. 264 ;; If we are not in a parenthetical node, then find a block instead.
@@ -287,7 +287,7 @@ can handle the @menu environment.")
287 ;; If we can't go up, we can't do this either. 287 ;; If we can't go up, we can't do this either.
288 t 288 t
289 ;; We moved, so now we need to skip into whatever this thing is. 289 ;; We moved, so now we need to skip into whatever this thing is.
290 (forward-word 1) ;; skip the command 290 (forward-word-strictly 1) ;; skip the command
291 (if (looking-at "\\s-*{") 291 (if (looking-at "\\s-*{")
292 ;; In a short command. Go in. 292 ;; In a short command. Go in.
293 (down-list 1) 293 (down-list 1)
diff --git a/lisp/completion.el b/lisp/completion.el
index 06594217107..093740d2cc3 100644
--- a/lisp/completion.el
+++ b/lisp/completion.el
@@ -542,13 +542,13 @@ But only if it is longer than `completion-min-length'."
542 ;; Remove chars to ignore at the start. 542 ;; Remove chars to ignore at the start.
543 (cond ((= (char-syntax (char-after cmpl-symbol-start)) ?w) 543 (cond ((= (char-syntax (char-after cmpl-symbol-start)) ?w)
544 (goto-char cmpl-symbol-start) 544 (goto-char cmpl-symbol-start)
545 (forward-word 1) 545 (forward-word-strictly 1)
546 (setq cmpl-symbol-start (point)) 546 (setq cmpl-symbol-start (point))
547 (goto-char saved-point))) 547 (goto-char saved-point)))
548 ;; Remove chars to ignore at the end. 548 ;; Remove chars to ignore at the end.
549 (cond ((= (char-syntax (char-after (1- cmpl-symbol-end))) ?w) 549 (cond ((= (char-syntax (char-after (1- cmpl-symbol-end))) ?w)
550 (goto-char cmpl-symbol-end) 550 (goto-char cmpl-symbol-end)
551 (forward-word -1) 551 (forward-word-strictly -1)
552 (setq cmpl-symbol-end (point)) 552 (setq cmpl-symbol-end (point))
553 (goto-char saved-point))) 553 (goto-char saved-point)))
554 ;; Return completion if the length is reasonable. 554 ;; Return completion if the length is reasonable.
@@ -584,7 +584,7 @@ Returns nil if there isn't one longer than `completion-min-length'."
584 ;; Remove chars to ignore at the start. 584 ;; Remove chars to ignore at the start.
585 (cond ((= (char-syntax (char-after cmpl-symbol-start)) ?w) 585 (cond ((= (char-syntax (char-after cmpl-symbol-start)) ?w)
586 (goto-char cmpl-symbol-start) 586 (goto-char cmpl-symbol-start)
587 (forward-word 1) 587 (forward-word-strictly 1)
588 (setq cmpl-symbol-start (point)) 588 (setq cmpl-symbol-start (point))
589 (goto-char cmpl-symbol-end))) 589 (goto-char cmpl-symbol-end)))
590 ;; Return value if long enough. 590 ;; Return value if long enough.
@@ -597,12 +597,12 @@ Returns nil if there isn't one longer than `completion-min-length'."
597 (let ((saved-point (point))) 597 (let ((saved-point (point)))
598 (setq cmpl-symbol-start (scan-sexps saved-point -1)) 598 (setq cmpl-symbol-start (scan-sexps saved-point -1))
599 ;; take off chars. from end 599 ;; take off chars. from end
600 (forward-word -1) 600 (forward-word-strictly -1)
601 (setq cmpl-symbol-end (point)) 601 (setq cmpl-symbol-end (point))
602 ;; remove chars to ignore at the start 602 ;; remove chars to ignore at the start
603 (cond ((= (char-syntax (char-after cmpl-symbol-start)) ?w) 603 (cond ((= (char-syntax (char-after cmpl-symbol-start)) ?w)
604 (goto-char cmpl-symbol-start) 604 (goto-char cmpl-symbol-start)
605 (forward-word 1) 605 (forward-word-strictly 1)
606 (setq cmpl-symbol-start (point)))) 606 (setq cmpl-symbol-start (point))))
607 ;; Restore state. 607 ;; Restore state.
608 (goto-char saved-point) 608 (goto-char saved-point)
@@ -653,7 +653,7 @@ Returns nil if there isn't one longer than `completion-min-length'."
653 ;; Remove chars to ignore at the start. 653 ;; Remove chars to ignore at the start.
654 (cond ((= (char-syntax (char-after cmpl-symbol-start)) ?w) 654 (cond ((= (char-syntax (char-after cmpl-symbol-start)) ?w)
655 (goto-char cmpl-symbol-start) 655 (goto-char cmpl-symbol-start)
656 (forward-word 1) 656 (forward-word-strictly 1)
657 (setq cmpl-symbol-start (point)) 657 (setq cmpl-symbol-start (point))
658 (goto-char cmpl-symbol-end))) 658 (goto-char cmpl-symbol-end)))
659 ;; Return completion if the length is reasonable. 659 ;; Return completion if the length is reasonable.
@@ -821,7 +821,7 @@ This is sensitive to `case-fold-search'."
821 ;; symbol char to ignore at end. Are we at end ? 821 ;; symbol char to ignore at end. Are we at end ?
822 (progn 822 (progn
823 (setq saved-point-2 (point)) 823 (setq saved-point-2 (point))
824 (forward-word -1) 824 (forward-word-strictly -1)
825 (prog1 825 (prog1
826 (= (char-syntax (preceding-char)) ? ) 826 (= (char-syntax (preceding-char)) ? )
827 (goto-char saved-point-2))))) 827 (goto-char saved-point-2)))))
@@ -1850,7 +1850,7 @@ Prefix args ::
1850 (cond ((looking-at "\\(define\\|ifdef\\)\\>") 1850 (cond ((looking-at "\\(define\\|ifdef\\)\\>")
1851 ;; skip forward over definition symbol 1851 ;; skip forward over definition symbol
1852 ;; and add it to database 1852 ;; and add it to database
1853 (and (forward-word 2) 1853 (and (forward-word-strictly 2)
1854 (setq string (symbol-before-point)) 1854 (setq string (symbol-before-point))
1855 ;;(push string foo) 1855 ;;(push string foo)
1856 (add-completion-to-tail-if-new string))))) 1856 (add-completion-to-tail-if-new string)))))
@@ -1868,7 +1868,7 @@ Prefix args ::
1868 ;; move to next separator char. 1868 ;; move to next separator char.
1869 (goto-char 1869 (goto-char
1870 (setq next-point (scan-sexps (point) 1)))) 1870 (setq next-point (scan-sexps (point) 1))))
1871 (forward-word -1) 1871 (forward-word-strictly -1)
1872 ;; add to database 1872 ;; add to database
1873 (if (setq string (symbol-under-point)) 1873 (if (setq string (symbol-under-point))
1874 ;; (push string foo) 1874 ;; (push string foo)
@@ -1876,7 +1876,7 @@ Prefix args ::
1876 ;; Local TMC hack (useful for parsing paris.h) 1876 ;; Local TMC hack (useful for parsing paris.h)
1877 (if (and (looking-at "_AP") ;; "ansi prototype" 1877 (if (and (looking-at "_AP") ;; "ansi prototype"
1878 (progn 1878 (progn
1879 (forward-word -1) 1879 (forward-word-strictly -1)
1880 (setq string 1880 (setq string
1881 (symbol-under-point)))) 1881 (symbol-under-point))))
1882 (add-completion-to-tail-if-new string))) 1882 (add-completion-to-tail-if-new string)))
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index e93294d6cc2..3a81adeb6a6 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -1580,7 +1580,7 @@ mouse-[0-3]\\)\\)\\>"))
1580 (if (and sym (boundp sym) (fboundp sym) 1580 (if (and sym (boundp sym) (fboundp sym)
1581 (save-excursion 1581 (save-excursion
1582 (goto-char mb) 1582 (goto-char mb)
1583 (forward-word -1) 1583 (forward-word-strictly -1)
1584 (not (looking-at 1584 (not (looking-at
1585 "variable\\|option\\|function\\|command\\|symbol")))) 1585 "variable\\|option\\|function\\|command\\|symbol"))))
1586 (if (checkdoc-autofix-ask-replace 1586 (if (checkdoc-autofix-ask-replace
@@ -1596,7 +1596,7 @@ mouse-[0-3]\\)\\)\\>"))
1596 nil t nil nil "variable"))) 1596 nil t nil nil "variable")))
1597 (goto-char (1- mb)) 1597 (goto-char (1- mb))
1598 (insert disambiguate " ") 1598 (insert disambiguate " ")
1599 (forward-word 1)) 1599 (forward-word-strictly 1))
1600 (setq ret 1600 (setq ret
1601 (format "Disambiguate %s by preceding w/ \ 1601 (format "Disambiguate %s by preceding w/ \
1602function,command,variable,option or symbol." ms1)))))) 1602function,command,variable,option or symbol." ms1))))))
diff --git a/lisp/files.el b/lisp/files.el
index bd9792a51a2..d5b34af86ba 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -6568,7 +6568,7 @@ normally equivalent short `-D' option is just passed on to
6568 (setq error-lines (nreverse error-lines)) 6568 (setq error-lines (nreverse error-lines))
6569 ;; Now read the numeric positions of file names. 6569 ;; Now read the numeric positions of file names.
6570 (goto-char linebeg) 6570 (goto-char linebeg)
6571 (forward-word 1) 6571 (forward-word-strictly 1)
6572 (forward-char 3) 6572 (forward-char 3)
6573 (while (< (point) end) 6573 (while (< (point) end)
6574 (let ((start (insert-directory-adj-pos 6574 (let ((start (insert-directory-adj-pos
diff --git a/lisp/json.el b/lisp/json.el
index bd1ee531656..1eabe0fa33c 100644
--- a/lisp/json.el
+++ b/lisp/json.el
@@ -296,14 +296,14 @@ KEYWORD is the keyword expected."
296 (unless (char-equal char (json-peek)) 296 (unless (char-equal char (json-peek))
297 (signal 'json-unknown-keyword 297 (signal 'json-unknown-keyword
298 (list (save-excursion 298 (list (save-excursion
299 (backward-word 1) 299 (backward-word-strictly 1)
300 (thing-at-point 'word))))) 300 (thing-at-point 'word)))))
301 (json-advance)) 301 (json-advance))
302 keyword) 302 keyword)
303 (unless (looking-at "\\(\\s-\\|[],}]\\|$\\)") 303 (unless (looking-at "\\(\\s-\\|[],}]\\|$\\)")
304 (signal 'json-unknown-keyword 304 (signal 'json-unknown-keyword
305 (list (save-excursion 305 (list (save-excursion
306 (backward-word 1) 306 (backward-word-strictly 1)
307 (thing-at-point 'word))))) 307 (thing-at-point 'word)))))
308 (cond ((string-equal keyword "true") t) 308 (cond ((string-equal keyword "true") t)
309 ((string-equal keyword "false") json-false) 309 ((string-equal keyword "false") json-false)
diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el
index 9dc3af6ab65..4f3e71d34b8 100644
--- a/lisp/mail/mail-extr.el
+++ b/lisp/mail/mail-extr.el
@@ -880,7 +880,7 @@ consing a string.)"
880 (and (not (eobp)) 880 (and (not (eobp))
881 (eq ?w (char-syntax (char-after))) 881 (eq ?w (char-syntax (char-after)))
882 (progn 882 (progn
883 (forward-word 1) 883 (forward-word-strictly 1)
884 (and (not (eobp)) 884 (and (not (eobp))
885 (> (char-after) ?\177) 885 (> (char-after) ?\177)
886 (not (eq (char-after) ? ))))))))) 886 (not (eq (char-after) ? )))))))))
@@ -1312,7 +1312,7 @@ consing a string.)"
1312 ) 1312 )
1313 (t 1313 (t
1314 (setq atom-beg (point)) 1314 (setq atom-beg (point))
1315 (forward-word 1) 1315 (forward-word-strictly 1)
1316 (setq atom-end (point)) 1316 (setq atom-end (point))
1317 (goto-char atom-beg) 1317 (goto-char atom-beg)
1318 (save-restriction 1318 (save-restriction
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el
index ed6a74349f5..a047f5f000a 100644
--- a/lisp/mail/mailabbrev.el
+++ b/lisp/mail/mailabbrev.el
@@ -574,7 +574,7 @@ of a mail alias. The value is set up, buffer-local, when first needed.")
574 (let ((end (point)) 574 (let ((end (point))
575 (beg (with-syntax-table mail-abbrev-syntax-table 575 (beg (with-syntax-table mail-abbrev-syntax-table
576 (save-excursion 576 (save-excursion
577 (backward-word 1) 577 (backward-word-strictly 1)
578 (point))))) 578 (point)))))
579 (completion-in-region beg end mail-abbrevs))) 579 (completion-in-region beg end mail-abbrevs)))
580 580
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 29926108c15..5c2331aea48 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -4089,7 +4089,7 @@ typically for purposes of moderating a list."
4089 (set-syntax-table mail-abbrev-syntax-table) 4089 (set-syntax-table mail-abbrev-syntax-table)
4090 (goto-char before) 4090 (goto-char before)
4091 (while (and (< (point) end) 4091 (while (and (< (point) end)
4092 (progn (forward-word 1) 4092 (progn (forward-word-strictly 1)
4093 (<= (point) end))) 4093 (<= (point) end)))
4094 (expand-abbrev)) 4094 (expand-abbrev))
4095 (set-syntax-table old-syntax-table)) 4095 (set-syntax-table old-syntax-table))
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 5ab5bd9a2cd..58f708a0c1e 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -1404,7 +1404,7 @@ just append to the file, in Babyl format if necessary."
1404 (insert "\nFrom " (user-login-name) " " (current-time-string time) "\n") 1404 (insert "\nFrom " (user-login-name) " " (current-time-string time) "\n")
1405 ;; Insert the time zone before the year. 1405 ;; Insert the time zone before the year.
1406 (forward-char -1) 1406 (forward-char -1)
1407 (forward-word -1) 1407 (forward-word-strictly -1)
1408 (require 'mail-utils) 1408 (require 'mail-utils)
1409 (insert (mail-rfc822-time-zone time) " ") 1409 (insert (mail-rfc822-time-zone time) " ")
1410 (goto-char (point-max)) 1410 (goto-char (point-max))
diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el
index 7a46485531a..bb9ce31307b 100644
--- a/lisp/net/quickurl.el
+++ b/lisp/net/quickurl.el
@@ -347,7 +347,7 @@ It is assumed that the URL is either \"unguarded\" or is wrapped inside an
347 ;; need to do a little more work to get to where we want to be. 347 ;; need to do a little more work to get to where we want to be.
348 (when (thing-at-point-looking-at thing-at-point-markedup-url-regexp) 348 (when (thing-at-point-looking-at thing-at-point-markedup-url-regexp)
349 (search-backward "<URL:")) 349 (search-backward "<URL:"))
350 (backward-word 1) 350 (backward-word-strictly 1)
351 (let ((word (funcall quickurl-grab-lookup-function))) 351 (let ((word (funcall quickurl-grab-lookup-function)))
352 (when word 352 (when word
353 (quickurl-make-url 353 (quickurl-make-url
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index 12ab5b01ab3..0c25d4d42ea 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -778,7 +778,7 @@ the 4 file locations can be clicked on and jumped to."
778 (beginning-of-line) 778 (beginning-of-line)
779 (looking-at ada-compile-goto-error-file-linenr-re)) 779 (looking-at ada-compile-goto-error-file-linenr-re))
780 (save-excursion 780 (save-excursion
781 (if (looking-at "\\([0-9]+\\)") (backward-word 1)) 781 (if (looking-at "\\([0-9]+\\)") (backward-word-strictly 1))
782 (looking-at "line \\([0-9]+\\)")))) 782 (looking-at "line \\([0-9]+\\)"))))
783 ) 783 )
784 (let ((line (if (match-beginning 2) (match-string 2) (match-string 1))) 784 (let ((line (if (match-beginning 2) (match-string 2) (match-string 1)))
@@ -1337,7 +1337,8 @@ the file name."
1337 (save-excursion 1337 (save-excursion
1338 (let ((aa-end (point))) 1338 (let ((aa-end (point)))
1339 (ada-adjust-case-region 1339 (ada-adjust-case-region
1340 (progn (goto-char (symbol-value 'beg)) (forward-word -1) (point)) 1340 (progn (goto-char (symbol-value 'beg)) (forward-word-strictly -1)
1341 (point))
1341 (goto-char aa-end))))) 1342 (goto-char aa-end)))))
1342 1343
1343(defun ada-region-selected () 1344(defun ada-region-selected ()
@@ -1395,7 +1396,8 @@ The standard casing rules will no longer apply to this word."
1395 (save-excursion 1396 (save-excursion
1396 (skip-syntax-backward "w") 1397 (skip-syntax-backward "w")
1397 (setq word (buffer-substring-no-properties 1398 (setq word (buffer-substring-no-properties
1398 (point) (save-excursion (forward-word 1) (point))))))) 1399 (point) (save-excursion (forward-word-strictly 1)
1400 (point)))))))
1399 1401
1400 ;; Reread the exceptions file, in case it was modified by some other, 1402 ;; Reread the exceptions file, in case it was modified by some other,
1401 (ada-case-read-exceptions-from-file file-name) 1403 (ada-case-read-exceptions-from-file file-name)
@@ -1444,7 +1446,8 @@ word itself has a special casing."
1444 (skip-syntax-backward "w") 1446 (skip-syntax-backward "w")
1445 (setq word (buffer-substring-no-properties 1447 (setq word (buffer-substring-no-properties
1446 (point) 1448 (point)
1447 (save-excursion (forward-word 1) (point)))))) 1449 (save-excursion (forward-word-strictly 1)
1450 (point))))))
1448 (modify-syntax-entry ?_ (make-string 1 underscore-syntax) 1451 (modify-syntax-entry ?_ (make-string 1 underscore-syntax)
1449 (syntax-table)))))) 1452 (syntax-table))))))
1450 1453
@@ -1477,7 +1480,8 @@ word itself has a special casing."
1477 ;; do not add it again. This way, the user can easily decide which 1480 ;; do not add it again. This way, the user can easily decide which
1478 ;; priority should be applied to each casing exception 1481 ;; priority should be applied to each casing exception
1479 (let ((word (buffer-substring-no-properties 1482 (let ((word (buffer-substring-no-properties
1480 (point) (save-excursion (forward-word 1) (point))))) 1483 (point) (save-excursion (forward-word-strictly 1)
1484 (point)))))
1481 1485
1482 ;; Handling a substring ? 1486 ;; Handling a substring ?
1483 (if (char-equal (string-to-char word) ?*) 1487 (if (char-equal (string-to-char word) ?*)
@@ -1567,7 +1571,7 @@ and the exceptions defined in `ada-case-exception-file'."
1567(defun ada-after-keyword-p () 1571(defun ada-after-keyword-p ()
1568 "Return t if cursor is after a keyword that is not an attribute." 1572 "Return t if cursor is after a keyword that is not an attribute."
1569 (save-excursion 1573 (save-excursion
1570 (forward-word -1) 1574 (forward-word-strictly -1)
1571 (and (not (and (char-before) 1575 (and (not (and (char-before)
1572 (or (= (char-before) ?_) 1576 (or (= (char-before) ?_)
1573 (= (char-before) ?'))));; unless we have a _ or ' 1577 (= (char-before) ?'))));; unless we have a _ or '
@@ -1868,7 +1872,7 @@ Return the equivalent internal parameter list."
1868 (goto-char apos) 1872 (goto-char apos)
1869 (ada-goto-next-non-ws) 1873 (ada-goto-next-non-ws)
1870 (while (looking-at "\\<\\(in\\|out\\|access\\)\\>") 1874 (while (looking-at "\\<\\(in\\|out\\|access\\)\\>")
1871 (forward-word 1) 1875 (forward-word-strictly 1)
1872 (ada-goto-next-non-ws)) 1876 (ada-goto-next-non-ws))
1873 1877
1874 ;; read type of parameter 1878 ;; read type of parameter
@@ -2472,7 +2476,7 @@ and the offset."
2472 (forward-comment -1000) 2476 (forward-comment -1000)
2473 (if (= (char-before) ?\)) 2477 (if (= (char-before) ?\))
2474 (forward-sexp -1) 2478 (forward-sexp -1)
2475 (forward-word -1)) 2479 (forward-word-strictly -1))
2476 2480
2477 ;; If there is a parameter list, and we have a function declaration 2481 ;; If there is a parameter list, and we have a function declaration
2478 ;; or a access to subprogram declaration 2482 ;; or a access to subprogram declaration
@@ -2480,26 +2484,26 @@ and the offset."
2480 (if (and (= (following-char) ?\() 2484 (if (and (= (following-char) ?\()
2481 (save-excursion 2485 (save-excursion
2482 (or (progn 2486 (or (progn
2483 (backward-word 1) 2487 (backward-word-strictly 1)
2484 (looking-at "\\(function\\|procedure\\)\\>")) 2488 (looking-at "\\(function\\|procedure\\)\\>"))
2485 (progn 2489 (progn
2486 (backward-word 1) 2490 (backward-word-strictly 1)
2487 (setq num-back 2) 2491 (setq num-back 2)
2488 (looking-at "\\(function\\|procedure\\)\\>"))))) 2492 (looking-at "\\(function\\|procedure\\)\\>")))))
2489 2493
2490 ;; The indentation depends of the value of ada-indent-return 2494 ;; The indentation depends of the value of ada-indent-return
2491 (if (<= (eval var) 0) 2495 (if (<= (eval var) 0)
2492 (list (point) (list '- var)) 2496 (list (point) (list '- var))
2493 (list (progn (backward-word num-back) (point)) 2497 (list (progn (backward-word-strictly num-back) (point))
2494 var)) 2498 var))
2495 2499
2496 ;; Else there is no parameter list, but we have a function 2500 ;; Else there is no parameter list, but we have a function
2497 ;; Only do something special if the user want to indent 2501 ;; Only do something special if the user want to indent
2498 ;; relative to the "function" keyword 2502 ;; relative to the "function" keyword
2499 (if (and (> (eval var) 0) 2503 (if (and (> (eval var) 0)
2500 (save-excursion (forward-word -1) 2504 (save-excursion (forward-word-strictly -1)
2501 (looking-at "function\\>"))) 2505 (looking-at "function\\>")))
2502 (list (progn (forward-word -1) (point)) var) 2506 (list (progn (forward-word-strictly -1) (point)) var)
2503 2507
2504 ;; Else... 2508 ;; Else...
2505 (ada-indent-on-previous-lines nil orgpoint orgpoint))))))) 2509 (ada-indent-on-previous-lines nil orgpoint orgpoint)))))))
@@ -2600,7 +2604,7 @@ and the offset."
2600 2604
2601 ;; avoid "with procedure"... in generic parts 2605 ;; avoid "with procedure"... in generic parts
2602 (save-excursion 2606 (save-excursion
2603 (forward-word -1) 2607 (forward-word-strictly -1)
2604 (setq found (not (looking-at "with")))))) 2608 (setq found (not (looking-at "with"))))))
2605 2609
2606 (cond 2610 (cond
@@ -2759,7 +2763,7 @@ ORGPOINT is the limit position used in the calculation."
2759 2763
2760 ;; yes, look what's following 'end' 2764 ;; yes, look what's following 'end'
2761 (progn 2765 (progn
2762 (forward-word 1) 2766 (forward-word-strictly 1)
2763 (ada-goto-next-non-ws) 2767 (ada-goto-next-non-ws)
2764 (cond 2768 (cond
2765 ;; 2769 ;;
@@ -2776,7 +2780,7 @@ ORGPOINT is the limit position used in the calculation."
2776 (save-excursion 2780 (save-excursion
2777 (ada-check-matching-start (match-string 0)) 2781 (ada-check-matching-start (match-string 0))
2778 ;; we are now looking at the matching "record" statement 2782 ;; we are now looking at the matching "record" statement
2779 (forward-word 1) 2783 (forward-word-strictly 1)
2780 (ada-goto-stmt-start) 2784 (ada-goto-stmt-start)
2781 ;; now on the matching type declaration, or use clause 2785 ;; now on the matching type declaration, or use clause
2782 (unless (looking-at "\\(for\\|type\\)\\>") 2786 (unless (looking-at "\\(for\\|type\\)\\>")
@@ -2891,7 +2895,7 @@ ORGPOINT is the limit position used in the calculation."
2891 (looking-at "\\<then\\>")) 2895 (looking-at "\\<then\\>"))
2892 (setq cur-indent (save-excursion (back-to-indentation) (point)))) 2896 (setq cur-indent (save-excursion (back-to-indentation) (point))))
2893 ;; skip 'then' 2897 ;; skip 'then'
2894 (forward-word 1) 2898 (forward-word-strictly 1)
2895 (list cur-indent 'ada-indent)) 2899 (list cur-indent 'ada-indent))
2896 2900
2897 (list cur-indent 'ada-broken-indent)))) 2901 (list cur-indent 'ada-broken-indent))))
@@ -2902,7 +2906,7 @@ ORGPOINT is the limit position used in the calculation."
2902 (let ((pos nil)) 2906 (let ((pos nil))
2903 (cond 2907 (cond
2904 ((save-excursion 2908 ((save-excursion
2905 (forward-word 1) 2909 (forward-word-strictly 1)
2906 (setq pos (ada-goto-next-non-ws orgpoint))) 2910 (setq pos (ada-goto-next-non-ws orgpoint)))
2907 (goto-char pos) 2911 (goto-char pos)
2908 (save-excursion 2912 (save-excursion
@@ -3141,8 +3145,8 @@ ORGPOINT is the limit position used in the calculation."
3141 (and 3145 (and
3142 (goto-char (match-end 0)) 3146 (goto-char (match-end 0))
3143 (ada-goto-next-non-ws orgpoint) 3147 (ada-goto-next-non-ws orgpoint)
3144 (forward-word 1) 3148 (forward-word-strictly 1)
3145 (if (= (char-after) ?') (forward-word 1) t) 3149 (if (= (char-after) ?') (forward-word-strictly 1) t)
3146 (ada-goto-next-non-ws orgpoint) 3150 (ada-goto-next-non-ws orgpoint)
3147 (looking-at "\\<use\\>") 3151 (looking-at "\\<use\\>")
3148 ;; 3152 ;;
@@ -3224,7 +3228,7 @@ ORGPOINT is the limit position used in the calculation."
3224 "end" nil orgpoint nil 'word-search-forward)) 3228 "end" nil orgpoint nil 'word-search-forward))
3225 (ada-goto-next-non-ws) 3229 (ada-goto-next-non-ws)
3226 (looking-at "\\<record\\>") 3230 (looking-at "\\<record\\>")
3227 (forward-word 1) 3231 (forward-word-strictly 1)
3228 (ada-goto-next-non-ws) 3232 (ada-goto-next-non-ws)
3229 (= (char-after) ?\;))) 3233 (= (char-after) ?\;)))
3230 (goto-char (car match-dat)) 3234 (goto-char (car match-dat))
@@ -3334,7 +3338,7 @@ is the end of the match."
3334 (save-excursion 3338 (save-excursion
3335 (ada-goto-previous-word) 3339 (ada-goto-previous-word)
3336 (looking-at "\\<\\(end\\|or\\|and\\)\\>[ \t]*[^;]"))) 3340 (looking-at "\\<\\(end\\|or\\|and\\)\\>[ \t]*[^;]")))
3337 (forward-word -1)) 3341 (forward-word-strictly -1))
3338 3342
3339 ((looking-at "is") 3343 ((looking-at "is")
3340 (setq found 3344 (setq found
@@ -3355,7 +3359,7 @@ is the end of the match."
3355 3359
3356 ((looking-at "private") 3360 ((looking-at "private")
3357 (save-excursion 3361 (save-excursion
3358 (backward-word 1) 3362 (backward-word-strictly 1)
3359 (setq found (not (looking-at "is"))))) 3363 (setq found (not (looking-at "is")))))
3360 3364
3361 (t 3365 (t
@@ -3459,18 +3463,18 @@ Moves point to the beginning of the declaration."
3459 (if (looking-at "\\<declare\\>") 3463 (if (looking-at "\\<declare\\>")
3460 (progn 3464 (progn
3461 (forward-comment -1) 3465 (forward-comment -1)
3462 (backward-word 1)) 3466 (backward-word-strictly 1))
3463 ;; 3467 ;;
3464 ;; no, => 'procedure'/'function'/'task'/'protected' 3468 ;; no, => 'procedure'/'function'/'task'/'protected'
3465 ;; 3469 ;;
3466 (progn 3470 (progn
3467 (forward-word 2) 3471 (forward-word-strictly 2)
3468 (backward-word 1) 3472 (backward-word-strictly 1)
3469 ;; 3473 ;;
3470 ;; skip 'body' 'type' 3474 ;; skip 'body' 'type'
3471 ;; 3475 ;;
3472 (if (looking-at "\\<\\(body\\|type\\)\\>") 3476 (if (looking-at "\\<\\(body\\|type\\)\\>")
3473 (forward-word 1)) 3477 (forward-word-strictly 1))
3474 (forward-sexp 1) 3478 (forward-sexp 1)
3475 (backward-sexp 1))) 3479 (backward-sexp 1)))
3476 ;; 3480 ;;
@@ -3566,7 +3570,7 @@ otherwise throw error."
3566 ;; 3570 ;;
3567 ((looking-at "if") 3571 ((looking-at "if")
3568 (save-excursion 3572 (save-excursion
3569 (forward-word -1) 3573 (forward-word-strictly -1)
3570 (unless (looking-at "\\<end[ \t\n]*if\\>") 3574 (unless (looking-at "\\<end[ \t\n]*if\\>")
3571 (progn 3575 (progn
3572 (setq nest-count (1- nest-count)) 3576 (setq nest-count (1- nest-count))
@@ -3636,7 +3640,7 @@ otherwise throw error."
3636 ;; 3640 ;;
3637 ((looking-at "when") 3641 ((looking-at "when")
3638 (save-excursion 3642 (save-excursion
3639 (forward-word -1) 3643 (forward-word-strictly -1)
3640 (unless (looking-at "\\<exit[ \t\n]*when\\>") 3644 (unless (looking-at "\\<exit[ \t\n]*when\\>")
3641 (progn 3645 (progn
3642 (if stop-at-when 3646 (if stop-at-when
@@ -3687,7 +3691,7 @@ If GOTOTHEN is non-nil, point moves to the `then' following `if'."
3687 3691
3688 (unless (and (looking-at "\\<record\\>") 3692 (unless (and (looking-at "\\<record\\>")
3689 (save-excursion 3693 (save-excursion
3690 (forward-word -1) 3694 (forward-word-strictly -1)
3691 (looking-at "\\<null\\>"))) 3695 (looking-at "\\<null\\>")))
3692 (progn 3696 (progn
3693 ;; calculate nest-depth 3697 ;; calculate nest-depth
@@ -3739,7 +3743,7 @@ If GOTOTHEN is non-nil, point moves to the `then' following `if'."
3739 (number-to-string (count-lines 1 (1+ current))))))) 3743 (number-to-string (count-lines 1 (1+ current)))))))
3740 (unless (looking-at "renames") 3744 (unless (looking-at "renames")
3741 (progn 3745 (progn
3742 (forward-word 1) 3746 (forward-word-strictly 1)
3743 (ada-goto-next-non-ws) 3747 (ada-goto-next-non-ws)
3744 ;; ignore it if it is only a declaration with 'new' 3748 ;; ignore it if it is only a declaration with 'new'
3745 ;; We could have package Foo is new .... 3749 ;; We could have package Foo is new ....
@@ -3755,13 +3759,13 @@ If GOTOTHEN is non-nil, point moves to the `then' following `if'."
3755 ;; found task start => check if it has a body 3759 ;; found task start => check if it has a body
3756 ((looking-at "task") 3760 ((looking-at "task")
3757 (save-excursion 3761 (save-excursion
3758 (forward-word 1) 3762 (forward-word-strictly 1)
3759 (ada-goto-next-non-ws) 3763 (ada-goto-next-non-ws)
3760 (cond 3764 (cond
3761 ((looking-at "\\<body\\>")) 3765 ((looking-at "\\<body\\>"))
3762 ((looking-at "\\<type\\>") 3766 ((looking-at "\\<type\\>")
3763 ;; In that case, do nothing if there is a "is" 3767 ;; In that case, do nothing if there is a "is"
3764 (forward-word 2);; skip "type" 3768 (forward-word-strictly 2);; skip "type"
3765 (ada-goto-next-non-ws);; skip type name 3769 (ada-goto-next-non-ws);; skip type name
3766 3770
3767 ;; Do nothing if we are simply looking at a simple 3771 ;; Do nothing if we are simply looking at a simple
@@ -3781,7 +3785,7 @@ If GOTOTHEN is non-nil, point moves to the `then' following `if'."
3781 (t 3785 (t
3782 ;; Check if that task declaration had a block attached to 3786 ;; Check if that task declaration had a block attached to
3783 ;; it (i.e do nothing if we have just "task name;") 3787 ;; it (i.e do nothing if we have just "task name;")
3784 (unless (progn (forward-word 1) 3788 (unless (progn (forward-word-strictly 1)
3785 (looking-at "[ \t]*;")) 3789 (looking-at "[ \t]*;"))
3786 (setq nest-count (1- nest-count)))))) 3790 (setq nest-count (1- nest-count))))))
3787 (setq last-was-begin (cdr last-was-begin)) 3791 (setq last-was-begin (cdr last-was-begin))
@@ -3906,7 +3910,7 @@ If NOERROR is non-nil, it only returns nil if no matching start found."
3906 ;; 3910 ;;
3907 ;; calculate nest-depth 3911 ;; calculate nest-depth
3908 ;; 3912 ;;
3909 (backward-word 1) 3913 (backward-word-strictly 1)
3910 (cond 3914 (cond
3911 ;; procedures and functions need to be processed recursively, in 3915 ;; procedures and functions need to be processed recursively, in
3912 ;; case they are defined in a declare/begin block, as in: 3916 ;; case they are defined in a declare/begin block, as in:
@@ -3925,7 +3929,7 @@ If NOERROR is non-nil, it only returns nil if no matching start found."
3925 3929
3926 ((and (looking-at "\\<procedure\\|function\\>")) 3930 ((and (looking-at "\\<procedure\\|function\\>"))
3927 (if first 3931 (if first
3928 (forward-word 1) 3932 (forward-word-strictly 1)
3929 3933
3930 (setq pos (point)) 3934 (setq pos (point))
3931 (ada-search-ignore-string-comment "is\\|;") 3935 (ada-search-ignore-string-comment "is\\|;")
@@ -3946,7 +3950,7 @@ If NOERROR is non-nil, it only returns nil if no matching start found."
3946 (skip-chars-forward "end") 3950 (skip-chars-forward "end")
3947 (ada-goto-next-non-ws) 3951 (ada-goto-next-non-ws)
3948 (looking-at "\\<\\(loop\\|select\\|record\\|case\\|if\\)\\>")) 3952 (looking-at "\\<\\(loop\\|select\\|record\\|case\\|if\\)\\>"))
3949 (forward-word 1))) 3953 (forward-word-strictly 1)))
3950 3954
3951 ;; found package start => check if it really starts a block, and is not 3955 ;; found package start => check if it really starts a block, and is not
3952 ;; in fact a generic instantiation for instance 3956 ;; in fact a generic instantiation for instance
@@ -3965,7 +3969,7 @@ If NOERROR is non-nil, it only returns nil if no matching start found."
3965 (if (not first) 3969 (if (not first)
3966 (setq nest-count (1+ nest-count))) 3970 (setq nest-count (1+ nest-count)))
3967 (setq found (<= nest-count 0)) 3971 (setq found (<= nest-count 0))
3968 (forward-word 1))) ; end of 'cond' 3972 (forward-word-strictly 1))) ; end of 'cond'
3969 3973
3970 (setq first nil)) 3974 (setq first nil))
3971 3975
@@ -4077,7 +4081,7 @@ Assumes point to be at the end of a statement."
4077 (save-excursion 4081 (save-excursion
4078 (and (looking-at "\\<or\\>") 4082 (and (looking-at "\\<or\\>")
4079 (progn 4083 (progn
4080 (forward-word 1) 4084 (forward-word-strictly 1)
4081 (ada-goto-stmt-start) 4085 (ada-goto-stmt-start)
4082 (looking-at "\\<or\\>"))))) 4086 (looking-at "\\<or\\>")))))
4083 4087
@@ -4100,7 +4104,7 @@ Return nil if the private is part of the package name, as in
4100 (progn (forward-comment -1000) 4104 (progn (forward-comment -1000)
4101 (and (not (bobp)) 4105 (and (not (bobp))
4102 (or (= (char-before) ?\;) 4106 (or (= (char-before) ?\;)
4103 (and (forward-word -3) 4107 (and (forward-word-strictly -3)
4104 (looking-at "\\<package\\>")))))))) 4108 (looking-at "\\<package\\>"))))))))
4105 4109
4106 4110
@@ -4120,11 +4124,11 @@ Return nil if the private is part of the package name, as in
4120 (skip-chars-backward " \t\n") 4124 (skip-chars-backward " \t\n")
4121 (if (= (char-before) ?\") 4125 (if (= (char-before) ?\")
4122 (backward-char 3) 4126 (backward-char 3)
4123 (backward-word 1)) 4127 (backward-word-strictly 1))
4124 t) 4128 t)
4125 4129
4126 ;; and now over the second one 4130 ;; and now over the second one
4127 (backward-word 1) 4131 (backward-word-strictly 1)
4128 4132
4129 ;; We should ignore the case when the reserved keyword is in a 4133 ;; We should ignore the case when the reserved keyword is in a
4130 ;; comment (for instance, when we have: 4134 ;; comment (for instance, when we have:
@@ -4150,7 +4154,7 @@ Return nil if the private is part of the package name, as in
4150If BACKWARDP is non-nil, search backward; search forward otherwise." 4154If BACKWARDP is non-nil, search backward; search forward otherwise."
4151 (let (result) 4155 (let (result)
4152 (while (and (setq result (ada-search-ignore-string-comment regexp backwardp)) 4156 (while (and (setq result (ada-search-ignore-string-comment regexp backwardp))
4153 (save-excursion (forward-word -1) 4157 (save-excursion (forward-word-strictly -1)
4154 (looking-at "and then\\|or else")))) 4158 (looking-at "and then\\|or else"))))
4155 result)) 4159 result))
4156 4160
@@ -4343,9 +4347,9 @@ of the region. Otherwise, operate only on the current line."
4343 (ada-in-string-or-comment-p) 4347 (ada-in-string-or-comment-p)
4344 (and (progn 4348 (and (progn
4345 (or (looking-at "[ \t]*\\<end\\>") 4349 (or (looking-at "[ \t]*\\<end\\>")
4346 (backward-word 1)) 4350 (backward-word-strictly 1))
4347 (or (looking-at "[ \t]*\\<end\\>") 4351 (or (looking-at "[ \t]*\\<end\\>")
4348 (backward-word 1)) 4352 (backward-word-strictly 1))
4349 (or (looking-at "[ \t]*\\<end\\>") 4353 (or (looking-at "[ \t]*\\<end\\>")
4350 (error "Not on end ...;"))) 4354 (error "Not on end ...;")))
4351 (ada-goto-matching-start 1) 4355 (ada-goto-matching-start 1)
@@ -4399,7 +4403,7 @@ Moves to `begin' if in a declarative part."
4399 ((save-excursion 4403 ((save-excursion
4400 (and (ada-goto-stmt-start) 4404 (and (ada-goto-stmt-start)
4401 (looking-at "\\<task\\>" ) 4405 (looking-at "\\<task\\>" )
4402 (forward-word 1) 4406 (forward-word-strictly 1)
4403 (ada-goto-next-non-ws) 4407 (ada-goto-next-non-ws)
4404 (looking-at "\\<body\\>"))) 4408 (looking-at "\\<body\\>")))
4405 (ada-search-ignore-string-comment "begin" nil nil nil 4409 (ada-search-ignore-string-comment "begin" nil nil nil
@@ -5020,7 +5024,7 @@ Since the search can be long, the results are cached."
5020 (skip-chars-forward " \t\n") 5024 (skip-chars-forward " \t\n")
5021 (if (looking-at "return") 5025 (if (looking-at "return")
5022 (progn 5026 (progn
5023 (forward-word 1) 5027 (forward-word-strictly 1)
5024 (skip-chars-forward " \t\n") 5028 (skip-chars-forward " \t\n")
5025 (skip-chars-forward "a-zA-Z0-9_'"))) 5029 (skip-chars-forward "a-zA-Z0-9_'")))
5026 5030
@@ -5271,8 +5275,8 @@ for `ada-procedure-start-regexp'."
5271 ((or (looking-at "^[ \t]*procedure") 5275 ((or (looking-at "^[ \t]*procedure")
5272 (setq func-found (looking-at "^[ \t]*function"))) 5276 (setq func-found (looking-at "^[ \t]*function")))
5273 ;; treat it as a proc/func 5277 ;; treat it as a proc/func
5274 (forward-word 2) 5278 (forward-word-strictly 2)
5275 (forward-word -1) 5279 (forward-word-strictly -1)
5276 (setq procname (buffer-substring (point) (cdr match))) ; store proc name 5280 (setq procname (buffer-substring (point) (cdr match))) ; store proc name
5277 5281
5278 ;; goto end of procname 5282 ;; goto end of procname
@@ -5285,7 +5289,7 @@ for `ada-procedure-start-regexp'."
5285 ;; if function, skip over 'return' and result type. 5289 ;; if function, skip over 'return' and result type.
5286 (if func-found 5290 (if func-found
5287 (progn 5291 (progn
5288 (forward-word 1) 5292 (forward-word-strictly 1)
5289 (skip-chars-forward " \t\n") 5293 (skip-chars-forward " \t\n")
5290 (setq functype (buffer-substring (point) 5294 (setq functype (buffer-substring (point)
5291 (progn 5295 (progn
@@ -5327,7 +5331,7 @@ for `ada-procedure-start-regexp'."
5327 (if (looking-at "^[ \t]*task") 5331 (if (looking-at "^[ \t]*task")
5328 (progn 5332 (progn
5329 (message "Task conversion is not yet implemented") 5333 (message "Task conversion is not yet implemented")
5330 (forward-word 2) 5334 (forward-word-strictly 2)
5331 (if (looking-at "[ \t]*;") 5335 (if (looking-at "[ \t]*;")
5332 (forward-line) 5336 (forward-line)
5333 (ada-move-to-end)) 5337 (ada-move-to-end))
diff --git a/lisp/progmodes/cc-align.el b/lisp/progmodes/cc-align.el
index d59503be61a..a2077be24fc 100644
--- a/lisp/progmodes/cc-align.el
+++ b/lisp/progmodes/cc-align.el
@@ -449,7 +449,7 @@ class Foo class Foo
449Works with: inher-cont." 449Works with: inher-cont."
450 (save-excursion 450 (save-excursion
451 (goto-char (c-langelem-pos langelem)) 451 (goto-char (c-langelem-pos langelem))
452 (forward-word 1) 452 (forward-word-strictly 1)
453 (if (looking-at "[ \t]*$") 453 (if (looking-at "[ \t]*$")
454 c-basic-offset 454 c-basic-offset
455 (c-forward-syntactic-ws) 455 (c-forward-syntactic-ws)
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 06e11b25d20..380ea15cc89 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -6083,7 +6083,7 @@ comment at the start of cc-engine.el for more info."
6083 6083
6084 (when (or (looking-at "extends") 6084 (when (or (looking-at "extends")
6085 (looking-at "super")) 6085 (looking-at "super"))
6086 (forward-word) 6086 (forward-word-strictly)
6087 (c-forward-syntactic-ws) 6087 (c-forward-syntactic-ws)
6088 (let ((c-promote-possible-types t) 6088 (let ((c-promote-possible-types t)
6089 (c-record-found-types t)) 6089 (c-record-found-types t))
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index de546f7c1d4..83eded136eb 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -2304,7 +2304,7 @@ to nil."
2304 (memq this-command '(self-insert-command newline)))) 2304 (memq this-command '(self-insert-command newline))))
2305 head1 notlast name p really-delete over) 2305 head1 notlast name p really-delete over)
2306 (and (save-excursion 2306 (and (save-excursion
2307 (forward-word -1) 2307 (forward-word-strictly -1)
2308 (and 2308 (and
2309 (eq (preceding-char) ?=) 2309 (eq (preceding-char) ?=)
2310 (progn 2310 (progn
@@ -2327,7 +2327,7 @@ to nil."
2327 (progn 2327 (progn
2328 (insert "\n\n=cut") 2328 (insert "\n\n=cut")
2329 (cperl-ensure-newlines 2) 2329 (cperl-ensure-newlines 2)
2330 (forward-word -2) 2330 (forward-word-strictly -2)
2331 (if (and head1 2331 (if (and head1
2332 (not 2332 (not
2333 (save-excursion 2333 (save-excursion
@@ -2335,7 +2335,7 @@ to nil."
2335 (re-search-backward "\\(\\`\n?\\|\n\n\\)=head1\\>" 2335 (re-search-backward "\\(\\`\n?\\|\n\n\\)=head1\\>"
2336 nil t)))) ; Only one 2336 nil t)))) ; Only one
2337 (progn 2337 (progn
2338 (forward-word 1) 2338 (forward-word-strictly 1)
2339 (setq name (file-name-base) 2339 (setq name (file-name-base)
2340 p (point)) 2340 p (point))
2341 (insert " NAME\n\n" name 2341 (insert " NAME\n\n" name
@@ -2343,10 +2343,10 @@ to nil."
2343 "=head1 DESCRIPTION") 2343 "=head1 DESCRIPTION")
2344 (cperl-ensure-newlines 4) 2344 (cperl-ensure-newlines 4)
2345 (goto-char p) 2345 (goto-char p)
2346 (forward-word 2) 2346 (forward-word-strictly 2)
2347 (end-of-line) 2347 (end-of-line)
2348 (setq really-delete t)) 2348 (setq really-delete t))
2349 (forward-word 1)))) 2349 (forward-word-strictly 1))))
2350 (if over 2350 (if over
2351 (progn 2351 (progn
2352 (setq p (point)) 2352 (setq p (point))
@@ -2354,7 +2354,7 @@ to nil."
2354 "=back") 2354 "=back")
2355 (cperl-ensure-newlines 2) 2355 (cperl-ensure-newlines 2)
2356 (goto-char p) 2356 (goto-char p)
2357 (forward-word 1) 2357 (forward-word-strictly 1)
2358 (end-of-line) 2358 (end-of-line)
2359 (setq really-delete t))) 2359 (setq really-delete t)))
2360 (if (and delete really-delete) 2360 (if (and delete really-delete)
@@ -2480,7 +2480,7 @@ If in POD, insert appropriate lines."
2480 (if (and over 2480 (if (and over
2481 (progn 2481 (progn
2482 (forward-paragraph -1) 2482 (forward-paragraph -1)
2483 (forward-word 1) 2483 (forward-word-strictly 1)
2484 (setq pos (point)) 2484 (setq pos (point))
2485 (setq cut (buffer-substring (point) (point-at-eol))) 2485 (setq cut (buffer-substring (point) (point-at-eol)))
2486 (delete-char (- (point-at-eol) (point))) 2486 (delete-char (- (point-at-eol) (point)))
@@ -2531,7 +2531,7 @@ If in POD, insert appropriate lines."
2531 ;; and do no indentation for them. 2531 ;; and do no indentation for them.
2532 (and (eq last-command-event ?:) 2532 (and (eq last-command-event ?:)
2533 (save-excursion 2533 (save-excursion
2534 (forward-word 1) 2534 (forward-word-strictly 1)
2535 (skip-chars-forward " \t") 2535 (skip-chars-forward " \t")
2536 (and (< (point) end) 2536 (and (< (point) end)
2537 (progn (goto-char (- end 1)) 2537 (progn (goto-char (- end 1))
@@ -4309,7 +4309,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face',
4309 ;; Now: tail: if the second part is non-matching without ///e 4309 ;; Now: tail: if the second part is non-matching without ///e
4310 (if (eq (char-syntax (following-char)) ?w) 4310 (if (eq (char-syntax (following-char)) ?w)
4311 (progn 4311 (progn
4312 (forward-word 1) ; skip modifiers s///s 4312 (forward-word-strictly 1) ; skip modifiers s///s
4313 (if tail (cperl-commentify tail (point) t)) 4313 (if tail (cperl-commentify tail (point) t))
4314 (cperl-postpone-fontification 4314 (cperl-postpone-fontification
4315 e1 (point) 'face my-cperl-REx-modifiers-face))) 4315 e1 (point) 'face my-cperl-REx-modifiers-face)))
@@ -5110,7 +5110,7 @@ Returns some position at the last line."
5110 (if (looking-at 5110 (if (looking-at
5111 "[ \t]*}?[ \t]*\\<\\(\\els\\(e\\|if\\)\\|continue\\|unless\\|if\\|while\\|for\\(each\\)?\\|until\\)\\>\\(\t*\\|[ \t][ \t]+\\)[^ \t\n#]") 5111 "[ \t]*}?[ \t]*\\<\\(\\els\\(e\\|if\\)\\|continue\\|unless\\|if\\|while\\|for\\(each\\)?\\|until\\)\\>\\(\t*\\|[ \t][ \t]+\\)[^ \t\n#]")
5112 (progn 5112 (progn
5113 (forward-word 1) 5113 (forward-word-strictly 1)
5114 (delete-horizontal-space) 5114 (delete-horizontal-space)
5115 (insert (make-string cperl-indent-region-fix-constructs ?\s)) 5115 (insert (make-string cperl-indent-region-fix-constructs ?\s))
5116 (beginning-of-line))) 5116 (beginning-of-line)))
@@ -5119,7 +5119,7 @@ Returns some position at the last line."
5119 (if (looking-at 5119 (if (looking-at
5120 "[ \t]*\\<for\\(each\\)?[ \t]+\\(my\\|local\\|our\\)\\(\t*\\|[ \t][ \t]+\\)[^ \t\n]") 5120 "[ \t]*\\<for\\(each\\)?[ \t]+\\(my\\|local\\|our\\)\\(\t*\\|[ \t][ \t]+\\)[^ \t\n]")
5121 (progn 5121 (progn
5122 (forward-word 2) 5122 (forward-word-strictly 2)
5123 (delete-horizontal-space) 5123 (delete-horizontal-space)
5124 (insert (make-string cperl-indent-region-fix-constructs ?\s)) 5124 (insert (make-string cperl-indent-region-fix-constructs ?\s))
5125 (beginning-of-line))) 5125 (beginning-of-line)))
@@ -8502,7 +8502,7 @@ the appropriate statement modifier."
8502 (insert B " ") 8502 (insert B " ")
8503 (and B-comment (insert B-comment " ")) 8503 (and B-comment (insert B-comment " "))
8504 (just-one-space) 8504 (just-one-space)
8505 (forward-word 1) 8505 (forward-word-strictly 1)
8506 (setq pre-A (point)) 8506 (setq pre-A (point))
8507 (insert " " A ";") 8507 (insert " " A ";")
8508 (delete-horizontal-space) 8508 (delete-horizontal-space)
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 588f4d99d78..58397530e4f 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -2355,7 +2355,8 @@ CHANGE-WORD should be one of `upcase-word', `downcase-word', `capitalize-word'."
2355 (setq ref-point (point) 2355 (setq ref-point (point)
2356 ;; FIXME this does not work for constructs with 2356 ;; FIXME this does not work for constructs with
2357 ;; embedded space, eg "sync all". 2357 ;; embedded space, eg "sync all".
2358 back-point (save-excursion (backward-word 1) (point)) 2358 back-point (save-excursion (backward-word-strictly 1)
2359 (point))
2359 saveword (buffer-substring back-point ref-point)) 2360 saveword (buffer-substring back-point ref-point))
2360 (funcall change-word -1) 2361 (funcall change-word -1)
2361 (or (string= saveword (buffer-substring back-point ref-point)) 2362 (or (string= saveword (buffer-substring back-point ref-point))
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el
index 8a87eb9770a..6b5f51a3fbd 100644
--- a/lisp/progmodes/hideif.el
+++ b/lisp/progmodes/hideif.el
@@ -1828,7 +1828,7 @@ This allows #ifdef VAR to be hidden."
1828 (let* ((default (save-excursion 1828 (let* ((default (save-excursion
1829 (beginning-of-line) 1829 (beginning-of-line)
1830 (cond ((looking-at hif-ifx-else-endif-regexp) 1830 (cond ((looking-at hif-ifx-else-endif-regexp)
1831 (forward-word 2) 1831 (forward-word-strictly 2)
1832 (current-word 'strict)) 1832 (current-word 'strict))
1833 (t 1833 (t
1834 nil)))) 1834 nil))))
diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el
index 7fde29dcf7a..c91f98e3206 100644
--- a/lisp/progmodes/icon.el
+++ b/lisp/progmodes/icon.el
@@ -404,8 +404,8 @@ Returns nil if line starts inside a string, t if in a comment."
404 (ch-syntax (char-syntax ch))) 404 (ch-syntax (char-syntax ch)))
405 (if (eq ch-syntax ?w) 405 (if (eq ch-syntax ?w)
406 (assoc (buffer-substring 406 (assoc (buffer-substring
407 (progn (forward-word -1) (point)) 407 (progn (forward-word-strictly -1) (point))
408 (progn (forward-word 1) (point))) 408 (progn (forward-word-strictly 1) (point)))
409 icon-resword-alist) 409 icon-resword-alist)
410 (not (memq ch '(0 ?\; ?\} ?\{ ?\) ?\] ?\" ?\' ?\# ?\, ?\. ?\n)))))) 410 (not (memq ch '(0 ?\; ?\} ?\{ ?\) ?\] ?\" ?\' ?\# ?\, ?\. ?\n))))))
411 411
@@ -431,7 +431,8 @@ Returns nil if line starts inside a string, t if in a comment."
431 ((and (eq (char-syntax (following-char)) ?w) 431 ((and (eq (char-syntax (following-char)) ?w)
432 (cdr 432 (cdr
433 (assoc (buffer-substring (point) 433 (assoc (buffer-substring (point)
434 (save-excursion (forward-word 1) (point))) 434 (save-excursion (forward-word-strictly 1)
435 (point)))
435 icon-resword-alist))) 0) 436 icon-resword-alist))) 0)
436 (t (end-of-line 0) (icon-backward-to-start-of-continued-exp lim)))) 437 (t (end-of-line 0) (icon-backward-to-start-of-continued-exp lim))))
437 438
@@ -475,7 +476,7 @@ Returns nil if line starts inside a string, t if in a comment."
475 (interactive) 476 (interactive)
476 (if (not (bobp)) (forward-char -1)) 477 (if (not (bobp)) (forward-char -1))
477 (re-search-forward "\\(\\s \\|^\\)end\\(\\s \\|$\\)" (point-max) 'move) 478 (re-search-forward "\\(\\s \\|^\\)end\\(\\s \\|$\\)" (point-max) 'move)
478 (forward-word -1) 479 (forward-word-strictly -1)
479 (forward-line 1)) 480 (forward-line 1))
480 481
481(defun indent-icon-exp () 482(defun indent-icon-exp ()
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index ab87a584bfd..9cb2ca74063 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -2118,7 +2118,7 @@ An END token must be preceded by whitespace."
2118 (if (not (idlwave-quoted)) 2118 (if (not (idlwave-quoted))
2119 (if 2119 (if
2120 (save-excursion 2120 (save-excursion
2121 (backward-word 1) 2121 (backward-word-strictly 1)
2122 (backward-char 1) 2122 (backward-char 1)
2123 (looking-at "[ \t\n\f]")) 2123 (looking-at "[ \t\n\f]"))
2124 (idlwave-show-begin)))) 2124 (idlwave-show-begin))))
@@ -2435,13 +2435,13 @@ If prefix ARG < 0 then move forward to enclosing block end."
2435 "Go to the beginning of the current block." 2435 "Go to the beginning of the current block."
2436 (interactive) 2436 (interactive)
2437 (idlwave-block-jump-out -1 'nomark) 2437 (idlwave-block-jump-out -1 'nomark)
2438 (forward-word 1)) 2438 (forward-word-strictly 1))
2439 2439
2440(defun idlwave-end-of-block () 2440(defun idlwave-end-of-block ()
2441 "Go to the beginning of the current block." 2441 "Go to the beginning of the current block."
2442 (interactive) 2442 (interactive)
2443 (idlwave-block-jump-out 1 'nomark) 2443 (idlwave-block-jump-out 1 'nomark)
2444 (backward-word 1)) 2444 (backward-word-strictly 1))
2445 2445
2446(defun idlwave-forward-block (&optional arg) 2446(defun idlwave-forward-block (&optional arg)
2447 "Move across next nested block." 2447 "Move across next nested block."
@@ -3150,12 +3150,12 @@ possibility of unbalanced blocks."
3150 (if (>= dir 0) (end-of-line)) ;Make sure we are in current block 3150 (if (>= dir 0) (end-of-line)) ;Make sure we are in current block
3151 (if (setq found (idlwave-find-key block-reg dir t unit-limit)) 3151 (if (setq found (idlwave-find-key block-reg dir t unit-limit))
3152 (while (and found (looking-at block-limit)) 3152 (while (and found (looking-at block-limit))
3153 (if (>= dir 0) (forward-word 1)) 3153 (if (>= dir 0) (forward-word-strictly 1))
3154 (idlwave-block-jump-out dir t) 3154 (idlwave-block-jump-out dir t)
3155 (setq found (idlwave-find-key block-reg dir t unit-limit)))) 3155 (setq found (idlwave-find-key block-reg dir t unit-limit))))
3156 (if (not nomark) (push-mark here)) 3156 (if (not nomark) (push-mark here))
3157 (if (not found) (goto-char unit-limit) 3157 (if (not found) (goto-char unit-limit)
3158 (if (>= dir 0) (forward-word 1))))) 3158 (if (>= dir 0) (forward-word-strictly 1)))))
3159 3159
3160(defun idlwave-min-current-statement-indent (&optional end-reg) 3160(defun idlwave-min-current-statement-indent (&optional end-reg)
3161 "The minimum indent in the current statement." 3161 "The minimum indent in the current statement."
@@ -6325,7 +6325,7 @@ Must accept two arguments: `apos' and `info'.")
6325 (is-self 6325 (is-self
6326 (and arrow 6326 (and arrow
6327 (save-excursion (goto-char apos) 6327 (save-excursion (goto-char apos)
6328 (forward-word -1) 6328 (forward-word-strictly -1)
6329 (let ((case-fold-search t)) 6329 (let ((case-fold-search t))
6330 (looking-at "self\\>"))))) 6330 (looking-at "self\\>")))))
6331 (force-query idlwave-force-class-query) 6331 (force-query idlwave-force-class-query)
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 1e5cc60ee51..15a52ba8cdc 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -838,7 +838,7 @@ return the name of the function, or t if the name could not be
838determined. Otherwise, return nil." 838determined. Otherwise, return nil."
839 (cl-assert (looking-at "\\_<function\\_>")) 839 (cl-assert (looking-at "\\_<function\\_>"))
840 (let ((name t)) 840 (let ((name t))
841 (forward-word) 841 (forward-word-strictly)
842 (forward-comment most-positive-fixnum) 842 (forward-comment most-positive-fixnum)
843 (when (eq (char-after) ?*) 843 (when (eq (char-after) ?*)
844 (forward-char) 844 (forward-char)
diff --git a/lisp/progmodes/mantemp.el b/lisp/progmodes/mantemp.el
index 913849df324..ea9d400dd9e 100644
--- a/lisp/progmodes/mantemp.el
+++ b/lisp/progmodes/mantemp.el
@@ -157,8 +157,8 @@ the lines."
157 "^template class [A-z :&*<>~=,0-9+!]*(" nil t nil) 157 "^template class [A-z :&*<>~=,0-9+!]*(" nil t nil)
158 (progn 158 (progn
159 (beginning-of-line) 159 (beginning-of-line)
160 (forward-word 1) 160 (forward-word-strictly 1)
161 (delete-region (point) (progn (forward-word 1) (point))))))) 161 (delete-region (point) (progn (forward-word-strictly 1) (point)))))))
162 162
163(defun mantemp-make-mantemps () 163(defun mantemp-make-mantemps ()
164 "Gathering interface to the functions modifying the buffer." 164 "Gathering interface to the functions modifying the buffer."
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index 28619a55853..f309565acff 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -1088,7 +1088,7 @@ The value is (START END NAME-START NAME-END) of the function."
1088 (save-excursion 1088 (save-excursion
1089 (goto-char (point-min)) 1089 (goto-char (point-min))
1090 (when (equal (funcall smie-forward-token-function) "function") 1090 (when (equal (funcall smie-forward-token-function) "function")
1091 (forward-word -1) 1091 (forward-word-strictly -1)
1092 (let* ((start (point)) 1092 (let* ((start (point))
1093 (end (progn (forward-sexp 1) (point))) 1093 (end (progn (forward-sexp 1) (point)))
1094 (name (when (progn 1094 (name (when (progn
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el
index b0929ebd040..76441ea03e6 100644
--- a/lisp/progmodes/pascal.el
+++ b/lisp/progmodes/pascal.el
@@ -1023,7 +1023,7 @@ indent of the current line in parameterlist."
1023 (let ((lineup (if (or (looking-at "\\<var\\>\\|\\<record\\>") arg start) 1023 (let ((lineup (if (or (looking-at "\\<var\\>\\|\\<record\\>") arg start)
1024 ":" "=")) 1024 ":" "="))
1025 (stpos (if start start 1025 (stpos (if start start
1026 (forward-word 2) (backward-word 1) (point))) 1026 (forward-word-strictly 2) (backward-word 1) (point)))
1027 (edpos (set-marker (make-marker) 1027 (edpos (set-marker (make-marker)
1028 (if end end 1028 (if end end
1029 (max (progn (pascal-declaration-end) 1029 (max (progn (pascal-declaration-end)
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index 241521bef4d..7ed87e8f033 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -301,7 +301,7 @@
301 ;; sub tr {...} 301 ;; sub tr {...}
302 (3 (ignore 302 (3 (ignore
303 (if (save-excursion (goto-char (match-beginning 0)) 303 (if (save-excursion (goto-char (match-beginning 0))
304 (forward-word -1) 304 (forward-word-strictly -1)
305 (looking-at-p "sub[ \t\n]")) 305 (looking-at-p "sub[ \t\n]"))
306 ;; This is defining a function. 306 ;; This is defining a function.
307 nil 307 nil
@@ -404,7 +404,8 @@
404 (skip-syntax-backward " ") 404 (skip-syntax-backward " ")
405 (skip-syntax-backward "w") 405 (skip-syntax-backward "w")
406 (member (buffer-substring 406 (member (buffer-substring
407 (point) (progn (forward-word 1) (point))) 407 (point) (progn (forward-word-strictly 1)
408 (point)))
408 '("tr" "s" "y")))) 409 '("tr" "s" "y"))))
409 (close (cdr (assq char perl-quote-like-pairs))) 410 (close (cdr (assq char perl-quote-like-pairs)))
410 (st (perl-quote-syntax-table char))) 411 (st (perl-quote-syntax-table char)))
@@ -993,7 +994,7 @@ Returns (parse-state) if line starts inside a string."
993 ((memq c '(?\) ?\] ?\} ?\")) 994 ((memq c '(?\) ?\] ?\} ?\"))
994 (forward-sexp -1) (forward-comment (- (point))) t) 995 (forward-sexp -1) (forward-comment (- (point))) t)
995 ((eq ?w (char-syntax c)) 996 ((eq ?w (char-syntax c))
996 (forward-word -1) (forward-comment (- (point))) t) 997 (forward-word-strictly -1) (forward-comment (- (point))) t)
997 (t (forward-char -1) (forward-comment (- (point))) t))))) 998 (t (forward-char -1) (forward-comment (- (point))) t)))))
998 999
999;; note: this may be slower than the c-mode version, but I can understand it. 1000;; note: this may be slower than the c-mode version, but I can understand it.
diff --git a/lisp/progmodes/ps-mode.el b/lisp/progmodes/ps-mode.el
index c9299055a4d..3b0694541b1 100644
--- a/lisp/progmodes/ps-mode.el
+++ b/lisp/progmodes/ps-mode.el
@@ -1082,7 +1082,7 @@ Use line numbers if `ps-run-error-line-numbers' is not nil"
1082 (goto-char (max 1 (1- (point))))) 1082 (goto-char (max 1 (1- (point)))))
1083 (when (looking-at "[0-9]") 1083 (when (looking-at "[0-9]")
1084 (forward-char 1) 1084 (forward-char 1)
1085 (forward-word -1) 1085 (forward-word-strictly -1)
1086 (when (looking-at "[0-9]+") 1086 (when (looking-at "[0-9]+")
1087 (let (i) 1087 (let (i)
1088 (setq 1088 (setq
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index d2370741972..be8f96dcfd9 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -448,7 +448,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
448 448
449(defun ruby-smie--redundant-do-p (&optional skip) 449(defun ruby-smie--redundant-do-p (&optional skip)
450 (save-excursion 450 (save-excursion
451 (if skip (backward-word 1)) 451 (if skip (backward-word-strictly 1))
452 (member (nth 2 (smie-backward-sexp ";")) '("while" "until" "for")))) 452 (member (nth 2 (smie-backward-sexp ";")) '("while" "until" "for"))))
453 453
454(defun ruby-smie--opening-pipe-p () 454(defun ruby-smie--opening-pipe-p ()
@@ -517,7 +517,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
517 (setq tok (concat "." tok))) 517 (setq tok (concat "." tok)))
518 (cond 518 (cond
519 ((member tok '("unless" "if" "while" "until")) 519 ((member tok '("unless" "if" "while" "until"))
520 (if (save-excursion (forward-word -1) (ruby-smie--bosp)) 520 (if (save-excursion (forward-word-strictly -1) (ruby-smie--bosp))
521 tok "iuwu-mod")) 521 tok "iuwu-mod"))
522 ((string-match-p "\\`|[*&]?\\'" tok) 522 ((string-match-p "\\`|[*&]?\\'" tok)
523 (forward-char (- 1 (length tok))) 523 (forward-char (- 1 (length tok)))
@@ -575,7 +575,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
575 ((equal tok "do") 575 ((equal tok "do")
576 (cond 576 (cond
577 ((not (ruby-smie--redundant-do-p)) tok) 577 ((not (ruby-smie--redundant-do-p)) tok)
578 ((> (save-excursion (forward-word 1) 578 ((> (save-excursion (forward-word-strictly 1)
579 (forward-comment (point-max)) (point)) 579 (forward-comment (point-max)) (point))
580 (line-end-position)) 580 (line-end-position))
581 (ruby-smie--backward-token)) ;Fully redundant. 581 (ruby-smie--backward-token)) ;Fully redundant.
@@ -897,7 +897,7 @@ and `\\' when preceded by `?'."
897 ;; us to do better. 897 ;; us to do better.
898 (when (not (memq (car (syntax-after (1- (point)))) '(2 3 6 10))) 898 (when (not (memq (car (syntax-after (1- (point)))) '(2 3 6 10)))
899 (or (not (memq (char-before) '(?\s ?\t))) 899 (or (not (memq (char-before) '(?\s ?\t)))
900 (ignore (forward-word -1)) 900 (ignore (forward-word-strictly -1))
901 (eq (char-before) ?_) 901 (eq (char-before) ?_)
902 (not (looking-at ruby-singleton-class-re)))))) 902 (not (looking-at ruby-singleton-class-re))))))
903 903
@@ -1240,7 +1240,7 @@ delimiter."
1240 ((let ((s (ruby-parse-region (point) ruby-indent-point))) 1240 ((let ((s (ruby-parse-region (point) ruby-indent-point)))
1241 (and (nth 2 s) (> (nth 2 s) 0) 1241 (and (nth 2 s) (> (nth 2 s) 0)
1242 (or (goto-char (cdr (nth 1 s))) t))) 1242 (or (goto-char (cdr (nth 1 s))) t)))
1243 (forward-word -1) 1243 (forward-word-strictly -1)
1244 (setq indent (ruby-indent-size (current-column) 1244 (setq indent (ruby-indent-size (current-column)
1245 (nth 2 state)))) 1245 (nth 2 state))))
1246 (t 1246 (t
@@ -1259,7 +1259,7 @@ delimiter."
1259 (if (null (cdr (nth 1 state))) 1259 (if (null (cdr (nth 1 state)))
1260 (error "Invalid nesting")) 1260 (error "Invalid nesting"))
1261 (goto-char (cdr (nth 1 state))) 1261 (goto-char (cdr (nth 1 state)))
1262 (forward-word -1) ; skip back a keyword 1262 (forward-word-strictly -1) ; skip back a keyword
1263 (setq begin (point)) 1263 (setq begin (point))
1264 (cond 1264 (cond
1265 ((looking-at "do\\>[^_]") ; iter block is a special case 1265 ((looking-at "do\\>[^_]") ; iter block is a special case
@@ -1352,7 +1352,7 @@ delimiter."
1352 (forward-char -1) 1352 (forward-char -1)
1353 (not (looking-at "{"))) 1353 (not (looking-at "{")))
1354 (progn 1354 (progn
1355 (forward-word -1) 1355 (forward-word-strictly -1)
1356 (not (looking-at "do\\>[^_]"))))) 1356 (not (looking-at "do\\>[^_]")))))
1357 (t t)))) 1357 (t t))))
1358 (not (eq ?, c)) 1358 (not (eq ?, c))
@@ -1505,10 +1505,11 @@ With ARG, do it many times. Negative ARG means move backward."
1505 (not (eq (char-before (point)) ?.)) 1505 (not (eq (char-before (point)) ?.))
1506 (not (eq (char-before (point)) ?:))) 1506 (not (eq (char-before (point)) ?:)))
1507 (ruby-end-of-block) 1507 (ruby-end-of-block)
1508 (forward-word 1)) 1508 (forward-word-strictly 1))
1509 ((looking-at "\\(\\$\\|@@?\\)?\\sw") 1509 ((looking-at "\\(\\$\\|@@?\\)?\\sw")
1510 (while (progn 1510 (while (progn
1511 (while (progn (forward-word 1) (looking-at "_"))) 1511 (while (progn (forward-word-strictly 1)
1512 (looking-at "_")))
1512 (cond ((looking-at "::") (forward-char 2) t) 1513 (cond ((looking-at "::") (forward-char 2) t)
1513 ((> (skip-chars-forward ".") 0)) 1514 ((> (skip-chars-forward ".") 0))
1514 ((looking-at "\\?\\|!\\(=[~=>]\\|[^~=]\\)") 1515 ((looking-at "\\?\\|!\\(=[~=>]\\|[^~=]\\)")
@@ -1524,7 +1525,7 @@ With ARG, do it many times. Negative ARG means move backward."
1524 (skip-chars-forward "<")) 1525 (skip-chars-forward "<"))
1525 (not expr)))) 1526 (not expr))))
1526 (setq i (1- i))) 1527 (setq i (1- i)))
1527 ((error) (forward-word 1))) 1528 ((error) (forward-word-strictly 1)))
1528 i)))) 1529 i))))
1529 1530
1530(defun ruby-backward-sexp (&optional arg) 1531(defun ruby-backward-sexp (&optional arg)
@@ -1560,7 +1561,7 @@ With ARG, do it many times. Negative ARG means move forward."
1560 ((looking-at "\\s(") nil) 1561 ((looking-at "\\s(") nil)
1561 (t 1562 (t
1562 (forward-char 1) 1563 (forward-char 1)
1563 (while (progn (forward-word -1) 1564 (while (progn (forward-word-strictly -1)
1564 (pcase (char-before) 1565 (pcase (char-before)
1565 (`?_ t) 1566 (`?_ t)
1566 (`?. (forward-char -1) t) 1567 (`?. (forward-char -1) t)
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 5f29bb64f05..2b61bc2e752 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -2197,7 +2197,7 @@ Returns the construct's token and moves point before it, if so."
2197Point should be before the newline." 2197Point should be before the newline."
2198 (save-excursion 2198 (save-excursion
2199 (let ((tok (funcall smie-backward-token-function))) 2199 (let ((tok (funcall smie-backward-token-function)))
2200 (if (or (when (equal tok "not") (forward-word 1) t) 2200 (if (or (when (equal tok "not") (forward-word-strictly 1) t)
2201 (and (zerop (length tok)) (eq (char-before) ?\)))) 2201 (and (zerop (length tok)) (eq (char-before) ?\))))
2202 (not (sh-smie--rc-after-special-arg-p)) 2202 (not (sh-smie--rc-after-special-arg-p))
2203 (sh-smie--newline-semi-p tok))))) 2203 (sh-smie--newline-semi-p tok)))))
diff --git a/lisp/progmodes/simula.el b/lisp/progmodes/simula.el
index 0c420dfbec6..d627309d6a4 100644
--- a/lisp/progmodes/simula.el
+++ b/lisp/progmodes/simula.el
@@ -568,7 +568,7 @@ The relative indentation among the lines of the statement are preserved."
568 (if (and (eq (char-syntax (preceding-char)) ?w) 568 (if (and (eq (char-syntax (preceding-char)) ?w)
569 (eq (char-syntax (following-char)) ?w)) 569 (eq (char-syntax (following-char)) ?w))
570 (save-excursion 570 (save-excursion
571 (backward-word 1) 571 (backward-word-strictly 1)
572 (if (looking-at "end\\>\\|else\\>\\|otherwise\\>\\|when\\>") 572 (if (looking-at "end\\>\\|else\\>\\|otherwise\\>\\|when\\>")
573 (setq return-value nil))))) 573 (setq return-value nil)))))
574 ((memq (preceding-char) '(?! ?t ?T)) 574 ((memq (preceding-char) '(?! ?t ?T))
@@ -654,12 +654,12 @@ If COUNT is negative, move forward up block level instead."
654 (1+ count))))) 654 (1+ count)))))
655 (while (< count 0) 655 (while (< count 0)
656 (re-search-forward "\\<begin\\>\\|\\<end\\>") 656 (re-search-forward "\\<begin\\>\\|\\<end\\>")
657 (backward-word 1) 657 (backward-word-strictly 1)
658 (if (not (simula-context)) 658 (if (not (simula-context))
659 (setq count (if (memq (following-char) '(?e ?E)) 659 (setq count (if (memq (following-char) '(?e ?E))
660 (1+ count) 660 (1+ count)
661 (1- count)))) 661 (1- count))))
662 (backward-word -1))) 662 (backward-word-strictly -1)))
663 ;; If block level not found, jump back to origin and signal an error 663 ;; If block level not found, jump back to origin and signal an error
664 (error (progn 664 (error (progn
665 (goto-char origin) 665 (goto-char origin)
@@ -689,12 +689,12 @@ If COUNT is negative, move backward down block level instead."
689 (if (< count start-count) (signal 'error nil))) 689 (if (< count start-count) (signal 'error nil)))
690 (while (> count 0) 690 (while (> count 0)
691 (re-search-forward "\\<begin\\>\\|\\<end\\>") 691 (re-search-forward "\\<begin\\>\\|\\<end\\>")
692 (backward-word 1) 692 (backward-word-strictly 1)
693 (if (not (simula-context)) 693 (if (not (simula-context))
694 (setq count (if (memq (following-char) '(?b ?B)) 694 (setq count (if (memq (following-char) '(?b ?B))
695 (1- count) 695 (1- count)
696 (1+ count)))) 696 (1+ count))))
697 (backward-word -1) 697 (backward-word-strictly -1)
698 ;; deeper level has to be found within starting block 698 ;; deeper level has to be found within starting block
699 (if (> count start-count) (signal 'error nil)))) 699 (if (> count start-count) (signal 'error nil))))
700 ;; If block level not found, jump back to origin and signal an error 700 ;; If block level not found, jump back to origin and signal an error
@@ -721,9 +721,9 @@ If COUNT is negative, move forward instead."
721 (simula-skip-comment-backward) 721 (simula-skip-comment-backward)
722 (if (memq (preceding-char) '(?n ?N)) 722 (if (memq (preceding-char) '(?n ?N))
723 (progn 723 (progn
724 (backward-word 1) 724 (backward-word-strictly 1)
725 (if (not (looking-at "\\<begin\\>")) 725 (if (not (looking-at "\\<begin\\>"))
726 (backward-word -1))) 726 (backward-word-strictly -1)))
727 (if (eq (preceding-char) ?\;) 727 (if (eq (preceding-char) ?\;)
728 (backward-char 1)) 728 (backward-char 1))
729 ) 729 )
@@ -734,7 +734,7 @@ If COUNT is negative, move forward instead."
734 (progn 734 (progn
735 (if (eq (following-char) ?\;) 735 (if (eq (following-char) ?\;)
736 (forward-char 1) 736 (forward-char 1)
737 (backward-word -1)))) 737 (backward-word-strictly -1))))
738 (simula-skip-comment-forward)) 738 (simula-skip-comment-forward))
739 (error (progn (goto-char origin) 739 (error (progn (goto-char origin)
740 (error "Incomplete statement (too many ENDs)"))) 740 (error "Incomplete statement (too many ENDs)")))
@@ -753,13 +753,13 @@ If COUNT is negative, move backward instead."
753 (condition-case () 753 (condition-case ()
754 (progn 754 (progn
755 (simula-skip-comment-forward) 755 (simula-skip-comment-forward)
756 (if (looking-at "\\<end\\>") (forward-word 1)) 756 (if (looking-at "\\<end\\>") (forward-word-strictly 1))
757 (while (and (natnump (setq count (1- count))) 757 (while (and (natnump (setq count (1- count)))
758 (setq status (simula-search-forward 758 (setq status (simula-search-forward
759 ";\\|\\<end\\>" (point-max) 'move)))) 759 ";\\|\\<end\\>" (point-max) 'move))))
760 (if (and status (/= (preceding-char) ?\;)) 760 (if (and status (/= (preceding-char) ?\;))
761 (progn 761 (progn
762 (backward-word 1) 762 (backward-word-strictly 1)
763 (simula-skip-comment-backward)))) 763 (simula-skip-comment-backward))))
764 (error (progn (goto-char origin) 764 (error (progn (goto-char origin)
765 (error "Incomplete statement (too few ENDs)"))) 765 (error "Incomplete statement (too few ENDs)")))
@@ -802,7 +802,7 @@ If COUNT is negative, move backward instead."
802 ((eq context 2) 802 ((eq context 2)
803 ;; an END-comment must belong to an END 803 ;; an END-comment must belong to an END
804 (re-search-backward "\\<end\\>") 804 (re-search-backward "\\<end\\>")
805 (forward-word 1) 805 (forward-word-strictly 1)
806 (throw 'simula-out nil)) 806 (throw 'simula-out nil))
807 ;; should be impossible to get here.. 807 ;; should be impossible to get here..
808 ))))) 808 )))))
@@ -915,7 +915,7 @@ If COUNT is negative, move backward instead."
915 ((memq (following-char) '(?E ?e)) 915 ((memq (following-char) '(?E ?e))
916 (setq indent (cdr simula-if-indent))) 916 (setq indent (cdr simula-if-indent)))
917 (t 917 (t
918 (forward-word 1) 918 (forward-word-strictly 1)
919 (setq indent 0))) 919 (setq indent 0)))
920 (simula-find-if)) 920 (simula-find-if))
921 ;; 921 ;;
@@ -939,7 +939,7 @@ If COUNT is negative, move backward instead."
939 (not (eq (preceding-char) ?\;)) 939 (not (eq (preceding-char) ?\;))
940 (if (memq (preceding-char) '(?N ?n)) 940 (if (memq (preceding-char) '(?N ?n))
941 (save-excursion 941 (save-excursion
942 (backward-word 1) 942 (backward-word-strictly 1)
943 (not (looking-at "begin\\>"))) 943 (not (looking-at "begin\\>")))
944 t)) 944 t))
945 (progn 945 (progn
@@ -954,7 +954,7 @@ If COUNT is negative, move backward instead."
954 ;; (not found-end) 954 ;; (not found-end)
955 (if (eq (char-syntax (preceding-char)) ?w) 955 (if (eq (char-syntax (preceding-char)) ?w)
956 (progn 956 (progn
957 (backward-word 1) 957 (backward-word-strictly 1)
958 (not (looking-at 958 (not (looking-at
959 "begin\\|then\\|else\\|when\\|otherwise\\|do" 959 "begin\\|then\\|else\\|when\\|otherwise\\|do"
960 ))) 960 )))
@@ -975,14 +975,14 @@ If COUNT is negative, move backward instead."
975 ((looking-at "begin\\>") 975 ((looking-at "begin\\>")
976 (setq indent (+ indent simula-indent-level))) 976 (setq indent (+ indent simula-indent-level)))
977 ((looking-at "end\\>") 977 ((looking-at "end\\>")
978 (forward-word 1) 978 (forward-word-strictly 1)
979 (simula-previous-statement 1)) 979 (simula-previous-statement 1))
980 ((looking-at "do\\>") 980 ((looking-at "do\\>")
981 (setq indent (+ indent simula-substatement-offset)) 981 (setq indent (+ indent simula-substatement-offset))
982 (simula-find-do-match)) 982 (simula-find-do-match))
983 ((looking-at "\\(if\\|then\\|else\\)\\>") 983 ((looking-at "\\(if\\|then\\|else\\)\\>")
984 (if (memq temp '(?I ?i)) 984 (if (memq temp '(?I ?i))
985 (forward-word 1) 985 (forward-word-strictly 1)
986 (setq indent (+ indent 986 (setq indent (+ indent
987 simula-substatement-offset 987 simula-substatement-offset
988 (if (memq temp '(?T ?t)) 988 (if (memq temp '(?T ?t))
@@ -1030,7 +1030,7 @@ If COUNT is negative, move backward instead."
1030 (and (not (bobp)) 1030 (and (not (bobp))
1031 (if (eq (char-syntax (preceding-char)) ?w) 1031 (if (eq (char-syntax (preceding-char)) ?w)
1032 (save-excursion 1032 (save-excursion
1033 (backward-word 1) 1033 (backward-word-strictly 1)
1034 (not (looking-at 1034 (not (looking-at
1035 "begin\\|then\\|else\\|when\\|otherwise\\|do"))) 1035 "begin\\|then\\|else\\|when\\|otherwise\\|do")))
1036 (not (memq (preceding-char) '(?: ?\;)))))) 1036 (not (memq (preceding-char) '(?: ?\;))))))
@@ -1067,7 +1067,7 @@ If COUNT is negative, move backward instead."
1067 (simula-skip-comment-backward) 1067 (simula-skip-comment-backward)
1068 (if (and (eq (char-syntax (preceding-char)) ?w) 1068 (if (and (eq (char-syntax (preceding-char)) ?w)
1069 (progn 1069 (progn
1070 (backward-word 1) 1070 (backward-word-strictly 1)
1071 (looking-at "else\\>"))) 1071 (looking-at "else\\>")))
1072 () 1072 ()
1073 (throw 'simula-out t))) 1073 (throw 'simula-out t)))
@@ -1189,7 +1189,7 @@ If COUNT is negative, move backward instead."
1189 (if where 1189 (if where
1190 (if (and (eq where 2) (eq (char-syntax (preceding-char)) ?w)) 1190 (if (and (eq where 2) (eq (char-syntax (preceding-char)) ?w))
1191 (save-excursion 1191 (save-excursion
1192 (backward-word 1) 1192 (backward-word-strictly 1)
1193 (not (looking-at "end\\>")))))) 1193 (not (looking-at "end\\>"))))))
1194 (unexpand-abbrev) 1194 (unexpand-abbrev)
1195 (cond 1195 (cond
@@ -1204,7 +1204,7 @@ If COUNT is negative, move backward instead."
1204 ;; check if the expanded word is on the beginning of the line. 1204 ;; check if the expanded word is on the beginning of the line.
1205 (if (and (eq (char-syntax (preceding-char)) ?w) 1205 (if (and (eq (char-syntax (preceding-char)) ?w)
1206 (progn 1206 (progn
1207 (backward-word 1) 1207 (backward-word-strictly 1)
1208 (if (looking-at "end\\>") 1208 (if (looking-at "end\\>")
1209 (save-excursion 1209 (save-excursion
1210 (simula-backward-up-level 1) 1210 (simula-backward-up-level 1)
diff --git a/lisp/progmodes/vera-mode.el b/lisp/progmodes/vera-mode.el
index 987022e8cb3..00b287e69e6 100644
--- a/lisp/progmodes/vera-mode.el
+++ b/lisp/progmodes/vera-mode.el
@@ -1109,7 +1109,7 @@ try to increase performance by using this macro."
1109 ((and (save-excursion 1109 ((and (save-excursion
1110 (vera-backward-syntactic-ws nil t) 1110 (vera-backward-syntactic-ws nil t)
1111 ;; previous line ends with a block opening? 1111 ;; previous line ends with a block opening?
1112 (or (/= (skip-chars-backward "{") 0) (backward-word 1)) 1112 (or (/= (skip-chars-backward "{") 0) (backward-word-strictly 1))
1113 (when (looking-at vera-beg-block-re) 1113 (when (looking-at vera-beg-block-re)
1114 ;; go to beginning of substatement 1114 ;; go to beginning of substatement
1115 (vera-beginning-of-substatement) 1115 (vera-beginning-of-substatement)
@@ -1162,7 +1162,7 @@ try to increase performance by using this macro."
1162 ;; is this line preceded by a substatement opening statement? 1162 ;; is this line preceded by a substatement opening statement?
1163 ((save-excursion (vera-backward-syntactic-ws nil t) 1163 ((save-excursion (vera-backward-syntactic-ws nil t)
1164 (when (= (preceding-char) ?\)) (backward-sexp)) 1164 (when (= (preceding-char) ?\)) (backward-sexp))
1165 (backward-word 1) 1165 (backward-word-strictly 1)
1166 (setq placeholder (point)) 1166 (setq placeholder (point))
1167 (looking-at vera-beg-substatement-re)) 1167 (looking-at vera-beg-substatement-re))
1168 (goto-char placeholder) 1168 (goto-char placeholder)
@@ -1225,7 +1225,7 @@ Calls `indent-region' for whole buffer."
1225 "If previous word is a block closing or `else', indent line again." 1225 "If previous word is a block closing or `else', indent line again."
1226 (when (= (char-syntax (preceding-char)) ?w) 1226 (when (= (char-syntax (preceding-char)) ?w)
1227 (save-excursion 1227 (save-excursion
1228 (backward-word 1) 1228 (backward-word-strictly 1)
1229 (when (and (not (vera-in-literal)) 1229 (when (and (not (vera-in-literal))
1230 (looking-at (concat vera-end-block-re "\\|\\<else\\>"))) 1230 (looking-at (concat vera-end-block-re "\\|\\<else\\>")))
1231 (indent-according-to-mode))))) 1231 (indent-according-to-mode)))))
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index 6b6cc643ffc..28ae3500ca8 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -3470,7 +3470,7 @@ Use filename, if current buffer being edited shorten to just buffer name."
3470 (found nil) 3470 (found nil)
3471 (st (point))) 3471 (st (point)))
3472 (if (not (looking-at "\\<")) 3472 (if (not (looking-at "\\<"))
3473 (forward-word -1)) 3473 (forward-word-strictly -1))
3474 (cond 3474 (cond
3475 ((verilog-skip-backward-comment-or-string)) 3475 ((verilog-skip-backward-comment-or-string))
3476 ((looking-at "\\<else\\>") 3476 ((looking-at "\\<else\\>")
@@ -3522,7 +3522,7 @@ Use filename, if current buffer being edited shorten to just buffer name."
3522 (st (point)) 3522 (st (point))
3523 (nest 'yes)) 3523 (nest 'yes))
3524 (if (not (looking-at "\\<")) 3524 (if (not (looking-at "\\<"))
3525 (forward-word -1)) 3525 (forward-word-strictly -1))
3526 (cond 3526 (cond
3527 ((verilog-skip-forward-comment-or-string) 3527 ((verilog-skip-forward-comment-or-string)
3528 (verilog-forward-syntactic-ws)) 3528 (verilog-forward-syntactic-ws))
@@ -3545,11 +3545,11 @@ Use filename, if current buffer being edited shorten to just buffer name."
3545 (and (looking-at "fork") 3545 (and (looking-at "fork")
3546 (progn 3546 (progn
3547 (setq here (point)) ; sometimes a fork is just a fork 3547 (setq here (point)) ; sometimes a fork is just a fork
3548 (forward-word -1) 3548 (forward-word-strictly -1)
3549 (looking-at verilog-disable-fork-re)))) 3549 (looking-at verilog-disable-fork-re))))
3550 (progn ; it is a disable fork; ignore it 3550 (progn ; it is a disable fork; ignore it
3551 (goto-char (match-end 0)) 3551 (goto-char (match-end 0))
3552 (forward-word 1) 3552 (forward-word-strictly 1)
3553 (setq reg nil)) 3553 (setq reg nil))
3554 (progn ; it is a nice simple fork 3554 (progn ; it is a nice simple fork
3555 (goto-char here) ; return from looking for "disable fork" 3555 (goto-char here) ; return from looking for "disable fork"
@@ -3599,7 +3599,7 @@ Use filename, if current buffer being edited shorten to just buffer name."
3599 ;; Search forward for matching endclocking 3599 ;; Search forward for matching endclocking
3600 (setq reg "\\(\\<clocking\\>\\)\\|\\(\\<endclocking\\>\\)" ))) 3600 (setq reg "\\(\\<clocking\\>\\)\\|\\(\\<endclocking\\>\\)" )))
3601 (if (and reg 3601 (if (and reg
3602 (forward-word 1)) 3602 (forward-word-strictly 1))
3603 (catch 'skip 3603 (catch 'skip
3604 (if (eq nest 'yes) 3604 (if (eq nest 'yes)
3605 (let ((depth 1) 3605 (let ((depth 1)
@@ -3618,7 +3618,7 @@ Use filename, if current buffer being edited shorten to just buffer name."
3618 (looking-at verilog-disable-fork-re) 3618 (looking-at verilog-disable-fork-re)
3619 (and (looking-at "fork") 3619 (and (looking-at "fork")
3620 (progn 3620 (progn
3621 (forward-word -1) 3621 (forward-word-strictly -1)
3622 (looking-at verilog-disable-fork-re)))) 3622 (looking-at verilog-disable-fork-re))))
3623 (progn ; it is a disable fork; another false alarm 3623 (progn ; it is a disable fork; another false alarm
3624 (goto-char (match-end 0))) 3624 (goto-char (match-end 0)))
@@ -4292,7 +4292,7 @@ Uses `verilog-scan' cache."
4292 ;; stop if we see a named coverpoint 4292 ;; stop if we see a named coverpoint
4293 (looking-at "\\w+\\W*:\\W*\\(coverpoint\\|cross\\|constraint\\)") 4293 (looking-at "\\w+\\W*:\\W*\\(coverpoint\\|cross\\|constraint\\)")
4294 ;; keep going if we are in the middle of a word 4294 ;; keep going if we are in the middle of a word
4295 (not (or (looking-at "\\<") (forward-word -1))) 4295 (not (or (looking-at "\\<") (forward-word-strictly -1)))
4296 ;; stop if we see an assertion (perhaps labeled) 4296 ;; stop if we see an assertion (perhaps labeled)
4297 (and 4297 (and
4298 (looking-at "\\(\\w+\\W*:\\W*\\)?\\(\\<\\(assert\\|assume\\|cover\\)\\>\\s-+\\<property\\>\\)\\|\\(\\<assert\\>\\)") 4298 (looking-at "\\(\\w+\\W*:\\W*\\)?\\(\\<\\(assert\\|assume\\|cover\\)\\>\\s-+\\<property\\>\\)\\|\\(\\<assert\\>\\)")
@@ -4841,7 +4841,7 @@ primitive or interface named NAME."
4841 4841
4842 ((looking-at "\\<end\\>") 4842 ((looking-at "\\<end\\>")
4843 ;; HERE 4843 ;; HERE
4844 (forward-word 1) 4844 (forward-word-strictly 1)
4845 (verilog-forward-syntactic-ws) 4845 (verilog-forward-syntactic-ws)
4846 (setq err nil) 4846 (setq err nil)
4847 (setq str (verilog-get-expr)) 4847 (setq str (verilog-get-expr))
@@ -5956,7 +5956,7 @@ Set point to where line starts."
5956 (verilog-backward-up-list 1) 5956 (verilog-backward-up-list 1)
5957 (verilog-backward-syntactic-ws) 5957 (verilog-backward-syntactic-ws)
5958 (let ((back (point))) 5958 (let ((back (point)))
5959 (forward-word -1) 5959 (forward-word-strictly -1)
5960 (cond 5960 (cond
5961 ;;XX 5961 ;;XX
5962 ((looking-at "\\<\\(always\\(_latch\\|_ff\\|_comb\\)?\\|case\\(\\|[xz]\\)\\|for\\(\\|each\\|ever\\)\\|i\\(f\\|nitial\\)\\|repeat\\|while\\)\\>") 5962 ((looking-at "\\<\\(always\\(_latch\\|_ff\\|_comb\\)?\\|case\\(\\|[xz]\\)\\|for\\(\\|each\\|ever\\)\\|i\\(f\\|nitial\\)\\|repeat\\|while\\)\\>")
@@ -5997,11 +5997,11 @@ Set point to where line starts."
5997 5997
5998 (;-- any of begin|initial|while are complete statements; 'begin : foo' is also complete 5998 (;-- any of begin|initial|while are complete statements; 'begin : foo' is also complete
5999 t 5999 t
6000 (forward-word -1) 6000 (forward-word-strictly -1)
6001 (while (or (= (preceding-char) ?\_) 6001 (while (or (= (preceding-char) ?\_)
6002 (= (preceding-char) ?\@) 6002 (= (preceding-char) ?\@)
6003 (= (preceding-char) ?\.)) 6003 (= (preceding-char) ?\.))
6004 (forward-word -1)) 6004 (forward-word-strictly -1))
6005 (cond 6005 (cond
6006 ((looking-at "\\<else\\>") 6006 ((looking-at "\\<else\\>")
6007 t) 6007 t)
@@ -6515,7 +6515,7 @@ Only look at a few lines to determine indent level."
6515 (= (following-char) ?\`)) 6515 (= (following-char) ?\`))
6516 (progn 6516 (progn
6517 (forward-char 1) 6517 (forward-char 1)
6518 (forward-word 1) 6518 (forward-word-strictly 1)
6519 (skip-chars-forward " \t"))) 6519 (skip-chars-forward " \t")))
6520 ((= (following-char) ?\[) 6520 ((= (following-char) ?\[)
6521 (progn 6521 (progn
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 664642554fa..27ce9fb1b30 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -6582,7 +6582,7 @@ returned point is at the first character of the \"libunit\" keyword."
6582 ;; keyword, allow for the keyword and an extra character, 6582 ;; keyword, allow for the keyword and an extra character,
6583 ;; as this will be used when looking forward for the 6583 ;; as this will be used when looking forward for the
6584 ;; "begin" keyword. 6584 ;; "begin" keyword.
6585 (save-excursion (forward-word 1) (1+ (point)))) 6585 (save-excursion (forward-word-strictly 1) (1+ (point))))
6586 foundp literal placeholder) 6586 foundp literal placeholder)
6587 ;; Find the "libunit" keyword. 6587 ;; Find the "libunit" keyword.
6588 (while (and (not foundp) 6588 (while (and (not foundp)
@@ -6633,7 +6633,7 @@ stops due to beginning or end of buffer."
6633 ;; keyword, allow for the keyword and an extra character, 6633 ;; keyword, allow for the keyword and an extra character,
6634 ;; as this will be used when looking forward for the 6634 ;; as this will be used when looking forward for the
6635 ;; "begin" keyword. 6635 ;; "begin" keyword.
6636 (save-excursion (forward-word 1) (1+ (point)))) 6636 (save-excursion (forward-word-strictly 1) (1+ (point))))
6637 begin-string literal) 6637 begin-string literal)
6638 (while (and (not foundp) 6638 (while (and (not foundp)
6639 (re-search-backward vhdl-defun-re nil 'move)) 6639 (re-search-backward vhdl-defun-re nil 'move))
@@ -6779,7 +6779,7 @@ statement if already at the beginning of one."
6779 ;; start point was not inside leader area 6779 ;; start point was not inside leader area
6780 ;; set stop point at word after leader 6780 ;; set stop point at word after leader
6781 (setq pos (point)))) 6781 (setq pos (point))))
6782 (forward-word 1) 6782 (forward-word-strictly 1)
6783 (vhdl-forward-syntactic-ws here) 6783 (vhdl-forward-syntactic-ws here)
6784 (setq pos (point))) 6784 (setq pos (point)))
6785 (goto-char pos) 6785 (goto-char pos)
@@ -8457,7 +8457,7 @@ buffer."
8457 (setq end (vhdl-re-search-forward "\\<then\\>" proc-end t)) 8457 (setq end (vhdl-re-search-forward "\\<then\\>" proc-end t))
8458 (when (vhdl-re-search-backward "\\('event\\|\\<\\(falling\\|rising\\)_edge\\)\\>" beg t) 8458 (when (vhdl-re-search-backward "\\('event\\|\\<\\(falling\\|rising\\)_edge\\)\\>" beg t)
8459 (goto-char end) 8459 (goto-char end)
8460 (backward-word 1) 8460 (backward-word-strictly 1)
8461 (vhdl-forward-sexp) 8461 (vhdl-forward-sexp)
8462 (push (cons end (point)) seq-region-list) 8462 (push (cons end (point)) seq-region-list)
8463 (beginning-of-line))) 8463 (beginning-of-line)))
@@ -8929,7 +8929,7 @@ is omitted or nil."
8929 (vhdl-insert-keyword ": BLOCK ") 8929 (vhdl-insert-keyword ": BLOCK ")
8930 (goto-char start) 8930 (goto-char start)
8931 (when (setq label (vhdl-template-field "label" nil t start (+ (point) 8))) 8931 (when (setq label (vhdl-template-field "label" nil t start (+ (point) 8)))
8932 (forward-word 1) 8932 (forward-word-strictly 1)
8933 (forward-char 1) 8933 (forward-char 1)
8934 (insert "(") 8934 (insert "(")
8935 (if (vhdl-template-field "[guard expression]" nil t) 8935 (if (vhdl-template-field "[guard expression]" nil t)
@@ -8965,7 +8965,7 @@ is omitted or nil."
8965 (if (vhdl-template-field "[quantity name]" " USE " t) 8965 (if (vhdl-template-field "[quantity name]" " USE " t)
8966 (progn (vhdl-template-field "quantity name" " => ") t) 8966 (progn (vhdl-template-field "quantity name" " => ") t)
8967 (delete-region (point) 8967 (delete-region (point)
8968 (progn (forward-word -1) (point))) 8968 (progn (forward-word-strictly -1) (point)))
8969 nil)) 8969 nil))
8970 (vhdl-template-field "[quantity name]" " => " t)) 8970 (vhdl-template-field "[quantity name]" " => " t))
8971 (vhdl-template-field "expression") 8971 (vhdl-template-field "expression")
@@ -8998,7 +8998,7 @@ is omitted or nil."
8998 (goto-char start) 8998 (goto-char start)
8999 (setq label (vhdl-template-field "[label]" nil t)) 8999 (setq label (vhdl-template-field "[label]" nil t))
9000 (unless label (delete-char 2)) 9000 (unless label (delete-char 2))
9001 (forward-word 1) 9001 (forward-word-strictly 1)
9002 (forward-char 1)) 9002 (forward-char 1))
9003 (when (vhdl-template-field "expression" nil t start (point)) 9003 (when (vhdl-template-field "expression" nil t start (point))
9004 (vhdl-insert-keyword (concat " " (if (eq kind 'is) "IS" "USE") "\n\n")) 9004 (vhdl-insert-keyword (concat " " (if (eq kind 'is) "IS" "USE") "\n\n"))
@@ -9280,7 +9280,7 @@ a configuration declaration if not within a design unit."
9280 (interactive) 9280 (interactive)
9281 (insert " ") 9281 (insert " ")
9282 (unexpand-abbrev) 9282 (unexpand-abbrev)
9283 (backward-word 1) 9283 (backward-word-strictly 1)
9284 (vhdl-case-word 1) 9284 (vhdl-case-word 1)
9285 (forward-char 1)) 9285 (forward-char 1))
9286 9286
@@ -9289,7 +9289,7 @@ a configuration declaration if not within a design unit."
9289 (interactive) 9289 (interactive)
9290 (insert " ") 9290 (insert " ")
9291 (unexpand-abbrev) 9291 (unexpand-abbrev)
9292 (backward-word 1) 9292 (backward-word-strictly 1)
9293 (vhdl-case-word 1) 9293 (vhdl-case-word 1)
9294 (forward-char 1) 9294 (forward-char 1)
9295 (indent-according-to-mode)) 9295 (indent-according-to-mode))
@@ -9450,7 +9450,7 @@ otherwise."
9450 (goto-char start) 9450 (goto-char start)
9451 (setq label (vhdl-template-field "[label]" nil t)) 9451 (setq label (vhdl-template-field "[label]" nil t))
9452 (unless label (delete-char 2)) 9452 (unless label (delete-char 2))
9453 (forward-word 1) 9453 (forward-word-strictly 1)
9454 (forward-char 1)) 9454 (forward-char 1))
9455 (when (setq index (vhdl-template-field "loop variable" 9455 (when (setq index (vhdl-template-field "loop variable"
9456 nil t start (point))) 9456 nil t start (point)))
@@ -9591,7 +9591,7 @@ otherwise."
9591 (goto-char start) 9591 (goto-char start)
9592 (setq label (vhdl-template-field "[label]" nil t)) 9592 (setq label (vhdl-template-field "[label]" nil t))
9593 (unless label (delete-char 2)) 9593 (unless label (delete-char 2))
9594 (forward-word 1) 9594 (forward-word-strictly 1)
9595 (forward-char 1)) 9595 (forward-char 1))
9596 (when vhdl-conditions-in-parenthesis (insert "(")) 9596 (when vhdl-conditions-in-parenthesis (insert "("))
9597 (when (vhdl-template-field "condition" nil t start (point)) 9597 (when (vhdl-template-field "condition" nil t start (point))
@@ -9674,7 +9674,7 @@ otherwise."
9674 (goto-char start) 9674 (goto-char start)
9675 (setq label (vhdl-template-field "[label]" nil t)) 9675 (setq label (vhdl-template-field "[label]" nil t))
9676 (unless label (delete-char 2)) 9676 (unless label (delete-char 2))
9677 (forward-word 1) 9677 (forward-word-strictly 1)
9678 (delete-char 1)) 9678 (delete-char 1))
9679 (insert "\n\n") 9679 (insert "\n\n")
9680 (indent-to margin) 9680 (indent-to margin)
@@ -9758,11 +9758,13 @@ otherwise."
9758 (cond ((equal definition "") 9758 (cond ((equal definition "")
9759 (insert ";")) 9759 (insert ";"))
9760 ((equal definition "ARRAY") 9760 ((equal definition "ARRAY")
9761 (delete-region (point) (progn (forward-word -1) (point))) 9761 (delete-region (point) (progn (forward-word-strictly -1)
9762 (point)))
9762 (vhdl-template-array 'nature t)) 9763 (vhdl-template-array 'nature t))
9763 ((equal definition "RECORD") 9764 ((equal definition "RECORD")
9764 (setq mid-pos (point-marker)) 9765 (setq mid-pos (point-marker))
9765 (delete-region (point) (progn (forward-word -1) (point))) 9766 (delete-region (point) (progn (forward-word-strictly -1)
9767 (point)))
9766 (vhdl-template-record 'nature name t)) 9768 (vhdl-template-record 'nature name t))
9767 (t 9769 (t
9768 (vhdl-insert-keyword " ACROSS ") 9770 (vhdl-insert-keyword " ACROSS ")
@@ -9875,7 +9877,7 @@ otherwise."
9875 (goto-char start) 9877 (goto-char start)
9876 (setq label (vhdl-template-field "[label]" nil t)) 9878 (setq label (vhdl-template-field "[label]" nil t))
9877 (unless label (delete-char 2)) 9879 (unless label (delete-char 2))
9878 (forward-word 1) 9880 (forward-word-strictly 1)
9879 (forward-char 1)) 9881 (forward-char 1))
9880 (unless (vhdl-standard-p '87) (vhdl-insert-keyword "IS")) 9882 (unless (vhdl-standard-p '87) (vhdl-insert-keyword "IS"))
9881 (insert "\n") 9883 (insert "\n")
@@ -9932,7 +9934,7 @@ otherwise."
9932 (goto-char start) 9934 (goto-char start)
9933 (setq label (vhdl-template-field "[label]" nil t)) 9935 (setq label (vhdl-template-field "[label]" nil t))
9934 (unless label (delete-char 2)) 9936 (unless label (delete-char 2))
9935 (forward-word 1) 9937 (forward-word-strictly 1)
9936 (forward-char 1)) 9938 (forward-char 1))
9937 (insert "(") 9939 (insert "(")
9938 (if (not seq) 9940 (if (not seq)
@@ -10128,7 +10130,7 @@ otherwise."
10128 (vhdl-insert-keyword "WITH ") 10130 (vhdl-insert-keyword "WITH ")
10129 (when (vhdl-template-field "selector expression" 10131 (when (vhdl-template-field "selector expression"
10130 nil t start (+ (point) 7)) 10132 nil t start (+ (point) 7))
10131 (forward-word 1) 10133 (forward-word-strictly 1)
10132 (delete-char 1) 10134 (delete-char 1)
10133 (insert "\n") 10135 (insert "\n")
10134 (indent-to (+ margin vhdl-basic-offset)) 10136 (indent-to (+ margin vhdl-basic-offset))
@@ -10250,11 +10252,13 @@ otherwise."
10250 (delete-char -4) 10252 (delete-char -4)
10251 (insert ";")) 10253 (insert ";"))
10252 ((equal definition "ARRAY") 10254 ((equal definition "ARRAY")
10253 (delete-region (point) (progn (forward-word -1) (point))) 10255 (delete-region (point) (progn (forward-word-strictly -1)
10256 (point)))
10254 (vhdl-template-array 'type t)) 10257 (vhdl-template-array 'type t))
10255 ((equal definition "RECORD") 10258 ((equal definition "RECORD")
10256 (setq mid-pos (point-marker)) 10259 (setq mid-pos (point-marker))
10257 (delete-region (point) (progn (forward-word -1) (point))) 10260 (delete-region (point) (progn (forward-word-strictly -1)
10261 (point)))
10258 (vhdl-template-record 'type name t)) 10262 (vhdl-template-record 'type name t))
10259 ((equal definition "ACCESS") 10263 ((equal definition "ACCESS")
10260 (insert " ") 10264 (insert " ")
@@ -10298,7 +10302,8 @@ otherwise."
10298 (if (or (save-excursion 10302 (if (or (save-excursion
10299 (progn (vhdl-beginning-of-block) 10303 (progn (vhdl-beginning-of-block)
10300 (looking-at "\\s-*\\(\\w+\\s-*:\\s-*\\)?\\<\\(\\<function\\|procedure\\|process\\|procedural\\)\\>"))) 10304 (looking-at "\\s-*\\(\\w+\\s-*:\\s-*\\)?\\<\\(\\<function\\|procedure\\|process\\|procedural\\)\\>")))
10301 (save-excursion (backward-word 1) (looking-at "\\<shared\\>"))) 10305 (save-excursion (backward-word-strictly 1)
10306 (looking-at "\\<shared\\>")))
10302 (vhdl-insert-keyword "VARIABLE ") 10307 (vhdl-insert-keyword "VARIABLE ")
10303 (if (vhdl-standard-p '87) 10308 (if (vhdl-standard-p '87)
10304 (error "ERROR: Not within sequential block") 10309 (error "ERROR: Not within sequential block")
@@ -10356,7 +10361,7 @@ otherwise."
10356 (goto-char start) 10361 (goto-char start)
10357 (setq label (vhdl-template-field "[label]" nil t)) 10362 (setq label (vhdl-template-field "[label]" nil t))
10358 (unless label (delete-char 2)) 10363 (unless label (delete-char 2))
10359 (forward-word 1) 10364 (forward-word-strictly 1)
10360 (forward-char 1)) 10365 (forward-char 1))
10361 (when vhdl-conditions-in-parenthesis (insert "(")) 10366 (when vhdl-conditions-in-parenthesis (insert "("))
10362 (when (vhdl-template-field "condition" nil t start (point)) 10367 (when (vhdl-template-field "condition" nil t start (point))
@@ -11218,7 +11223,7 @@ else insert tab (used for word completion in VHDL minibuffer)."
11218 (save-match-data 11223 (save-match-data
11219 (save-excursion 11224 (save-excursion
11220 (goto-char (match-end 5)) 11225 (goto-char (match-end 5))
11221 (forward-word 1) 11226 (forward-word-strictly 1)
11222 (vhdl-forward-syntactic-ws) 11227 (vhdl-forward-syntactic-ws)
11223 (when (looking-at "(") 11228 (when (looking-at "(")
11224 (forward-sexp)) 11229 (forward-sexp))
@@ -11292,19 +11297,19 @@ else insert tab (used for word completion in VHDL minibuffer)."
11292but not if inside a comment or quote." 11297but not if inside a comment or quote."
11293 (if (or (vhdl-in-literal) 11298 (if (or (vhdl-in-literal)
11294 (save-excursion 11299 (save-excursion
11295 (forward-word -1) 11300 (forward-word-strictly -1)
11296 (and (looking-at "\\<end\\>") (not (looking-at "\\<end;"))))) 11301 (and (looking-at "\\<end\\>") (not (looking-at "\\<end;")))))
11297 (progn 11302 (progn
11298 (insert " ") 11303 (insert " ")
11299 (unexpand-abbrev) 11304 (unexpand-abbrev)
11300 (backward-word 1) 11305 (backward-word-strictly 1)
11301 (vhdl-case-word 1) 11306 (vhdl-case-word 1)
11302 (delete-char 1)) 11307 (delete-char 1))
11303 (if (not vhdl-electric-mode) 11308 (if (not vhdl-electric-mode)
11304 (progn 11309 (progn
11305 (insert " ") 11310 (insert " ")
11306 (unexpand-abbrev) 11311 (unexpand-abbrev)
11307 (backward-word 1) 11312 (backward-word-strictly 1)
11308 (vhdl-case-word 1) 11313 (vhdl-case-word 1)
11309 (delete-char 1)) 11314 (delete-char 1))
11310 (let ((invoke-char vhdl-last-input-event) 11315 (let ((invoke-char vhdl-last-input-event)
@@ -11707,7 +11712,7 @@ reflected in a subsequent paste operation."
11707 (equal "END" (upcase (match-string 1)))) 11712 (equal "END" (upcase (match-string 1))))
11708 (throw 'parse "ERROR: Not within an entity or component declaration")) 11713 (throw 'parse "ERROR: Not within an entity or component declaration"))
11709 (setq decl-type (downcase (match-string-no-properties 1))) 11714 (setq decl-type (downcase (match-string-no-properties 1)))
11710 (forward-word 1) 11715 (forward-word-strictly 1)
11711 (vhdl-parse-string "\\s-+\\(\\w+\\)\\(\\s-+is\\>\\)?") 11716 (vhdl-parse-string "\\s-+\\(\\w+\\)\\(\\s-+is\\>\\)?")
11712 (setq name (match-string-no-properties 1)) 11717 (setq name (match-string-no-properties 1))
11713 (message "Reading port of %s \"%s\"..." decl-type name) 11718 (message "Reading port of %s \"%s\"..." decl-type name)
@@ -13211,7 +13216,7 @@ File statistics: \"%s\"\n\
13211 ;; subprogram body 13216 ;; subprogram body
13212 (when (match-string 2) 13217 (when (match-string 2)
13213 (re-search-forward "^\\s-*\\<begin\\>" nil t) 13218 (re-search-forward "^\\s-*\\<begin\\>" nil t)
13214 (backward-word 1) 13219 (backward-word-strictly 1)
13215 (vhdl-forward-sexp))) 13220 (vhdl-forward-sexp)))
13216 ;; block (recursive) 13221 ;; block (recursive)
13217 ((looking-at "^\\s-*\\w+\\s-*:\\s-*block\\>") 13222 ((looking-at "^\\s-*\\w+\\s-*:\\s-*block\\>")
@@ -13224,7 +13229,7 @@ File statistics: \"%s\"\n\
13224 (re-search-forward "^\\s-*end\\s-+process\\>" nil t)) 13229 (re-search-forward "^\\s-*end\\s-+process\\>" nil t))
13225 ;; configuration declaration 13230 ;; configuration declaration
13226 ((looking-at "^\\s-*configuration\\>") 13231 ((looking-at "^\\s-*configuration\\>")
13227 (forward-word 4) 13232 (forward-word-strictly 4)
13228 (vhdl-forward-sexp)) 13233 (vhdl-forward-sexp))
13229 (t (goto-char pos)))))) 13234 (t (goto-char pos))))))
13230 13235
diff --git a/lisp/simple.el b/lisp/simple.el
index e5fb5f031dd..1701eb0e0f3 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1170,7 +1170,7 @@ END, without printing any message."
1170 (save-restriction 1170 (save-restriction
1171 (narrow-to-region start end) 1171 (narrow-to-region start end)
1172 (goto-char (point-min)) 1172 (goto-char (point-min))
1173 (while (forward-word 1) 1173 (while (forward-word-strictly 1)
1174 (setq words (1+ words))))) 1174 (setq words (1+ words)))))
1175 words)) 1175 words))
1176 ((use-region-p) 1176 ((use-region-p)
diff --git a/lisp/skeleton.el b/lisp/skeleton.el
index b9c1bb506d1..0e81e2d74c6 100644
--- a/lisp/skeleton.el
+++ b/lisp/skeleton.el
@@ -244,7 +244,8 @@ When done with skeleton, but before going back to `_'-point call
244 (setq skeleton-regions 244 (setq skeleton-regions
245 (if (> skeleton-regions 0) 245 (if (> skeleton-regions 0)
246 (list (copy-marker (point) t) 246 (list (copy-marker (point) t)
247 (save-excursion (forward-word skeleton-regions) 247 (save-excursion (forward-word-strictly
248 skeleton-regions)
248 (point-marker))) 249 (point-marker)))
249 (setq skeleton-regions (- skeleton-regions)) 250 (setq skeleton-regions (- skeleton-regions))
250 ;; copy skeleton-regions - 1 elements from `mark-ring' 251 ;; copy skeleton-regions - 1 elements from `mark-ring'
diff --git a/lisp/subr.el b/lisp/subr.el
index fb1e0291a7a..cad6319f3b2 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4267,6 +4267,39 @@ If SYNTAX is nil, return nil."
4267 4267
4268;; Utility motion commands 4268;; Utility motion commands
4269 4269
4270(defvar word-move-empty-char-table nil
4271 "Used in `forward-word-strictly' and `backward-word-strictly'
4272to countermand the effect of `find-word-boundary-function-table'.")
4273
4274(defun forward-word-strictly (&optional arg)
4275 "Move point forward ARG words (backward if ARG is negative).
4276If ARG is omitted or nil, move point forward one word.
4277Normally returns t.
4278If an edge of the buffer or a field boundary is reached, point is left there
4279and the function returns nil. Field boundaries are not noticed if
4280`inhibit-field-text-motion' is non-nil.
4281
4282This function is like `forward-word', but it is not affected
4283by `find-word-boundary-function-table'. It is also not interactive."
4284 (let ((find-word-boundary-function-table
4285 (if (char-table-p word-move-empty-char-table)
4286 word-move-empty-char-table
4287 (setq word-move-empty-char-table (make-char-table nil)))))
4288 (forward-word (or arg 1))))
4289
4290(defun backward-word-strictly (&optional arg)
4291 "Move backward until encountering the beginning of a word.
4292With argument ARG, do this that many times.
4293If ARG is omitted or nil, move point backward one word.
4294
4295This function is like `forward-word', but it is not affected
4296by `find-word-boundary-function-table'. It is also not interactive."
4297 (let ((find-word-boundary-function-table
4298 (if (char-table-p word-move-empty-char-table)
4299 word-move-empty-char-table
4300 (setq word-move-empty-char-table (make-char-table nil)))))
4301 (forward-word (- (or arg 1)))))
4302
4270;; Whitespace 4303;; Whitespace
4271 4304
4272(defun forward-whitespace (arg) 4305(defun forward-whitespace (arg)
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 5db0d987a0f..042b7d40edc 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -368,7 +368,7 @@ property of the major mode name.")
368(defun texinfo-mode-flyspell-verify () 368(defun texinfo-mode-flyspell-verify ()
369 "Function used for `flyspell-generic-check-word-predicate' in Texinfo mode." 369 "Function used for `flyspell-generic-check-word-predicate' in Texinfo mode."
370 (save-excursion 370 (save-excursion
371 (forward-word -1) 371 (forward-word-strictly -1)
372 (not (looking-at "@")))) 372 (not (looking-at "@"))))
373 373
374;;*--- tex mode --------------------------------------------------------*/ 374;;*--- tex mode --------------------------------------------------------*/
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 5b1bd6a05bc..973b2d373d5 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -735,7 +735,8 @@ automatically inserts its partner."
735 (let ((arg-end (match-end 0))) 735 (let ((arg-end (match-end 0)))
736 (if (null type) ;\end 736 (if (null type) ;\end
737 (progn (goto-char arg-end) 737 (progn (goto-char arg-end)
738 (latex-forward-sexp -1) (forward-word 1)) 738 (latex-forward-sexp -1)
739 (forward-word-strictly 1))
739 (goto-char cmd-start) 740 (goto-char cmd-start)
740 (latex-forward-sexp 1) 741 (latex-forward-sexp 1)
741 (let (forward-sexp-function) (backward-sexp))) 742 (let (forward-sexp-function) (backward-sexp)))
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el
index 19a21237d2b..55be7fe9df5 100644
--- a/lisp/textmodes/texinfmt.el
+++ b/lisp/textmodes/texinfmt.el
@@ -891,7 +891,7 @@ commands."
891 ;; @ is followed by a command-word; find the end of the word. 891 ;; @ is followed by a command-word; find the end of the word.
892 (setq texinfo-command-start (1- (point))) 892 (setq texinfo-command-start (1- (point)))
893 (if (= (char-syntax (following-char)) ?w) 893 (if (= (char-syntax (following-char)) ?w)
894 (forward-word 1) 894 (forward-word-strictly 1)
895 (forward-char 1)) 895 (forward-char 1))
896 (setq texinfo-command-end (point)) 896 (setq texinfo-command-end (point))
897 ;; Detect the case of two @-commands in a row; 897 ;; Detect the case of two @-commands in a row;
@@ -1190,7 +1190,7 @@ Leave point after argument."
1190 (forward-paragraph) 1190 (forward-paragraph)
1191 (let ((end (point))) 1191 (let ((end (point)))
1192 (if (save-excursion 1192 (if (save-excursion
1193 (backward-word 1) 1193 (backward-word-strictly 1)
1194 (search-forward "@refill" end t)) 1194 (search-forward "@refill" end t))
1195 (setq anchor-string "@anchor-yes-refill") 1195 (setq anchor-string "@anchor-yes-refill")
1196 (setq anchor-string "@anchor-no-refill"))) 1196 (setq anchor-string "@anchor-no-refill")))
@@ -2003,7 +2003,7 @@ commands that are defined in texinfo.tex for printed output.
2003 (error "In @multitable, @columnfractions misspelled")) 2003 (error "In @multitable, @columnfractions misspelled"))
2004 ;; Case 1: @columnfractions .25 .3 .45 2004 ;; Case 1: @columnfractions .25 .3 .45
2005 ((looking-at "@columnfractions") 2005 ((looking-at "@columnfractions")
2006 (forward-word 1) 2006 (forward-word-strictly 1)
2007 (while (not (eolp)) 2007 (while (not (eolp))
2008 (push (truncate 2008 (push (truncate
2009 (1- 2009 (1-
@@ -2118,7 +2118,7 @@ This command is executed when texinfmt sees @item inside @multitable."
2118 ;; Delete the @tab command, including the @-sign 2118 ;; Delete the @tab command, including the @-sign
2119 (delete-region 2119 (delete-region
2120 (point) 2120 (point)
2121 (progn (forward-word -1) (1- (point))))) 2121 (progn (forward-word-strictly -1) (1- (point)))))
2122 (point))) 2122 (point)))
2123 ;; Set fill-column *wider* than needed to produce inter-column space 2123 ;; Set fill-column *wider* than needed to produce inter-column space
2124 (setq fill-column (+ 1 2124 (setq fill-column (+ 1
diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el
index 12a991163b3..ed6022f9fbb 100644
--- a/lisp/textmodes/texinfo.el
+++ b/lisp/textmodes/texinfo.el
@@ -393,7 +393,7 @@ Subexpression 1 is what goes into the corresponding `@end' statement.")
393 (unless (get-char-property start 'text-clones) 393 (unless (get-char-property start 'text-clones)
394 (if endp 394 (if endp
395 (texinfo-last-unended-begin) 395 (texinfo-last-unended-begin)
396 (forward-word 1) 396 (forward-word-strictly 1)
397 (texinfo-next-unmatched-end)) 397 (texinfo-next-unmatched-end))
398 (skip-syntax-forward "^w") 398 (skip-syntax-forward "^w")
399 (when (looking-at 399 (when (looking-at
@@ -738,7 +738,7 @@ With prefix argument or inside @code or @example, inserts a plain \"."
738 "Insert the matching `@end' for the last Texinfo command that needs one." 738 "Insert the matching `@end' for the last Texinfo command that needs one."
739 (ignore-errors 739 (ignore-errors
740 (save-excursion 740 (save-excursion
741 (backward-word 1) 741 (backward-word-strictly 1)
742 (texinfo-last-unended-begin) 742 (texinfo-last-unended-begin)
743 (or (match-string 1) '-))) 743 (or (match-string 1) '-)))
744 \n "@end " str \n \n) 744 \n "@end " str \n \n)
diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el
index 8f401323445..b01c678ffec 100644
--- a/lisp/textmodes/texnfo-upd.el
+++ b/lisp/textmodes/texnfo-upd.el
@@ -519,7 +519,7 @@ line. If there is no node name, returns an empty string."
519 519
520 (save-excursion 520 (save-excursion
521 (buffer-substring 521 (buffer-substring
522 (progn (forward-word 1) ; skip over node command 522 (progn (forward-word-strictly 1) ; skip over node command
523 (skip-chars-forward " \t") ; and over spaces 523 (skip-chars-forward " \t") ; and over spaces
524 (point)) 524 (point))
525 (if (search-forward "," (line-end-position) t) ; bound search 525 (if (search-forward "," (line-end-position) t) ; bound search
@@ -542,7 +542,7 @@ must have been done by `texinfo-menu-locate-entry-p'."
542 (goto-char (match-beginning 7)) ; match section name 542 (goto-char (match-beginning 7)) ; match section name
543 543
544 (buffer-substring 544 (buffer-substring
545 (progn (forward-word 1) ; skip over section type 545 (progn (forward-word-strictly 1) ; skip over section type
546 (skip-chars-forward " \t") ; and over spaces 546 (skip-chars-forward " \t") ; and over spaces
547 (point)) 547 (point))
548 (progn (end-of-line) (point)))) 548 (progn (end-of-line) (point))))
@@ -794,7 +794,7 @@ complements the node name rather than repeats it as a title does."
794 (setq title 794 (setq title
795 (buffer-substring 795 (buffer-substring
796 ;; skip over section type 796 ;; skip over section type
797 (progn (forward-word 1) 797 (progn (forward-word-strictly 1)
798 ;; and over spaces 798 ;; and over spaces
799 (skip-chars-forward " \t") 799 (skip-chars-forward " \t")
800 (point)) 800 (point))
@@ -1104,7 +1104,7 @@ point."
1104 t) 1104 t)
1105 (progn 1105 (progn
1106 (beginning-of-line) 1106 (beginning-of-line)
1107 (forward-word 1) ; skip over section type 1107 (forward-word-strictly 1) ; skip over section type
1108 (skip-chars-forward " \t") ; and over spaces 1108 (skip-chars-forward " \t") ; and over spaces
1109 (buffer-substring 1109 (buffer-substring
1110 (point) 1110 (point)
@@ -1167,7 +1167,7 @@ error if the node is not the top node and a section is not found."
1167 (setq sec-name (buffer-substring-no-properties 1167 (setq sec-name (buffer-substring-no-properties
1168 (progn (beginning-of-line) ; copy its name 1168 (progn (beginning-of-line) ; copy its name
1169 (1+ (point))) 1169 (1+ (point)))
1170 (progn (forward-word 1) 1170 (progn (forward-word-strictly 1)
1171 (point)))))) 1171 (point))))))
1172 (cond 1172 (cond
1173 ((or sec-pos top-pos) 1173 ((or sec-pos top-pos)
@@ -1374,7 +1374,7 @@ Point must be at beginning of node line. Does not move point."
1374 (save-excursion 1374 (save-excursion
1375 (let ((initial (texinfo-copy-next-section-title))) 1375 (let ((initial (texinfo-copy-next-section-title)))
1376 ;; This is not clean. Use `interactive' to read the arg. 1376 ;; This is not clean. Use `interactive' to read the arg.
1377 (forward-word 1) ; skip over node command 1377 (forward-word-strictly 1) ; skip over node command
1378 (skip-chars-forward " \t") ; and over spaces 1378 (skip-chars-forward " \t") ; and over spaces
1379 (if (not (looking-at "[^,\t\n ]+")) ; regexp based on what Info looks for 1379 (if (not (looking-at "[^,\t\n ]+")) ; regexp based on what Info looks for
1380 ; alternatively, use "[a-zA-Z]+" 1380 ; alternatively, use "[a-zA-Z]+"
@@ -1700,7 +1700,7 @@ node names in pre-existing `@node' lines that lack names."
1700 (if title-p 1700 (if title-p
1701 (progn 1701 (progn
1702 (beginning-of-line) 1702 (beginning-of-line)
1703 (forward-word 1) 1703 (forward-word-strictly 1)
1704 (skip-chars-forward " \t") 1704 (skip-chars-forward " \t")
1705 (setq title (buffer-substring 1705 (setq title (buffer-substring
1706 (point) 1706 (point)
@@ -1713,7 +1713,7 @@ node names in pre-existing `@node' lines that lack names."
1713 (line-beginning-position -1)) 1713 (line-beginning-position -1))
1714 t) 1714 t)
1715 ;; @node is present, and point at beginning of that line 1715 ;; @node is present, and point at beginning of that line
1716 (forward-word 1) ; Leave point just after @node. 1716 (forward-word-strictly 1) ; Leave point just after @node.
1717 ;; Else @node missing; insert one. 1717 ;; Else @node missing; insert one.
1718 (beginning-of-line) ; Beginning of `@section' line. 1718 (beginning-of-line) ; Beginning of `@section' line.
1719 (insert "@node\n") 1719 (insert "@node\n")
@@ -1728,7 +1728,7 @@ node names in pre-existing `@node' lines that lack names."
1728 (if (not (looking-at "[^,\t\n ]+")) 1728 (if (not (looking-at "[^,\t\n ]+"))
1729 (progn 1729 (progn
1730 (beginning-of-line) 1730 (beginning-of-line)
1731 (forward-word 1) 1731 (forward-word-strictly 1)
1732 (insert " " title) 1732 (insert " " title)
1733 (message "Inserted title %s ... " title))))) 1733 (message "Inserted title %s ... " title)))))
1734 ;; Go forward beyond current section title. 1734 ;; Go forward beyond current section title.
@@ -1813,7 +1813,7 @@ same place. If there is no title, returns an empty string."
1813 ;; copy title 1813 ;; copy title
1814 (let ((title 1814 (let ((title
1815 (buffer-substring 1815 (buffer-substring
1816 (progn (forward-word 1) ; skip over section type 1816 (progn (forward-word-strictly 1) ; skip over section type
1817 (skip-chars-forward " \t") ; and over spaces 1817 (skip-chars-forward " \t") ; and over spaces
1818 (point)) 1818 (point))
1819 (progn (end-of-line) (point))))) 1819 (progn (end-of-line) (point)))))
diff --git a/lisp/wdired.el b/lisp/wdired.el
index 91093032125..2e68bec6fd7 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -685,7 +685,7 @@ If OLD, return the old target. If MOVE, move point before it."
685 (funcall command 1) 685 (funcall command 1)
686 (setq arg (1- arg))) 686 (setq arg (1- arg)))
687 (error 687 (error
688 (if (forward-word) 688 (if (forward-word-strictly)
689 ;; Skip any non-word characters to avoid triggering a read-only 689 ;; Skip any non-word characters to avoid triggering a read-only
690 ;; error which would cause skipping the next word characters too. 690 ;; error which would cause skipping the next word characters too.
691 (skip-syntax-forward "^w") 691 (skip-syntax-forward "^w")
diff --git a/src/syntax.c b/src/syntax.c
index ffe0ea5e0d9..fc8c666cec4 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -3771,11 +3771,11 @@ Each function is called with two arguments; POS and LIMIT.
3771POS and LIMIT are character positions in the current buffer. 3771POS and LIMIT are character positions in the current buffer.
3772 3772
3773If POS is less than LIMIT, POS is at the first character of a word, 3773If POS is less than LIMIT, POS is at the first character of a word,
3774and the return value of a function is a position after the last 3774and the return value of a function should be a position after the
3775character of that word. 3775last character of that word.
3776 3776
3777If POS is not less than LIMIT, POS is at the last character of a word, 3777If POS is not less than LIMIT, POS is at the last character of a word,
3778and the return value of a function is a position at the first 3778and the return value of a function should be a position at the first
3779character of that word. 3779character of that word.
3780 3780
3781In both cases, LIMIT bounds the search. */); 3781In both cases, LIMIT bounds the search. */);