emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 496bed5: Change command-completion-using-modes-p to defun


From: Lars Ingebrigtsen
Subject: Re: master 496bed5: Change command-completion-using-modes-p to defun
Date: Sun, 21 Feb 2021 13:41:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> -(define-inline command-completion-using-modes-p (symbol buffer)
>> +(defun command-completion-using-modes-p (symbol buffer)
>
> `define-inline` can be used to define inlinable functions, but it's not
> like `defsubst`: the body needs to be changed to look a bit more like
> what a macro would look like.

Right, that's what I thought, but Emacs didn't seem to beep at me when I
used it, so I assumed that it had somehow been changed lately or
something.  I didn't notice that calling

(command-completion-using-modes-p 'eww-form-select (current-buffer))

led to this appearing in my *Messages* buffer:

Compiler-macro error for command-completion-using-modes-p: (wrong-type-argument 
bufferp (current-buffer))

By the way, changing it back to a defun doesn't seem to clear out the
define-inline-ness?  Hm...  Ah:

(symbol-plist 'command-completion-using-modes-p)
=> (edebug #<marker at 81894 in simple.el> compiler-macro 
command-completion-using-modes-p--inliner)

Perhaps defun should

(put 'command-completion-using-modes-p 'compiler-macro nil)

?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

[Prev in Thread] Current Thread [Next in Thread]