Skip to content

Commit 8a7961c

Browse files
committed
fix: Address most compile warnings
1 parent 6e51cb1 commit 8a7961c

16 files changed

+60
-59
lines changed

lisp/cider-browse-ns.el

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,8 @@
6060
(defcustom cider-browse-ns-default-filters nil
6161
"List of default hide filters to apply to browse-ns buffer.
6262

63-
Available options include `private', `test', `macro', `function', and
64-
`var'."
65-
:type 'list
63+
Available options include `private', `test', `macro', `function', and `var'."
64+
:type '(list symbol)
6665
:package-version '(cider . "1.4.0"))
6766

6867
(defconst cider-browse-ns-buffer "*cider-ns-browser*")
@@ -455,7 +454,7 @@ var-meta map."
455454

456455
(defun cider-browse-ns--thing-at-point ()
457456
"Get the thing at point.
458-
Return a list of the type ('ns or 'var) and the value."
457+
Return a list of the type (\\='ns or \\='var) and the value."
459458
(let ((ns-p (get-text-property (point) 'ns))
460459
(line (car (split-string (string-trim (thing-at-point 'line)) " "))))
461460
(if (or ns-p (string-match "\\." line))

lisp/cider-common.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ in the container, the alist would be `((\"/src\" \"~/projects/foo/src\"))."
293293
"Attempt to translate the PATH in the given DIRECTION, optionally RETURN-ALL.
294294
Looks at `cider-path-translations' for (container . host) alist of path
295295
prefixes and translates PATH from container to host or vice-versa depending on
296-
whether DIRECTION is 'from-nrepl or 'to-nrepl."
296+
whether DIRECTION is \\='from-nrepl or \\='to-nrepl."
297297
(seq-let [from-fn to-fn path-fn] (cond ((eq direction 'from-nrepl) '(car cdr identity))
298298
((eq direction 'to-nrepl) '(cdr car expand-file-name)))
299299
(let ((f (lambda (translation)

lisp/cider-completion.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ backend, and ABBREVIATION is a short form of that type."
104104
(defcustom cider-completion-annotations-include-ns 'unqualified
105105
"Controls passing of namespaces to `cider-annotate-completion-function'.
106106

107-
When set to 'always, the candidate's namespace will always be passed if it
108-
is available. When set to 'unqualified, the namespace will only be passed
107+
When set to \\='always, the candidate's namespace will always be passed if it
108+
is available. When set to \\='unqualified, the namespace will only be passed
109109
if the candidate is not namespace-qualified."
110110
:type '(choice (const always)
111111
(const unqualified)

lisp/cider-debug.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ list."
210210
:type '(alist :key-type character
211211
:value-type (list
212212
(string :tag "command name")
213-
(choice (string :tag "display name") nil)))
213+
(choice (string :tag "display name")
214+
(const nil))))
214215
:package-version '(cider . "0.24.0"))
215216

216217
(defun cider--debug-format-locals-list (locals)
@@ -507,7 +508,7 @@ REASON is a keyword describing why this buffer was necessary."
507508
COORDINATES is a list of integers that specify how to navigate into the
508509
sexp that is after point when this function is called.
509510

510-
As an example, a COORDINATES list of '(1 0 2) means:
511+
As an example, a COORDINATES list of \\='(1 0 2) means:
511512
- enter next sexp then `forward-sexp' once,
512513
- enter next sexp,
513514
- enter next sexp then `forward-sexp' twice.

lisp/cider-doc.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ Tables are marked to be ignored by line wrap."
361361
(put-text-property (org-table-begin) (org-table-end) 'block 'table)))))))
362362

363363
(defun cider-docview-wrap-text (buffer)
364-
"For text in BUFFER not propertized as 'block', apply line wrap."
364+
"For text in BUFFER not propertized as `block', apply line wrap."
365365
(with-current-buffer buffer
366366
(save-excursion
367367
(while (not (eobp))

lisp/cider-eval.el

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464

6565
(defcustom cider-show-error-buffer t
6666
"Control the popup behavior of cider stacktraces.
67-
The following values are possible t or 'always, 'except-in-repl,
68-
'only-in-repl. Any other value, including nil, will cause the stacktrace
67+
The following values are possible t or \\='always, \\='except-in-repl,
68+
\\='only-in-repl. Any other value, including nil, will cause the stacktrace
6969
not to be automatically shown.
7070

7171
Irrespective of the value of this variable, the `cider-error-buffer' is
@@ -88,7 +88,7 @@ in order to void its effect."
8888
(defcustom cider-auto-jump-to-error t
8989
"Control the cursor jump behavior in compilation error buffer.
9090
When non-nil automatically jump to error location during interactive
91-
compilation. When set to 'errors-only, don't jump to warnings.
91+
compilation. When set to \\='errors-only, don't jump to warnings.
9292
When set to nil, don't jump at all."
9393
:type '(choice (const :tag "always" t)
9494
(const errors-only)
@@ -120,7 +120,7 @@ Only applies when the *cider-inspect* buffer is currently visible."
120120
(defcustom cider-save-file-on-load 'prompt
121121
"Controls whether to prompt to save the file when loading a buffer.
122122
If nil, files are not saved.
123-
If 'prompt, the user is prompted to save the file if it's been modified.
123+
If \\='prompt, the user is prompted to save the file if it's been modified.
124124
If t, save the file without confirmation."
125125
:type '(choice (const :tag "Prompt to save the file if it's been modified" prompt)
126126
(const :tag "Don't save the file" nil)
@@ -336,7 +336,7 @@ If you wish phases to be ignored, set this variable to nil instead.
336336

337337
You can learn more about Clojure's error phases at:
338338
https://clojure.org/reference/repl_and_main#_at_repl"
339-
:type 'list
339+
:type '(list string)
340340
:group 'cider
341341
:package-version '(cider . "0.18.0"))
342342

lisp/cider-inspector.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ The page size can be also changed interactively within the inspector."
5454

5555
(defcustom cider-inspector-max-atom-length 150
5656
"Default max length of nested atoms before they are truncated.
57-
'Atom' here means any collection member that satisfies (complement coll?).
57+
`Atom' here means any collection member that satisfies (complement coll?).
5858
The max length can be also changed interactively within the inspector."
5959
:type '(integer :tag "Max atom length" 150)
6060
:package-version '(cider . "1.1.0"))
@@ -623,7 +623,7 @@ from stack), `:next-inspectable' (move point to next inspectable object)."
623623

624624
(defun cider-find-inspectable-object (direction limit)
625625
"Find the next/previous inspectable object.
626-
DIRECTION can be either 'next or 'prev.
626+
DIRECTION can be either \\='next or \\='prev.
627627
LIMIT is the maximum or minimum position in the current buffer.
628628

629629
Return a list of two values: If an object could be found, the

lisp/cider-macroexpansion.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
"Determines if namespaces are displayed in the macroexpansion buffer.
4141
Possible values are:
4242

43-
'qualified ;=> Vars are fully-qualified in the expansion
44-
'none ;=> Vars are displayed without namespace qualification
45-
'tidy ;=> Vars that are :refer-ed or defined in the current namespace are
43+
`qualified ;=> Vars are fully-qualified in the expansion
44+
`none ;=> Vars are displayed without namespace qualification
45+
`tidy ;=> Vars that are :refer-ed or defined in the current namespace are
4646
displayed with their simple name, non-referred vars from other
4747
namespaces are referred using the alias for that namespace (if
4848
defined), other vars are displayed fully qualified."

lisp/cider-mode.el

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
(require 'cider-completion-context)
4343
(require 'cider-inspector)
4444
(require 'cider-find)
45+
(require 'cider-log)
4546
(require 'cider-xref-backend)
4647
(require 'subr-x)
4748

@@ -465,8 +466,8 @@ If invoked with a prefix ARG eval the expression after inserting it."
465466
(defconst cider--has-many-mouse-buttons (not (memq window-system '(mac ns)))
466467
"Non-nil if system binds forward and back buttons to <mouse-8> and <mouse-9>.
467468

468-
As it stands Emacs fires these events on <mouse-8> and <mouse-9> on 'x' and
469-
'w32'systems while on macOS it presents them on <mouse-4> and <mouse-5>.")
469+
As it stands Emacs fires these events on <mouse-8> and <mouse-9> on `x' and
470+
`w32'systems while on macOS it presents them on <mouse-4> and <mouse-5>.")
470471

471472
(defcustom cider-use-xref t
472473
"Enable xref integration."
@@ -489,7 +490,7 @@ higher precedence."
489490
(unless cider-use-xref
490491
(define-key map (kbd "M-.") #'cider-find-var)
491492
(define-key map (kbd "M-,") #'cider-pop-back))
492-
(define-key map (kbd (if cider--has-many-mouse-buttons "<mouse-8>" "<mouse-4>")) #'xref-pop-marker-stack)
493+
(define-key map (kbd (if cider--has-many-mouse-buttons "<mouse-8>" "<mouse-4>")) #'xref-go-back)
493494
(define-key map (kbd (if cider--has-many-mouse-buttons "<mouse-9>" "<mouse-5>")) #'cider-find-dwim-at-mouse)
494495
(define-key map (kbd "C-c C-.") #'cider-find-ns)
495496
(define-key map (kbd "C-c C-:") #'cider-find-keyword)

lisp/cider-ns.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
(defcustom cider-ns-save-files-on-refresh 'prompt
7171
"Controls whether to prompt to save files before refreshing.
7272
If nil, files are not saved.
73-
If 'prompt, the user is prompted to save files if they have been modified.
73+
If \\='prompt, the user is prompted to save files if they have been modified.
7474
If t, save the files without confirmation."
7575
:type '(choice (const :tag "Prompt to save files if they have been modified" prompt)
7676
(const :tag "Don't save the files" nil)
@@ -248,7 +248,7 @@ Based on OP-NAME and the value of cider-ns-code-reload-tool defcustom."
248248

249249
;;;###autoload
250250
(defun cider-ns-reload (&optional prompt)
251-
"Send a (require 'ns :reload) to the REPL.
251+
"Send a (require \\='ns :reload) to the REPL.
252252

253253
With an argument PROMPT, it prompts for a namespace name. This is the
254254
Clojure out of the box reloading experience and does not rely on
@@ -263,7 +263,7 @@ identified libs even if they are already loaded\"."
263263

264264
;;;###autoload
265265
(defun cider-ns-reload-all (&optional prompt)
266-
"Send a (require 'ns :reload-all) to the REPL.
266+
"Send a (require \\='ns :reload-all) to the REPL.
267267

268268
With an argument PROMPT, it prompts for a namespace name. This is the
269269
Clojure out of the box reloading experience and does not rely on
@@ -280,7 +280,7 @@ indirectly load via require\"."
280280
;;;###autoload
281281
(defun cider-ns-refresh (&optional mode)
282282
"Reload modified and unloaded namespaces, using the Reloaded Workflow.
283-
Uses the configured 'refresh dirs' \(defaults to the classpath dirs).
283+
Uses the configured `refresh dirs' \(defaults to the classpath dirs).
284284

285285
With a single prefix argument, or if MODE is `refresh-all', reload all
286286
namespaces on the classpath dirs unconditionally.

0 commit comments

Comments
 (0)