]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/icon.el
Fix problems caused by new implementation of sub-word mode
[gnu-emacs] / lisp / progmodes / icon.el
index 35c29e106279595fee557d2c6c88405ec6918b4c..c91f98e32060df3143b32c102c63a3c61bf71bb2 100644 (file)
@@ -1,6 +1,6 @@
 ;;; icon.el --- mode for editing Icon code
 
-;; Copyright (C) 1989, 2001-201 Free Software Foundation, Inc.
+;; Copyright (C) 1989, 2001-2016 Free Software Foundation, Inc.
 
 ;; Author: Chris Smith <csmith@convex.com>
 ;; Created: 15 Feb 89
   :group 'languages)
 
 (defcustom icon-indent-level 4
-  "*Indentation of Icon statements with respect to containing block."
+  "Indentation of Icon statements with respect to containing block."
   :type 'integer
   :group 'icon)
 
 (defcustom icon-brace-imaginary-offset 0
-  "*Imagined indentation of a Icon open brace that actually follows a statement."
+  "Imagined indentation of a Icon open brace that actually follows a statement."
   :type 'integer
   :group 'icon)
 
 (defcustom icon-brace-offset 0
-  "*Extra indentation for braces, compared with other text in same context."
+  "Extra indentation for braces, compared with other text in same context."
   :type 'integer
   :group 'icon)
 
 (defcustom icon-continued-statement-offset 4
-  "*Extra indent for Icon lines not starting new statements."
+  "Extra indent for Icon lines not starting new statements."
   :type 'integer
   :group 'icon)
 
 (defcustom icon-continued-brace-offset 0
-  "*Extra indent for Icon substatements that start with open-braces.
+  "Extra indent for Icon substatements that start with open-braces.
 This is in addition to `icon-continued-statement-offset'."
   :type 'integer
   :group 'icon)
 
 (defcustom icon-auto-newline nil
-  "*Non-nil means automatically newline before and after braces Icon code.
+  "Non-nil means automatically newline before and after braces Icon code.
 This applies when braces are inserted."
   :type 'boolean
   :group 'icon)
 
 (defcustom icon-tab-always-indent t
-  "*Non-nil means TAB in Icon mode should always reindent the current line.
+  "Non-nil means TAB in Icon mode should always reindent the current line.
 It will then reindent, regardless of where in the line point is
 when the TAB command is used."
   :type 'boolean
@@ -404,8 +404,8 @@ Returns nil if line starts inside a string, t if in a comment."
         (ch-syntax (char-syntax ch)))
     (if (eq ch-syntax ?w)
        (assoc (buffer-substring
-               (progn (forward-word -1) (point))
-               (progn (forward-word 1) (point)))
+               (progn (forward-word-strictly -1) (point))
+               (progn (forward-word-strictly 1) (point)))
               icon-resword-alist)
       (not (memq ch '(0 ?\; ?\} ?\{ ?\) ?\] ?\" ?\' ?\# ?\, ?\. ?\n))))))
 
@@ -431,7 +431,8 @@ Returns nil if line starts inside a string, t if in a comment."
    ((and (eq (char-syntax (following-char)) ?w)
         (cdr
          (assoc (buffer-substring (point)
-                                  (save-excursion (forward-word 1) (point)))
+                                  (save-excursion (forward-word-strictly 1)
+                                                   (point)))
                 icon-resword-alist))) 0)
    (t (end-of-line 0) (icon-backward-to-start-of-continued-exp lim))))
 
@@ -475,7 +476,7 @@ Returns nil if line starts inside a string, t if in a comment."
   (interactive)
   (if (not (bobp)) (forward-char -1))
   (re-search-forward "\\(\\s \\|^\\)end\\(\\s \\|$\\)" (point-max) 'move)
-  (forward-word -1)
+  (forward-word-strictly -1)
   (forward-line 1))
 \f
 (defun indent-icon-exp ()