help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting auto-indentation of braces


From: Nikolaj Schumacher
Subject: Re: Setting auto-indentation of braces
Date: Thu, 05 Mar 2009 10:20:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (darwin)

Juha Nieminen <nospam@thanks.invalid> wrote: > Juha Nieminen wrote: >> Juha Nieminen wrote: >>> Kevin Rodgers kirjoitti: >>>> (global-set-key (kbd "M-7") "{") >>> (global-set-key "M-7" "{") seems to work as well. >>> >> New problem: When I do that, and then press ctrl-s to start a search >> and press the key combination in question, rather than inserting { in >> the search area at the bottom of the window, it instead cancels the >> search and inserts the { in the current buffer, as if I hadn't started a
search at all. >> >> Why is it doing that?

I think I can tell you why. isearch is a mode, and it terminates itself automatically on every command it doesn't recognize. Assigning keys that way is the same as using a keyboard macro, which inserts an additional command in the queue, causing isearch to exit.

Here's my work-around:

(defun do-what-backspace-does () (interactive) (call-interactively (key-binding (kbd "<backspace>")))) (global-set-key "\C-h" 'do-what-backspace-does)

I think it should work in your case, too. regards, Nikolaj Schumacher

PS: If you'd use a real email address (even if you don't read it), you'd save me the trouble of getting my emails returned to me as undeliverable. Thanks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]