summaryrefslogtreecommitdiff
path: root/lisp/progmodes/simula.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2016-02-05 23:54:21 +0200
committerEli Zaretskii <eliz@gnu.org>2016-02-05 23:54:21 +0200
commitc1d32a65372c72d7de4808d620eefd3214a8e92a (patch)
treec1dabeb7fc6b5a979ab51787c765ded60630c533 /lisp/progmodes/simula.el
parentd3337167c2a4d09444908cfc875ac4077a02279d (diff)
downloademacs-c1d32a65372c72d7de4808d620eefd3214a8e92a.tar.gz
emacs-c1d32a65372c72d7de4808d620eefd3214a8e92a.tar.bz2
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 'lisp/progmodes/simula.el')
-rw-r--r--lisp/progmodes/simula.el40
1 files changed, 20 insertions, 20 deletions
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."
(if (and (eq (char-syntax (preceding-char)) ?w)
(eq (char-syntax (following-char)) ?w))
(save-excursion
- (backward-word 1)
+ (backward-word-strictly 1)
(if (looking-at "end\\>\\|else\\>\\|otherwise\\>\\|when\\>")
(setq return-value nil)))))
((memq (preceding-char) '(?! ?t ?T))
@@ -654,12 +654,12 @@ If COUNT is negative, move forward up block level instead."
(1+ count)))))
(while (< count 0)
(re-search-forward "\\<begin\\>\\|\\<end\\>")
- (backward-word 1)
+ (backward-word-strictly 1)
(if (not (simula-context))
(setq count (if (memq (following-char) '(?e ?E))
(1+ count)
(1- count))))
- (backward-word -1)))
+ (backward-word-strictly -1)))
;; If block level not found, jump back to origin and signal an error
(error (progn
(goto-char origin)
@@ -689,12 +689,12 @@ If COUNT is negative, move backward down block level instead."
(if (< count start-count) (signal 'error nil)))
(while (> count 0)
(re-search-forward "\\<begin\\>\\|\\<end\\>")
- (backward-word 1)
+ (backward-word-strictly 1)
(if (not (simula-context))
(setq count (if (memq (following-char) '(?b ?B))
(1- count)
(1+ count))))
- (backward-word -1)
+ (backward-word-strictly -1)
;; deeper level has to be found within starting block
(if (> count start-count) (signal 'error nil))))
;; If block level not found, jump back to origin and signal an error
@@ -721,9 +721,9 @@ If COUNT is negative, move forward instead."
(simula-skip-comment-backward)
(if (memq (preceding-char) '(?n ?N))
(progn
- (backward-word 1)
+ (backward-word-strictly 1)
(if (not (looking-at "\\<begin\\>"))
- (backward-word -1)))
+ (backward-word-strictly -1)))
(if (eq (preceding-char) ?\;)
(backward-char 1))
)
@@ -734,7 +734,7 @@ If COUNT is negative, move forward instead."
(progn
(if (eq (following-char) ?\;)
(forward-char 1)
- (backward-word -1))))
+ (backward-word-strictly -1))))
(simula-skip-comment-forward))
(error (progn (goto-char origin)
(error "Incomplete statement (too many ENDs)")))
@@ -753,13 +753,13 @@ If COUNT is negative, move backward instead."
(condition-case ()
(progn
(simula-skip-comment-forward)
- (if (looking-at "\\<end\\>") (forward-word 1))
+ (if (looking-at "\\<end\\>") (forward-word-strictly 1))
(while (and (natnump (setq count (1- count)))
(setq status (simula-search-forward
";\\|\\<end\\>" (point-max) 'move))))
(if (and status (/= (preceding-char) ?\;))
(progn
- (backward-word 1)
+ (backward-word-strictly 1)
(simula-skip-comment-backward))))
(error (progn (goto-char origin)
(error "Incomplete statement (too few ENDs)")))
@@ -802,7 +802,7 @@ If COUNT is negative, move backward instead."
((eq context 2)
;; an END-comment must belong to an END
(re-search-backward "\\<end\\>")
- (forward-word 1)
+ (forward-word-strictly 1)
(throw 'simula-out nil))
;; should be impossible to get here..
)))))
@@ -915,7 +915,7 @@ If COUNT is negative, move backward instead."
((memq (following-char) '(?E ?e))
(setq indent (cdr simula-if-indent)))
(t
- (forward-word 1)
+ (forward-word-strictly 1)
(setq indent 0)))
(simula-find-if))
;;
@@ -939,7 +939,7 @@ If COUNT is negative, move backward instead."
(not (eq (preceding-char) ?\;))
(if (memq (preceding-char) '(?N ?n))
(save-excursion
- (backward-word 1)
+ (backward-word-strictly 1)
(not (looking-at "begin\\>")))
t))
(progn
@@ -954,7 +954,7 @@ If COUNT is negative, move backward instead."
;; (not found-end)
(if (eq (char-syntax (preceding-char)) ?w)
(progn
- (backward-word 1)
+ (backward-word-strictly 1)
(not (looking-at
"begin\\|then\\|else\\|when\\|otherwise\\|do"
)))
@@ -975,14 +975,14 @@ If COUNT is negative, move backward instead."
((looking-at "begin\\>")
(setq indent (+ indent simula-indent-level)))
((looking-at "end\\>")
- (forward-word 1)
+ (forward-word-strictly 1)
(simula-previous-statement 1))
((looking-at "do\\>")
(setq indent (+ indent simula-substatement-offset))
(simula-find-do-match))
((looking-at "\\(if\\|then\\|else\\)\\>")
(if (memq temp '(?I ?i))
- (forward-word 1)
+ (forward-word-strictly 1)
(setq indent (+ indent
simula-substatement-offset
(if (memq temp '(?T ?t))
@@ -1030,7 +1030,7 @@ If COUNT is negative, move backward instead."
(and (not (bobp))
(if (eq (char-syntax (preceding-char)) ?w)
(save-excursion
- (backward-word 1)
+ (backward-word-strictly 1)
(not (looking-at
"begin\\|then\\|else\\|when\\|otherwise\\|do")))
(not (memq (preceding-char) '(?: ?\;))))))
@@ -1067,7 +1067,7 @@ If COUNT is negative, move backward instead."
(simula-skip-comment-backward)
(if (and (eq (char-syntax (preceding-char)) ?w)
(progn
- (backward-word 1)
+ (backward-word-strictly 1)
(looking-at "else\\>")))
()
(throw 'simula-out t)))
@@ -1189,7 +1189,7 @@ If COUNT is negative, move backward instead."
(if where
(if (and (eq where 2) (eq (char-syntax (preceding-char)) ?w))
(save-excursion
- (backward-word 1)
+ (backward-word-strictly 1)
(not (looking-at "end\\>"))))))
(unexpand-abbrev)
(cond
@@ -1204,7 +1204,7 @@ If COUNT is negative, move backward instead."
;; check if the expanded word is on the beginning of the line.
(if (and (eq (char-syntax (preceding-char)) ?w)
(progn
- (backward-word 1)
+ (backward-word-strictly 1)
(if (looking-at "end\\>")
(save-excursion
(simula-backward-up-level 1)