LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-20-2006, 04:00 PM   #1
Horos23
LQ Newbie
 
Registered: Jan 2005
Posts: 27

Rep: Reputation: 15
emacs ctrl-m is RET. how to change ?


Hello,

I want to bind Ctrl-m to a function in .emacs, with:
(global-set-key [?\C-m] 'delete-backward-char)

But then, I discover that I bound enter to that function, cause Ctrl-m is enter. How to solve this problem ? I want to insert newline with enter and do delete-backward-char with Ctrl+m.

I googled for a an hour or two for this, but couldn't find.

Thanks for your help
 
Old 11-12-2007, 11:53 PM   #2
Solmoeban
LQ Newbie
 
Registered: Nov 2007
Posts: 11

Rep: Reputation: 0
Arrow How to change key binding of Ctrl-m

13/11/07 12:08am
Hello:
I am new to Emacs but key binding is so important that
I looked it up in the 'manual.pdf' 3.7 MG.
Using 'nano' I saved these three lines in the file '.emacs'
in my home directory than used a terminal(bash)
and gave the command 'emacs' any mistakes in the
file will be noticed when you start emacs. There
should be no mistakes as I copied the file from
my win98se system(coexisting with Ubuntu 7.04) to my
Toshiba laptop with Vista Home Premium.

(global-set-key "\C-z" 'shell) ;;Ctrl-z shells out to bash
(global-unset-key "\C-m") ;;RETURN unbound
(global-set-key "\C-m" 'delete-backward-char)

Notes:
;; comment following command.
"\C-z" key in double quotes in nerd language Ctrl-z.
'shell a command (') apostrophe required to show shell is
a command and not a variable.
(...) all scripted commands inside parenthesis.

Hope this helps.

Cheers,

Solmoeban
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Terminal change (Ctrl+Alt+F1 to F7) problem mehlkelm Debian 8 09-26-2004 05:11 PM
no ctrl-a or ctrl-z in emacs or on command line? ashlock Fedora 5 12-30-2003 08:00 PM
How do you change the colors in emacs? ArmedCoder Linux - Software 1 10-26-2003 07:12 PM
How to change the keyboard layout with Ctrl + Shift? geraldomanaus Linux - Newbie 1 12-12-2002 02:49 PM
how to change bg and fg color in emacs linux_rookie Linux - Software 1 06-23-2001 07:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration