diff options
Diffstat (limited to 'completion-conf.el')
-rw-r--r-- | completion-conf.el | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/completion-conf.el b/completion-conf.el index ed28b06..efc9bd5 100644 --- a/completion-conf.el +++ b/completion-conf.el @@ -43,6 +43,7 @@ (define-key minibuffer-local-completion-map (vector 'down) #'durand-embark-scroll-down-or-go-to-completions) (define-key minibuffer-local-completion-map (vector 'up) #'durand-embark-scroll-up-or-go-to-completions) +(define-key minibuffer-local-completion-map (vector ?\s-v) #'durand-completion-toggle-display) (define-key completion-list-mode-map (vector 'down) #'durand-completion-scroll-down-or-go-to-minibuffer) (define-key completion-list-mode-map (vector 'up) #'durand-completion-scroll-up-or-go-to-minibuffer) @@ -89,6 +90,48 @@ minibuffer as usual." (remove-hook 'minibuffer-exit-hook 'durand-headlong-minibuffer-exit-hook)) ;;;###autoload +(fset + 'durand-completion-display-after-change + (make-byte-code + #x080 + (unibyte-string 192 32 135) + (vector #'minibuffer-completion-help) + 2 + "Call `minibuffer-completion-help' with no input. + +\(fn &rest ARGS)" + nil)) + +;;;###autoload +(fset + 'durand-completion-toggle-display + (make-byte-code + 0 + (unibyte-string 192 9 62 ; determine if it is a member + 131 14 0 + ;; memq + 194 193 192 196 35 130 20 0 + ;; not memq + 195 193 192 197 196 36 + 135) + (vector #'durand-completion-display-after-change + 'after-change-functions + 'remove-hook 'add-hook t nil) + 6 + "Toggle to display the list of completions after each input. + +\(fn)" + nil)) + +;; (defun durand-completion-toggle-display () +;; "Toggle to display the list of completions after each input." +;; (interactive) +;; (cond +;; ((memq #'durand-completion-display-after-change 'post-command-hook) +;; (remove-hook 'post-command-hook #'durand-completion-display-after-change t)) +;; ((add-hook 'post-command-hook #'durand-completion-display-after-change nil t)))) + +;;;###autoload (defun regex-try-completion (string table pred point &optional metadata) "The function that tries to complete STRING using completion table \ TABLE for the `regex' style. |