emacs-devel
[Top][All Lists]
Advanced

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

Re: master ed84f24a21: Make `signal-process' allow completing over signa


From: Daniel Martín
Subject: Re: master ed84f24a21: Make `signal-process' allow completing over signal names
Date: Mon, 27 Jun 2022 10:47:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (darwin)

Po Lu <luangruo@yahoo.com> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> +DEFUN ("signal-names", Fsignal_names, Ssignal_names, 0, 0, 0,
>> +       doc: /* Return a list of known signal names on this system.  */)
>> +  (void)
>> +{
>> +  char name[SIG2STR_MAX];
>> +  Lisp_Object names = Qnil;
>> +  for (int i = 0; i < 255; ++i)
>> +    {
>> +      if (!sig2str (i, name))
>> +    {
>> +      names = Fcons (build_string (name), names);
>> +    }
>> +    }
>> +  return names;
>> +}
>> +
>
> Shouldn't the "255" be NSIG instead? And what about systems where POSIX
> signal handling doesn't really apply, such as MS Windows and MS-DOS?
>

In the same header that defines SIG2STR_MAX there is SIGNUM_BOUND.  It
is defined depending on the availability of other macros, including
NSIG.  Couldn't it be used instead?


reply via email to

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