Browse Source

org-macs: Use `define-key' instead of `org-defkey'

* lisp/org-macs.el (org-completing-read): Use `define-key' instead of
  `org-defkey'.

For bootstrapping reasons, "org-macs.el" isn't expected to require
functions from "org.el". Besides, minibuffer isn't supposed to depend
of `org-disputed-keys' either.
Nicolas Goaziou 7 năm trước cách đây
mục cha
commit
f487fccbec
1 tập tin đã thay đổi với 4 bổ sung6 xóa
  1. 4 6
      lisp/org-macs.el

+ 4 - 6
lisp/org-macs.el

@@ -31,8 +31,6 @@
 
 ;;; Code:
 
-(declare-function org-defkey "org" (keymap key def))
-
 
 ;;; Macros
 
@@ -240,10 +238,10 @@ error when the user input is empty."
   (let ((enable-recursive-minibuffers t)
 	(minibuffer-local-completion-map
 	 (copy-keymap minibuffer-local-completion-map)))
-    (org-defkey minibuffer-local-completion-map " " 'self-insert-command)
-    (org-defkey minibuffer-local-completion-map "?" 'self-insert-command)
-    (org-defkey minibuffer-local-completion-map (kbd "C-c !")
-		'org-time-stamp-inactive)
+    (define-key minibuffer-local-completion-map " " 'self-insert-command)
+    (define-key minibuffer-local-completion-map "?" 'self-insert-command)
+    (define-key minibuffer-local-completion-map (kbd "C-c !")
+      'org-time-stamp-inactive)
     (apply #'completing-read args)))