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?

有帮助吗?

解决方案

There is no major-mode function in vanilla Emacs. Whatever that function is in your config, it's probably responsible for displaying the message you're seeing.

You want to fix your code (as per Stefan's comment), but you probably also want to look into that non-standard function:

M-x find-function RET major-mode RET

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top