On Tue, Jul 22, 2014 at 4:20 PM, Bozhidar Batsov wrote: > Hi guys, > > I was wondering what’s the preferred approach to run a major mode without > triggering any if its hooks. I looked at the Elisp manual, but didn’t find > anything on the subject. Google searches yield nothing useful as well. > (here’s an example that lead to my question - imagine you’re enabling some > major mode in a temp buffer just to get proper font-locking for a string > you inserted in the temp buffer, but you wouldn’t want to enable > whitespace-mode as well, which might add font-locking of it’s own. > Obviously you can disable whitespace-mode directly, but there has to be > some more generic solution) > > Please look at the code in nXhtml for multiple major modes.