]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/simula.el
Merge from origin/emacs-25
[gnu-emacs] / lisp / progmodes / simula.el
index 77732ed32412d50ca93b878a693d4a3fed0ddd9d..d627309d6a43a9d44dc209f551b055d44a3a1ff9 100644 (file)
@@ -1,6 +1,6 @@
 ;;; simula.el --- SIMULA 87 code editing commands for Emacs
 
 ;;; simula.el --- SIMULA 87 code editing commands for Emacs
 
-;; Copyright (C) 1992, 1994, 1996, 2001-2013 Free Software Foundation,
+;; Copyright (C) 1992, 1994, 1996, 2001-2016 Free Software Foundation,
 ;; Inc.
 
 ;; Author: Hans Henrik Eriksen <hhe@ifi.uio.no>
 ;; Inc.
 
 ;; Author: Hans Henrik Eriksen <hhe@ifi.uio.no>
@@ -344,22 +344,22 @@ Variables controlling indentation style:
     with respect to the previous line of the statement.
  `simula-label-offset' -4711
     Offset of SIMULA label lines relative to usual indentation.
     with respect to the previous line of the statement.
  `simula-label-offset' -4711
     Offset of SIMULA label lines relative to usual indentation.
- `simula-if-indent' '(0 . 0)
+ `simula-if-indent' (0 . 0)
     Extra indentation of THEN and ELSE with respect to the starting IF.
     Value is a cons cell, the car is extra THEN indentation and the cdr
     extra ELSE indentation.  IF after ELSE is indented as the starting IF.
     Extra indentation of THEN and ELSE with respect to the starting IF.
     Value is a cons cell, the car is extra THEN indentation and the cdr
     extra ELSE indentation.  IF after ELSE is indented as the starting IF.
- `simula-inspect-indent' '(0 . 0)
+ `simula-inspect-indent' (0 . 0)
     Extra indentation of WHEN and OTHERWISE with respect to the
     corresponding INSPECT.  Value is a cons cell, the car is
     extra WHEN indentation and the cdr extra OTHERWISE indentation.
  `simula-electric-indent' nil
     If this variable is non-nil, `simula-indent-line'
     will check the previous line to see if it has to be reindented.
     Extra indentation of WHEN and OTHERWISE with respect to the
     corresponding INSPECT.  Value is a cons cell, the car is
     extra WHEN indentation and the cdr extra OTHERWISE indentation.
  `simula-electric-indent' nil
     If this variable is non-nil, `simula-indent-line'
     will check the previous line to see if it has to be reindented.
- `simula-abbrev-keyword' 'upcase
+ `simula-abbrev-keyword' `upcase'
     Determine how SIMULA keywords will be expanded.  Value is one of
     the symbols `upcase', `downcase', `capitalize', (as in) `abbrev-table',
     or nil if they should not be changed.
     Determine how SIMULA keywords will be expanded.  Value is one of
     the symbols `upcase', `downcase', `capitalize', (as in) `abbrev-table',
     or nil if they should not be changed.
- `simula-abbrev-stdproc' 'abbrev-table
+ `simula-abbrev-stdproc' `abbrev-table'
     Determine how standard SIMULA procedure and class names will be
     expanded.  Value is one of the symbols `upcase', `downcase', `capitalize',
     (as in) `abbrev-table', or nil if they should not be changed.
     Determine how standard SIMULA procedure and class names will be
     expanded.  Value is one of the symbols `upcase', `downcase', `capitalize',
     (as in) `abbrev-table', or nil if they should not be changed.
@@ -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
            (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))
                  (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\\>")
                                (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))))
            (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)
       ;; 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\\>")
              (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))))
            (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
            ;; 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
            (simula-skip-comment-backward)
            (if (memq (preceding-char) '(?n ?N))
                (progn
-                 (backward-word 1)
+                 (backward-word-strictly 1)
                  (if (not (looking-at "\\<begin\\>"))
                  (if (not (looking-at "\\<begin\\>"))
-                     (backward-word -1)))
+                     (backward-word-strictly -1)))
              (if (eq (preceding-char) ?\;)
                  (backward-char 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)
                (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)")))
            (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)
       (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
            (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)")))
                  (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\\>")
         ((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..
         )))))
          (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
           ((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))
         ;;
            (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
                 (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
                       (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
                     ;; (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"
                                 )))
                           (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\\>")
                 ((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))
                  (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))
                    (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
                  (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) '(?: ?\;))))))
                             (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
            (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)))
                       (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
          (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
                    (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
              ;; 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)
                         (if (looking-at "end\\>")
                             (save-excursion
                               (simula-backward-up-level 1)