help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: configuring emacs as a programmer's editor


From: Tim X
Subject: Re: configuring emacs as a programmer's editor
Date: Sun, 02 Jul 2006 18:32:42 +1000
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

"B. T. Raven" <ecinmn@alcisp.com> writes:

> "Ted" <r.ted.byers@rogers.com> wrote in message
> news:1151684092.236583.270470@b68g2000cwa.googlegroups.com...
>>
>> Le Wang wrote:
>> > Ted wrote:
>> > `mode-compile' is missing.  You then do a web search and find that
> it's
>> > available here:  "http://www.tls.cena.fr/~boubaker/Emacs/";.  You
> follow
>>
>> Thanks all.  I found, with a little experimenting, that I didn't need
>> much of what I thought I needed.
>>
>> I am using version 21.3 of emacs, if that matters.
>>
>> I didn't find mode-compile.el on my system, and so I downloaded it from
>> the site you cite above.  I tried to byte compile within emacs, as
>> instructed, but no mode-compile.elc is made.  The output I get is:
>>
>> Compiling file c:/emacs-21.3/mode-compile.el at Fri Jun 30 11:54:37
>> 2006
>>   !! End of file during parsing
>>
>> This looks like an error message, but it doesn't make sense given that
>> the last line in the file is:
>>
>> ;;; mode-compile.el ends here
>>
>> This tells me that the file I'm working with has not been truncated.
>>
>> Why does byte-compiling this file fail?  Is the file on the above site
>> defective?  Is the file available elsewhere?
>>

That error message often means there is a missing close ) somewhere.

>>
>
> I removed 21 ^L's from the source and the byte-compilation went to
> completion with the following warnings:
>
Thats very odd - it is common to have ^L in elisp source files as
these are often used as page breaks and provide a convenient way to
jump around by "pages". 


> Compiling file d:/EMACS/emacs-21.3/site-lisp/mc.el at Sat Jul 01 22:39:21
> 2006

I notice that not only is this a different path (drive) to the
previous one you were using, it is also a completely different
filename (mc.el rather than mode-compile.el). 

>   ** reference to free variable efs-remote-shell-file-name
>   ** `(fboundp (quote eval-when-compile))' called for effect
>   ** `(fboundp (quote eval-when-compile))' called for effect
>   ** The following functions are not known to be defined: console-type,
>     device-type, mc--compile-sav, mc--frame-live-p, mc--select-frame,
>     mc--make-frame, mc--make-frame-visible, mc--raise-frame,
>     byte-compile-buffer, locate-file, mc--member, efs-ftp-path,
>     mc--run-hooks
>
>

The above are not errors, but warnings. The "reference to free
variable" means there is a (setq something ....) where there has been
no (defvar something). It is possible the defvar is done in a related
mode which at the time of compilation had not been loaded. The
warnings regarding functions not known to be defined may also be
nothing to worry about. It is just warning you that when the file was
being compiled, there was no visible definition for these functions,
which again may just indicate they have not yet been loaded (though
some of them do look a bit suspect). 

> The front matter of the .el looks like this:
>
> ;;   Last modified: 2003/04/01 13:52:47
> ;;   Version: 2.28
> ;;   Keywords: compile, compilation, modes, languages
> ;;   Tested for:
> ;;     XEmacs (Lucid GNU Emacs) >= 19.10
> ;;     Must work with FSF GNU Emacs > 19.31 ;-)
>
>
> Maybe the smiley face has a tongue in cheek.
>
Well, it is winking!

Most of the time, you do not have to compile a *.el file to use it.
this is normally only done to improve performance. So, before trying
to compile the file, see ifyou can successfully load it and use it.
then, once you know its working, worry about getting it to compile.
Note you will need to remove the .elc version if it is there. Also
note that if you have renamed the file to mc.el, you can get into
trouble with loading it - the (require 'mode-compile) directive looks
for a file called mode-compile.elc or mode-compile.el. If you rename
the file, emacs won't find it.

I suspect from rading this thread and the way you are operating, you
are attempting to find quick and easy short cuts to get to where you
want to be without having to put time into learning more about emacs.
I can understand this - after all, its a tool you want to use.
However, you are also trying to setup emacs as an experts tool rather
than getting to know how it works "out of the box" and I suspect ou
will actually spend more time chasing your tail than if you put aside
the time to read the manuals. I do understand this approach and for
many systems, it can be quite fruitful - but not for Emacs.

There are no real short-cuts here. Emacs is extremely powerful and
there are thousands of customizations and add-ons out there ranging
from amazingly powerful to unbelievably badly implemented and broken.
You need at least a basic familiarity in order to identify the crap
from the gold. One of the great things about elisp is that its syntax
is extremely easy and it doesn't take long to understand what is going
on - lisp is really easy to learn, but quite difficult to master. The
good news is you don't need to master it to use it to great benefit. 

>From memory, you wanted to work with emacs under both Linux and
Windows. I would recommend getting the Linux/Unix environment sorted
first. This is probably Emacs' more 'native' platform and getting
things working correctly there first will avoid you spending hours and
hours tyring to fix something only to find out that the code you have
doesn't work under windows. 

-- 
tcross (at) rapttech dot com dot au


reply via email to

[Prev in Thread] Current Thread [Next in Thread]