branch: elpa/swift-mode commit d47bdd25d257b1680142b84f324f03ef4d164bc9 Author: taku0 <mxxouy6x3m_git...@tatapa.org> Commit: taku0 <mxxouy6x3m_git...@tatapa.org>
Fix spell --- swift-mode-beginning-of-defun.el | 12 ++++++------ swift-mode-font-lock.el | 8 ++++---- swift-mode-indent.el | 18 +++++++++--------- swift-mode-lexer.el | 28 ++++++++++++++-------------- swift-mode-repl.el | 34 +++++++++++++++++----------------- 5 files changed, 50 insertions(+), 50 deletions(-) diff --git a/swift-mode-beginning-of-defun.el b/swift-mode-beginning-of-defun.el index 5f39f91..ef24cd3 100644 --- a/swift-mode-beginning-of-defun.el +++ b/swift-mode-beginning-of-defun.el @@ -186,7 +186,7 @@ The cursor must be at the beginning of a statement." ;; // Nested class named "final" ;; class Foo { class final {} } ;; - ;; // Nonoverridable class method named "foo" + ;; // Non-overridable class method named "foo" ;; class Foo { class final func foo() {} } ;; ;; Keeps scanning and returns the token if there are no other @@ -318,7 +318,7 @@ Intended for internal use." (memq (swift-mode:token:type previous-token) '(\; anonymous-function-parameter-in)) (eq (swift-mode:token:end previous-token) pos)) - ;; Already at the eod of statement. Returns next token. + ;; Already at the end of statement. Returns next token. (save-excursion (swift-mode:forward-token))) ((memq (swift-mode:token:type previous-token) '(implicit-\; outside-of-buffer)) @@ -525,7 +525,7 @@ Interactively, the behavior depends on ‘narrow-to-defun-include-comments’." (defun swift-mode:forward-sentence (&optional arg) "Skip forward sentences or statements. -In comments or strings, skip a sentence. Otherwise, skip a stateement. +In comments or strings, skip a sentence. Otherwise, skip a statement. With ARG, repeat ARG times. If ARG is negative, Skip backwards. @@ -865,7 +865,7 @@ Both functions return t if succeeded, return nil otherwise." (defun swift-mode:backward-sentence (&optional arg) "Skip backward sentences or statements. -In comments or strings, skip a sentence. Otherwise, skip a stateement. +In comments or strings, skip a sentence. Otherwise, skip a statement. With ARG, repeat ARG times. If ARG is negative, Skip forwards. @@ -883,7 +883,7 @@ Return t if a sentence is found. Return nil otherwise." (defun swift-mode:forward-sentence-1 () "Skip forward a sentence or a statement. -In comments or strings, skip a sentence. Otherwise, skip a stateement." +In comments or strings, skip a sentence. Otherwise, skip a statement." (let ((chunk (swift-mode:chunk-after))) (cond ((swift-mode:chunk:comment-p chunk) @@ -924,7 +924,7 @@ In comments or strings, skip a sentence. Otherwise, skip a stateement." (defun swift-mode:backward-sentence-1 () "Skip backward a sentence or a statement. -In comments or strings, skip a sentence. Otherwise, skip a stateement." +In comments or strings, skip a sentence. Otherwise, skip a statement." (let ((chunk (swift-mode:chunk-after))) (cond ((swift-mode:chunk:comment-p chunk) diff --git a/swift-mode-font-lock.el b/swift-mode-font-lock.el index bbf7046..4506c20 100644 --- a/swift-mode-font-lock.el +++ b/swift-mode-font-lock.el @@ -73,7 +73,7 @@ That is, true, false, and nil." '((t . (:inherit font-lock-preprocessor-face))) "Face for highlighting preprocessor keywords. -Exmpale: #if, #endif, and #selector." +Example: #if, #endif, and #selector." :group 'swift-mode:faces) ;;;###autoload @@ -162,7 +162,7 @@ Exmpale: #if, #endif, and #selector." (defun swift-mode:make-set (list) - "Return a hash where its keys are elemetns of the LIST. + "Return a hash where its keys are elements of the LIST. All values are t." (let ((hash (make-hash-table :test 'equal))) @@ -394,7 +394,7 @@ Return nil otherwise." (swift-mode:font-lock-match-expr limit #'swift-mode:declared-function-name-pos-p)) -(defun swift-mode:font-lock-match-property-accesss (limit) +(defun swift-mode:font-lock-match-property-access (limit) "Move the cursor just after a property access. Set `match-data', and return t if a property access found before position LIMIT. Return nil otherwise." @@ -675,7 +675,7 @@ Excludes true, false, and keywords begin with a number sign.") 'swift-mode:function-name-face) ;; Property accesses - (swift-mode:font-lock-match-property-accesss + (swift-mode:font-lock-match-property-access . 'swift-mode:property-access-face)) "Swift mode keywords for Font Lock.") diff --git a/swift-mode-indent.el b/swift-mode-indent.el index 435e8ad..aead84e 100644 --- a/swift-mode-indent.el +++ b/swift-mode-indent.el @@ -372,7 +372,7 @@ declaration and its offset is `swift-mode:basic-offset'." ;; Searches sibling "case" at the beginning of a line. If found, aligns ;; with it. ;; - ;; Otherwise, searches "switch" and aligh with it with offset. + ;; Otherwise, searches "switch" and align with it with offset. (let ((parent (swift-mode:backward-sexps-until '("switch") nil '("case" "default")))) (if (equal (swift-mode:token:text parent) "switch") @@ -992,9 +992,9 @@ Assuming the cursor is on the comma." (swift-mode:align-with-next-token (swift-mode:find-parent-of-list-element nil))) -(defun swift-mode:find-parent-of-list-element (&optional utrecht-sytle) +(defun swift-mode:find-parent-of-list-element (&optional utrecht-style) "Move point backward to the parent token of the comma under the cursor. -If UTRECHT-SYTLE is non-nil, stop at a comma at bol. Otherwise, stop at a +If UTRECHT-STYLE is non-nil, stop at a comma at bol. Otherwise, stop at a comma at eol." ;; Various examples: ;; @@ -1092,8 +1092,8 @@ comma at eol." (parent (swift-mode:backward-sexps-until ;; Includes "if" to stop at the last else-if. (append swift-mode:statement-parent-tokens '("if" \( \[ <)) - (if utrecht-sytle nil '(\,)) - (if utrecht-sytle '(\,) nil)))) + (if utrecht-style nil '(\,)) + (if utrecht-style '(\,) nil)))) (cond ((memq (swift-mode:token:type parent) '(\( \[ \,)) parent) @@ -1228,10 +1228,10 @@ Assuming the cursor is before the string chunk." Return the token. When this function returns, the cursor is at the start of the token. -TOKEN-TYPES is a list of guard token typess. This function backs to a token +TOKEN-TYPES is a list of guard token types. This function backs to a token with one of those token types. STOP-AT-EOL-TOKEN-TYPES is a list of token types that if we skipped the end of -a line just after a token with one of given toke typen, the function returns. +a line just after a token with one of given token type, the function returns. Typically, this is a list of token types that separates list elements \(e.g. ',', ';'). If STOP-AT-EOL-TOKEN-TYPES is the symbol `any', it matches all tokens. @@ -1416,7 +1416,7 @@ It is a Generic parameter list if: #'swift-mode:forward-token-or-list ">" "<")) -(defconst siwft-mode:tokens-not-in-generic-parameter-list +(defconst swift-mode:tokens-not-in-generic-parameter-list ;; Whitelisting tend to be fragile. So we list tokens that are ;; unlikely to appear in generic parameter lists in the current ;; version and future ones. @@ -1459,7 +1459,7 @@ UNMATCHING-BRACKET-TEXT is a text of the current bracket." (let ((pos (point)) (prohibited-tokens (append unmatching-bracket-text - siwft-mode:tokens-not-in-generic-parameter-list)) + swift-mode:tokens-not-in-generic-parameter-list)) (next-token (funcall skip-token-or-list-function))) (while (cond diff --git a/swift-mode-lexer.el b/swift-mode-lexer.el index 28abf34..383d6e0 100644 --- a/swift-mode-lexer.el +++ b/swift-mode-lexer.el @@ -76,7 +76,7 @@ (defun swift-mode:token (type text start end) "Construct and return a token. -TYPE is the type of the token such as `inix-operator' or {. +TYPE is the type of the token such as `infix-operator' or {. TEXT is the text of the token. START is the start position of the token. END is the point after the token." @@ -98,7 +98,7 @@ END is the point after the token." "Return the end position of TOKEN." (nth 3 token)) -;; Token types is one of the follwing symbols: +;; Token types is one of the following symbols: ;; ;; - prefix-operator (including try, try?, and try!) ;; - postfix-operator @@ -124,7 +124,7 @@ END is the point after the token." ;; - string-chunk-before-interpolated-expression (part of a string ending with "\\(") ;; - outside-of-buffer ;; -;; Additionaly, `swift-mode:backward-token-or-list' may return a parenthesized +;; Additionally, `swift-mode:backward-token-or-list' may return a parenthesized ;; expression as a token with one of the following types: ;; - () ;; - [] @@ -376,13 +376,13 @@ Return nil otherwise." (setq next-token (swift-mode:token 'identifier "" (point) (point)))) (cond ((or - ;; Supresses implicit semicolon around binary operators and separators. + ;; Suppresses implicit semicolon around binary operators and separators. (memq (swift-mode:token:type previous-token) '(binary-operator \; \, :)) (memq (swift-mode:token:type next-token) '(binary-operator \; \, :)) - ;; Supresses implicit semicolon after try, try?, and try!. + ;; Suppresses implicit semicolon after try, try?, and try!. (member (swift-mode:token:text previous-token) '("try" "try?" "try!")) @@ -419,7 +419,7 @@ Return nil otherwise." ;; } ((eq (swift-mode:token:type next-token) '\{) t) - ;; Supress implicit semicolon after attributes. + ;; Suppress implicit semicolon after attributes. ((eq (swift-mode:token:type previous-token) 'attribute) nil) @@ -450,7 +450,7 @@ Return nil otherwise." ;; Insert implicit semicolon before modifiers. ;; - ;; Preceding mofidiers takes precedence over this. + ;; Preceding modifiers takes precedence over this. ((member (swift-mode:token:text next-token) '("indirect" "convenience" "dynamic" "final" "infix" "lazy" "mutating" "nonmutating" "optional" "override" "postfix" @@ -681,7 +681,7 @@ Return nil otherwise." ;; switch foo { ;; case let x where x is Foo ? ;; a : // This function should return nil but it - ;; // actually retuns t. + ;; // actually returns t. ;; b: // This function should return t but it ;; // actually return nil. ;; let y = a ? b : c // This function returns nil correctly for @@ -695,7 +695,7 @@ Return nil otherwise." '("case" "default")) (setq swift-mode:in-recursive-call-of-case-colon-p nil))))) -(defun swift-mode:anonyous-parameter-in-p () +(defun swift-mode:anonymous-parameter-in-p () "Return t if a 'in' token at the cursor is for anonymous function parameters." (save-excursion (eq @@ -811,7 +811,7 @@ type `out-of-buffer'" (when (and (equal (swift-mode:token:text token) "in") (save-excursion (goto-char (swift-mode:token:start token)) - (swift-mode:anonyous-parameter-in-p))) + (swift-mode:anonymous-parameter-in-p))) (setq token (swift-mode:token 'anonymous-function-parameter-in @@ -853,7 +853,7 @@ This function does not return `implicit-;' or `type-:'." ;; Open angle bracket for type parameters ;; ;; We use a heuristic: spaces are inserted around inequality sign, but not - ;; for angle bracket, and a type paramer starts with an upper case + ;; for angle bracket, and a type parameter starts with an upper case ;; character, a square bracket, a parenthesis, or keyword 'protocol'. ((and (eq (char-after) ?<) (looking-at "<\\([[:upper:]\\[[(]\\|protocol\\)")) @@ -1023,7 +1023,7 @@ type `out-of-buffer'." (when (and (equal (swift-mode:token:text token) "in") (save-excursion (goto-char (swift-mode:token:start token)) - (swift-mode:anonyous-parameter-in-p))) + (swift-mode:anonymous-parameter-in-p))) (setq token (swift-mode:token 'anonymous-function-parameter-in @@ -1095,7 +1095,7 @@ This function does not return `implicit-;' or `type-:'." ;; Open angle bracket for type parameters ;; ;; We use a heuristic: spaces are inserted around inequality sign, but not - ;; for angle bracket, and a type paramer starts with an upper case + ;; for angle bracket, and a type parameter starts with an upper case ;; character, a square bracket, a parenthesis, or keyword `protocol'. ((and (eq (char-before) ?<) (looking-at "\\([[:upper:]\\[[(]\\|protocol\\)")) @@ -1273,7 +1273,7 @@ If this line ends with a single-line comment, goto just before the comment." (swift-mode:chunk:comment-p chunk)) ;; The cursor is in a comment. (if (swift-mode:chunk:single-line-comment-p chunk) - ;; This ia a single-line comment + ;; This is a single-line comment ;; Back to the beginning of the comment. (goto-char (swift-mode:chunk:start chunk)) ;; This is a multiline comment diff --git a/swift-mode-repl.el b/swift-mode-repl.el index fdcb6a3..dc51668 100644 --- a/swift-mode-repl.el +++ b/swift-mode-repl.el @@ -48,7 +48,7 @@ ;;;###autoload (defcustom swift-mode:repl-executable "xcrun swift" - "Path to the Swift CLI. The string is splitted by spaces, then unquoted." + "Path to the Swift CLI. The string is split by spaces, then unquoted." :type '(choice string (list string)) :group 'swift-mode:repl :safe 'stringp) @@ -57,7 +57,7 @@ (defcustom swift-mode:swift-package-executable "xcrun swift package" "Path to the Swift command for package manipulation. -The string is splitted by spaces, then unquoted." +The string is split by spaces, then unquoted." :type '(choice string (list string)) :group 'swift-mode:repl :safe 'stringp) @@ -66,7 +66,7 @@ The string is splitted by spaces, then unquoted." (defcustom swift-mode:swift-build-executable "xcrun swift build" "Path to the Swift command for building. -The string is splitted by spaces, then unquoted." +The string is split by spaces, then unquoted." :type '(choice string (list string)) :group 'swift-mode:repl :safe 'stringp) @@ -75,7 +75,7 @@ The string is splitted by spaces, then unquoted." (defcustom swift-mode:debugger-executable "xcrun lldb" "Path to the debugger command. -The string is splitted by spaces, then unquoted." +The string is split by spaces, then unquoted." :type '(choice string (list string)) :group 'swift-mode:repl :safe 'stringp) @@ -84,7 +84,7 @@ The string is splitted by spaces, then unquoted." (defcustom swift-mode:ios-deploy-executable "ios-deploy" "Path to ios-deploy command. -The string is splitted by spaces, then unquoted." +The string is split by spaces, then unquoted." :type '(choice string (list string)) :group 'swift-mode:repl :safe 'stringp) @@ -93,7 +93,7 @@ The string is splitted by spaces, then unquoted." (defcustom swift-mode:simulator-controller-executable "xcrun simctl" "Path to the simulator controller command. -The string is splitted by spaces, then unquoted." +The string is split by spaces, then unquoted." :type '(choice string (list string)) :group 'swift-mode:repl :safe 'stringp) @@ -102,7 +102,7 @@ The string is splitted by spaces, then unquoted." (defcustom swift-mode:xcodebuild-executable "xcrun xcodebuild" "Path to the Xcode builder. -The string is splitted by spaces, then unquoted." +The string is split by spaces, then unquoted." :type '(choice string (list string)) :group 'swift-mode:repl :safe 'stringp) @@ -111,7 +111,7 @@ The string is splitted by spaces, then unquoted." (defcustom swift-mode:xcode-select-executable "xcode-select" "Path to the Xcode selector. -The string is splitted by spaces, then unquoted." +The string is split by spaces, then unquoted." :type '(choice string (list string)) :group 'swift-mode:repl :safe 'stringp) @@ -168,7 +168,7 @@ switch to that buffer. CMD is a string or a list, interpreted as a command line. The default value is `swift-mode:repl-executable'. This function updates the buffer local variable `swift-mode:repl-executable' with the given CMD if KEEP-DEFAULT is nil, -so it will be used as the default value for the next invocatoin in the current +so it will be used as the default value for the next invocation in the current buffer. If KEEP-DEFAULT is non-nil, the `swift-mode:repl-executable' and the global variable `swift-mode:repl-buffer' are not updated. The buffer local variable @@ -235,7 +235,7 @@ You can send text to the REPL process from other buffers containing source. (defun swift-mode:call-process (executable &rest args) "Call EXECUTABLE synchronously in separate process. -EXECUTABLE may be a string or a list. The string is splitted by spaces, +EXECUTABLE may be a string or a list. The string is split by spaces, then unquoted. ARGS are rest arguments, appended to the argument list. Returns the exit status." @@ -244,7 +244,7 @@ Returns the exit status." (defun swift-mode:call-process-async (executable &rest args) "Call EXECUTABLE asynchronously in separate process. -EXECUTABLE may be a string or a list. The string is splitted by spaces, +EXECUTABLE may be a string or a list. The string is split by spaces, then unquoted. ARGS are rest arguments, appended to the argument list." (swift-mode:do-call-process executable nil 0 nil args)) @@ -252,7 +252,7 @@ ARGS are rest arguments, appended to the argument list." (defun swift-mode:do-call-process (executable infile destination display args) "Wrapper for `call-process'. -EXECUTABLE may be a string or a list. The string is splitted by spaces, +EXECUTABLE may be a string or a list. The string is split by spaces, then unquoted. For INFILE, DESTINATION, DISPLAY, see `call-process'. ARGS are rest arguments, appended to the argument list. @@ -269,7 +269,7 @@ Returns the exit status." "Call EXECUTABLE synchronously in separate process. The output is parsed as a JSON document. -EXECUTABLE may be a string or a list. The string is splitted by spaces, +EXECUTABLE may be a string or a list. The string is split by spaces, then unquoted. ARGS are rest arguments, appended to the argument list." (with-temp-buffer @@ -526,7 +526,7 @@ Typically, it is /Applications/Xcode.app/Contents/Developer." (defun swift-mode:build-swift-module (&optional project-directory args) "Build a Swift module in the PROJECT-DIRECTORY. -If PROJECT-DIRECTORY is nil or omited, it is searched from `default-directory' +If PROJECT-DIRECTORY is nil or omitted, it is searched from `default-directory' or its ancestors. An list ARGS are appended for builder command line arguments." (interactive @@ -634,7 +634,7 @@ the value of `swift-mode:ios-project-scheme' is used." (defun swift-mode:wait-for-prompt-then-execute-commands (string) "Execute the next command from the queue if the point is on a prompt. -Itended for used as a `comint-output-filter-functions'. +Intended for used as a `comint-output-filter-functions'. STRING is passed to the command." (let ((command (car swift-mode:repl-command-queue))) (when (and @@ -707,7 +707,7 @@ STRING is passed to the command." (defun swift-mode:debug-swift-module (&optional project-directory) "Run debugger on a Swift module in the PROJECT-DIRECTORY. -If PROJECT-DIRECTORY is nil or omited, it is searched from `default-directory' +If PROJECT-DIRECTORY is nil or omitted, it is searched from `default-directory' or its ancestors." (interactive (let ((default-project-directory (swift-mode:find-swift-project-directory))) @@ -896,7 +896,7 @@ in Xcode build settings." device-identifier scheme) "Run debugger on an iOS app in the PROJECT-DIRECTORY. -Run it for the iOS simulator devie DEVICE-IDENTIFIER for the given SCHEME. +Run it for the iOS simulator device DEVICE-IDENTIFIER for the given SCHEME. If PROJECT-DIRECTORY is nil or omitted, it is searched from `default-directory' or its ancestors. DEVICE-IDENTIFIER is the device identifier of the iOS simulator. If it is