emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/swift-mode 56e21f8 427/496: Simplify autoloads


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode 56e21f8 427/496: Simplify autoloads
Date: Sun, 29 Aug 2021 11:34:21 -0400 (EDT)

branch: elpa/swift-mode
commit 56e21f84f36a4c4511614f543861550bfab02d84
Author: taku0 <mxxouy6x3m_github@tatapa.org>
Commit: taku0 <mxxouy6x3m_github@tatapa.org>

    Simplify autoloads
---
 swift-mode-beginning-of-defun.el |  1 -
 swift-mode-font-lock.el          | 18 ------------------
 swift-mode-imenu.el              |  1 -
 swift-mode-indent.el             |  9 ---------
 swift-mode-repl.el               |  9 ---------
 swift-mode.el                    | 31 +++++++++++++++++++++++--------
 6 files changed, 23 insertions(+), 46 deletions(-)

diff --git a/swift-mode-beginning-of-defun.el b/swift-mode-beginning-of-defun.el
index a998141..54cbad6 100644
--- a/swift-mode-beginning-of-defun.el
+++ b/swift-mode-beginning-of-defun.el
@@ -45,7 +45,6 @@
 (require 'swift-mode-lexer)
 (require 'swift-mode-indent)
 
-;;;###autoload
 (defcustom swift-mode:mark-defun-preference 'containing
   "Preference for `swift-mode:mark-defun' for nested declarations.
 
diff --git a/swift-mode-font-lock.el b/swift-mode-font-lock.el
index aa00caa..c48bd1f 100644
--- a/swift-mode-font-lock.el
+++ b/swift-mode-font-lock.el
@@ -44,7 +44,6 @@
   "Font faces."
   :group 'swift)
 
-;;;###autoload
 (defcustom swift-mode:highlight-symbols-in-standard-library
   t
   "Highlight symbols in the standard library."
@@ -52,7 +51,6 @@
   :group 'swift-mode:faces
   :safe 'booleanp)
 
-;;;###autoload
 (defcustom swift-mode:highlight-symbols-in-foundation-framework
   t
   "Highlight symbols in the Foundation framework."
@@ -60,7 +58,6 @@
   :group 'swift-mode:faces
   :safe 'booleanp)
 
-;;;###autoload
 (defface swift-mode:constant-keyword-face
   '((t . (:inherit font-lock-constant-face)))
   "Face for highlighting constant keywords
@@ -68,7 +65,6 @@
 That is, true, false, and nil."
   :group 'swift-mode:faces)
 
-;;;###autoload
 (defface swift-mode:preprocessor-keyword-face
   '((t . (:inherit font-lock-preprocessor-face)))
   "Face for highlighting preprocessor keywords.
@@ -76,85 +72,71 @@ That is, true, false, and nil."
 Example: #if, #endif, and #selector."
   :group 'swift-mode:faces)
 
-;;;###autoload
 (defface swift-mode:keyword-face
   '((t . (:inherit font-lock-keyword-face)))
   "Face for highlighting keywords."
   :group 'swift-mode:faces)
 
-;;;###autoload
 (defface swift-mode:builtin-method-trailing-closure-face
   '((t . (:inherit font-lock-builtin-face)))
   "Face for highlighting builtin methods with trailing closure."
   :group 'swift-mode:faces)
 
-;;;###autoload
 (defface swift-mode:builtin-method-face
   '((t . (:inherit font-lock-builtin-face)))
   "Face for highlighting builtin methods."
   :group 'swift-mode:faces)
 
-;;;###autoload
 (defface swift-mode:builtin-function-trailing-closure-face
   '((t . (:inherit font-lock-builtin-face)))
   "Face for highlighting builtin functions with trailing closure."
   :group 'swift-mode:faces)
 
-;;;###autoload
 (defface swift-mode:builtin-function-face
   '((t . (:inherit font-lock-builtin-face)))
   "Face for highlighting builtin functions."
   :group 'swift-mode:faces)
 
-;;;###autoload
 (defface swift-mode:builtin-property-face
   '((t . (:inherit font-lock-builtin-face)))
   "Face for highlighting builtin properties."
   :group 'swift-mode:faces)
 
-;;;###autoload
 (defface swift-mode:builtin-constant-face
   '((t . (:inherit font-lock-builtin-face)))
   "Face for highlighting builtin constants."
   :group 'swift-mode:faces)
 
-;;;###autoload
 (defface swift-mode:builtin-enum-case-face
   '((t . (:inherit font-lock-builtin-face)))
   "Face for highlighting builtin enum cases."
   :group 'swift-mode:faces)
 
-;;;###autoload
 (defface swift-mode:build-config-keyword-face
   '((t . (:inherit font-lock-builtin-face)))
   "Face for highlighting build configuration keywords."
   :group 'swift-mode:faces)
 
-;;;###autoload
 (defface swift-mode:builtin-type-face
   '((t . (:inherit font-lock-builtin-face)))
   "Face for highlighting builtin types."
   :group 'swift-mode:faces)
 
-;;;###autoload
 (defface swift-mode:builtin-precedence-group-face
   '((t . (:inherit font-lock-builtin-face)))
   "Face for highlighting builtin precedence groups."
   :group 'swift-mode:faces)
 
-;;;###autoload
 (defface swift-mode:function-call-face
   '((t . (:inherit font-lock-function-name-face)))
   "Face for highlighting function calls."
   :group 'swift-mode:faces)
 
-;;;###autoload
 (defface swift-mode:function-name-face
   '((t . (:inherit font-lock-function-name-face)))
   "Face for highlighting function names."
   :group 'swift-mode:faces)
 
-;;;###autoload
 (defface swift-mode:property-access-face
   '((t . (:inherit font-lock-variable-name-face)))
   "Face for highlighting property accesses."
diff --git a/swift-mode-imenu.el b/swift-mode-imenu.el
index ea72901..48ad200 100644
--- a/swift-mode-imenu.el
+++ b/swift-mode-imenu.el
@@ -36,7 +36,6 @@
   "Imenu."
   :group 'swift)
 
-;;;###autoload
 (defcustom swift-mode:imenu-style
   'nested
   "Style of Imenu hierarchy.
diff --git a/swift-mode-indent.el b/swift-mode-indent.el
index 19d2f4f..cfdce81 100644
--- a/swift-mode-indent.el
+++ b/swift-mode-indent.el
@@ -36,63 +36,54 @@
 
 ;;; Customizations
 
-;;;###autoload
 (defcustom swift-mode:basic-offset 4
   "Amount of indentation for block contents."
   :type 'integer
   :group 'swift
   :safe 'integerp)
 
-;;;###autoload
 (defcustom swift-mode:parenthesized-expression-offset 2
   "Amount of indentation inside parentheses and square brackets."
   :type 'integer
   :group 'swift
   :safe 'integerp)
 
-;;;###autoload
 (defcustom swift-mode:multiline-statement-offset 2
   "Amount of indentation for continuations of expressions."
   :type 'integer
   :group 'swift
   :safe 'integerp)
 
-;;;###autoload
 (defcustom swift-mode:switch-case-offset 0
   "Amount of indentation for case labels in switch statements."
   :type 'integer
   :group 'swift
   :safe 'integerp)
 
-;;;###autoload
 (defcustom swift-mode:prepend-asterisk-to-comment-line nil
   "Automatically insert a asterisk to each comment line if non-nil."
   :type 'boolean
   :group 'swift
   :safe 'booleanp)
 
-;;;###autoload
 (defcustom swift-mode:insert-space-after-asterisk-in-comment t
   "Automatically insert a space after asterisk in comment if non-nil."
   :type 'boolean
   :group 'swift
   :safe 'booleanp)
 
-;;;###autoload
 (defcustom swift-mode:auto-close-multiline-comment t
   "If non-nil, `indent-new-comment-line' automatically close multiline 
comment."
   :type 'boolean
   :group 'swift
   :safe 'booleanp)
 
-;;;###autoload
 (defcustom swift-mode:fix-comment-close t
   "Fix \"* /\" in incomplete multiline comment to \"*/\" if non-nil."
   :type 'boolean
   :group 'swift
   :safe 'booleanp)
 
-;;;###autoload
 (defcustom swift-mode:highlight-anchor nil
   "Highlight anchor point for indentation if non-nil.
 
diff --git a/swift-mode-repl.el b/swift-mode-repl.el
index acd3edc..0f6fb7e 100644
--- a/swift-mode-repl.el
+++ b/swift-mode-repl.el
@@ -45,7 +45,6 @@
   "REPL."
   :group 'swift)
 
-;;;###autoload
 (defcustom swift-mode:repl-executable
   (concat (when (executable-find "xcrun") "xcrun ") "swift")
   "Path to the Swift CLI.  The string is split by spaces, then unquoted."
@@ -53,7 +52,6 @@
   :group 'swift-mode:repl
   :safe 'stringp)
 
-;;;###autoload
 (defcustom swift-mode:swift-package-executable
   (concat (when (executable-find "xcrun") "xcrun ") "swift package")
   "Path to the Swift command for package manipulation.
@@ -62,7 +60,6 @@ The string is split by spaces, then unquoted."
   :group 'swift-mode:repl
   :safe 'stringp)
 
-;;;###autoload
 (defcustom swift-mode:swift-build-executable
   (concat (when (executable-find "xcrun") "xcrun ") "swift build")
   "Path to the Swift command for building.
@@ -71,7 +68,6 @@ The string is split by spaces, then unquoted."
   :group 'swift-mode:repl
   :safe 'stringp)
 
-;;;###autoload
 (defcustom swift-mode:debugger-executable
   (concat (when (executable-find "xcrun") "xcrun ") "lldb")
   "Path to the debugger command.
@@ -80,7 +76,6 @@ The string is split by spaces, then unquoted."
   :group 'swift-mode:repl
   :safe 'stringp)
 
-;;;###autoload
 (defcustom swift-mode:ios-deploy-executable
   "ios-deploy"
   "Path to ios-deploy command.
@@ -89,7 +84,6 @@ The string is split by spaces, then unquoted."
   :group 'swift-mode:repl
   :safe 'stringp)
 
-;;;###autoload
 (defcustom swift-mode:simulator-controller-executable
   (concat (when (executable-find "xcrun") "xcrun ") "simctl")
   "Path to the simulator controller command.
@@ -98,7 +92,6 @@ The string is split by spaces, then unquoted."
   :group 'swift-mode:repl
   :safe 'stringp)
 
-;;;###autoload
 (defcustom swift-mode:xcodebuild-executable
   (concat (when (executable-find "xcrun") "xcrun ") "xcodebuild")
   "Path to the Xcode builder.
@@ -107,7 +100,6 @@ The string is split by spaces, then unquoted."
   :group 'swift-mode:repl
   :safe 'stringp)
 
-;;;###autoload
 (defcustom swift-mode:xcode-select-executable
   "xcode-select"
   "Path to the Xcode selector.
@@ -116,7 +108,6 @@ The string is split by spaces, then unquoted."
   :group 'swift-mode:repl
   :safe 'stringp)
 
-;;;###autoload
 (defcustom swift-mode:debugger-prompt-regexp "^(lldb) +\\|^[0-9]+> +"
   "Regexp to search a debugger prompt."
   :type 'string
diff --git a/swift-mode.el b/swift-mode.el
index e7d2f6b..20d432d 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -46,6 +46,13 @@
   :group 'languages
   :prefix "swift-mode:")
 
+;;;`update-directory-autoloads' does not handle `:group'.
+;;;###autoload (custom-add-load 'languages 'swift-mode)
+
+;; WORKAROUND: `cus-load' overrides `custom-loads'
+;;;###autoload (with-eval-after-load 'cus-load
+;;;###autoload   (custom-add-load 'languages 'swift-mode))
+
 ;;; Keymap
 
 (defvar swift-mode-map
@@ -135,6 +142,16 @@ Signal `scan-error' if it hits opening parentheses."
                     (swift-mode:token:end token))))
     token))
 
+(declare-function speedbar-add-supported-extension "speedbar" (extension))
+
+;;;###autoload
+(defsubst swift-mode:add-supported-extension-for-speedbar ()
+  (if (fboundp 'speedbar-add-supported-extension)
+      (speedbar-add-supported-extension ".swift")
+    (add-hook 'speedbar-load-hook
+              (lambda ()
+                (speedbar-add-supported-extension ".swift")))))
+
 ;;;###autoload
 (define-derived-mode swift-mode prog-mode "Swift"
   "Major mode for editing Swift code.
@@ -190,18 +207,16 @@ Signal `scan-error' if it hits opening parentheses."
 
   (delete-overlay swift-mode:anchor-overlay)
 
-  (add-hook 'which-func-functions (lambda ()
-                                    (when (equal (with-current-buffer 
(current-buffer) major-mode) 'swift-mode)
-                                      (swift-mode:current-defun-name))))
+  (add-hook 'which-func-functions
+            (lambda ()
+              (when (equal (with-current-buffer (current-buffer) major-mode)
+                           'swift-mode)
+                (swift-mode:current-defun-name))))
   (setq-local add-log-current-defun-function #'swift-mode:current-defun-name))
 
 ;;;###autoload (add-to-list 'auto-mode-alist '("\\.swift\\'" . swift-mode))
 
-;;;###autoload (if (fboundp 'speedbar-add-supported-extension)
-;;;###autoload     (speedbar-add-supported-extension ".swift")
-;;;###autoload   (add-hook 'speedbar-load-hook
-;;;###autoload             (lambda ()
-;;;###autoload               (speedbar-add-supported-extension ".swift"))))
+;;;###autoload (swift-mode:add-supported-extension-for-speedbar)
 
 (provide 'swift-mode)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]