Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9024171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:56:24+00:00 2026-06-16T05:56:24+00:00

For example, in the codes of zen-coding, the C-j shadows the normal behavior of

  • 0

For example, in the codes of zen-coding, the “C-j” shadows the normal behavior of “C-j” (newline-and-indent)

(define-key zencoding-mode-keymap (kbd "C-j") 'zencoding-expand-line)

Then how can I unset this keybinding and use C-j for newline-and-indent again?

I tried this, but it doesn’t work:

(add-hook 'html-mode-hook
          (lambda ()
            (progn
              (zencoding-mode)
              (local-set-key (kbd "C-j") 'newline-and-indent))))

Does anyone have ideas about this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T05:56:25+00:00Added an answer on June 16, 2026 at 5:56 am

    The general way to unbind a key (for any keymap) is to define a binding of nil:

    (define-key KEYMAP KEY nil)
    

    For convenience, there are also two standard functions for unbinding from the global keymap and from the local keymap (which is usually the major mode’s keymap).

    • (global-unset-key KEY)
    • (local-unset-key KEY)

    Those ones are interactive commands, as per their respective complements global-set-key and local-set-key.

    As to your specific example, you probably want something like this:

    (with-eval-after-load "zencoding-mode"
      (define-key zencoding-mode-keymap (kbd "C-j") nil))
    

    For the benefit of other readers trying to do similar things, those arguments are "zencoding-mode" because the library being loaded is named zencoding-mode.el (note that you should omit the ".el" suffix); and zencoding-mode-keymap rather than the typical/expected zencoding-mode-map because zencoding-mode.el is unusual in explicitly declaring its keymap and not using the standard name for it.

    Use C-hk to check what the key in question is bound to, and Emacs will tell you both the name of the keymap and the name of the library, which establishes both arguments.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When someone codes something for example in MASM, what is it called? Coding in
about the define-match-expansion, there are rare materials and example codes to illustrate the concepts.
I start my android app writing with modifying some example codes from the internet.
I've tried some codes like string s = this is example; txt1TextBlock.Text = Thread.CurrentCulture.TextInfo.ToTitleCase(s);
For example, say I'm creating a table which stores promo codes for a shipping
This is an example of my codes: template <typename T> struct MyStruct { T
I have tried the ReSharper Power toy Zen Coding and found it can only
I tried to use the following example codes by using a ? b :
Look at these example codes: We have ​ <div class=ex></div>​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ And we have jquery
Saw that in some example codes, but ive never used it, unless im dynamically

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.