Closes an open file
(close file-desc)
Arguments
open function.
A file descriptor obtained from theReturn Values
Nil if file-desc is valid; otherwise results in an error message.
close, the file descriptor is unchanged but is no longer valid. Data added to an open file is not actually written until the file is closed.
After aExamples
ct equal to that number:
The following code counts the number of lines in the file somefile.txt and sets the variable(setq fil "SOMEFILE.TXT")
(setq x (open fil "r") ct 0)
(while (read-line x)
(setq ct (1+ ct))
)
(close x)