Skip to content

Commit

Permalink
Remove minibuffer-completing-symbol (deprecated)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmed-shariff committed Sep 27, 2023
1 parent c53ff6a commit 3a40541
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions org-roam-ql.el
Original file line number Diff line number Diff line change
Expand Up @@ -245,20 +245,19 @@ This would be either an `org-agenda' buffer or a `org-roam' like buffer."
"Read query from minibuffer.
Sets the history as well."
;; Copied from `simple.el' `read--expression'
(let ((minibuffer-completing-symbol t))
(minibuffer-with-setup-hook
(lambda ()
;; KLUDGE: No idea why this is here!
(set-syntax-table emacs-lisp-mode-syntax-table)
(add-hook 'completion-at-point-functions
#'org-roam-ql--completion-at-point nil t))
(let ((query (read-from-minibuffer "Query: " initial-input org-roam-ql--read-query-map nil
'org-roam-ql--search-query-history)))
(setf org-roam-ql--search-query-history (delete-dups
(append
org-roam-ql--search-query-history
(list query))))
(read query)))))
(minibuffer-with-setup-hook
(lambda ()
;; KLUDGE: No idea why this is here!
(set-syntax-table emacs-lisp-mode-syntax-table)
(add-hook 'completion-at-point-functions
#'org-roam-ql--completion-at-point nil t))
(let ((query (read-from-minibuffer "Query: " initial-input org-roam-ql--read-query-map nil
'org-roam-ql--search-query-history)))
(setf org-roam-ql--search-query-history (delete-dups
(append
org-roam-ql--search-query-history
(list query))))
(read query))))

;; Copied from `elisp-completion-at-point'
(defun org-roam-ql--completion-at-point ()
Expand Down

0 comments on commit 3a40541

Please sign in to comment.