Kyle Jones writes:
Charles G Waldman writes:
> I just found that hexl is broken if you build XEmacs without
> FILE_CODING turned on - it attempts to take the value of the variable
> buffer-file-coding-system which is not defined if FILE_CODING is not
> enabled.
> [...]
> What is the right way to handle this? Check for boundp in Lisp code,
> or make sure the variable is defined even if FILE_CODING is not
> enabled? Or some other approach?
Check whether the variable is bound if that is all that the
program needs to know. But if a more general question is being
asked such as 'is MULE support available?', then use a broader check like
(featurep 'mule). Some programs will set variables unconditionally
so you can't rely on (boundp 'buffer-file-coding-system) meaning
MULE or file-coding support is available.
OK, thanks for that answer. It would be clearly be better to check
for (featurep 'file-coding)
rather than (boundp 'buffer-file-coding-system)
But I fear that this check may need to be added in a bunch of places
in the package lisp!