[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swift-mode 8dc7eb9 078/496: Clean up after pull request
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swift-mode 8dc7eb9 078/496: Clean up after pull request |
Date: |
Sun, 29 Aug 2021 11:33:11 -0400 (EDT) |
branch: elpa/swift-mode
commit 8dc7eb9f9d0bd0239b1375628839abf92b66cb82
Author: Chris Barrett <chris.d.barrett@me.com>
Commit: Chris Barrett <chris.d.barrett@me.com>
Clean up after pull request
- Merge custom vars into a single group
- Update docstrings
- Rename vars
- Add autoload directive to `swift-mode-run-repl`
---
swift-mode.el | 48 ++++++++++++++++++++++++------------------------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/swift-mode.el b/swift-mode.el
index eff7214..cc8013d 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -52,6 +52,16 @@
:group 'swift
:type 'integerp)
+(defcustom swift-repl-executable
+ "xcrun swift"
+ "Path to the Swift CLI."
+ :group 'swift)
+
+(defcustom swift-repl-mode-hook nil
+ "*Hook for customizing swift-repl mode."
+ :type 'hook
+ :group 'swift)
+
;;; Indentation
(defun swift-indent--paren-level ()
@@ -317,54 +327,42 @@ Returns the column number as an integer."
(add-to-list 'flycheck-checkers 'swift)))
-;;; Mode definition
-
;;; REPL
-(defcustom swift-mode-executable
- "xcrun swift"
- "Path to the Swift CLI.")
-(defgroup swift-repl nil
- "Run a Swift REPL process in a buffer."
- :group 'swift-repl)
-
-(defcustom swift-repl-mode-hook nil
- "*Hook for customizing swift-repl mode."
- :type 'hook
- :group 'swift-repl)
+(defvar swift-repl-buffer nil
+ "Stores the name of the current swift repl buffer, or nil.")
+;;;###autoload
(defun swift-mode-run-repl (cmd &optional dont-switch-p)
"Run a REPL process, input and output via buffer `*swift-repl*'.
If there is a process already running in `*swift-repl*', switch to that buffer.
With argument CMD allows you to edit the command line (default is value
-of `swift-mode-executable').
+of `swift-repl-executable').
With DONT-SWITCH-P cursor will stay in current buffer.
Runs the hook `swift-repl-mode-hook' \(after the `comint-mode-hook'
is run).
\(Type \\[describe-mode] in the process buffer for a list of commands.)"
(interactive (list (if current-prefix-arg
- (read-string "Run swift-repl: " swift-mode-executable)
- swift-mode-executable)))
+ (read-string "Run swift-repl: " swift-repl-executable)
+ swift-repl-executable)))
(if (not (comint-check-proc "*swift-repl*"))
(save-excursion (let ((cmdlist (split-string cmd)))
(set-buffer (apply 'make-comint "swift-repl" (car
cmdlist)
nil (cdr cmdlist)))
(swift-repl-mode))))
- (setq swift-mode-executable cmd)
- (setq swift-mode-repl-buffer "*swift-repl*")
+ (setq swift-repl-executable cmd)
+ (setq swift-repl-buffer "*swift-repl*")
(if (not dont-switch-p)
(pop-to-buffer "*swift-repl*")))
-(defvar swift-mode-repl-buffer)
-
(defun swift-mode-send-region (start end)
- "Send the current region to the inferior Javascript process.
+ "Send the current region to the inferior swift process.
START and END define region within current buffer"
(interactive "r")
- (swift-mode-run-repl swift-mode-executable t)
- (comint-send-region swift-mode-repl-buffer start end)
- (comint-send-string swift-mode-repl-buffer "\n"))
+ (swift-mode-run-repl swift-repl-executable t)
+ (comint-send-region swift-repl-buffer start end)
+ (comint-send-string swift-repl-buffer "\n"))
(defun swift-mode-send-buffer ()
"Send the buffer to the Swift REPL process."
@@ -384,6 +382,8 @@ You can send text to the REPL process from other buffers
containing source.
swift-mode-send-buffer sends the current buffer to the REPL process.
")
+;;; Mode definition
+
;; HACK: This syntax table is lifted directly from `rust-mode'. There may be
;; corner cases in the Swift syntax that are not accounted for.
(defvar swift-mode-syntax-table
- [nongnu] elpa/swift-mode 760710c 031/496: fixup! Update readme, (continued)
- [nongnu] elpa/swift-mode 760710c 031/496: fixup! Update readme, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode bf224ad 049/496: Organize links, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode e46584a 054/496: Add @bbatsov to contributors in readme, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 5adb37d 070/496: More indentation tests, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 34be010 074/496: Update features in readme, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 6553249 062/496: Rename predicate (add question mark), ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode ff32221 068/496: Add font lock tests, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 5f97c99 060/496: Add tests, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode c3a0a66 065/496: Fix custom variable types, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a17f9e8 066/496: Rename predicate functions ('?' -> -p), ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 8dc7eb9 078/496: Clean up after pull request,
ELPA Syncer <=
- [nongnu] elpa/swift-mode 98b627a 075/496: Add @ap4y to contributors, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 812b4f6 084/496: Remove redundant hook definition, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 8fc94c7 097/496: Merge pull request #25 from ap4y/smie_indentation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 889586c 102/496: Merge pull request #28 from ap4y/highlight_interpolation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 0fcf3ab 115/496: Restructure test for multi-line hash in method call to test against case, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode b0f5d13 113/496: Make commas non sticky, fixes indentation issues with optionals and, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode d77b2df 122/496: Enable nested flag 'n' for C-style multi-line comments, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode b43c1e2 129/496: Merge pull request #38 from ap4y/fix_36, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a028f68 127/496: Add "_" to the allowed symbols in string interpolation expression, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 2593659 131/496: Improve indentation for multi-line dot expression with dot positioned on, ELPA Syncer, 2021/08/29