Examines a buffer for an encoding option.
system
find-encoding-option pathname ef-spec buffer length => result
pathname⇩ |
Pathname identifying location of buffer. |
ef-spec⇩ |
An external format spec. |
buffer⇩ |
A buffer whose contents are examined. |
length⇩ |
Length (an integer) up to which buffer should be examined. |
result⇩ |
An external format spec. |
The function find-encoding-option
looks in buffer (bounded by length) for file options (EMACS-style -*-
lines) containing an option called encoding
or external-format
, with value value.
If encoding
or external-format
is found, it reads value as a Lisp expression in the keyword
package. If coding
is found, it attempts to translate value from a GNU Emacs coding system name to a LispWorks external-format name.
It then merges ef-spec with the external format spec derived from value, and returns the result as result. Thus it does not override a supplied ef-spec.
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:31:02