unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: master 496bed5: Change command-completion-using-modes-p to defun
Date: Sun, 21 Feb 2021 13:41:08 +0100	[thread overview]
Message-ID: <878s7hmw4b.fsf@gnus.org> (raw)
In-Reply-To: <jwvmtvyzsxr.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sat, 20 Feb 2021 10:00:28 -0500")

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	other threads:[~2021-02-21 12:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210220144350.4736.64583@vcs0.savannah.gnu.org>
     [not found] ` <20210220144351.6424B20B7C@vcs0.savannah.gnu.org>
2021-02-20 15:00   ` master 496bed5: Change command-completion-using-modes-p to defun Stefan Monnier
2021-02-21 12:41     ` Lars Ingebrigtsen [this message]
2021-02-21 20:17       ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878s7hmw4b.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).