diff options
| author | Eli Zaretskii | 2016-02-05 23:54:21 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2016-02-05 23:54:21 +0200 |
| commit | c1d32a65372c72d7de4808d620eefd3214a8e92a (patch) | |
| tree | c1dabeb7fc6b5a979ab51787c765ded60630c533 /doc | |
| parent | d3337167c2a4d09444908cfc875ac4077a02279d (diff) | |
| download | emacs-c1d32a65372c72d7de4808d620eefd3214a8e92a.tar.gz emacs-c1d32a65372c72d7de4808d620eefd3214a8e92a.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'.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/positions.texi | 60 |
1 files changed, 48 insertions, 12 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 |
| 195 | whether a given character is part of a word. @xref{Syntax Tables}. | 195 | to decide whether a given character is part of a word. @xref{Syntax |
| 196 | Tables}. | ||
| 196 | 197 | ||
| 197 | @deffn Command forward-word &optional count | 198 | @deffn Command forward-word &optional count |
| 198 | This function moves point forward @var{count} words (or backward if | 199 | This 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 |
| 200 | defaults to 1. | 201 | defaults to 1. In an interactive call, @var{count} is specified by |
| 202 | the 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 |
| 203 | word-constituent character and then encounters a word-separator | 205 | word-constituent character, which indicates the beginning of a word, |
| 204 | character. However, this function cannot move point past the boundary | 206 | and then continue moving until the word ends. By default, characters |
| 205 | of the accessible portion of the buffer, or across a field boundary | 207 | that begin and end words, known as @dfn{word boundaries}, are defined |
| 208 | by the current buffer's syntax table (@pxref{Syntax Class Table}), but | ||
| 209 | modes can override that by setting up a suitable | ||
| 210 | @code{find-word-boundary-function-table}, described below. In any | ||
| 211 | case, this function cannot move point past the boundary of the | ||
| 212 | accessible 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 |
| 207 | of the prompt in the minibuffer. | 214 | of the prompt in the minibuffer. |
| 208 | 215 | ||
| @@ -214,8 +221,6 @@ the buffer boundary or field boundary. | |||
| 214 | If @code{inhibit-field-text-motion} is non-@code{nil}, | 221 | If @code{inhibit-field-text-motion} is non-@code{nil}, |
| 215 | this function ignores field boundaries. | 222 | this function ignores field boundaries. |
| 216 | 223 | ||
| 217 | In an interactive call, @var{count} is specified by the numeric prefix | ||
| 218 | argument. | ||
| 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 |
| 228 | This variable affects the behavior of @code{forward-word} and everything | 233 | This variable affects the behavior of @code{forward-word} and |
| 229 | that uses it. If it is non-@code{nil}, then characters in the | 234 | @code{backward-word}, and everything that uses them. If it is |
| 230 | escape and character-quote syntax classes count as part of | 235 | non-@code{nil}, then characters in the escape and character-quote |
| 231 | words. Otherwise, they do not. | 236 | syntax 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 | ||
| 246 | This variable affects the behavior of @code{forward-word} and | ||
| 247 | @code{backward-word}, and everything that uses them. Its value is a | ||
| 248 | char-table (@pxref{Char-Tables}) of functions to search for word | ||
| 249 | boundaries. If a character has a non-@code{nil} entry in this table, | ||
| 250 | then when a word starts or ends with that character, the corresponding | ||
| 251 | function will be called with 2 arguments: @var{pos} and @var{limit}. | ||
| 252 | The function should return the position of the other word boundary. | ||
| 253 | Specifically, if @var{pos} is smaller than @var{limit}, then @var{pos} | ||
| 254 | is at the beginning of a word, and the function should return the | ||
| 255 | position after the last character of the word; otherwise, @var{pos} is | ||
| 256 | at the last character of a word, and the function should return the | ||
| 257 | position of that word's first character. | ||
| 258 | @end defvar | ||
| 259 | |||
| 260 | @defun forward-word-strictly &optional count | ||
| 261 | This function is like @code{forward-word}, but it is not affected by | ||
| 262 | @code{find-word-boundary-function-table}. Lisp programs that should | ||
| 263 | not change behavior when word movement is modified by modes which set | ||
| 264 | that table, such as @code{subword-mode}, should use this function | ||
| 265 | instead of @code{forward-word}. | ||
| 266 | @end defun | ||
| 267 | |||
| 268 | @defun backward-word-strictly &optional count | ||
| 269 | This 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 | ||
| 273 | syntax 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 |