Questions tagged [declare]
The declare tag has no usage guidance.
9
questions
1
vote
1
answer
58
views
`completion` In Declare Form Not Working
Why is this function:
(defun shyn/func ()
(declare (completion (lambda (symbol current-buffer)
nil)))
(interactive))
still listed by pressing M-x TAB in buffer *scratch*?
...
1
vote
0
answers
64
views
Effect of `modes` In Declare Form [duplicate]
13.14 The declare Form:
(modes MODES)
Specify that this command is meant to be applicable for MODES only.
What is the practical effect of (modes ...) in declare form?
I find that I can still call ...
1
vote
0
answers
135
views
How to change this slime configuration on the init file from the classic imperative installation to a declarative approach via use-package?
When I first installed Slime, I used to install things via the classic M-x and package-install. Then, I inserted the following configuration:
(slime-setup '(slime-fancy slime-asdf slime-indentation ...
0
votes
2
answers
215
views
How to fix byte compiler warnings for "Unused lexical variable" in a macro?
I have a macro and a function which uses it:
(defmacro oauth2-auto--query-case (&rest cases)
"Handle HTTP queries based on the keys present in ‘query-alist’.
‘query-alist’ is a free ...
1
vote
1
answer
82
views
Does declare-function recognize functions declared via cl-defun?
It seems that declare-function + check-declare-file do not recognize functions defined via cl-defun.
I was happy using declare-function because it comes with check-declare-file that actually checks ...
1
vote
0
answers
50
views
How do you debug edebug specs?
As I write progressively more ambitious macros I find my (declare (debug specs)) more involved. There're times where I really wish I could step debug the spec matching itself, or at least perform the ...
1
vote
3
answers
73
views
Using 'package as a filename in a declare-function statement?
I just saw this line near the top of the file use-package.el:
(declare-function package-installed-p 'package)
How can 'package be a useful 2nd argument, when the doc for declare-function says that ...
1
vote
0
answers
92
views
How do I teach edebug to only evaluate some macro arguments?
Currently, edebug doesn't understand the ->> macro in dash.el.
(defun foo ()
(->> (+ 1 1)
(+ 2)
(* 3)
(format "%s")))
C-u M-x edebug-eval-defun followed by M-: (...
3
votes
1
answer
156
views
How to access the declare specifications of a function
How does one access the declare specification of a function?
Edit: After the answer of npostavs I have to correct myself.
As long as a function is not byte-compiled the declare forms are still in ...