From b3b608ace2ef1a11833b5d46cfb9338f256a746d Mon Sep 17 00:00:00 2001 From: Sebastian Weddmark Olsson Date: Mon, 25 Sep 2023 13:26:02 +0200 Subject: [PATCH] byte-compile fixes --- elisp/edts/edts-alist.el | 8 ++++++-- elisp/edts/edts-code.el | 8 ++------ elisp/edts/edts-complete-built-in-function-source.el | 6 +++--- elisp/edts/edts-complete-exported-function-source.el | 8 ++++---- elisp/edts/edts-complete-imported-function-source.el | 6 +++--- elisp/edts/edts-complete-keyword-source.el | 6 +++--- elisp/edts/edts-complete-local-function-source.el | 8 ++++---- elisp/edts/edts-complete-macro-source.el | 6 +++--- elisp/edts/edts-complete-module-source.el | 6 +++--- elisp/edts/edts-complete-record-source.el | 8 ++++---- elisp/edts/edts-complete-variable-source.el | 6 +++--- elisp/edts/edts-face.el | 2 +- elisp/edts/edts-rpc.el | 2 +- elisp/edts/edts-shell.el | 2 +- elisp/edts/edts-test.el | 2 +- lib/edts_dialyzer/edts-dialyzer.el | 5 ----- test_data/package-install-deps.el | 2 +- 17 files changed, 43 insertions(+), 48 deletions(-) diff --git a/elisp/edts/edts-alist.el b/elisp/edts/edts-alist.el index a50993fd..5f901147 100644 --- a/elisp/edts/edts-alist.el +++ b/elisp/edts/edts-alist.el @@ -94,12 +94,16 @@ (defun edts-alist-select (predicate alist) - "Return all elements of ALIST for which PREDICATE returns a non-nil value. PREDICATE is a function that takes two argument KEY and VALUE." + "Return all elements of ALIST for which PREDICATE returns a +non-nil value. PREDICATE is a function that takes two argument +KEY and VALUE." (-filter (lambda (el) (funcall predicate (car el) (cdr el))) alist)) (defun edts-alist-filter (predicate alist) - "Remove all elements of ALIST for which PREDICATE returns a non-nil value. PREDICATE is a function that takes two argument KEY and VALUE." + "Remove all elements of ALIST for which PREDICATE returns a +non-nil value. PREDICATE is a function that takes two argument +KEY and VALUE." (-filter (lambda (el) (not (funcall predicate (car el) (cdr el)))) alist)) diff --git a/elisp/edts/edts-code.el b/elisp/edts/edts-code.el index 3e403c5f..603ce270 100644 --- a/elisp/edts/edts-code.el +++ b/elisp/edts/edts-code.el @@ -47,10 +47,6 @@ the module to be compiled as the only argument.") '(edts-code-eunit) "Hooks to run after compilation finishes. Hooks are called with the compilation result as a symbol as the only argument") -(defvaralias ;; Compatibility - 'edts-code-after-compilation-hook - 'edts-code-after-compile-hook - "This variable is deprecated, use `edts-code-after-compile-hook'") (defvar edts-code-buffer-issues nil "A plist describing the current issues (errors and warnings) in the @@ -97,8 +93,8 @@ with severity as key and a lists of issues as values" (plist-put edts-code-buffer-issues type issues))) (defun edts-code-buffer-status () - "Return 'error if there are any edts errors in current buffer, -'warning if there are warnings and 'ok otherwise." + "Return `'error' if there are any edts errors in current buffer, +`'warning' if there are warnings and `'ok' otherwise." (cl-block nil (let ((status 'ok) (issues edts-code-buffer-issues)) diff --git a/elisp/edts/edts-complete-built-in-function-source.el b/elisp/edts/edts-complete-built-in-function-source.el index 3675f1a8..546ff40a 100644 --- a/elisp/edts/edts-complete-built-in-function-source.el +++ b/elisp/edts/edts-complete-built-in-function-source.el @@ -46,9 +46,9 @@ (defun edts-complete-built-in-function-candidates () (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings - ('single-quoted (edts-complete-single-quoted-built-in-function-candidates)) - ('none (edts-complete-normal-built-in-function-candidates)))) + (double-quoted nil) ; Don't complete inside strings + (single-quoted (edts-complete-single-quoted-built-in-function-candidates)) + (none (edts-complete-normal-built-in-function-candidates)))) (defun edts-complete-normal-built-in-function-candidates () "Produces the completion list for normal (unqoted) local functions." diff --git a/elisp/edts/edts-complete-exported-function-source.el b/elisp/edts/edts-complete-exported-function-source.el index 169a501e..c22de1ca 100644 --- a/elisp/edts/edts-complete-exported-function-source.el +++ b/elisp/edts/edts-complete-exported-function-source.el @@ -56,7 +56,7 @@ (let ((point (or ac-point (point)))) (when (edts-complete-exported-function-p point) (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings + (double-quoted nil) ; Don't complete inside strings (otherwise (edts-log-debug "Initializing exported function completions") (let* ((module (ferl-symbol-at (- point 1))) @@ -66,9 +66,9 @@ (defun edts-complete-exported-function-candidates () (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings - ('single-quoted (edts-complete-single-quoted-exported-function-candidates)) - ('none (edts-complete-normal-exported-function-candidates)))) + (double-quoted nil) ; Don't complete inside strings + (single-quoted (edts-complete-single-quoted-exported-function-candidates)) + (none (edts-complete-normal-exported-function-candidates)))) (defun edts-complete-normal-exported-function-candidates () "Produces the completion list for normal (unqoted) exported functions." diff --git a/elisp/edts/edts-complete-imported-function-source.el b/elisp/edts/edts-complete-imported-function-source.el index e2889ef0..97b7bc92 100644 --- a/elisp/edts/edts-complete-imported-function-source.el +++ b/elisp/edts/edts-complete-imported-function-source.el @@ -45,9 +45,9 @@ (defun edts-complete-imported-function-candidates () (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings - ('single-quoted (edts-complete-single-quoted-imported-function-candidates)) - ('none (edts-complete-normal-imported-function-candidates)))) + (double-quoted nil) ; Don't complete inside strings + (single-quoted (edts-complete-single-quoted-imported-function-candidates)) + (none (edts-complete-normal-imported-function-candidates)))) (defun edts-complete-normal-imported-function-candidates () "Produces the completion list for normal (unqoted) imported functions." diff --git a/elisp/edts/edts-complete-keyword-source.el b/elisp/edts/edts-complete-keyword-source.el index 5f03b8b3..1455565e 100644 --- a/elisp/edts/edts-complete-keyword-source.el +++ b/elisp/edts/edts-complete-keyword-source.el @@ -41,9 +41,9 @@ (defun edts-complete-keyword-candidates () (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings - ('single-quoted (edts-complete-single-quoted-keyword-candidates)) - ('none (edts-complete-normal-keyword-candidates)))) + (double-quoted nil) ; Don't complete inside strings + (single-quoted (edts-complete-single-quoted-keyword-candidates)) + (none (edts-complete-normal-keyword-candidates)))) (defun edts-complete-normal-keyword-candidates () "Produces the completion list for normal (unqoted) local functions." diff --git a/elisp/edts/edts-complete-local-function-source.el b/elisp/edts/edts-complete-local-function-source.el index 1d5d0c00..5e8b9c6f 100644 --- a/elisp/edts/edts-complete-local-function-source.el +++ b/elisp/edts/edts-complete-local-function-source.el @@ -49,7 +49,7 @@ "Initialize local function completions." (when (edts-complete-local-function-p) (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings + (double-quoted nil) ; Don't complete inside strings (otherwise (edts-log-debug "Initializing local function completions") (setq edts-complete-local-function-candidates @@ -57,9 +57,9 @@ (defun edts-complete-local-function-candidates () (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings - ('single-quoted (edts-complete-single-quoted-local-function-candidates)) - ('none (edts-complete-normal-local-function-candidates)))) + (double-quoted nil) ; Don't complete inside strings + (single-quoted (edts-complete-single-quoted-local-function-candidates)) + (none (edts-complete-normal-local-function-candidates)))) (defun edts-complete-normal-local-function-candidates () "Produces the completion list for normal (unqoted) local functions." diff --git a/elisp/edts/edts-complete-macro-source.el b/elisp/edts/edts-complete-macro-source.el index 3cce962f..4bfd46b0 100644 --- a/elisp/edts/edts-complete-macro-source.el +++ b/elisp/edts/edts-complete-macro-source.el @@ -50,9 +50,9 @@ (defun edts-complete-macro-candidates () (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings - ('single-quoted (edts-complete-single-quoted-macro-candidates)) - ('none (edts-complete-normal-macro-candidates)))) + (double-quoted nil) ; Don't complete inside strings + (single-quoted (edts-complete-single-quoted-macro-candidates)) + (none (edts-complete-normal-macro-candidates)))) (defun edts-complete-normal-macro-candidates () "Produces the completion list for normal (unqoted) macros." diff --git a/elisp/edts/edts-complete-module-source.el b/elisp/edts/edts-complete-module-source.el index abe70418..a5b8303c 100644 --- a/elisp/edts/edts-complete-module-source.el +++ b/elisp/edts/edts-complete-module-source.el @@ -48,9 +48,9 @@ (defun edts-complete-module-candidates () (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings - ('single-quoted (edts-complete-single-quoted-module-candidates)) - ('none (edts-complete-normal-module-candidates)))) + (double-quoted nil) ; Don't complete inside strings + (single-quoted (edts-complete-single-quoted-module-candidates)) + (none (edts-complete-normal-module-candidates)))) (defun edts-complete-normal-module-candidates () "Produces the completion list for normal (unqoted) modules." diff --git a/elisp/edts/edts-complete-record-source.el b/elisp/edts/edts-complete-record-source.el index 99963b37..dc3fd9a3 100644 --- a/elisp/edts/edts-complete-record-source.el +++ b/elisp/edts/edts-complete-record-source.el @@ -53,7 +53,7 @@ "Initialize record completions." (when (edts-complete-record-p ac-point) (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings + (double-quoted nil) ; Don't complete inside strings (otherwise (edts-log-debug "Initializing record completions") (cl-flet ((rec-name (rec) (cdr (assoc 'record rec)))) @@ -65,9 +65,9 @@ (defun edts-complete-record-candidates () (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings - ('single-quoted (edts-complete-single-quoted-record-candidates)) - ('none (edts-complete-normal-record-candidates)))) + (double-quoted nil) ; Don't complete inside strings + (single-quoted (edts-complete-single-quoted-record-candidates)) + (none (edts-complete-normal-record-candidates)))) (defun edts-complete-normal-record-candidates () "Produces the completion list for normal (unqoted) records. Unimplemented" diff --git a/elisp/edts/edts-complete-variable-source.el b/elisp/edts/edts-complete-variable-source.el index 73a44932..1099034c 100644 --- a/elisp/edts/edts-complete-variable-source.el +++ b/elisp/edts/edts-complete-variable-source.el @@ -54,9 +54,9 @@ (defun edts-complete-variable-candidates () (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings - ('single-quoted nil) ; No single-quoted variables - ('none (edts-complete-normal-variable-candidates)))) + (double-quoted nil) ; Don't complete inside strings + (single-quoted nil) ; No single-quoted variables + (none (edts-complete-normal-variable-candidates)))) (defun edts-complete-normal-variable-candidates () "Generates the auto-complete candidate list for variables. Matches variables diff --git a/elisp/edts/edts-face.el b/elisp/edts/edts-face.el index 3011be0e..174b6d2e 100644 --- a/elisp/edts/edts-face.el +++ b/elisp/edts/edts-face.el @@ -107,7 +107,7 @@ left-fringe or right-fringe." :group 'edts) (defvar edts-face-modeline-remap-cookie nil - "A list of The 'cookies' returned from face-remap-add-relative, so + "A list of The `cookies' returned from face-remap-add-relative, so that we can reset our face remappings.") (make-variable-buffer-local 'edts-face-modeline-remap-cookie) diff --git a/elisp/edts/edts-rpc.el b/elisp/edts/edts-rpc.el index 3845690f..d2292772 100644 --- a/elisp/edts/edts-rpc.el +++ b/elisp/edts/edts-rpc.el @@ -169,7 +169,7 @@ inside a `with-temp-buffer'." (defun edts-rpc--parse-http-response-status () (save-excursion (goto-char (point-min)) - (s-split " " (buffer-substring (point) (point-at-eol))))) + (s-split " " (buffer-substring (point) (line-end-position))))) (defun edts-rpc-command-url (command) "Construct the edts command url." diff --git a/elisp/edts/edts-shell.el b/elisp/edts/edts-shell.el index ceb6001b..6c214faa 100644 --- a/elisp/edts/edts-shell.el +++ b/elisp/edts/edts-shell.el @@ -257,7 +257,7 @@ respectively so we can use them later when fontifying user input." (while (< start end) (let ((temp-end nil)) (cl-case (get-text-property start 'field) - ('output + (output (setq temp-end (edts-shell-output-end start end)) (font-lock-default-fontify-region start temp-end loudly)) (otherwise diff --git a/elisp/edts/edts-test.el b/elisp/edts/edts-test.el index ee88e642..b666d6c3 100644 --- a/elisp/edts/edts-test.el +++ b/elisp/edts/edts-test.el @@ -100,9 +100,9 @@ (defmacro edts-test-case (suite name args desc &rest body) "Define a testcase in SUITE. All other arguments are the same is in `ert-deftest'." + (declare (indent 3)) (unless body (error "edts-test-case: Not enough arguments")) - (declare (indent 3)) `(macroexpand (ert-deftest ,name ,args ,desc :tags '(,suite edts-test-suite) ,@body))) diff --git a/lib/edts_dialyzer/edts-dialyzer.el b/lib/edts_dialyzer/edts-dialyzer.el index 003673d1..00b8e4a8 100644 --- a/lib/edts_dialyzer/edts-dialyzer.el +++ b/lib/edts_dialyzer/edts-dialyzer.el @@ -34,11 +34,6 @@ :group 'edts :type 'boolean) -(define-obsolete-variable-alias - 'edts-code-inhibit-dialyzer-on-compile - 'edts-dialyzer-inhibit-on-compile - "2017-04-15") - (defun edts-dialyzer-init () "Initialize edts-dialyzer." (add-to-list 'edts-code-issue-types 'edts-dialyzer) diff --git a/test_data/package-install-deps.el b/test_data/package-install-deps.el index 73ebba17..267e622b 100644 --- a/test_data/package-install-deps.el +++ b/test_data/package-install-deps.el @@ -1,4 +1,4 @@ -;;; edts-pkg.el --- EDTS dependency installation, for test. +;;; package-install-deps.el --- EDTS dependency installation, for test. ;; Copyright 2012-2013 Thomas Järvstrand