Browse Source

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

* org.el (orgstruct-setup): Ignore errors around org-defkey.
Christopher Schmidt 12 years ago
parent
commit
e7403d6912
1 changed files with 5 additions and 3 deletions
  1. 5 3
      lisp/org.el

+ 5 - 3
lisp/org.el

@@ -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)