I was wondering if there is a way to permanently remove a major mode let's say vhdl-mode from Emacs? I have already checked " How do I turn off vhdl-mode in emacs? " but I am wondering if I want to write my own distribution how can I removed some of these modes permanently from Emacs?
-- Experimental only and so no licensing issues or etc.
You can effectively disable a mode by removing it from the auto-mode-alist
variable. Once removed, the mode will never be automatically chosen by emacs but it may still be started manually. This removes vhdl-mode
:
(rassq-delete-all 'vhdl-mode auto-mode-alist)
All modes are available as files. On my machine, VHDL mode is at /usr/share/emacs/23.4/lisp/progmodes/vhdl-mode.el.gz
. If you delete this file, there's no way to turn that on at all. If other modes depend on functionality implemented in this mode, they will suffer too.
Also, modes might be spread across mutliple files so you might have to remove more than one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With