unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master aea9365 3/3: * lisp/gnus/gnus-search.el (gnus-search-contact-tables): Fix type.
       [not found] ` <20201106130103.DF32C20CAE@vcs0.savannah.gnu.org>
@ 2020-11-06 17:17   ` Eric Abrahamsen
  2020-11-06 21:30     ` Mattias Engdegård
  2020-11-06 21:33     ` Basil L. Contovounesios
  0 siblings, 2 replies; 5+ messages in thread
From: Eric Abrahamsen @ 2020-11-06 17:17 UTC (permalink / raw)
  To: emacs-devel; +Cc: Mattias Engdegård

Mattias Engdegård <mattiase@savannah.gnu.org> writes:

> branch: master
> commit aea936562b033899f0b7160cc492bbea1006863b
> Author: Mattias Engdegård <mattiase@acm.org>
> Commit: Mattias Engdegård <mattiase@acm.org>
>
>     * lisp/gnus/gnus-search.el (gnus-search-contact-tables): Fix type.
>     
>     A more precise type is desirable but at it is now correct ('list' is not).
> ---
>  lisp/gnus/gnus-search.el | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
> index 15d96e3..7ee7c53 100644
> --- a/lisp/gnus/gnus-search.el
> +++ b/lisp/gnus/gnus-search.el
> @@ -410,7 +410,7 @@ returned by `completion-at-point-functions'.  That usually means
>  a list of strings, a hash table, or an alist."
>    :group 'gnus-search
>    :version "28.1"
> -  :type 'list)
> +  :type '(repeat sexp))

Doesn't this type demand a list of lists? It could also be a list of
hashtables, or functions, or a mix of alist/list/function/hashtable...



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: master aea9365 3/3: * lisp/gnus/gnus-search.el (gnus-search-contact-tables): Fix type.
  2020-11-06 17:17   ` master aea9365 3/3: * lisp/gnus/gnus-search.el (gnus-search-contact-tables): Fix type Eric Abrahamsen
@ 2020-11-06 21:30     ` Mattias Engdegård
  2020-11-07  5:02       ` Eric Abrahamsen
  2020-11-06 21:33     ` Basil L. Contovounesios
  1 sibling, 1 reply; 5+ messages in thread
From: Mattias Engdegård @ 2020-11-06 21:30 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-devel

6 nov. 2020 kl. 18.17 skrev Eric Abrahamsen <eric@ericabrahamsen.net>:

>> -  :type 'list)
>> +  :type '(repeat sexp))
> 
> Doesn't this type demand a list of lists? It could also be a list of
> hashtables, or functions, or a mix of alist/list/function/hashtable...

'sexp' means any Lisp type, thus (repeat sexp) is any list.
You may want to replace it with a smaller (more precise) type.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: master aea9365 3/3: * lisp/gnus/gnus-search.el (gnus-search-contact-tables): Fix type.
  2020-11-06 17:17   ` master aea9365 3/3: * lisp/gnus/gnus-search.el (gnus-search-contact-tables): Fix type Eric Abrahamsen
  2020-11-06 21:30     ` Mattias Engdegård
@ 2020-11-06 21:33     ` Basil L. Contovounesios
  2020-11-06 21:54       ` Eric Abrahamsen
  1 sibling, 1 reply; 5+ messages in thread
From: Basil L. Contovounesios @ 2020-11-06 21:33 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: Mattias Engdegård, emacs-devel

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Mattias Engdegård <mattiase@savannah.gnu.org> writes:
>
>> branch: master
>> commit aea936562b033899f0b7160cc492bbea1006863b
>> Author: Mattias Engdegård <mattiase@acm.org>
>> Commit: Mattias Engdegård <mattiase@acm.org>
>>
>>     * lisp/gnus/gnus-search.el (gnus-search-contact-tables): Fix type.
>>     
>>     A more precise type is desirable but at it is now correct ('list' is not).
>> ---
>>  lisp/gnus/gnus-search.el | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
>> index 15d96e3..7ee7c53 100644
>> --- a/lisp/gnus/gnus-search.el
>> +++ b/lisp/gnus/gnus-search.el
>> @@ -410,7 +410,7 @@ returned by `completion-at-point-functions'.  That usually means
>>  a list of strings, a hash table, or an alist."
>>    :group 'gnus-search
>>    :version "28.1"
>> -  :type 'list)
>> +  :type '(repeat sexp))
>
> Doesn't this type demand a list of lists? It could also be a list of
> hashtables, or functions, or a mix of alist/list/function/hashtable...

