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 08-17-2011, 08:19 AM   #1
splintercdo
Member
 
Registered: Feb 2011
Posts: 141

Rep: Reputation: 11
Little about font lock GNUEmacs


Can someone tell me
1. does GNUEmacs see diference between different programming languages or it has just some built in keywords

2. Can I change syntax highlihting of buffer which isn't saved or has another .extension (for example change to c++ highlight in file which is already open and has .sql extension or has no extension at all)

3. if GNUEmacs has font locking for different languages How can I add new font locking scheme(for example if I want font locking for .prg files(foxpro/clipper))

As I understood I can add new keywords to GNUEmacs I will look through that in documentation.

Any help is appreciated
 
Old 08-18-2011, 01:23 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
First of all, "GNU" and "Emacs" are separate words.

For 1. and 2., you want to look at the section Major Modes in the Emacs manual.
 
Old 08-18-2011, 10:17 AM   #3
splintercdo
Member
 
Registered: Feb 2011
Posts: 141

Original Poster
Rep: Reputation: 11
Thanks, looked through your link, 1. and 2. points are clear

To solve third people should use M-x load-library and then load some lisp library foo.el, or even easier just set (load "foo.el") in emacs initialization file

---------------------------------------------------------------

Problem is just that I can't find any library for foxpro or clipper font locking(syntax highlighting), so it would be cool, if someone would throw some link!
 
Old 08-18-2011, 10:41 AM   #4
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
A quick google came up with xbase mode, but it doesn't appear to have been updated recently. Still, you might want to try it.
 
Old 08-19-2011, 03:20 AM   #5
splintercdo
Member
 
Registered: Feb 2011
Posts: 141

Original Poster
Rep: Reputation: 11
Thanks for xbase, it is better than nothing! But works quite laggy on clipper files. But, OK, from what I checked out it's not at all hard to write my own *.el file, so I might just do it!

One another thing, a bit off topic, BUT I always use C-w to kill or M-w to copy region, is there some way to DELETE region(so it's not held in buffer)
(For example if I copy some text from another buffer or even another application I come back to emacs and if buffer is already filled with some information I have to kill it and then Control-yank and Meta-yank -> basically, I have to use three commands instead of two, first of which would delete region and second would yank previously copied region)
 
Old 08-19-2011, 04:45 AM   #6
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
You should be able to use M-x delete-region, if I understand what you want (see, e.g. this). I just tried it myself and it doesn't store the text in the kill ring. Weird, though, as this command isn't in the manual :/.
 
Old 08-19-2011, 07:16 AM   #7
splintercdo
Member
 
Registered: Feb 2011
Posts: 141

Original Poster
Rep: Reputation: 11
Thank you, I should dispel my laziness of reading and take a look more into "GNU Emacs" documentation, because it is wonderful!

But that makes as human, that we can ask questions, get answers and learn from experience of others /Me/
 
Old 08-19-2011, 07:17 AM   #8
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
The manual is pretty complete, yes. Also, Google is your friend!
 
  


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
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) phreakshew Linux - Newbie 24 04-12-2019 10:42 AM
emacs: minor mode font-mode-lock not on by default?! hewsonism Linux - Newbie 2 06-10-2010 01:32 PM
Num lock OFF and Caps & Screen Lock ON at Linux startup. Reversing? peteyperson Linux - Newbie 2 02-28-2009 11:44 AM
Xemacs font-lock question... terry_opie Linux - Software 1 11-03-2008 07:44 AM
xemacs font-lock ttower Linux - Software 2 01-17-2005 06:29 AM

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

All times are GMT -5. The time now is 09:58 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
Open Source Consulting | Domain Registration