be better at handling integration with tuareg and typerex
Ignore-this: 11bdba8ecbe2838732e3bda7ff2f29c0 darcs-hash:20120303224259-33bd9-047a8c48c6f05f146715666dd83f2b494e4ee815
This commit is contained in:
parent
baf0de7ca9
commit
8535250c29
|
@ -613,13 +613,19 @@ If ADD-TO-HISTORY is t then the input will be added to history."
|
||||||
;; +-----------------------------------------------------------------+
|
;; +-----------------------------------------------------------------+
|
||||||
|
|
||||||
(defun utop-choose (symbol)
|
(defun utop-choose (symbol)
|
||||||
|
"Be best at resolving tuareg or typerex dependencies even when
|
||||||
|
byte-compiling."
|
||||||
(cond
|
(cond
|
||||||
((eq major-mode 'tuareg-mode)
|
((eq major-mode 'tuareg-mode)
|
||||||
(intern (concat "tuareg-" symbol)))
|
(intern (concat "tuareg-" symbol)))
|
||||||
((eq major-mode 'typerex-mode)
|
((eq major-mode 'typerex-mode)
|
||||||
(intern (concat "typerex-" symbol)))
|
(intern (concat "typerex-" symbol)))
|
||||||
(t
|
(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)
|
(defmacro utop-choose-symbol (symbol)
|
||||||
(utop-choose symbol))
|
(utop-choose symbol))
|
||||||
|
|
Loading…
Reference in New Issue