[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swift-mode a3bcb19 278/496: Merge pull request #109 from s
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swift-mode a3bcb19 278/496: Merge pull request #109 from syohex/with-eval-after-load |
Date: |
Sun, 29 Aug 2021 11:33:51 -0400 (EDT) |
branch: elpa/swift-mode
commit a3bcb1982a9ee3a51e06236d8d714e1b31f474ec
Merge: c40887e ade8e95
Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
Commit: Bozhidar Batsov <bozhidar.batsov@gmail.com>
Merge pull request #109 from syohex/with-eval-after-load
Use with-eval-after-load instead of eval-after-load
---
swift-mode.el | 139 +++++++++++++++++++++++++++++-----------------------------
1 file changed, 69 insertions(+), 70 deletions(-)
diff --git a/swift-mode.el b/swift-mode.el
index 18cbcc6..2833047 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -629,76 +629,75 @@ We try to constraint those lookups by reasonable number
of lines.")
;;; Flycheck
-(eval-after-load 'flycheck
- (lambda ()
- (flycheck-def-option-var flycheck-swift-sdk-path nil swift
- "A path to the targeted SDK"
- :type '(choice (const :tag "Don't link against sdk" nil)
- (string :tag "Targeted SDK path"))
- :safe #'stringp)
-
- (flycheck-def-option-var flycheck-swift-linked-sources nil swift
- "Source files path to link against. Can be glob, i.e. *.swift"
- :type '(choice (const :tag "Don't use linked sources" nil)
- (string :tag "Linked Sources"))
- :safe #'stringp)
-
- (flycheck-def-option-var flycheck-swift-framework-search-paths nil swift
- "A list of framework search paths"
- :type '(repeat (directory :tag "Include directory"))
- :safe #'flycheck-string-list-p)
-
- (flycheck-def-option-var flycheck-swift-cc-include-search-paths nil swift
- "A list of include file search paths to pass to the Objective C
compiler"
- :type '(repeat (directory :tag "Include directory"))
- :safe #'flycheck-string-list-p)
-
- (flycheck-def-option-var flycheck-swift-target "i386-apple-ios8.1" swift
- "Target used by swift compiler"
- :type '(choice (const :tag "Don't specify target" nil)
- (string :tag "Build target"))
- :safe #'stringp)
-
- (flycheck-def-option-var flycheck-swift-import-objc-header nil swift
- "Objective C header file to import, if any"
- :type '(choice (const :tag "Don't specify objective C bridging header"
nil)
- (string :tag "Objective C bridging header path"))
- :safe #'stringp)
-
- (flycheck-define-checker swift
- "Flycheck plugin for for Apple's Swift programming language."
- :command ("swift"
- "-frontend" "-parse"
- (option "-sdk" flycheck-swift-sdk-path)
- (option-list "-F" flycheck-swift-framework-search-paths)
- ;; Swift compiler will complain about redeclaration
- ;; if we will include original file along with
- ;; temporary source file created by flycheck.
- ;; We also don't want a hidden emacs interlock files.
- (eval
- (let (source file)
- (when flycheck-swift-linked-sources
- (setq source (car (flycheck-substitute-argument 'source
'swift)))
- (setq file (file-name-nondirectory source))
- (cl-remove-if-not
- #'(lambda (path)
- (and
- (eq (string-match ".#" path) nil)
- (eq (string-match file path) nil)))
- (file-expand-wildcards
flycheck-swift-linked-sources)))))
- (option "-target" flycheck-swift-target)
- (option "-import-objc-header"
flycheck-swift-import-objc-header)
- (eval
- (mapcan
- #'(lambda (path) (list "-Xcc" (concat "-I" path)))
- flycheck-swift-cc-include-search-paths))
- "-primary-file" source)
- :error-patterns
- ((error line-start (file-name) ":" line ":" column ": "
- "error: " (message) line-end)
- (warning line-start (file-name) ":" line ":" column ": "
- "warning: " (message) line-end))
- :modes swift-mode)))
+(with-eval-after-load 'flycheck
+ (flycheck-def-option-var flycheck-swift-sdk-path nil swift
+ "A path to the targeted SDK"
+ :type '(choice (const :tag "Don't link against sdk" nil)
+ (string :tag "Targeted SDK path"))
+ :safe #'stringp)
+
+ (flycheck-def-option-var flycheck-swift-linked-sources nil swift
+ "Source files path to link against. Can be glob, i.e. *.swift"
+ :type '(choice (const :tag "Don't use linked sources" nil)
+ (string :tag "Linked Sources"))
+ :safe #'stringp)
+
+ (flycheck-def-option-var flycheck-swift-framework-search-paths nil swift
+ "A list of framework search paths"
+ :type '(repeat (directory :tag "Include directory"))
+ :safe #'flycheck-string-list-p)
+
+ (flycheck-def-option-var flycheck-swift-cc-include-search-paths nil swift
+ "A list of include file search paths to pass to the Objective C compiler"
+ :type '(repeat (directory :tag "Include directory"))
+ :safe #'flycheck-string-list-p)
+
+ (flycheck-def-option-var flycheck-swift-target "i386-apple-ios8.1" swift
+ "Target used by swift compiler"
+ :type '(choice (const :tag "Don't specify target" nil)
+ (string :tag "Build target"))
+ :safe #'stringp)
+
+ (flycheck-def-option-var flycheck-swift-import-objc-header nil swift
+ "Objective C header file to import, if any"
+ :type '(choice (const :tag "Don't specify objective C bridging header"
nil)
+ (string :tag "Objective C bridging header path"))
+ :safe #'stringp)
+
+ (flycheck-define-checker swift
+ "Flycheck plugin for for Apple's Swift programming language."
+ :command ("swift"
+ "-frontend" "-parse"
+ (option "-sdk" flycheck-swift-sdk-path)
+ (option-list "-F" flycheck-swift-framework-search-paths)
+ ;; Swift compiler will complain about redeclaration
+ ;; if we will include original file along with
+ ;; temporary source file created by flycheck.
+ ;; We also don't want a hidden emacs interlock files.
+ (eval
+ (let (source file)
+ (when flycheck-swift-linked-sources
+ (setq source (car (flycheck-substitute-argument 'source
'swift)))
+ (setq file (file-name-nondirectory source))
+ (cl-remove-if-not
+ #'(lambda (path)
+ (and
+ (eq (string-match ".#" path) nil)
+ (eq (string-match file path) nil)))
+ (file-expand-wildcards flycheck-swift-linked-sources)))))
+ (option "-target" flycheck-swift-target)
+ (option "-import-objc-header" flycheck-swift-import-objc-header)
+ (eval
+ (mapcan
+ #'(lambda (path) (list "-Xcc" (concat "-I" path)))
+ flycheck-swift-cc-include-search-paths))
+ "-primary-file" source)
+ :error-patterns
+ ((error line-start (file-name) ":" line ":" column ": "
+ "error: " (message) line-end)
+ (warning line-start (file-name) ":" line ":" column ": "
+ "warning: " (message) line-end))
+ :modes swift-mode))
;;; REPL
- [nongnu] elpa/swift-mode fd9ed20 244/496: Modify indents around comma to meet Xcode spec, (continued)
- [nongnu] elpa/swift-mode fd9ed20 244/496: Modify indents around comma to meet Xcode spec, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 5e7d1b9 250/496: Update swift-mode.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a2c0b6a 251/496: Merge pull request #98 from akoaysigod/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 7709e04 256/496: Fix token for DECSPEC, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 7169a3b 265/496: Fix class when empty (no insts), ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 391752f 272/496: Add test case for forward-list & backward-list, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 7ffd59d 273/496: Fix forward-list test by adding brackets, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 3ce22b1 275/496: Remove needless code, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode c40887e 276/496: Merge pull request #108 from syohex/remove-needless-code, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode ade8e95 277/496: Use with-eval-after-load instead of eval-after-load, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a3bcb19 278/496: Merge pull request #109 from syohex/with-eval-after-load,
ELPA Syncer <=
- [nongnu] elpa/swift-mode 3aec61f 279/496: Update Emacs version requirement in README, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 6793bd9 281/496: Indent according to operators precedence, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode add2ae9 282/496: Merge pull request #111 from uk-ar/indent-according-to-prec, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 8889a6a 285/496: Merge pull request #112 from uk-ar/fix-multiline-expressions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 064d4ee 287/496: Update acknowledgments section in readme, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode b7cc115 293/496: Merge pull request #116 from syohex/use-cl-lib, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode e9648b1 296/496: Use .el for file extension in distributed package., ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 1563e8b 300/496: Bump the development version to 0.5.0-snapshot, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a5e1acf 297/496: Merge pull request #122 from N4tr0n/make-install-fix-issue120, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode cfaeaff 294/496: Update MELPA URL, ELPA Syncer, 2021/08/29