joaotavora / sly

Sylvester the Cat's Common Lisp IDE
1.24k stars 140 forks source link

Allow READ-FROM-MINIBUFFER-IN-EMACS to return an empty string #512

Open daewok opened 2 years ago

daewok commented 2 years ago

The docstring for READ-FROM-MINIBUFFER-IN-EMACS says that an empty string is returned when a user enters nothing. Prior to this commit, SLY-READ-FROM-MINIBUFFER was called in such a way that an empty result wasn't allowed.

daewok commented 2 years ago

It kind of looks like the t that was already present in the call to sly-read-from-minibuffer may have been intended for the allow-empty optional argument, but instead it's consumed by the hist optional argument.

So I'm unsure if the correct fix is (sly-read-from-minibuffer prompt initial-value t t) (history is not saved) or (sly-read-from-minibuffer prompt initial-value nil t) (history is saved).