mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
make compile-core: fix warnings
It is easier to spot real problems if the code is warning-free.
Replacing `gensym` with `make-symbol` is an idea taken from here:
b44c08dd45
In defer-until!:
core-lib.el:150:19:Warning: function ‘gensym’ from cl package called at
runtime
In add-transient-hook!:
core-lib.el:216:16:Warning: function ‘gensym’ from cl package called at
runtime
In toplevel form:
autoload/message.el:35:1:Warning: Unused lexical variable ‘spec’
In toplevel form:
autoload/line-numbers.el:31:1:Warning: defcustom for
‘display-line-numbers-type’ fails to specify containing group
autoload/line-numbers.el:31:1:Warning: defcustom for
‘display-line-numbers-type’ fails to specify containing group
autoload/line-numbers.el:39:1:Warning: defcustom for
‘display-line-numbers-grow-only’ fails to specify containing group
autoload/line-numbers.el:39:1:Warning: defcustom for
‘display-line-numbers-grow-only’ fails to specify containing group
autoload/line-numbers.el:44:1:Warning: defcustom for
‘display-line-numbers-width-start’ fails to specify containing group
autoload/line-numbers.el:44:1:Warning: defcustom for
‘display-line-numbers-width-start’ fails to specify containing group
In toplevel form:
cli/autoloads.el:137:1:Warning: Unused lexical variable ‘type’
Preserve name of unused lexical var _type
Makes it obvious what is stored there.
This commit is contained in:
@ -130,7 +130,7 @@ serve as a predicated alternative to `after!'."
|
||||
(declare (indent defun) (debug t))
|
||||
`(if ,condition
|
||||
(progn ,@body)
|
||||
,(let ((fun (gensym "doom|delay-form-")))
|
||||
,(let ((fun (make-symbol "doom|delay-form-")))
|
||||
`(progn
|
||||
(fset ',fun (lambda (&rest args)
|
||||
(when ,(or condition t)
|
||||
@ -196,7 +196,7 @@ advised)."
|
||||
(let ((append (if (eq (car forms) :after) (pop forms)))
|
||||
(fn (if (symbolp (car forms))
|
||||
(intern (format "doom|transient-hook-%s" (pop forms)))
|
||||
(gensym "doom|transient-hook-"))))
|
||||
(make-symbol "doom|transient-hook-"))))
|
||||
`(progn
|
||||
(fset ',fn
|
||||
(lambda (&rest _)
|
||||
|
Reference in New Issue
Block a user