Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error loading C mode

4 views
Skip to first unread message

Axel

unread,
Jul 29, 2005, 5:24:25 AM7/29/05
to
Hello, group!

After upgrading to the latest packages for XEmacs on Windows, I get the
following error when trying to open a C file:

File mode specification error: (void-function run-mode-hooks)

In my init.el file, I have (among other things):

(add-hook 'c-mode-hook 'turn-on-font-lock)

It is the same for C++ files.

What am I to do?

Kind regards, ------------ Axel <><

Alan Mackenzie

unread,
Jul 30, 2005, 7:54:34 AM7/30/05
to

> (add-hook 'c-mode-hook 'turn-on-font-lock)

Could you describe what your "upgrading" entails? What precise steps did
you take to transform the raw package into a "working" package on your
xemacs? [Please bear in mind I'm not familiar with the details of
XEmacs's packaging system.]

The reason I ask is that `run-mode-hooks' is a new function in the yet to
be released GNU Emacs 22.1. In the CC Mode source it appears in
essentially only one place, within the macro `c-run-mode-hooks'.

For almost every Emacs version, this macro should NOT expand to
`run-mode-hooks'. It looks like it did on your system. :-( However,
the macros in CC Mode can be a bit knifflig, since they attempt to bridge
incompatibilities between so many versions of XEmacs and GNU Emacs.

Alternatively, take a deep breath, copy the new files.el in CC Mode to
their own directory, and compile them from the command line in batch
mode, following the directions in the attached README file. (Hey, that
file IS in the Xemacs packaging of CC Mode isn't it?)

> Kind regards, ------------ Axel <><

--
Alan Mackenzie (Munich, Germany)
Email: aa...@muuc.dee; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").

Les Schaffer

unread,
Jul 30, 2005, 12:40:49 PM7/30/05
to
Axel wrote:

> Hello, group!
>
> After upgrading to the latest packages for XEmacs on Windows, I get the
> following error when trying to open a C file:
>
> File mode specification error: (void-function run-mode-hooks)

i was getting this too once i updated my packages the other day. i was using
the netinstaller version of xemacs, 21.4.13. i discovered that later xemacs
implemented the run-mode-hooks function (in subr.el), but installing the
newer subr.el by itself didnt help since xemacs loads (is that the word???)
this file on build.

soooooo.....

being slightly bored last evening i went ahead and built 21.4.17 from
scratch and now it runs fine. 21.4.13 is almost a couple years old.
probably time to have a windows binary updated.

i'd be happy to zip my new xemacs-21.4.17/i586-pc-win32 folder if someone
has room for it. i am currently web-pageless. it include compface, png,
tiff, jpeg, xpm, gif, and zlib support.

les schaffer

Axel

unread,
Aug 1, 2005, 2:55:43 AM8/1/05
to

Alan Mackenzie schrieb:

> Could you describe what your "upgrading" entails? What precise steps did
> you take to transform the raw package into a "working" package on your
> xemacs? [Please bear in mind I'm not familiar with the details of
> XEmacs's packaging system.]

On Windows, upgrading only means running the net installer. That
program discovers new packages, downloads and installs them. That way,
I received a CC mode 1.45. My XEmacs is the last one officially
available for Windows, 21.4.13, which may be too old to run the latest
CC mode (as was mentioned in another post). I don't like the thought of
building XEmacs myself (I only have a bare GCC on my machine and I
think there must be a number of additional prerequisites for building
XEmacs, like libraries and so on, although I haven't studied that). But
I have found a workaround: The last command in my init.el is now

(font-lock-mode)

That turns font-lock mode on in the buffer that is active at startup
time (scratch?), which is not very useful in itself. But its side
effect seems to be that automatically enabling font-lock mode when
loading C/C++ files now works. Well, I still get the error message, but
that doesn't prevent font-lock mode from being activated.

em0...@gmail.com

unread,
Aug 26, 2005, 3:05:00 PM8/26/05
to
I trying to build 2.4.17 for windows no luck. zlib is problem. Compiler
says "fatal error LNK1107: invalid or corrupt file: cannot read at
0x17AB0" when try to link zlib.lib. zlib.lib is by download
optional-libs.exe from xemacs site, it zlib-1.2.1. I downloading 3
times in case corruption. Is bad on server? I try for building zlib but
make other problem. Newer version zlib-1.2.2 not working either, api
changes.

How can you link with zlib? I use new microsoft compiler, do you?

Surendra Singhi

unread,
Aug 28, 2005, 9:11:53 PM8/28/05
to em0...@gmail.com
em0...@gmail.com writes:

> I trying to build 2.4.17 for windows no luck. zlib is problem. Compiler
>

> How can you link with zlib? I use new microsoft compiler, do you?

Why do you want to build 21.4.17 on windows? The binaries are available for
download. I don't see the point in doing this unless you have modified some
C code.

For downloading it go to:
http://www.xemacs.org/Download/index.html

HTH.
--
Surendra Singhi
http://www.public.asu.edu/~sksinghi/index.html

"All animals are equal, but some animals are more equal than others."
- Orwell, Animal Farm, 1945

Franz Haeuslschmid

unread,
Aug 29, 2005, 5:20:50 AM8/29/05
to
Surendra Singhi writes:

> em0...@gmail.com writes:
>
>> I trying to build 2.4.17 for windows no luck. zlib is problem. Compiler
>>
>> How can you link with zlib? I use new microsoft compiler, do you?
>
> Why do you want to build 21.4.17 on windows? The binaries are available for
> download. I don't see the point in doing this unless you have modified some
> C code.
>
> For downloading it go to:
> http://www.xemacs.org/Download/index.html

The Netinstaller only provides version 21.4.13 as XEmacs' latest
version. Take a look at the ftp site of xemacs.org:

<URL:ftp://ftp.xemacs.org/pub/xemacs/windows/win32/>

There are various versions of XEmacs, however the newest dates to
may 2003 and is the mentioned version of XEmacs.

At least, that is all I could find on the download site.

Franz.

em0...@gmail.com

unread,
Aug 29, 2005, 5:34:28 PM8/29/05
to
21.4.17 windows binaries not available. No 21.5.N binaries.
optional-libs.exe provides old zlib with security hole, and libs not
compatible with new ms compilers. All windows support very stale.
I give up every optional libs (except xpm) and can build 21.4.17.
But now crash with no stack when (require 'compile) so no compile
support.
I think windows xemacs dying already for 2 years.

Surendra Singhi

unread,
Aug 29, 2005, 11:13:16 PM8/29/05
to em0...@gmail.com
em0...@gmail.com writes:

> 21.4.17 windows binaries not available. No 21.5.N binaries.

I am using XEmacs 21.5.17b (Chayote) and I installed it from a windows
binary.

Read this page:
http://www.xemacs.org/Download/win32/

and you can download from this ftp site:

http://ftp.xemacs.org/pub/xemacs/binaries/win32/installshield/

> optional-libs.exe provides old zlib with security hole, and libs not
> compatible with new ms compilers. All windows support very stale.
> I give up every optional libs (except xpm) and can build 21.4.17.
> But now crash with no stack when (require 'compile) so no compile
> support.
> I think windows xemacs dying already for 2 years.

Whatever.

Henry S. Thompson

unread,
Aug 30, 2005, 5:32:53 AM8/30/05
to
I have successfully built XEmacs 21.4.17 from source under cygwin w/o X as
follows

> ./configure --without-x11 --pdump --with-modules=no
> make

ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: h...@inf.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]

Franz Haeuslschmid

unread,
Aug 30, 2005, 9:14:22 AM8/30/05
to
Note: your real name here would be very appreciated.

> I trying to build 2.4.17 for windows no luck. zlib is problem. Compiler
> says "fatal error LNK1107: invalid or corrupt file: cannot read at
> 0x17AB0" when try to link zlib.lib. zlib.lib is by download
> optional-libs.exe from xemacs site, it zlib-1.2.1.

I remembered the problems, when I tried to compile the latest
XEmacs version on my own:

,----
| D:\Src\optional-libs\zlib-1.2.3\zlib.lib : fatal error LNK1136: Ungültige oder beschädigte Datei
| NMAKE : fatal error U1077: 'cl': Rückgabe-Code '0x2'
| Stop.
`----

The non-english parts are german and describe the message that
you have gotten. I'm using the `Visual Studio .NET 2003' IDE,
`nmake' prints 7.10.3077 as its version. My approach to solving
this problem then was to download the sources of the optional
libraries and build them in my environment. This worked quite
well, you only will have to adapt the paths to each optional
library in `$XEMACS_SRC/nt/config.inc', where `XEMACS_SRC' points
to the root folder of XEmacs' source tree.

HTH,
Franz.

Franz Haeuslschmid

unread,
Aug 30, 2005, 9:27:37 AM8/30/05
to
> 21.4.17 windows binaries not available. No 21.5.N binaries.
> optional-libs.exe provides old zlib with security hole, and libs not
> compatible with new ms compilers.


The archive `optional-libs.exe'[1] indeed contains the flawed
version of zlib. Also does the web site for optional
libraries[2] refer to the outdated version of zlib. Will it be
possible to update this references on the web? Is XEmacs itself
affected as well (at least the edition for MS-Windows)?

Franz.

Footnotes:
[1] available at
<URL:http://www.xemacs.org/Download/win32/optional-libs.exe>

[2] see <URL:http://www.xemacs.org/Download/optLibs.html>

0 new messages