org.el: Ignore errors when bindings keys in orgstruct-setup

* org.el (orgstruct-setup): Ignore errors around org-defkey.
This commit is contained in:
Christopher Schmidt 2013-02-13 13:01:15 +01:00
parent 7c27e57c4c
commit e7403d6912

View file

@ -8632,9 +8632,11 @@ buffer. It will also recognize item context in multiline items."
(key-description binding)))))
(let ((key (lookup-key orgstruct-mode-map binding)))
(when (or (not key) (numberp key))
(org-defkey orgstruct-mode-map
binding
(orgstruct-make-binding f binding)))))))
(condition-case nil
(org-defkey orgstruct-mode-map
binding
(orgstruct-make-binding f binding))
(error nil)))))))
(run-hooks 'orgstruct-setup-hook))
(defun orgstruct-make-binding (fun key)