Courtesy of the Daily Grail, here's a short article on how tomato plants have been found to react to the presence of snail slime in soil nearby, by producing an enzyme that repels snails. The article suggests there's something of a mystery about how the plants detected the slime, as it didn't actually touch them. But perhaps not too much of a mystery, as that aspect isn't even mentioned in the abstract of the published article. Access to the full text requires payment.
https://www.scientificamerican.com/artic...my-snails/
https://link.springer.com/article/10.100...018-4070-1
https://www.scientificamerican.com/artic...my-snails/
https://link.springer.com/article/10.100...018-4070-1