all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] scratch/flymake-refactor b75f7e2: Hook Flymake onto proper checkdoc and byte-compile interfaces
       [not found] ` <20171001123812.A22F12068C@vcs0.savannah.gnu.org>
@ 2017-10-01 21:40   ` Stefan Monnier
  2017-10-02  0:36     ` João Távora
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2017-10-01 21:40 UTC (permalink / raw)
  To: emacs-devel; +Cc: João Távora

> * lisp/emacs-lisp/bytecomp.el
> (byte-compile-log-warning-function): New variable.
> (byte-compile-log-warning): Use it.
> (byte-compile--log-warning-for-byte-compile): New function.

Looking at it, I think it'd be more useful to add
a `display-warning-function` which applies to all calls to display-warning.

> * lisp/emacs-lisp/checkdoc.el
> (checkdoc-create-error-function): New variable.
> (checkdoc-create-error): Use it.
> (checkdoc--create-error-for-checkdoc): New function.xo

As for this one, I see that checkdoc-create-error can be either
"declarative" (it just builds an object, with no side-effect) or not
depending on checkdoc-generate-compile-warnings-flag.
This sounds like checkdoc already has some of the design we need (it
can construct error objects and then return them), but maybe some more
serious refactoring would be needed to make it really work for flymake.
No time to look deeper into it now,


        Stefan



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

* Re: [Emacs-diffs] scratch/flymake-refactor b75f7e2: Hook Flymake onto proper checkdoc and byte-compile interfaces
  2017-10-01 21:40   ` [Emacs-diffs] scratch/flymake-refactor b75f7e2: Hook Flymake onto proper checkdoc and byte-compile interfaces Stefan Monnier
@ 2017-10-02  0:36     ` João Távora
  2017-10-02  3:14       ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: João Távora @ 2017-10-02  0:36 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> * lisp/emacs-lisp/bytecomp.el
>> (byte-compile-log-warning-function): New variable.
>> (byte-compile-log-warning): Use it.
>> (byte-compile--log-warning-for-byte-compile): New function.
>
> Looking at it, I think it'd be more useful to add
> a `display-warning-function` which applies to all calls to
> display-warning.

OTOH, we're not exactly "displaying" a warning, we're collecting one.

>> * lisp/emacs-lisp/checkdoc.el
>> (checkdoc-create-error-function): New variable.
>> (checkdoc-create-error): Use it.
>> (checkdoc--create-error-for-checkdoc): New function.xo
>
> As for this one, I see that checkdoc-create-error can be either
> "declarative" (it just builds an object, with no side-effect) or not
> depending on checkdoc-generate-compile-warnings-flag.
> This sounds like checkdoc already has some of the design we need (it
> can construct error objects and then return them), but maybe some more
> serious refactoring would be needed to make it really work for flymake.
> No time to look deeper into it now,

No problem. As I think I said in the commit message these two "proper"
interfaces are just pure boilerplate. Feel free to change them.

João



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

* Re: [Emacs-diffs] scratch/flymake-refactor b75f7e2: Hook Flymake onto proper checkdoc and byte-compile interfaces
  2017-10-02  0:36     ` João Távora
@ 2017-10-02  3:14       ` Stefan Monnier
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2017-10-02  3:14 UTC (permalink / raw)
  To: emacs-devel

>>> * lisp/emacs-lisp/bytecomp.el
>>> (byte-compile-log-warning-function): New variable.
>>> (byte-compile-log-warning): Use it.
>>> (byte-compile--log-warning-for-byte-compile): New function.
>> Looking at it, I think it'd be more useful to add
>> a `display-warning-function` which applies to all calls to
>> display-warning.
> OTOH, we're not exactly "displaying" a warning, we're collecting one.

I'm just pointing out that moving the hook from byte-compile-log-warning
to display-warning would make it more generally useful.

> No problem. As I think I said in the commit message these two "proper"
> interfaces are just pure boilerplate. Feel free to change them.

I think for checkdoc, the hook looks good enough.


        Stefan




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

end of thread, other threads:[~2017-10-02  3:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20171001123811.5647.26035@vcs0.savannah.gnu.org>
     [not found] ` <20171001123812.A22F12068C@vcs0.savannah.gnu.org>
2017-10-01 21:40   ` [Emacs-diffs] scratch/flymake-refactor b75f7e2: Hook Flymake onto proper checkdoc and byte-compile interfaces Stefan Monnier
2017-10-02  0:36     ` João Távora
2017-10-02  3:14       ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.