All Manuals > LispWorks Editor User Guide > 6 Advanced Features > 6.3 Programming the editor

NextPrevUpTopContentsIndex

6.3.7 Files

editor:find-file-buffer

Function

editor:find-file-buffer pathname &optional check-function

Returns a buffer associated with the file pathname , reading the file into a new buffer if necessary. The second value returned is T if a new buffer is created, and nil otherwise. If the file already exists in a buffer, its consistency is first checked by means of check-function . If no value is supplied for check-function , editor:check-disk-version-consistent is used.

editor:fast-save-all-buffers

Function

editor:fast-save-all-buffers &optional ask

Saves all modified buffers which are associated with a file. If ask is non-nil then confirmation is asked for before saving each buffer. If ask is not set, all buffers are saved without further prompting.

Unlike the editor command Save All Files this function can be run without any window interaction. It is thus suitable for use in code which does not intend to allow the user to leave any buffers unsaved, and from the console if it is necessary to save buffers without re-entering the full window system.

editor:check-disk-version-consistent

Function

editor:check-disk-version-consistent pathname buffer

Checks that the date of the file pathname is not more recent than the last time buffer was saved. If pathname is more recent, the user is prompted on how to proceed. Returns t if there is no need to read the file from disk and nil if it should be read from disk.

editor:buffer-pathname

Function

editor:buffer-pathname buffer

Returns the pathname of the file associated with buffer . If no file is associated with buffer , nil is returned.

6.3.7.1 File encodings in the editor

6.3.7.2 Non base-char errors

6.3.7.3 Choosing the encoding to use


LispWorks Editor User Guide (Unix version) - 3 May 2011

NextPrevUpTopContentsIndex