unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: emacs-devel@gnu.org
Cc: Lars Ingebrigtsen <larsi@gnus.org>
Subject: Re: master 9291e73 02/12: Add new 'declare' forms for command completion predicates
Date: Sat, 20 Feb 2021 19:30:28 +0000	[thread overview]
Message-ID: <874ki6v8ob.fsf@tcd.ie> (raw)
In-Reply-To: <20210214131502.DADCE20DFB@vcs0.savannah.gnu.org> (Lars Ingebrigtsen's message of "Sun, 14 Feb 2021 08:15:02 -0500 (EST)")

[-- Attachment #1: Type: text/plain, Size: 644 bytes --]

larsi@gnus.org (Lars Ingebrigtsen) writes:

> branch: master
> commit 9291e7316f98ab0858b323f72047ffd5a23d9ac9
> Author: Lars Ingebrigtsen <larsi@gnus.org>
> Commit: Lars Ingebrigtsen <larsi@gnus.org>
>
>     Add new 'declare' forms for command completion predicates

[...]

> +(defalias 'byte-run--set-completion
> +  #'(lambda (f _args val)
> +      (list 'function-put (list 'quote f)
> +            ''completion-predicate val)))

This is the only declare form property that doesn't quote its value,
resulting in forms like (declare (completion 'foo)) rather than the more
conventional (declare (completion foo)).  How's the following fix?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Function-quote-completion-property-of-declare-form.patch --]
[-- Type: text/x-diff, Size: 1054 bytes --]

From 3a93eb1c161c4a50b942aaabff450422b8a63679 Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob@tcd.ie>
Date: Sat, 20 Feb 2021 18:55:12 +0000
Subject: [PATCH] Function-quote completion property of declare form

* lisp/emacs-lisp/byte-run.el (byte-run--set-completion): Quote with
'function' for syntactical consistency with other declare form
properties.  This allows writing (declare (completion foo)) instead
of (declare (completion 'foo)).
---
 lisp/emacs-lisp/byte-run.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index afe94bb035..6451d7fb62 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -149,7 +149,7 @@ 'byte-run--set-indent
 (defalias 'byte-run--set-completion
   #'(lambda (f _args val)
       (list 'function-put (list 'quote f)
-            ''completion-predicate val)))
+            ''completion-predicate (list 'function val))))
 
 (defalias 'byte-run--set-modes
   #'(lambda (f _args &rest val)
-- 
2.30.0


[-- Attachment #3: Type: text/plain, Size: 20 bytes --]


Thanks,

-- 
Basil

       reply	other threads:[~2021-02-20 19:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210214131500.30678.63538@vcs0.savannah.gnu.org>
     [not found] ` <20210214131502.DADCE20DFB@vcs0.savannah.gnu.org>
2021-02-20 19:30   ` Basil L. Contovounesios [this message]
2021-02-21 13:15     ` master 9291e73 02/12: Add new 'declare' forms for command completion predicates Lars Ingebrigtsen
2021-02-21 14:11       ` Basil L. Contovounesios
2021-02-21 15:54         ` Lars Ingebrigtsen
2021-02-21 16:13           ` Basil L. Contovounesios
2021-02-21 18:30             ` Lars Ingebrigtsen
2021-02-26 11:34               ` Basil L. Contovounesios

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=874ki6v8ob.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    /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).