be better at handling integration with tuareg and typerex

Ignore-this: 11bdba8ecbe2838732e3bda7ff2f29c0

darcs-hash:20120303224259-33bd9-047a8c48c6f05f146715666dd83f2b494e4ee815
This commit is contained in:
wojciech.meyer 2012-03-03 23:42:59 +01:00
parent baf0de7ca9
commit 8535250c29
1 changed files with 7 additions and 1 deletions

View File

@ -613,13 +613,19 @@ If ADD-TO-HISTORY is t then the input will be added to history."
;; +-----------------------------------------------------------------+
(defun utop-choose (symbol)
"Be best at resolving tuareg or typerex dependencies even when
byte-compiling."
(cond
((eq major-mode 'tuareg-mode)
(intern (concat "tuareg-" symbol)))
((eq major-mode 'typerex-mode)
(intern (concat "typerex-" symbol)))
(t
(error (concat "unsupported mode: " (symbol-name major-mode) ", utop support only tuareg and typerex modes")))))
(if (require 'typerex nil t)
(intern (concat "typerex-" symbol))
(if (require 'tuareg nil t)
(intern (concat "tuareg-" symbol))
(error (concat "unsupported mode: " (symbol-name major-mode) ", utop support only tuareg and typerex modes")))))))
(defmacro utop-choose-symbol (symbol)
(utop-choose symbol))