]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/loadup.el: Load minibuffer after cl-generic
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 27 Oct 2019 17:21:21 +0000 (13:21 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 27 Oct 2019 17:21:21 +0000 (13:21 -0400)
This is so minibuffer.el can make use of cl-generic

* lisp/minibuffer.el (minibuffer-local-completion-map):
Move switch-to-completions bindings here from...
* lisp/simple.el (minibuffer-local-completion-map): ... here.

lisp/loadup.el
lisp/minibuffer.el
lisp/simple.el

index e60922e380a3650a1de525ee0cd738bcb3e7e57f..0246dc10262a2cfcfafe5c93405b9d68bd283f59 100644 (file)
 
 (load "emacs-lisp/nadvice")
 (load "emacs-lisp/cl-preloaded")
-(load "minibuffer")            ;After loaddefs, for define-minor-mode.
 (load "obarray")        ;abbrev.el is implemented in terms of obarrays.
 (load "abbrev")         ;lisp-mode.el and simple.el use define-abbrev-table.
 (load "simple")
 
 (load "indent")
 (load "emacs-lisp/cl-generic")
+(load "minibuffer") ;Needs cl-generic (and define-minor-mode).
 (load "frame")
 (load "startup")
 (load "term/tty-colors")
@@ -390,10 +390,9 @@ lost after dumping")))
     (let* ((base (concat "emacs-" emacs-version "."))
           (exelen (if (eq system-type 'windows-nt) -4))
           (files (file-name-all-completions base default-directory))
-          (versions (mapcar (function
-                             (lambda (name)
-                               (string-to-number
-                                (substring name (length base) exelen))))
+          (versions (mapcar (lambda (name)
+                               (string-to-number
+                                (substring name (length base) exelen)))
                             files)))
       (setq emacs-repository-version (ignore-errors (emacs-repository-get-version))
             emacs-repository-branch (ignore-errors (emacs-repository-get-branch)))
index c92a91e76ced7ce14ddcd3e9d82f7fad86c5d7b4..9a8db07819361a8f5e783f7af799b6737da29140 100644 (file)
@@ -2251,6 +2251,8 @@ The completion method is determined by `completion-at-point-functions'."
     ;; (define-key map "\e\t" 'minibuffer-force-complete)
     (define-key map " " 'minibuffer-complete-word)
     (define-key map "?" 'minibuffer-completion-help)
+    (define-key map [prior] 'switch-to-completions)
+    (define-key map "\M-v"  'switch-to-completions)
     map)
   "Local keymap for minibuffer input with completion.")
 
index 338f3e3fd89faaf8c9f0d49b658ce6f124800bf4..5502cd49aa42f588e7c67b11e222b367eb4941ae 100644 (file)
@@ -3336,7 +3336,7 @@ to `shell-command-history'."
         (shell-completion-vars)
        (set (make-local-variable 'minibuffer-default-add-function)
             'minibuffer-default-add-shell-commands))
-    (apply 'read-from-minibuffer prompt initial-contents
+    (apply #'read-from-minibuffer prompt initial-contents
           minibuffer-local-shell-command-map
           nil
           (or hist 'shell-command-history)
@@ -8494,10 +8494,7 @@ Called from `temp-buffer-show-hook'."
                 "In this buffer, type \\[choose-completion] to \
 select the completion near point.\n\n"))))))
 
-(add-hook 'completion-setup-hook 'completion-setup-function)
-
-(define-key minibuffer-local-completion-map [prior] 'switch-to-completions)
-(define-key minibuffer-local-completion-map "\M-v"  'switch-to-completions)
+(add-hook 'completion-setup-hook #'completion-setup-function)
 
 (defun switch-to-completions ()
   "Select the completion list window."