Change internalmode to be an intrinsic variable

Currently, internalmode is a special word to set an internal state
variable.  Because this series adds variables anyway, change this to
be a variable instead.

I saw some commits in the history that made sure that chew did not
leak memory, so I put some extra effort into trying to handle this for
variables as well.

2023-02-07  Tom Tromey  <tom@tromey.com>

	* doc/proto.str (external, internal, ifinternal, ENUMEQ, ENUMDOC):
	Update.
	* doc/chew.c (internalmode): Remove.
	(add_intrinsic_variable): New function.
	(main): Add internalmode as intrinsic.
	(internal_mode): Remove global.
	(maybecatstr): Update.
	(free_words): Free variables.


3 files changed