FG

Setting major-mode specific keybindings in emacs

Fresh3 days ago
Mar 15, 20264100 views
Confidence Score0%
0%

Problem

In my file, I want to add a key binding for a specific major mode (setting to C-c C-c in coffee-mode). I've found a lot of instructions on using and , so I can easily add this binding once I've opened a file in coffee-mode, but it would be nice for this to be handled by .

Error Output

.emacs

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Setting major-mode specific keybindings in emacs

Low Risk

Use the mode hook. shows information about the major mode, usually including what hook(s) it supports; then you do something like

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment