Questions tagged [declare]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 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 ...
user avatar
0 votes
2 answers
48 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 ...
user avatar
1 vote
1 answer
69 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 ...
user avatar
  • 1,085
1 vote
0 answers
44 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 ...
user avatar
  • 335
1 vote
3 answers
68 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 ...
user avatar
  • 1,218
1 vote
0 answers
86 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-: (...
user avatar
3 votes
1 answer
145 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 ...
user avatar
  • 30.5k