2

I am using emacs on a debian system and have installed emacs-goodies-el. One of the many things in there is todoo which registers itself in auto-mode-alist for all files ending in TODO.

This particular association is in the way and I would like to either get rid of todoo or just change the entry in the auto-mode-alist.

I tried to find a switch in customize-group emacs-goodies-el but there seems to be nothing.

I've got a few incantations in a file in ~/.emacs.d and could add to those, but fiddling with with auto-mode-alist seems a bit daunting. The entry I need to get rid of is

("TODO\\'" . todoo-mode)

So if anyone knows off-hand how to easily disable todoo in emacs-goodies-el, let me know. Alternatively a hint how to remove this element from the alist or just define a different file pattern would help.

2 Answers 2

4

You can do this to remove the entry.

(setq auto-mode-alist  (rassq-delete-all 'todoo-mode auto-mode-alist))

I'm not sure there's a specialized way to remove entry of auto-mode-alist.

0

Newer entries take priority over older ones, so you could just do

(push '("TODO\\'" . text-mode) auto-mode-alist)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.