A sexp in this context is "any Lisp object that can be printed and read
back".  That covers most completion table types, right?  AFAICT the only
type more general than that is restricted-sexp.

-- 
Basil



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: master aea9365 3/3: * lisp/gnus/gnus-search.el (gnus-search-contact-tables): Fix type.
  2020-11-06 21:33     ` Basil L. Contovounesios
@ 2020-11-06 21:54       ` Eric Abrahamsen
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Abrahamsen @ 2020-11-06 21:54 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: Mattias Engdegård, emacs-devel



On November 6, 2020 1:33:33 PM PST, "Basil L. Contovounesios" <contovob@tcd.ie> wrote:
>Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Mattias Engdegård <mattiase@savannah.gnu.org> writes:
>>
>>> branch: master
>>> commit aea936562b033899f0b7160cc492bbea1006863b
>>> Author: Mattias Engdegård <mattiase@acm.org>
>>> Commit: Mattias Engdegård <mattiase@acm.org>
>>>
>>>     * lisp/gnus/gnus-search.el (gnus-search-contact-tables): Fix
>type.
>>>     
>>>     A more precise type is desirable but at it is now correct
>('list' is not).
>>> ---
>>>  lisp/gnus/gnus-search.el | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
>>> index 15d96e3..7ee7c53 100644
>>> --- a/lisp/gnus/gnus-search.el
>>> +++ b/lisp/gnus/gnus-search.el
>>> @@ -410,7 +410,7 @@ returned by `completion-at-point-functions'. 
>That usually means
>>>  a list of strings, a hash table, or an alist."
>>>    :group 'gnus-search
>>>    :version "28.1"
>>> -  :type 'list)
>>> +  :type '(repeat sexp))
>>
>> Doesn't this type demand a list of lists? It could also be a list of
>> hashtables, or functions, or a mix of
>alist/list/function/hashtable...
>
>A sexp in this context is "any Lisp object that can be printed and read
>back".  That covers most completion table types, right?  AFAICT the
>only
>type more general than that is restricted-sexp.

Oh, I didn't realize that was the definition of a sexp. For some reason I thought it was more or less equivalent to list. Carry on!

Thanks, 
Eric

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: master aea9365 3/3: * lisp/gnus/gnus-search.el (gnus-search-contact-tables): Fix type.
  2020-11-06 21:30     ` Mattias Engdegård
@ 2020-11-07  5:02       ` Eric Abrahamsen
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Abrahamsen @ 2020-11-07  5:02 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: emacs-devel

Mattias Engdegård <mattiase@acm.org> writes:

> 6 nov. 2020 kl. 18.17 skrev Eric Abrahamsen <eric@ericabrahamsen.net>:
>
>>> -  :type 'list)
>>> +  :type '(repeat sexp))
>> 
>> Doesn't this type demand a list of lists? It could also be a list of
>> hashtables, or functions, or a mix of alist/list/function/hashtable...
>
> 'sexp' means any Lisp type, thus (repeat sexp) is any list.
> You may want to replace it with a smaller (more precise) type.

Thanks! I think I will do that.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-11-07  5:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20201106130101.11980.32709@vcs0.savannah.gnu.org>
     [not found] ` <20201106130103.DF32C20CAE@vcs0.savannah.gnu.org>
2020-11-06 17:17   ` master aea9365 3/3: * lisp/gnus/gnus-search.el (gnus-search-contact-tables): Fix type Eric Abrahamsen
2020-11-06 21:30     ` Mattias Engdegård
2020-11-07  5:02       ` Eric Abrahamsen
2020-11-06 21:33     ` Basil L. Contovounesios
2020-11-06 21:54       ` Eric Abrahamsen

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).