LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-26-2003, 02:52 AM   #1
nakkaya
LQ Guru
 
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Rep: Reputation: 45
creating my own shortcut


i use emacs for all sorts of typing and txt stuff problem is i mostly use command that dont have a keyboard shortcut so how can i create my try google but got only tutorials on emacs none explains my problem thx.
(like compile function from the menu)
 
Old 05-12-2003, 03:10 PM   #2
vladkrack
Member
 
Registered: Oct 2002
Location: Curitiba - Brazil
Distribution: Conectiva
Posts: 334

Rep: Reputation: 30
You could use Control with C (C-c) as it is reserved for user definition of commands. The following lines will define a prefix, a keymap and set a global key for accessing the keymap.

(defun Ctl-C-prefix ())
(setq Ctl-C-keymap (make-keymap))
(global-set-key "\C-c" (Ctl-C-prefix))

Here are some examples of how is used:

(define-key Ctl-C-keymap "c" 'compile)
(define-key Ctl-C-keymap "e" 'eval-buffer)
(define-key Ctl-C-keymap "n" 'next-error)
(define-key Ctl-C-keymap "f" 'auto-fill-mode)
(define-key Ctl-C-keymap "g" 'goto-line)
(define-key Ctl-C-keymap "$" 'ispell-buffer)
(define-key Ctl-C-keymap "-" 'dabbrev-expand)
 
Old 05-12-2003, 05:45 PM   #3
nakkaya
LQ Guru
 
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Original Poster
Rep: Reputation: 45
thx i got one more question do you know how to activate the c++ highlight mode during execution of the program?
 
Old 05-12-2003, 05:48 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Meta-x font-lock-mode


Gülle Gülle,
Tink
 
Old 05-13-2003, 01:24 AM   #5
nakkaya
LQ Guru
 
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Original Poster
Rep: Reputation: 45
Quote:
Originally posted by Tinkster
Meta-x font-lock-mode


Gülle Gülle,
Tink
thks but it is with just one 'l' Güle Güle,

 
  


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
Creating Azureus Shortcut figfighter Linux - Software 3 07-22-2005 01:34 AM
Is creating a shortcut possible? slick_willie Solaris / OpenSolaris 17 12-20-2004 04:18 PM
Creating a shortcut to the Desktop ptreves Linux - Newbie 3 08-19-2004 04:53 PM
Creating a shortcut? linux_dejan Linux - Software 8 04-11-2004 12:24 PM
Creating a shortcut to desktop yenonn Linux - General 11 08-12-2003 04:29 PM


All times are GMT -5. The time now is 11:56 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration