Fix #2349: Make +format-completing-read return symbol

Currently `+format-completing-read` returns a cons cell like `(symbol . t)`, where `+format/buffer` expects a symbol. This commit makes `+format-completing-read` return a symbol instead. Fixes #2349.
This commit is contained in:
Janfel 2020-01-10 21:14:03 +01:00 committed by GitHub
parent 18301b0b9a
commit 9b5835504e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,7 +95,7 @@ Stolen shamelessly from go-mode"
(require 'format-all)
(let* ((fmtlist (mapcar #'symbol-name (hash-table-keys format-all--format-table)))
(fmt (completing-read "Formatter: " fmtlist)))
(if fmt (cons (intern fmt) t))))
(if fmt (intern fmt))))
;;;###autoload
(defun +format-probe-a (orig-fn)