unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master b0049c942b8: bytecomp.el: Warn for `, ' not within backquote construct
       [not found] ` <20240203231336.5A511C0EFF8@vcs2.savannah.gnu.org>
@ 2024-02-04  4:06   ` Po Lu
  2024-02-05  3:36     ` Richard Stallman
  2024-02-05 13:35     ` Stefan Monnier via Emacs development discussions.
  0 siblings, 2 replies; 6+ messages in thread
From: Po Lu @ 2024-02-04  4:06 UTC (permalink / raw)
  To: emacs-devel; +Cc: Richard M. Stallman

"Richard M. Stallman" <rms@gnu.org> writes:

> branch: master
> commit b0049c942b8fa4093a02a9bb4ffc9c5da2261765
> Author: Richard M Stallman <rms@gnu.org>
> Commit: Richard Stallman <rms@gnu.org>
>
>     bytecomp.el: Warn for `,' not within backquote construct
>     
>     (bytecomp--report-comma): New function with `compiler-macro' property.

Richard, our ChangeLog generator script is not sophisticated enough to
extract file names from the title of a commit.  Instead, please move the
file name to a separate line, in the format of a ChangeLog entry:

* lisp/emacs-lisp/bytecomp.el:

Thanks.



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

* Re: master b0049c942b8: bytecomp.el: Warn for `, ' not within backquote construct
  2024-02-04  4:06   ` master b0049c942b8: bytecomp.el: Warn for `, ' not within backquote construct Po Lu
@ 2024-02-05  3:36     ` Richard Stallman
  2024-02-05 12:46       ` Eli Zaretskii
  2024-02-05 13:35     ` Stefan Monnier via Emacs development discussions.
  1 sibling, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2024-02-05  3:36 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > Richard, our ChangeLog generator script is not sophisticated enough to
  > extract file names from the title of a commit.  Instead, please move the
  > file name to a separate line, in the format of a ChangeLog entry:

  > * lisp/emacs-lisp/bytecomp.el:

1. The format I used on Feb 3 was the same as used in the previous
commit for that same file.  What exactly are you asking me to do
differently?

2.  How could I change it now that it is already pushed?


-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





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

* Re: master b0049c942b8: bytecomp.el: Warn for `, ' not within backquote construct
  2024-02-05  3:36     ` Richard Stallman
@ 2024-02-05 12:46       ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2024-02-05 12:46 UTC (permalink / raw)
  To: rms; +Cc: luangruo, emacs-devel

> From: Richard Stallman <rms@gnu.org>
> Cc: emacs-devel@gnu.org
> Date: Sun, 04 Feb 2024 22:36:13 -0500
> 
>   > Richard, our ChangeLog generator script is not sophisticated enough to
>   > extract file names from the title of a commit.  Instead, please move the
>   > file name to a separate line, in the format of a ChangeLog entry:
> 
>   > * lisp/emacs-lisp/bytecomp.el:
> 
> 1. The format I used on Feb 3 was the same as used in the previous
> commit for that same file.  What exactly are you asking me to do
> differently?

To name the file name before the function name:

  * lisp/emacs-lisp/bytecomp.el (bytecomp--report-comma): New function with...

You could still mention the file name in the heading line (the 1st
line of the log message), it does no harm to have the file mentioned
twice.

> 2.  How could I change it now that it is already pushed?

You cannot.  We can only edit by hand the produced ChangeLog when the
next release's tarball is being prepared.



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

* Re: master b0049c942b8: bytecomp.el: Warn for `, ' not within backquote construct
  2024-02-04  4:06   ` master b0049c942b8: bytecomp.el: Warn for `, ' not within backquote construct Po Lu
  2024-02-05  3:36     ` Richard Stallman
@ 2024-02-05 13:35     ` Stefan Monnier via Emacs development discussions.
  2024-03-16  1:45       ` Richard Stallman
  1 sibling, 1 reply; 6+ messages in thread
From: Stefan Monnier via Emacs development discussions. @ 2024-02-05 13:35 UTC (permalink / raw)
  To: emacs-devel

>>     bytecomp.el: Warn for `,' not within backquote construct
>>     (bytecomp--report-comma): New function with `compiler-macro' property.

BTW, the compiler already emitted a warning for it, but saying only
that there was a call to an unknown function `,`, and without specifying
where that call was found.

So now we get a duplicate warning:

    In my-foo:
    foo.el:4:7: Warning: ‘,’ called -- perhaps used not within backquote
    
    In end of data:
    foo.el: Warning: the function ‘,’ is not known to be defined.

Maybe the better fix is to improve the "function ‘,’ is not known to
be defined" warning so it points to the right location?


        Stefan




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

* Re: master b0049c942b8: bytecomp.el: Warn for `, ' not within backquote construct
  2024-02-05 13:35     ` Stefan Monnier via Emacs development discussions.
@ 2024-03-16  1:45       ` Richard Stallman
  2024-03-16 15:08         ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2024-03-16  1:45 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > BTW, the compiler already emitted a warning for it, but saying only
  > that there was a call to an unknown function `,`, and without specifying
  > where that call was found.

Right.  It was very difficult to find where that warning was coming from.
It turns out that searching for a comma finds lots of matches that
do not represent anything wrong.

  > So now we get a duplicate warning:

  >     In my-foo:
  >     foo.el:4:7: Warning: ‘,’ called -- perhaps used not within backquote
    
  >     In end of data:
  >     foo.el: Warning: the function ‘,’ is not known to be defined.

The mew warning (shown first above) is better), so I'd suggest disabling
the old (second) warning for this function.

  > Maybe the better fix is to improve the "function ‘,’ is not known to
  > be defined" warning so it points to the right location?

It would be useful to improve the "function XYZ is not known to be defined"
warning in that way -- but, in the special case of comma, the newer
more specific warning is better.



-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





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

* Re: master b0049c942b8: bytecomp.el: Warn for `, ' not within backquote construct
  2024-03-16  1:45       ` Richard Stallman
@ 2024-03-16 15:08         ` Stefan Monnier
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2024-03-16 15:08 UTC (permalink / raw)
  To: Richard Stallman; +Cc: emacs-devel

>   >     In my-foo:
>   >     foo.el:4:7: Warning: ‘,’ called -- perhaps used not within backquote
>     
>   >     In end of data:
>   >     foo.el: Warning: the function ‘,’ is not known to be defined.
>
> The mew warning (shown first above) is better), so I'd suggest disabling
> the old (second) warning for this function.

Reminds me that I have fun definitions for toplevel uses of `,` and `,@`
to propose:

    (defmacro \,@ (exp)
      "Splice EXP's value (a list of Lisp forms) into the code."
      (declare (debug t))
      `(progn ,@(eval exp t)))

    (defmacro \, (exp)
      "Splice EXP's value (a Lisp form) into the code."
      (declare (debug t))
      (eval exp t))

The first one is already available under the names `gnus--,@` and `ses--,@`.


        Stefan




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

end of thread, other threads:[~2024-03-16 15:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <170700201601.3724.18410252880023545872@vcs2.savannah.gnu.org>
     [not found] ` <20240203231336.5A511C0EFF8@vcs2.savannah.gnu.org>
2024-02-04  4:06   ` master b0049c942b8: bytecomp.el: Warn for `, ' not within backquote construct Po Lu
2024-02-05  3:36     ` Richard Stallman
2024-02-05 12:46       ` Eli Zaretskii
2024-02-05 13:35     ` Stefan Monnier via Emacs development discussions.
2024-03-16  1:45       ` Richard Stallman
2024-03-16 15:08         ` Stefan Monnier

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