From 86a02aab4dd402123f3f02fa318e160eb9dc5eb7 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Tue, 24 Oct 2023 23:37:32 +1100 Subject: Fixing bom-state - A typo - use complete-read for state names --- bom.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'bom.el') diff --git a/bom.el b/bom.el index d70226d..b97e7c1 100644 --- a/bom.el +++ b/bom.el @@ -215,10 +215,14 @@ The string is ready for display or export." ;;;###autoload (defun bom-state (state) "Open bom forecast for STATE." - (interactive "sState: ") + (interactive (list (completing-read + "State: " + (mapcar (lambda (pair) + (upcase (format "%s" (car pair)))) + bom-state-files)))) (with-current-buffer (get-buffer-create "*bom*") (erase-buffer) - (insert (bom-states-org state)) + (insert (bom-state-org state)) (goto-char (point-min)) (org-mode)) (display-buffer "*bom*")) -- cgit v1.2.3