forked from mirrors/org-mode
Revert "Move `org-key' and `org-defkey' into "org-macs.el""
This reverts commit 7f56a9920f
.
`org-key' is specific to Org keybinding, therefore not generic enough
to fit in "org-macs.el". So is `org-defkey'.
This commit is contained in:
parent
486331e323
commit
59d21881b1
|
@ -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
lisp/org.el
14
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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue