unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Improved warning about called to undefined functions
@ 2024-01-30  3:56 Richard Stallman
  0 siblings, 0 replies; only message in thread
From: Richard Stallman @ 2024-01-30  3:56 UTC (permalink / raw)
  To: 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. ]]]

The byte compiler makes a list of unknown functins referenced.
At the end of the file, it outputs a warning listing the names
of those that were not defined in the file.

That is usually enough, because most of the time there will be few
spurious matches for the function name.  The extreme exceptional case
is the , function, and that is now handled optimally.

But it might nonetheless be useful to get a warning for each call to
an undefined function.  I have a suggestion for how to do that.

On finding a call to an undefined function, push a warning item
including the call's source location data onto a list of tentative
warnings.  At the end of the file, instead of just listing the names
of the functions that remain undefined, for each such function output
warnings using that warning data, a warning for each of the calls seen
to that function.

A more radical idea to make snazzier output:
warn immediately about each call to an undefined function.
Also make a list of those functions, as now, and data about the
warnings shown about them.

On seeing a definition for any of those functions,
delete in the *Compile-Log* buffer all warnings about
calling that undefined function.  This way, each warning will
appear in the proper place, those that have not been deleted.

Or, save with each tentaive warning's data a marker to the place
that warning should go.  At end of file, insert each of those warnings
where it ought to go.

Those are three methods of inserting the same warnings into *Compile-Log*.
I don't know which one users would like 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] only message in thread

only message in thread, other threads:[~2024-01-30  3:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-30  3:56 Improved warning about called to undefined functions Richard Stallman

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