~pkal/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] Sharp-quote symbols with function definition only

Details
Message ID
<20230422094436.26764-1-qq1358722950@gmail.com>
DKIM signature
missing
Download raw message
Patch: +2 -1
---
 setup.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/setup.el b/setup.el
index 7881d65..607e96b 100644
--- a/setup.el
+++ b/setup.el
@@ -196,7 +196,8 @@ of ENSURE-SPEC and ARGS are compatible."
                                             arg)
                                            ((eq (car-safe arg) 'quote)
                                             `#',(cadr arg))
                                            ((symbolp arg)
                                            ((and (symbolp arg)
                                                  (symbol-function arg))
                                             `#',arg)
                                            (arg)))
                        ((error "Invalid ensure spec %S" ensure)))
-- 
2.40.0
Details
Message ID
<878rek2lt6.fsf@posteo.net>
In-Reply-To
<20230422094436.26764-1-qq1358722950@gmail.com> (view parent)
DKIM signature
missing
Download raw message
Hi,

if this is done, then there is no point in sharp-quoting any more, since
the main advantage of doing so is to have the byte-compiler be able to
check if the function is bound or not.

eli <qq1358722950@gmail.com> writes:

> ---
>  setup.el | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/setup.el b/setup.el
> index 7881d65..607e96b 100644
> --- a/setup.el
> +++ b/setup.el
> @@ -196,7 +196,8 @@ of ENSURE-SPEC and ARGS are compatible."
>                                               arg)
>                                              ((eq (car-safe arg) 'quote)
>                                               `#',(cadr arg))
> -                                            ((symbolp arg)
> +                                            ((and (symbolp arg)
> +                                                  (symbol-function arg))
>                                               `#',arg)
>                                              (arg)))
>                          ((error "Invalid ensure spec %S" ensure)))

-- 
Philip Kaludercic
Reply to thread Export thread (mbox)