I am not sure how to put this in short. I saw that Rav Shach has an answer for the Rambam [Laws of Forbidden Sexual Relations 12:1] that is a little different than the answer I put down in my little booklet on Bava Metzia.
In short the Rambam says it is a prohibition from the Torah to marry a gentile. The curious thing about this is that it seems to be going like R Shimon that we look at the reason for a verse. The gemara in Kidushin and Yevamot says one can not marry a gentile. It asks why not? To R. Shimon it is clear because the verse says בתך לא תתן לבנו Do not give your daughter to his son nor your son to his daughters because they will tilt the hearts of your children towards idolatry. {Deuteronomy.}
But that is only to R. Shimon who looks at the reason for a verse. But to R. Yehuda the verse is only talking about the seven Canaanite nations.[The Gemara answers it is a decree.]
In short Rav Shach brings another argument in Sanhedrin about the verse that says a king should not have many wives because they might tilt his heart. The Sages say no more than 18. R. Yehuda says He can marry more than 18 as long as they do not tilt his heart. R. Shimon says even one that tilts his heart is forbidden. Then why say "He should not have many"? To tell us even if they are a righteous as Abigail.
The way Rav Shach says it is that we see R. Yehuda holds דורשין טעמא דקרא (we go by the reason for the verse, not the literal meaning) if the reason is stated in the verse. So to R. Yehuda only the seven nations would be forbidden because they are very attached to idolatry but others not. However the Sages would hold that the simple explanation of the verse would be referring to all gentile nations. [This is different than my own explanation but still closely related.] One problem I see with this is that R Yehuda holds if the reason for the verse is stated then it would mean you could marry anyone as long as they do not tilt your heart. That is one possible question on Rav Shach's approach.
[That is the exact parallel to what R. Yehuda says about a king where there also is written the reason for the verse.]
[I might mention that the Tur, the son of Rabbainu Asher decided the halacha like R. Yehuda that we do no go by the reason for the verse, but rather by the literal meaning which in this case means only the seven Canaanite Nations are forbidden.]
It is also important to point out that idolatry is not limited to gentiles. Thus anyone doing idolatry would be forbidden to marry. כל המסירות all that could cause one's heart to stray from God to serve false gods.will be forbidden. And the religious world is sadlly jam packed with false gods-(non with standing the extreme emphasis on rituals).
_______________________________________________________________________________
I saw that רב שך has an answer for the רמב''ם הלכות איסורי ביאה י''ב:א
In short the רמב''ם says it is a prohibition from the Torah to marry a gentile. The curious thing about this is that it seems to be going like ר. שמעון that we look at the reason for a verse. The גמרא in קידושין and יבמות says one can not marry a gentile. It asks why not? To ר. שמעון it is clear because the verse says בתך לא תתן לבנו Do not give your daughter to his son nor your son to his daughters because they will tilt the hearts of your children towards idolatry.
But that is only to ר. שמעון who looks at the reason for a verse. But to ר. יהודה the verse is only talking about the שבעת העמים.The גמרא answers it is a דרבנן.
Without being aware of what רב שך had written I wrote my own explanation of the רמב''ם that in fact is closely linked to רב שך, but slightly different.
In short רב שך brings another argument in סנהדרין about the verse that says a king should not have many wives because they might tilt his heart. The חכמים say no more than שמנה עשרה. But ר. יהודה says he can marry more than שמנה עשרה as long as they do not tilt his heart. ר. שמעון says even one that tilts his heart is forbidden. Then why say "He should not have many"? To tell us even if they are a righteous as אביגיל.
The way רב שך says it is that we see ר. יהודה holds דורשין טעמא דקרא if the reason is stated in the verse. So to ר. יהודה only the seven nations would be forbidden because they are very attached to idolatry but others not. However the Sages would hold that the simple explanation of the verse would be referring to all gentile nations. One problem I see with this is that ר. יהודה holds if the reason for the verse is stated then it would mean you could marry anyone as long as they do not tilt your heart. That is one possible question on רב שך approach.
לרב יש שך תשובה עבור הרמב''ם הלכות איסורי ביאה י''ב: א'. בקיצור רמב''ם אומר שזה איסור מן התורה להתחתן עם גויה. הדבר המעניין בזה הוא שזה נראה שהולך כמו ר. שמעון שהולכים לפי הסיבה של פסוק. הגמרא בקידושין ויבמות אומרת אחד לא יכול להתחתן עם גויה. זה שואל למה לא? ועונה זה ל ר. שמעון כי הפסוק אומר בתך לא תתן לבנו (אל תיתן בתך לבנו) ולא בנך לבנותיו כי הם יוכלו להטות את לבם של הילדים שלך כלפי עבודה זרה. אבל זה רק ר. שמעון שמסתכל על הסיבה של הפסוק. אבל אל לר. יהודה הפסוק רק מדבר על שבעת העמים. גמרא עונה היא דרבנן. בקיצור רב שך מביא טיעון נוסף בסנהדרין על הפסוק שאומר למלך אסור להתחתן עם נשים רבות, משום שהן עלולות להטות את לבו. חכמים אומרים לא יותר משמנה עשרה. אבל ר. יהודה אומר שהוא יכול לשאת יותר משמנה עשרה, כל עוד שהן לא נוטות את לבו. ר. שמעון אומר אפילו אחת שנוטה את לבו אסורה. אז למה הפסוק אומר "לא ירבה"? כדי לדווח לנו שאפילו אם הן צדיקות כמו אביגיל. הדרך שרב שך אומר הוא שאנחנו רואים שר. יהודה מחזיק דורשין טעמא דקרא אם הסיבה נאמרה בפסוק. אז אל ר. יהודה רק שבעת האומות תיאסרנה משום שהן קשורות מאוד לעבודה זרה אבל אחרות לא. אולם חז"ל מחזיקים כי ההסבר הפשוט של הפסוק מתייחס לכל אומות העולם. בעיה אחת שאני רואה עם זה היא כי ר. יהודה מחזיק אם הסיבת הפסוק נאמרה, אז זה אומר שאתה יכול להתחתן עם מישהיא, כל עוד שהיא לא נוטה את הלב שלך.
My own answer here was that when the reason for the verse is written then the Sages and R. Shimon agree. [I think that was my answer, but I have not looked it up to check.] But if so then on my answer also there is a question because R. Shimon and the Sages do not look to agree completely in such a case,