Questions tagged [declare]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer

`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*? ...
shynur's user avatar
  • 4,638
1 vote
0 answers

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 ...
shynur's user avatar
  • 4,638
1 vote
0 answers

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 ...
Pedro Delfino's user avatar
0 votes
2 answers

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 ...
telotortium's user avatar
1 vote
1 answer

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 ...
phs's user avatar
  • 1,105
1 vote
0 answers

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 ...
zeRusski's user avatar
  • 335
1 vote
3 answers

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 ...
Kevin's user avatar
  • 1,308
1 vote
0 answers

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-: (...
Wilfred Hughes's user avatar
3 votes
1 answer

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 ...
Tobias's user avatar
  • 32.9k