Skip to content

Commit 9e5a15c

Browse files
authored
Fixing defcustom warnings + 1 wrong usage of eq (#4377)
* treewide: replace :type list to alist for Action Alist vars All variables whose types being fixed in this commit are used as an arg to `(display-buffer-in-side-window)` function. From the docs it seems that the type of the key and value in this parameter is completely arbitrary, and since `alist` type-definition allows omitting the arg we do that. Fixes a couple of byte-compilation warnings like: ‘list’ without arguments * lsp-asm.el: fix two :type definitions Fixes warnings: lsp-asm.el:38:10: Warning: in defcustom for ‘lsp-asm-active-modes’: ‘list’ without arguments lsp-ido.el:64:10: Warning: in defcustom for ‘lsp-ido-symbol-kind-to-string’: ‘vector’ without arguments * lsp-headerline.el: fix wrong usage of (eq) for comparison to "" `(eq)` does not care about object content, the author probably meant to use (equal). Either way, there's a special func for string emptiness, let's use it. Fixes a warning: lsp-headerline.el:400:14: Warning: ‘eq’ called with literal string that may never match (arg 2)
1 parent 782e1dc commit 9e5a15c

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

clients/lsp-asm.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
(defcustom lsp-asm-active-modes
3636
'( asm-mode fasm-mode masm-mode nasm-mode gas-mode)
3737
"List of major mode that work with asm-lsp."
38-
:type 'list
38+
:type '(list symbol)
3939
:group 'lsp-asm)
4040

4141
(defcustom lsp-asm-home-url

clients/lsp-clojure.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@
9999
(defcustom lsp-clojure-test-tree-position-params nil
100100
"The optional test tree position params.
101101
Defaults to side following treemacs default."
102-
:type 'list
102+
:type 'alist
103103
:group 'lsp-clojure)
104104

105105
(defcustom lsp-clojure-project-tree-position-params nil
106106
"The optional project tree position params.
107107
Defaults to side following treemacs default."
108-
:type 'list
108+
:type 'alist
109109
:group 'lsp-clojure)
110110

111111
;; Internal

clients/lsp-terraform.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,14 @@ language server."
117117
(defcustom lsp-terraform-ls-providers-position-params nil
118118
"The optional providers tree position params.
119119
Defaults to side following treemacs default."
120-
:type 'list
120+
:type 'alist
121121
:group 'lsp-terraform-ls
122122
:package-version '(lsp-mode . "8.0.1"))
123123

124124
(defcustom lsp-terraform-ls-module-calls-position-params nil
125125
"The optional module calls tree position params.
126126
Defaults to side following treemacs default."
127-
:type 'list
127+
:type 'alist
128128
:group 'lsp-terraform-ls
129129
:package-version '(lsp-mode . "8.0.1"))
130130

lsp-headerline.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ PATH is the current folder to be checked."
397397
(_ (lsp-log "'%s' is not a valid entry for `lsp-headerline-breadcrumb-segments'"
398398
(symbol-name segment))
399399
""))))
400-
(if (eq segment-string "")
400+
(if (string-empty-p segment-string)
401401
""
402402
(concat (lsp-headerline--arrow-icon)
403403
" "

lsp-ido.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"TPar"] ; TypeParameter - 26
6262
"A vector of 26 items representing the SymbolKind."
6363
:group 'lsp-ido
64-
:type 'vector)
64+
:type '(vector string))
6565

6666
(defcustom lsp-ido-show-symbol-filename
6767
t

0 commit comments

Comments
 (0)