LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-18-2005, 03:47 PM   #1
wildcat22
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu
Posts: 102

Rep: Reputation: 15
emacs keybinding


My fingers have betrayed me for the last time.

Does anyone know how I can disable ctrl-x ctrl-c, or at least prompt me to say yes or no before exiting emacs?

I will appreciate it greatly.

Thanks.
 
Old 11-18-2005, 08:50 PM   #2
AltF4
Member
 
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
Emacs prompts before exiting if it has any modified files in any buffer.

The only way to exit immediately is having no files open/modified.
 
Old 11-19-2005, 02:41 PM   #3
Vookimedlo
Member
 
Registered: Jul 2004
Location: Czech Republic - Roudnice nad Labem
Distribution: Debian
Posts: 253

Rep: Reputation: 33
Hi wildcat22,

there are two ways how to do it.

1) quit without saving
Code:
(global-set-key (kbd "C-x C-c") 'kill-emacs)
2) quit with saving
Code:
(global-set-key (kbd "C-x C-c") 'save-buffers-kill-emacs)

Choose one way and add the expression to your .emacs configuration file.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
keybinding not working in gnome kg4ysy Linux - Software 1 04-21-2006 11:07 AM
touchpad OFF keybinding mandrakemikael Linux - Laptop and Netbook 0 01-10-2005 03:24 PM
rxvt - vim questions about keybinding thely Linux - General 2 12-13-2004 12:53 AM
Program for keybinding of Multimedia buttons on keyboard alitrix Linux - Software 24 10-17-2004 08:23 PM
my customized xmms keybinding file gets overwritten infamous41md Linux - Newbie 1 06-22-2003 02:43 PM


All times are GMT -5. The time now is 06:22 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration