comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Is there an emacs mode??
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Is there an emacs mode?? [message #4097] Mon, 24 April 1995 00:00 Go to next message
phil is currently offline  phil
Messages: 15
Registered: April 1995
Junior Member
I was wondering if anyone out there had an emacs mode for writing IDL .pro files.

/*********************************************************** ****************/
Phil Williams
Postdoctoral Researcher "One man gathers what
MRI Facility another man spills..."
The Ohio State University -The Grateful Dead
email: phil@peace.med.ohio-state.edu
URL: http://justice.med.ohio-state.edu:1525
/*********************************************************** ****************/
Re: Is there an emacs mode?? [message #4115 is a reply to message #4097] Wed, 03 May 1995 00:00 Go to previous messageGo to next message
patterso is currently offline  patterso
Messages: 36
Registered: February 1995
Member
Does anybody also know of a "hilite" setup for IDL in Emacs - one that will
show my wonderful program in pretty colours?

This is pretty useful for at times for tracking down where loops
start and end, etc. more easily (at least I find so when using
in for C and FORTRAN code).

Thanks

Tim


Chris Chase S1A (chase@pickett.jhuapl.edu) wrote:
: >>>>> "Fergus" == Fergus Gallagher <F.Gallagher@nerc.ac.uk> writes:

: Fergus> anton@mola.gps.caltech.edu (Anton Ivanov) wrote:
: >> Yes, there is.
: >> It's located at ftp://fermi.jhuapl.edu/pub/idl .
: >> I'd say that you can find out many useful things there.
: >> Anton

: Fergus> I tried to find this - no luck. Are you sure it's there?

: Actually, the directory is idl_emacs.

: Specifically, use anonymous FTP to fermi.jhuapl.edu, cd to idl_emacs,
: and you will find the files idl-shell.el and idl.el in that directory.

: Or via the WEB:

: ftp://fermi.jhuapl.edu/pub/idl_emacs

: Chris

: P.S. idl-shell.el is at version 1.20 and idl.el is at version 1.17.
: --
: ===============================
: Bldg 24-E188
: The Applied Physics Laboratory
: The Johns Hopkins University
: Laurel, MD 20723-6099
: (301)953-6000 x8529
: chris.chase@jhuapl.edu
Re: Is there an emacs mode?? [message #4116 is a reply to message #4097] Wed, 03 May 1995 00:00 Go to previous messageGo to next message
chase is currently offline  chase
Messages: 62
Registered: May 1993
Member
>>>> > "Fergus" == Fergus Gallagher <F.Gallagher@nerc.ac.uk> writes:

Fergus> anton@mola.gps.caltech.edu (Anton Ivanov) wrote:
>> Yes, there is.
>> It's located at ftp://fermi.jhuapl.edu/pub/idl .
>> I'd say that you can find out many useful things there.
>> Anton

Fergus> I tried to find this - no luck. Are you sure it's there?

Actually, the directory is idl_emacs.

Specifically, use anonymous FTP to fermi.jhuapl.edu, cd to idl_emacs,
and you will find the files idl-shell.el and idl.el in that directory.

Or via the WEB:

ftp://fermi.jhuapl.edu/pub/idl_emacs

Chris

P.S. idl-shell.el is at version 1.20 and idl.el is at version 1.17.
--
===============================
Bldg 24-E188
The Applied Physics Laboratory
The Johns Hopkins University
Laurel, MD 20723-6099
(301)953-6000 x8529
chris.chase@jhuapl.edu
Re: Is there an emacs mode?? [message #4117 is a reply to message #4097] Wed, 03 May 1995 00:00 Go to previous messageGo to next message
Fergus Gallagher is currently offline  Fergus Gallagher
Messages: 41
Registered: January 1995
Member
anton@mola.gps.caltech.edu (Anton Ivanov) wrote:
> Yes, there is.
> It's located at ftp://fermi.jhuapl.edu/pub/idl .
> I'd say that you can find out many useful things there.
> Anton

I tried to find this - no luck. Are you sure it's there?

Fergus


=================================================
| Fergus Gallagher |
| Remote Sensing Applications Development Unit |
| British National Space Centre |
| Monks Wood |
| Huntingdon PE17 2LS / UK |
| |
| F.Gallagher@nerc.ac.uk |
| http://uh.nmt.ac.uk/bnsc/fgg.html |
=================================================
Re: Is there an emacs mode?? [message #4192 is a reply to message #4097] Fri, 05 May 1995 00:00 Go to previous message
davis is currently offline  davis
Messages: 15
Registered: March 1995
Junior Member
The latest version of JED (emacs-like editor) is now able to do color syntax
highlighting in its idl mode. It happens automatically when .pro files are
loaded. Below, I have appended `idl.sl' which sets up the syntax
highlighting. You can get the latest version of JED from
space.mit.edu:/pub/davis/jed. The latest version is 0.97-7.

----- idl.sl ------------
% idl mode color syntax highlighting. Requires 0.97-6 or later

create_syntax_table ("IDL");

define_syntax (";", "", '%', "IDL");
define_syntax ("([{", ")]}", '(', "IDL");
define_syntax ('"', '"', "IDL");
define_syntax ('\'', '\'', "IDL");
define_syntax ('\\', '\\', "IDL");
define_syntax ("0-9a-zA-Z_", 'w', "IDL"); % words
define_syntax ("-+0-9a-fA-F.xXL", '0', "IDL"); % Numbers
define_syntax (",.?:", ',', "IDL");
define_syntax ("%-+/&*=<>|!~^", '+', "IDL");
define_syntax ('@', '#', "IDL");

set_syntax_flags ("IDL", 1); % case insensitive

% These are IDL reserved words
() = define_keywords ("IDL", "doeqgegtifleltneofor", 2);
() = define_keywords ("IDL", "andendformodnotproxor", 3);
() = define_keywords ("IDL", "caseelsegotothen", 4);
() = define_keywords ("IDL", "beginendifuntilwhile", 5);
() = define_keywords ("IDL", "commonendforendrependwhirepeatreturn", 6);
() = define_keywords ("IDL", "endcaseendelse", 7);
() = define_keywords ("IDL", "endwhilefunctionon_error", 8);
() = define_keywords ("IDL", "ennrepeat", 9);
() = define_keywords ("IDL", "on_ioerror", 10);

define idl_mode ()
{
variable idl = "IDL";
setmode (idl, 0);
use_syntax_table (idl);
runhooks ("idl_mode_hook");
% This is called after the hook to give the hook a chance to load the
% abbrev table.
if (abbrev_table_p (idl)) use_abbrev_table (idl);
}
Re: Is there an emacs mode?? [message #4198 is a reply to message #4097] Fri, 05 May 1995 00:00 Go to previous message
chase is currently offline  chase
Messages: 62
Registered: May 1993
Member
>>>> > "Tim" == Tim Patterson <patterso@astrosun.tn.cornell.edu> writes:
In article <3o8atn$2qr@newsstand.cit.cornell.edu> patterso@astrosun.tn.cornell.edu (Tim Patterson) writes:


Tim> Does anybody also know of a "hilite" setup for IDL in Emacs - one
Tim> that will show my wonderful program in pretty colours?

Here are the hilit patterns used by idl.el:

(defvar idl-hilit-patterns
'(("\\s ;.*" nil comment)
("^;.*" nil comment)
("\"[^\\\"\\\n]*\"" nil string)
("'[^'\\\n]*'" nil string)
("\\< \\(and\\|begin\\|case\\|common\\|do\\|else\\|end\\|endcase\\ |endelse\\|endfor\\|endif\\|endrep\\|endwhile\\|eq\\|for\\|f unction\\|ge\\|goto\\|gt\\|if\\|le\\|lt\\|mod\\|ne\\|not\\|o f\\|on_ioerror\\|or\\|pro\\|repeat\\|return\\|then\\|until\\ |while\\|xor\\)\\ >" nil keyword)
)
"List of patterns and associated font faces for hilit.el.
See hilit19.el for documentation. ")

The following code sets the above patterns for idl-mode buffers:

(if (featurep 'hilit19)
(hilit-set-mode-patterns 'idl-mode idl-hilit-patterns nil t))

Change 'idl-mode in the above to whatever mode you use for editing IDL
".pro" files. You would probably place the above in your .emacs file.

Chris
--
===============================
Bldg 24-E188
The Applied Physics Laboratory
The Johns Hopkins University
Laurel, MD 20723-6099
(301)953-6000 x8529
chris.chase@jhuapl.edu
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: reversing calculation order
Next Topic: Q: Efficient Memory handling and deallocation

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:15:08 PDT 2025

Total time taken to generate the page: 0.00451 seconds