emacs-devel
[Top][All Lists]
Advanced

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

Re: native-comp-async-report-warnings-errors default value


From: Robert Pluim
Subject: Re: native-comp-async-report-warnings-errors default value
Date: Wed, 08 Dec 2021 10:19:59 +0100

>>>>> On Tue, 07 Dec 2021 19:16:16 +0200, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Robert Pluim <rpluim@gmail.com>
    >> Cc: akrl@sdf.org,  larsi@gnus.org,  stefankangas@gmail.com,
    >> emacs-devel@gnu.org
    >> Date: Tue, 07 Dec 2021 17:54:49 +0100
    >> 
    >> Let the wordsmithing begin!

    Eli> Thanks, this is fine, with two gotchas:

    >> +is available.  Note that because of this use of a subprocess, native
    >> +compilation may produce warning and errors which byte-compilation does
    >> +not, and lisp code may thus need to be modified to work correctly. See
    Eli>                                                                     ^^
    Eli> Two spaces there, please.

    >> +@code{native-comp-async-report-warnings-errors} in 
@xref{Native-Compilation

    Eli> @xref is inappropriate in the middle of a sentence, since it produces
    Eli> a capitalized "See".  You want @pxref instead.

Fixed and pushed to emacs-28.

    >> I guess we could add a link to
    >> `native-comp-async-report-warnings-errors' when the warning type == 
(comp)

    Eli> We could, yes.  Assuming the code to add that is simple enough to
    Eli> install on the release branch.

Something like this, although this puts the button on all warnings,
not just the ones about missing definitions. And now Iʼm tempted to
*remove* the 'Disable' buttons for 'comp' warnings, since clicking
those will suppress all native compilation warnings.

diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el
index 36b275e2d3..8aa6d18d61 100644
--- a/lisp/emacs-lisp/warnings.el
+++ b/lisp/emacs-lisp/warnings.el
@@ -298,6 +298,12 @@ display-warning
               ;; Don't output the buttons when doing batch compilation
               ;; and similar.
               (unless (or noninteractive (eq type 'bytecomp))
+                (when (eq type 'comp)
+                  (insert " ")
+                  (insert-button "More Info"
+                                 'help-echo "mouse-2, RET: Show native-compile 
documentation"
+                                 'action (lambda (_)
+                                           (describe-variable 
'native-comp-async-report-warnings-errors))))
                 (insert " ")
                 (insert-button "Disable showing"
                                'type 'warning-suppress-warning

(I really must either update some packages or hassle their
authors. Iʼm getting like 200 warnings)

Robert
-- 



reply via email to

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