Skip to content

Commit

Permalink
Added the read-history and write-history functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinkohl committed May 8, 2018
1 parent 3187511 commit 1acf46d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cl-readline.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,17 @@ function returns previous value of the parameter."
(defcfun ("rl_clear_history" clear-history) :void
"Clear the history list by deleting all of the entries.")

(defcfun ("read_history" read-history) :int
"Add the contents of filename to the history list, a line at a
time."
(filename :string))

(defcfun ("write_history" write-history) :int
"Write the current history to filename, overwriting filename if
necessary."
(filename :string))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Signal Handling ;;
Expand Down
10 changes: 10 additions & 0 deletions doc/cl-readline.texi
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,16 @@ been enabled. The function returns previous value of the parameter.
Clear the history list by deleting all of the entries.
@end defun

@defun read-history filename
Add the contents of filename to the history list, a line at a
time.
@end defun

@defun write-history filename
Write the current history to filename, overwriting filename if
necessary.
@end defun

@node Signal Handling
@chapter Signal Handling

Expand Down
2 changes: 2 additions & 0 deletions package.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@
#:variable-dumper
#:set-paren-blink-timeout
#:clear-history
#:read-history
#:write-history
;; Signal Handling
#:cleanup-after-signal
#:free-line-state
Expand Down

0 comments on commit 1acf46d

Please sign in to comment.