diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2019-12-04 22:35:07 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2019-12-04 22:35:07 -0500 |
commit | 67a29115ba7748629cf6a1ba41f28e25195d1958 (patch) | |
tree | 8b14142800c1d53e8c099980eaaac7e7c214d8bc /lisp/emacs-lisp | |
parent | 8f22251e595d7598d6643b0d24bf5f409dc59fa8 (diff) | |
download | emacs-scratch/completion-api.tar.gz |
* lisp/emacs-lisp/cl-generic.el: Fix bootstrap.scratch/completion-api
Most importantly, prefill dispatchers for the new minibuffer.el methods.
* lisp/minibuffer.el (completion-table-category): Return both the
category and the default style.
(completion-table--call-method): New function.
(completion-table-test, completion-table-category)
(completion-table-boundaries, completion-table-fetch-matches): Use it.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/cl-generic.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index b0173dc991b..1c4b3fcd228 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -593,7 +593,12 @@ The set of acceptable TYPEs (also called \"specializers\") is defined ;; FIXME: For generic functions with a single method (or with 2 methods, ;; one of which always matches), using a tagcode + hash-table is ;; overkill: better just use a `cl-typep' test. - (byte-compile + (funcall + ;; (featurep 'cl-generic) is only nil when we're called from + ;; cl--generic-prefill-dispatchers during the dump, at which + ;; point it's not worth loading the byte-compiler. + (if (featurep 'cl-generic) + #'byte-compile (lambda (exp) (eval (macroexpand-all exp) 'lexical))) `(lambda (generic dispatches-left methods) (let ((method-cache (make-hash-table :test #'eql))) (lambda (,@fixedargs &rest args) @@ -1117,6 +1122,9 @@ These match if the argument is `eql' to VAL." (eql nil)) (cl--generic-prefill-dispatchers (terminal-parameter nil 'xterm--set-selection) (eql nil)) +;; For lisp/minibuffer.el. +(cl--generic-prefill-dispatchers 1 (head regexp)) +(cl--generic-prefill-dispatchers 0 (head old-styles-api)) ;;; Support for cl-defstructs specializers. |