In general, it's not possible.
The reason is that there might be several maps that define the same binding, and there's not way to figure out automatically which one you want. (in your example, elisp-slime-nav-mode
is such a minor mode). So the only really reliable approach is for you to figure out exactly what definition you want.
That said... there's a possible hack (isn't there always...)
Part of what makes it tricky is that the binding that you want to remap is potentially already masked by an evil active keymap, so getting the current binding of M-.
is useless.
(defun lookup-no-evil (key)
;; excluding evil maps from the lookup. not sure if
;; anything more than evail-normal-state-map is needed
(let* ((evil-maps (list evil-normal-state-map))
(bindings
(remq nil
(mapcar
(lambda (map)
(unless (memq map evil-maps)
(lookup-key map key)))
(current-active-maps)))))
(when bindings
;; let's assume the first one is the right one.
;; Given that minor modes are at the beginning
;; (although this is *not* documented so should not
;; be relied upon), it might be what we would have
;;without evil-mode indeed
(car bindings))))
(defmacro evil-remap (from to)
;; assuming that we want to put it in the normal-state map.
;; not sure about that
`(define-key evil-normal-state-map ,to
(lambda ()
(interactive)
(call-interactively (lookup-no-evil ,from)))))
(evil-remap (kbd "M-.") (kbd "C-]"))
I normally don't use evil at all, so there might be adjustments needed (see embedded comments)
Also, a cleaner approach would be to lookup the bindings once (in a mode hook for example), instead of looking up dynamically every time the keybinding is pressed. But I'm not sure what evil hook to use, so this is left as an exercise ;)
(and depending on the order you use for your minor-modes, or if you toggle them dynamically, it might be incorrect)