Spelling fixes.
[bpt/emacs.git] / lisp / progmodes / cc-engine.el
index d56d5ae..5ec0ab0 100644 (file)
@@ -2364,7 +2364,7 @@ comment at the start of cc-engine.el for more info."
 
 (defun c-parse-state-get-strategy (here good-pos)
   ;; Determine the scanning strategy for adjusting `c-parse-state', attempting
-  ;; to minimise the amount of scanning.  HERE is the pertinent position in
+  ;; to minimize the amount of scanning.  HERE is the pertinent position in
   ;; the buffer, GOOD-POS is a position where `c-state-cache' (possibly with
   ;; its head trimmed) is known to be good, or nil if there is no such
   ;; position.
@@ -2548,7 +2548,7 @@ comment at the start of cc-engine.el for more info."
                        c-state-cache)))
        ;; N.B.  This defsubst codes one method for the simple, normal case,
        ;; and a more sophisticated, slower way for the general case.  Don't
-       ;; eliminate this defsubst - it's a speed optimisation.
+       ;; eliminate this defsubst - it's a speed optimization.
        (c-append-lower-brace-pair-to-state-cache (1- bra+1)))))
 
 (defun c-append-to-state-cache (from)
@@ -2788,7 +2788,7 @@ comment at the start of cc-engine.el for more info."
   ;;
   ;; This function must only be called only when (> `c-state-cache-good-pos'
   ;; HERE).  Usually the gap between CACHE-POS and HERE is large.  It is thus
-  ;; optimised to eliminate (or minimise) scanning between these two
+  ;; optimized to eliminate (or minimize) scanning between these two
   ;; positions.
   ;;
   ;; Return a three element list (GOOD-POS SCAN-BACK-POS FWD-FLAG), where:
@@ -2820,7 +2820,7 @@ comment at the start of cc-engine.el for more info."
                                        ; or `here' itself.
        here- here+                  ; start/end of macro around HERE, or HERE
        (here-bol (c-point 'bol here))
-       (too-far-back (max (- here c-state-cache-too-far) 1)))
+       (too-far-back (max (- here c-state-cache-too-far) (point-min))))
 
     ;; Remove completely irrelevant entries from `c-state-cache'.
     (while (and c-state-cache
@@ -2964,9 +2964,9 @@ comment at the start of cc-engine.el for more info."
            c-state-cache-good-pos nil
            c-state-min-scan-pos nil)
 
-;;; Truncate `c-state-cache' and set `c-state-cache-good-pos' to a value below
-;;; `here'.  To maintain its consistency, we may need to insert a new brace
-;;; pair.
+    ;; Truncate `c-state-cache' and set `c-state-cache-good-pos' to a value
+    ;; below `here'.  To maintain its consistency, we may need to insert a new
+    ;; brace pair.
     (let ((here-bol (c-point 'bol here))
          too-high-pa             ; recorded {/(/[ next above here, or nil.
          dropped-cons            ; was the last removed element a brace pair?
@@ -4233,9 +4233,9 @@ comment at the start of cc-engine.el for more info."
 ;; fails to take account of the change of the s-t property on the opening / to
 ;; "string", and reports that the { is within a string started by the second /.
 ;;
-;; The workaround for this is for the AWK Mode initialisation to switch the
+;; The workaround for this is for the AWK Mode initialization to switch the
 ;; defalias for c-in-literal to c-slow-in-literal.  This will slow down other
-;; cc-modes in XEmacs whenever an awk-buffer has been initialised.
+;; cc-modes in XEmacs whenever an awk-buffer has been initialized.
 ;;
 ;; (Alan Mackenzie, 2003/4/30).
 
@@ -4904,7 +4904,7 @@ comment at the start of cc-engine.el for more info."
            (setq cfd-prop-match nil))
 
        (when (/= cfd-macro-end 0)
-         ;; Restore limits if we did macro narrowment above.
+         ;; Restore limits if we did macro narrowing above.
          (narrow-to-region (point-min) cfd-buffer-end)))
 
       (goto-char cfd-continue-pos)
@@ -5052,7 +5052,7 @@ comment at the start of cc-engine.el for more info."
 ;; The strategy now (2010-01) adopted is to mark and unmark < and
 ;; > IN MATCHING PAIRS ONLY.  [Previously, they were marked
 ;; individually when their context so indicated.  This gave rise to
-;; intractible problems when one of a matching pair was deleted, or
+;; intractable problems when one of a matching pair was deleted, or
 ;; pulled into a literal.]
 ;;
 ;; At each buffer change, the syntax-table properties are removed in a
@@ -5965,7 +5965,7 @@ comment at the start of cc-engine.el for more info."
   ;;     `*-font-lock-extra-types');
   ;;   o - 'prefix if it's a known prefix of a type;
   ;;   o - 'found if it's a type that matches one in `c-found-types';
-  ;;   o - 'maybe if it's an identfier that might be a type; or
+  ;;   o - 'maybe if it's an identifier that might be a type; or
   ;;   o -  nil if it can't be a type (the point isn't moved then).
   ;;
   ;; The point is assumed to be at the beginning of a token.
@@ -7100,7 +7100,7 @@ comment at the start of cc-engine.el for more info."
   ;;   colon).  Currently (2006-03), this applies only to Objective C's
   ;;   keywords "@private", "@protected", and "@public".  Returns t.
   ;;
-  ;; One of the things which will NOT be recognised as a label is a bit-field
+  ;; One of the things which will NOT be recognized as a label is a bit-field
   ;; element of a struct, something like "int foo:5".
   ;;
   ;; The end of the label is taken to be just after the colon, or the end of
@@ -8832,7 +8832,7 @@ comment at the start of cc-engine.el for more info."
        ;; CASE B.4: Continued statement with block open.  The most
        ;; accurate analysis is perhaps `statement-cont' together with
        ;; `block-open' but we play DWIM and use `substatement-open'
-       ;; instead.  The rationaly is that this typically is a macro
+       ;; instead.  The rationale is that this typically is a macro
        ;; followed by a block which makes it very similar to a
        ;; statement with a substatement block.
        (t
@@ -9582,7 +9582,7 @@ comment at the start of cc-engine.el for more info."
            (c-add-syntax 'inher-cont (c-point 'boi)))
 
           ;; CASE 5D.5: Continuation of the "expression part" of a
-          ;; top level construct.  Or, perhaps, an unrecognised construct.
+          ;; top level construct.  Or, perhaps, an unrecognized construct.
           (t
            (while (and (setq placeholder (point))
                        (eq (car (c-beginning-of-decl-1 containing-sexp))
@@ -9593,7 +9593,7 @@ comment at the start of cc-engine.el for more info."
                        (< (point) placeholder)))
            (c-add-stmt-syntax
             (cond
-             ((eq (point) placeholder) 'statement) ; unrecognised construct
+             ((eq (point) placeholder) 'statement) ; unrecognized construct
              ;; A preceding comma at the top level means that a
              ;; new variable declaration starts here.  Use
              ;; topmost-intro-cont for it, for consistency with