Sfoglia il codice sorgente

Revert "Move `org-key' and `org-defkey' into "org-macs.el""

This reverts commit 7f56a9920fff6c3538f30df2cc1c04cefe4f803b.

`org-key' is specific to Org keybinding, therefore not generic enough
to fit in "org-macs.el". So is `org-defkey'.
Nicolas Goaziou 7 anni fa
parent
commit
59d21881b1
2 ha cambiato i file con 14 aggiunte e 21 eliminazioni
  1. 0 21
      lisp/org-macs.el
  2. 14 0
      lisp/org.el

+ 0 - 21
lisp/org-macs.el

@@ -31,9 +31,6 @@
 
 ;;; Code:
 
-(defvar org-disputed-keys)
-(defvar org-replace-disputed-keys)
-
 
 ;;; Macros
 
@@ -223,24 +220,6 @@ error when the user input is empty."
   (if a (not b) b))
 
 
-
-;;; Keybinding
-
-(defun org-key (key)
-  "Select key according to `org-replace-disputed-keys' and `org-disputed-keys'.
-Or return the original if not disputed."
-  (when org-replace-disputed-keys
-    (let* ((nkey (key-description key))
-	   (x (cl-find-if (lambda (x) (equal (key-description (car x)) nkey))
-			  org-disputed-keys)))
-      (setq key (if x (cdr x) key))))
-  key)
-
-(defun org-defkey (keymap key def)
-  "Define a key, possibly translated, as returned by `org-key'."
-  (define-key keymap (org-key key) def))
-
-
 
 ;;; Overlays
 

+ 14 - 0
lisp/org.el

@@ -1107,6 +1107,20 @@ therefore you'll have to restart Emacs to apply it after changing."
   :group 'org-startup
   :type 'alist)
 
+(defun org-key (key)
+  "Select key according to `org-replace-disputed-keys' and `org-disputed-keys'.
+Or return the original if not disputed."
+  (when org-replace-disputed-keys
+    (let* ((nkey (key-description key))
+	   (x (cl-find-if (lambda (x) (equal (key-description (car x)) nkey))
+			  org-disputed-keys)))
+      (setq key (if x (cdr x) key))))
+  key)
+
+(defun org-defkey (keymap key def)
+  "Define a key, possibly translated, as returned by `org-key'."
+  (define-key keymap (org-key key) def))
+
 (defcustom org-ellipsis nil
   "The ellipsis to use in the Org mode outline.