diff options
author | Bozhidar Batsov <bozhidar@batsov.com> | 2018-08-25 10:46:05 +0200 |
---|---|---|
committer | Bozhidar Batsov <bozhidar@batsov.com> | 2018-08-25 10:46:05 +0200 |
commit | 4d226ffee8459f7590ccfacf2dd4ef2ac695ccac (patch) | |
tree | ff7e7a47895a2b40ea482d52293ffd5e64390a66 | |
parent | 396786c30b6b69d0337899150662d96d3be1fd86 (diff) |
[Fix #2427] Handle properly multiple project types
There were two problems fixed in this commit:
* `default` has to be a string for completing-read to work
* completing-read returns a string, but we need a symbol
-rw-r--r-- | cider.el | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1363,7 +1363,8 @@ tool in `cider-preferred-build-tool', otherwise prompt the user to choose. PROJECT-DIR defaults to the current project." (let* ((choices (cider--identify-buildtools-present project-dir)) (multiple-project-choices (> (length choices) 1)) - (default (car choices)) + ;; this needs to be a string to be used in `completing-read' + (default (symbol-name (car choices))) ;; `cider-preferred-build-tool' used to be a string prior to CIDER ;; 0.18, therefore the need for `cider-maybe-intern' (preferred-build-tool (cider-maybe-intern cider-preferred-build-tool))) @@ -1371,8 +1372,10 @@ PROJECT-DIR defaults to the current project." (member preferred-build-tool choices)) preferred-build-tool) (multiple-project-choices - (completing-read (format "Which command should be used (default %s): " default) - choices nil t nil nil default)) + (intern + (completing-read + (format "Which command should be used (default %s): " default) + choices nil t nil nil default))) (choices (car choices)) ;; TODO: Move this fallback outside the project-type check |