I have strange thing in my Emacs and I can't locate it, everytime I switch a buffer I get message with major mode name even when I call the function I get minibuffer-inactive-mode
The only global function (for all modes) in my .emacs file (I think) is this:
(add-hook 'after-change-major-mode-hook (lambda () (if (not (memql (intern (major-mode)) '(fundamental-mode erc-mode text-mode sql-mode))) (local-set-key (kbd "RET") 'new-line-and-indent-fix)))) How to find the place that add this annoying thing? What different hook can be executed on each mode?
major-modeis not a function, so in the code you quoted you want to replace(intern (major-mode))withmajor-mode(since the value ofmajor-modeis already an interned symbol).grepping for that message in the source code that you use?