def_shell_mode - Linux


def_shell_mode is a command-line tool that allows you to define and manage shell modes in Emacs. It provides a convenient way to customize and enhance your Emacs environment for specific programming languages or domains.


def_shell_mode [options] [language-name]


  • -h, –help: Display help and usage information.
  • -v, –version: Display version information.
  • -c, –create: Create a new shell mode for the specified language.
  • -e, –edit: Edit the configuration file for the specified shell mode.
  • -l, –list: List all available shell modes.
  • -d, –delete: Delete the specified shell mode.


Create a new shell mode for Python

def_shell_mode -c python

Edit the configuration file for the Python shell mode

def_shell_mode -e python

List all available shell modes

def_shell_mode -l

Delete the C shell mode

def_shell_mode -d c

Common Issues

Error: Shell mode python not found

This error occurs when you try to edit or delete a shell mode that does not exist. Make sure you have created the shell mode before attempting to edit or delete it.


def_shell_mode can be integrated with other Emacs commands and tools to further customize your environment. For example, you can use it to create custom keybindings for specific shell modes or to automatically load certain shell modes based on the current file type.

Related Commands

  • emacs: The Emacs text editor.
  • define-mode: Defines a new major mode in Emacs.
  • shell-mode: The built-in Emacs shell mode.