(defun Jane.emacsian-ocamlspot ()
- "nlinger and pszilagyi find the default `ocamlspot-query'
-behavior annoying. Let's try something a little more Emacsian,
-i.e., more like `find-function'."
+ "Tweak `ocamlspot' functions to act more like Emacs functions."
;; Use advice rather than redefining, so it's easy to disable.
(defadvice ocamlspot-query (around Jane.emacsian-ocamlspot activate)
+ "Act more like `find-function-other-window'."
+ ;; nlinger and pszilagyi find the default behavior annoying. In
+ ;; particular, point moves to the query window, capturing
+ ;; keystrokes like C-x C-b, but only temporarily, until
+ ;; `ocaml-wait' returns and the original window is re-selected.
+ ;; This is visually distracting and deceptive and creates a
+ ;; partial UI race condition.
+ ;; Go further than merely fixing the existing behavior, which
+ ;; could be accomplished by switching back to the originally
+ ;; selected window before calling `ocamlspot-wait'.
(ocamlspot-query-at-cursor (ad-get-arg 0))