Skip to content

Commit d47bdd2

Browse files
committed
Fix spell
1 parent 7f89b8c commit d47bdd2

File tree

5 files changed

+50
-50
lines changed

5 files changed

+50
-50
lines changed

swift-mode-beginning-of-defun.el

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ The cursor must be at the beginning of a statement."
186186
;; // Nested class named "final"
187187
;; class Foo { class final {} }
188188
;;
189-
;; // Nonoverridable class method named "foo"
189+
;; // Non-overridable class method named "foo"
190190
;; class Foo { class final func foo() {} }
191191
;;
192192
;; Keeps scanning and returns the token if there are no other
@@ -318,7 +318,7 @@ Intended for internal use."
318318
(memq (swift-mode:token:type previous-token)
319319
'(\; anonymous-function-parameter-in))
320320
(eq (swift-mode:token:end previous-token) pos))
321-
;; Already at the eod of statement. Returns next token.
321+
;; Already at the end of statement. Returns next token.
322322
(save-excursion (swift-mode:forward-token)))
323323
((memq (swift-mode:token:type previous-token)
324324
'(implicit-\; outside-of-buffer))
@@ -525,7 +525,7 @@ Interactively, the behavior depends on ‘narrow-to-defun-include-comments’."
525525
(defun swift-mode:forward-sentence (&optional arg)
526526
"Skip forward sentences or statements.
527527
528-
In comments or strings, skip a sentence. Otherwise, skip a stateement.
528+
In comments or strings, skip a sentence. Otherwise, skip a statement.
529529
530530
With ARG, repeat ARG times. If ARG is negative, Skip backwards.
531531
@@ -865,7 +865,7 @@ Both functions return t if succeeded, return nil otherwise."
865865
(defun swift-mode:backward-sentence (&optional arg)
866866
"Skip backward sentences or statements.
867867
868-
In comments or strings, skip a sentence. Otherwise, skip a stateement.
868+
In comments or strings, skip a sentence. Otherwise, skip a statement.
869869
870870
With ARG, repeat ARG times. If ARG is negative, Skip forwards.
871871
@@ -883,7 +883,7 @@ Return t if a sentence is found. Return nil otherwise."
883883
(defun swift-mode:forward-sentence-1 ()
884884
"Skip forward a sentence or a statement.
885885
886-
In comments or strings, skip a sentence. Otherwise, skip a stateement."
886+
In comments or strings, skip a sentence. Otherwise, skip a statement."
887887
(let ((chunk (swift-mode:chunk-after)))
888888
(cond
889889
((swift-mode:chunk:comment-p chunk)
@@ -924,7 +924,7 @@ In comments or strings, skip a sentence. Otherwise, skip a stateement."
924924
(defun swift-mode:backward-sentence-1 ()
925925
"Skip backward a sentence or a statement.
926926
927-
In comments or strings, skip a sentence. Otherwise, skip a stateement."
927+
In comments or strings, skip a sentence. Otherwise, skip a statement."
928928
(let ((chunk (swift-mode:chunk-after)))
929929
(cond
930930
((swift-mode:chunk:comment-p chunk)

swift-mode-font-lock.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ That is, true, false, and nil."
7373
'((t . (:inherit font-lock-preprocessor-face)))
7474
"Face for highlighting preprocessor keywords.
7575
76-
Exmpale: #if, #endif, and #selector."
76+
Example: #if, #endif, and #selector."
7777
:group 'swift-mode:faces)
7878

7979
;;;###autoload
@@ -162,7 +162,7 @@ Exmpale: #if, #endif, and #selector."
162162

163163

164164
(defun swift-mode:make-set (list)
165-
"Return a hash where its keys are elemetns of the LIST.
165+
"Return a hash where its keys are elements of the LIST.
166166
167167
All values are t."
168168
(let ((hash (make-hash-table :test 'equal)))
@@ -394,7 +394,7 @@ Return nil otherwise."
394394
(swift-mode:font-lock-match-expr
395395
limit #'swift-mode:declared-function-name-pos-p))
396396

397-
(defun swift-mode:font-lock-match-property-accesss (limit)
397+
(defun swift-mode:font-lock-match-property-access (limit)
398398
"Move the cursor just after a property access.
399399
Set `match-data', and return t if a property access found before position LIMIT.
400400
Return nil otherwise."
@@ -675,7 +675,7 @@ Excludes true, false, and keywords begin with a number sign.")
675675
'swift-mode:function-name-face)
676676

677677
;; Property accesses
678-
(swift-mode:font-lock-match-property-accesss
678+
(swift-mode:font-lock-match-property-access
679679
.
680680
'swift-mode:property-access-face))
681681
"Swift mode keywords for Font Lock.")

swift-mode-indent.el

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ declaration and its offset is `swift-mode:basic-offset'."
372372
;; Searches sibling "case" at the beginning of a line. If found, aligns
373373
;; with it.
374374
;;
375-
;; Otherwise, searches "switch" and aligh with it with offset.
375+
;; Otherwise, searches "switch" and align with it with offset.
376376
(let ((parent (swift-mode:backward-sexps-until
377377
'("switch") nil '("case" "default"))))
378378
(if (equal (swift-mode:token:text parent) "switch")
@@ -992,9 +992,9 @@ Assuming the cursor is on the comma."
992992
(swift-mode:align-with-next-token
993993
(swift-mode:find-parent-of-list-element nil)))
994994

995-
(defun swift-mode:find-parent-of-list-element (&optional utrecht-sytle)
995+
(defun swift-mode:find-parent-of-list-element (&optional utrecht-style)
996996
"Move point backward to the parent token of the comma under the cursor.
997-
If UTRECHT-SYTLE is non-nil, stop at a comma at bol. Otherwise, stop at a
997+
If UTRECHT-STYLE is non-nil, stop at a comma at bol. Otherwise, stop at a
998998
comma at eol."
999999
;; Various examples:
10001000
;;
@@ -1092,8 +1092,8 @@ comma at eol."
10921092
(parent (swift-mode:backward-sexps-until
10931093
;; Includes "if" to stop at the last else-if.
10941094
(append swift-mode:statement-parent-tokens '("if" \( \[ <))
1095-
(if utrecht-sytle nil '(\,))
1096-
(if utrecht-sytle '(\,) nil))))
1095+
(if utrecht-style nil '(\,))
1096+
(if utrecht-style '(\,) nil))))
10971097
(cond
10981098
((memq (swift-mode:token:type parent) '(\( \[ \,))
10991099
parent)
@@ -1228,10 +1228,10 @@ Assuming the cursor is before the string chunk."
12281228
Return the token.
12291229
When this function returns, the cursor is at the start of the token.
12301230
1231-
TOKEN-TYPES is a list of guard token typess. This function backs to a token
1231+
TOKEN-TYPES is a list of guard token types. This function backs to a token
12321232
with one of those token types.
12331233
STOP-AT-EOL-TOKEN-TYPES is a list of token types that if we skipped the end of
1234-
a line just after a token with one of given toke typen, the function returns.
1234+
a line just after a token with one of given token type, the function returns.
12351235
Typically, this is a list of token types that separates list elements
12361236
\(e.g. ',', ';'). If STOP-AT-EOL-TOKEN-TYPES is the symbol `any', it matches
12371237
all tokens.
@@ -1416,7 +1416,7 @@ It is a Generic parameter list if:
14161416
#'swift-mode:forward-token-or-list
14171417
">" "<"))
14181418

1419-
(defconst siwft-mode:tokens-not-in-generic-parameter-list
1419+
(defconst swift-mode:tokens-not-in-generic-parameter-list
14201420
;; Whitelisting tend to be fragile. So we list tokens that are
14211421
;; unlikely to appear in generic parameter lists in the current
14221422
;; version and future ones.
@@ -1459,7 +1459,7 @@ UNMATCHING-BRACKET-TEXT is a text of the current bracket."
14591459
(let ((pos (point))
14601460
(prohibited-tokens (append
14611461
unmatching-bracket-text
1462-
siwft-mode:tokens-not-in-generic-parameter-list))
1462+
swift-mode:tokens-not-in-generic-parameter-list))
14631463
(next-token (funcall skip-token-or-list-function)))
14641464
(while
14651465
(cond

swift-mode-lexer.el

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
(defun swift-mode:token (type text start end)
7777
"Construct and return a token.
7878
79-
TYPE is the type of the token such as `inix-operator' or {.
79+
TYPE is the type of the token such as `infix-operator' or {.
8080
TEXT is the text of the token.
8181
START is the start position of the token.
8282
END is the point after the token."
@@ -98,7 +98,7 @@ END is the point after the token."
9898
"Return the end position of TOKEN."
9999
(nth 3 token))
100100

101-
;; Token types is one of the follwing symbols:
101+
;; Token types is one of the following symbols:
102102
;;
103103
;; - prefix-operator (including try, try?, and try!)
104104
;; - postfix-operator
@@ -124,7 +124,7 @@ END is the point after the token."
124124
;; - string-chunk-before-interpolated-expression (part of a string ending with "\\(")
125125
;; - outside-of-buffer
126126
;;
127-
;; Additionaly, `swift-mode:backward-token-or-list' may return a parenthesized
127+
;; Additionally, `swift-mode:backward-token-or-list' may return a parenthesized
128128
;; expression as a token with one of the following types:
129129
;; - ()
130130
;; - []
@@ -376,13 +376,13 @@ Return nil otherwise."
376376
(setq next-token (swift-mode:token 'identifier "" (point) (point))))
377377
(cond
378378
((or
379-
;; Supresses implicit semicolon around binary operators and separators.
379+
;; Suppresses implicit semicolon around binary operators and separators.
380380
(memq (swift-mode:token:type previous-token)
381381
'(binary-operator \; \, :))
382382
(memq (swift-mode:token:type next-token)
383383
'(binary-operator \; \, :))
384384

385-
;; Supresses implicit semicolon after try, try?, and try!.
385+
;; Suppresses implicit semicolon after try, try?, and try!.
386386
(member (swift-mode:token:text previous-token)
387387
'("try" "try?" "try!"))
388388

@@ -419,7 +419,7 @@ Return nil otherwise."
419419
;; }
420420
((eq (swift-mode:token:type next-token) '\{) t)
421421

422-
;; Supress implicit semicolon after attributes.
422+
;; Suppress implicit semicolon after attributes.
423423
((eq (swift-mode:token:type previous-token) 'attribute)
424424
nil)
425425

@@ -450,7 +450,7 @@ Return nil otherwise."
450450

451451
;; Insert implicit semicolon before modifiers.
452452
;;
453-
;; Preceding mofidiers takes precedence over this.
453+
;; Preceding modifiers takes precedence over this.
454454
((member (swift-mode:token:text next-token)
455455
'("indirect" "convenience" "dynamic" "final" "infix" "lazy"
456456
"mutating" "nonmutating" "optional" "override" "postfix"
@@ -681,7 +681,7 @@ Return nil otherwise."
681681
;; switch foo {
682682
;; case let x where x is Foo ?
683683
;; a : // This function should return nil but it
684-
;; // actually retuns t.
684+
;; // actually returns t.
685685
;; b: // This function should return t but it
686686
;; // actually return nil.
687687
;; let y = a ? b : c // This function returns nil correctly for
@@ -695,7 +695,7 @@ Return nil otherwise."
695695
'("case" "default"))
696696
(setq swift-mode:in-recursive-call-of-case-colon-p nil)))))
697697

698-
(defun swift-mode:anonyous-parameter-in-p ()
698+
(defun swift-mode:anonymous-parameter-in-p ()
699699
"Return t if a 'in' token at the cursor is for anonymous function parameters."
700700
(save-excursion
701701
(eq
@@ -811,7 +811,7 @@ type `out-of-buffer'"
811811
(when (and (equal (swift-mode:token:text token) "in")
812812
(save-excursion
813813
(goto-char (swift-mode:token:start token))
814-
(swift-mode:anonyous-parameter-in-p)))
814+
(swift-mode:anonymous-parameter-in-p)))
815815
(setq token
816816
(swift-mode:token
817817
'anonymous-function-parameter-in
@@ -853,7 +853,7 @@ This function does not return `implicit-;' or `type-:'."
853853
;; Open angle bracket for type parameters
854854
;;
855855
;; We use a heuristic: spaces are inserted around inequality sign, but not
856-
;; for angle bracket, and a type paramer starts with an upper case
856+
;; for angle bracket, and a type parameter starts with an upper case
857857
;; character, a square bracket, a parenthesis, or keyword 'protocol'.
858858
((and (eq (char-after) ?<)
859859
(looking-at "<\\([[:upper:]\\[[(]\\|protocol\\)"))
@@ -1023,7 +1023,7 @@ type `out-of-buffer'."
10231023
(when (and (equal (swift-mode:token:text token) "in")
10241024
(save-excursion
10251025
(goto-char (swift-mode:token:start token))
1026-
(swift-mode:anonyous-parameter-in-p)))
1026+
(swift-mode:anonymous-parameter-in-p)))
10271027
(setq token
10281028
(swift-mode:token
10291029
'anonymous-function-parameter-in
@@ -1095,7 +1095,7 @@ This function does not return `implicit-;' or `type-:'."
10951095
;; Open angle bracket for type parameters
10961096
;;
10971097
;; We use a heuristic: spaces are inserted around inequality sign, but not
1098-
;; for angle bracket, and a type paramer starts with an upper case
1098+
;; for angle bracket, and a type parameter starts with an upper case
10991099
;; character, a square bracket, a parenthesis, or keyword `protocol'.
11001100
((and (eq (char-before) ?<)
11011101
(looking-at "\\([[:upper:]\\[[(]\\|protocol\\)"))
@@ -1273,7 +1273,7 @@ If this line ends with a single-line comment, goto just before the comment."
12731273
(swift-mode:chunk:comment-p chunk))
12741274
;; The cursor is in a comment.
12751275
(if (swift-mode:chunk:single-line-comment-p chunk)
1276-
;; This ia a single-line comment
1276+
;; This is a single-line comment
12771277
;; Back to the beginning of the comment.
12781278
(goto-char (swift-mode:chunk:start chunk))
12791279
;; This is a multiline comment

0 commit comments

Comments
 (0)