* CC Mode 5.30
@ 2003-06-19 13:42 Martin Stjernholm
2003-07-03 12:56 ` Martin Stjernholm
0 siblings, 1 reply; 9+ messages in thread
From: Martin Stjernholm @ 2003-06-19 13:42 UTC (permalink / raw)
Cc: bug-cc-mode
Hello, Emacs developers!
I now have a new version of CC Mode finished. It has extensive
changes, and some of them affect the interaction with other packages:
o CC Mode now contains the font lock support for its languages. This
means that the corresponding patterns in the core font-lock package
should be phased out. It also means that the font locking is
different in various details for most languages, since it's now
unified across all of them (except AWK).
o CC Mode provides AWK support written by Alan Mackenzie. The old
awk-mode.el should be removed. It was derived from CC Mode and no
longer works well with it.
o There has been internal changes which might break derived modes.
There is however a new variable system that is designed to make it
possible to write derived modes without getting too hard
dependencies on the internal workings of CC Mode.
See <http://cc-mode.sourceforge.net/changes-530.php> and
<http://cc-mode.sourceforge.net/changes-529.php> for all the details.
Needless to say, there'll be some things to clear up when this is
committed in the Emacs cvs. I'll do that, but it'll have to wait since
I'll be off net next week.
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CC Mode 5.30
2003-06-19 13:42 CC Mode 5.30 Martin Stjernholm
@ 2003-07-03 12:56 ` Martin Stjernholm
2003-07-03 21:19 ` Tak Ota
0 siblings, 1 reply; 9+ messages in thread
From: Martin Stjernholm @ 2003-07-03 12:56 UTC (permalink / raw)
Cc: bug-cc-mode
Martin Stjernholm <mast@lysator.liu.se> wrote:
> Needless to say, there'll be some things to clear up when this is
> committed in the Emacs cvs. /.../
Done, but I haven't yet cleaned up the old font lock patterns in
font-lock.el or the old AWK mode. Please add bug-cc-mode@gnu.org to
the recipient list for problems concerning C, C++, Objective-C, Java,
IDL, Pike and AWK modes.
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CC Mode 5.30
2003-07-03 12:56 ` Martin Stjernholm
@ 2003-07-03 21:19 ` Tak Ota
2003-07-03 21:57 ` Martin Stjernholm
0 siblings, 1 reply; 9+ messages in thread
From: Tak Ota @ 2003-07-03 21:19 UTC (permalink / raw)
Cc: emacs-devel
Thu, 03 Jul 2003 14:56:51 +0200: Martin Stjernholm <mast@lysator.liu.se> wrote:
> Martin Stjernholm <mast@lysator.liu.se> wrote:
>
> > Needless to say, there'll be some things to clear up when this is
> > committed in the Emacs cvs. /.../
>
> Done, but I haven't yet cleaned up the old font lock patterns in
> font-lock.el or the old AWK mode. Please add bug-cc-mode@gnu.org to
> the recipient list for problems concerning C, C++, Objective-C, Java,
> IDL, Pike and AWK modes.
After this change .c files now open in C++ mode.
-Tak
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CC Mode 5.30
2003-07-03 21:19 ` Tak Ota
@ 2003-07-03 21:57 ` Martin Stjernholm
2003-07-03 22:19 ` Tak Ota
0 siblings, 1 reply; 9+ messages in thread
From: Martin Stjernholm @ 2003-07-03 21:57 UTC (permalink / raw)
Cc: bug-cc-mode, emacs-devel
Tak Ota <Takaaki.Ota@am.sony.com> wrote:
>> Done, but I haven't yet cleaned up the old font lock patterns in
>> font-lock.el or the old AWK mode. Please add bug-cc-mode@gnu.org to
>> the recipient list for problems concerning C, C++, Objective-C, Java,
>> IDL, Pike and AWK modes.
>
> After this change .c files now open in C++ mode.
Sorry, but I fail to duplicate that.
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CC Mode 5.30
2003-07-03 21:57 ` Martin Stjernholm
@ 2003-07-03 22:19 ` Tak Ota
2003-07-04 12:14 ` Martin Stjernholm
0 siblings, 1 reply; 9+ messages in thread
From: Tak Ota @ 2003-07-03 22:19 UTC (permalink / raw)
Cc: emacs-devel
Thu, 03 Jul 2003 23:57:18 +0200: Martin Stjernholm <mast@lysator.liu.se> wrote:
> Tak Ota <Takaaki.Ota@am.sony.com> wrote:
>
> >> Done, but I haven't yet cleaned up the old font lock patterns in
> >> font-lock.el or the old AWK mode. Please add bug-cc-mode@gnu.org to
> >> the recipient list for problems concerning C, C++, Objective-C, Java,
> >> IDL, Pike and AWK modes.
> >
> > After this change .c files now open in C++ mode.
>
> Sorry, but I fail to duplicate that.
I made bootstrap from the head of 21.3.50 CVS. One possibility is the
problem is specific to my platform. I am building emacs with MSVC++
6.0 and running on windoze 2K. This system may fail to distinguish
".c" from ".C". Anyway, the one built from 6/30 CVS opens .c file in
c mode while 7/03 opens the same file in c++ mode here. Can someone
in similar environment verify this?
-Tak
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CC Mode 5.30
2003-07-03 22:19 ` Tak Ota
@ 2003-07-04 12:14 ` Martin Stjernholm
0 siblings, 0 replies; 9+ messages in thread
From: Martin Stjernholm @ 2003-07-04 12:14 UTC (permalink / raw)
Cc: bug-cc-mode, emacs-devel
Tak Ota <Takaaki.Ota@am.sony.com> wrote:
> /.../ One possibility is the problem is specific to my platform. I
> am building emacs with MSVC++ 6.0 and running on windoze 2K. This
> system may fail to distinguish ".c" from ".C". /.../
That's a possible cause. Could you please try to move the entry
("\\.\\(CC?\\|HH?\\)\\'" . c++-mode)
in auto-mode-alist to the bottom of it and see if it helps?
If it does, I'll rearrange the autoload directives so that ".c" is
tested before ".C".
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CC Mode 5.30
@ 2003-07-04 6:25 David Ponce
2003-07-04 11:05 ` Martin Stjernholm
0 siblings, 1 reply; 9+ messages in thread
From: David Ponce @ 2003-07-04 6:25 UTC (permalink / raw)
Hi,
Since that change Emacs fails to load generic-x with the following error:
Debugger entered--Lisp error: (void-variable c-emacs-features)
(memq (quote 8-bit) c-emacs-features)
(cond ((memq ... c-emacs-features) (modify-syntax-entry ...
(progn (defvar rul-generic-mode-syntax-table nil ...
(and (memq (quote rul-generic-mode) generic-extras-enable-list) ...
eval-buffer(#<buffer *load*> nil "generic-x" nil t)
;;; Reading at buffer position 37707
load-with-code-conversion("c:/opt/emacs/lisp/generic-x.el" "generic-x" nil t)
require(generic-x)
It seems that `c-emacs-features' was an auto-loaded definition in
previous version of cc-vars.el (1.29).
I tried to add an autoload cookie to `c-emacs-features' in cc-vars.el and
rebuilt loaddef.el, but then loadup fails on missing definition for
`c-mark-<-as-paren'.
Hope this helps.
David
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CC Mode 5.30
2003-07-04 6:25 David Ponce
@ 2003-07-04 11:05 ` Martin Stjernholm
0 siblings, 0 replies; 9+ messages in thread
From: Martin Stjernholm @ 2003-07-04 11:05 UTC (permalink / raw)
Cc: emacs-devel
David Ponce <david.ponce@wanadoo.fr> wrote:
> It seems that `c-emacs-features' was an auto-loaded definition in
> previous version of cc-vars.el (1.29).
True. That was removed since several functions in CC Mode now is used
to compute the value of that variable, so the initialization can't be
copied into loaddefs.el.
I've instead removed the dependency on c-emacs-features in
generic-x.el. It was only used to detect whether a syntax table should
be populated in the Emacs or the XEmacs way, which is obvious anyway
in this case.
If other packages use it (a grep-find through the Emacs tree didn't
reveal any), they have to do (require 'cc-vars) first.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CC Mode 5.30
@ 2003-07-05 10:18 David Ponce
0 siblings, 0 replies; 9+ messages in thread
From: David Ponce @ 2003-07-05 10:18 UTC (permalink / raw)
Cc: emacs-devel
Hi,
> > /.../ One possibility is the problem is specific to my platform. I
> > am building emacs with MSVC++ 6.0 and running on windoze 2K. This
> > system may fail to distinguish ".c" from ".C". /.../
>
> That's a possible cause. Could you please try to move the entry
>
> ("\\.\\(CC?\\|HH?\\)\\'" . c++-mode)
>
> in auto-mode-alist to the bottom of it and see if it helps?
>
> If it does, I'll rearrange the autoload directives so that ".c" is
> tested before ".C".
That is definitively the case, when system-type is windows-nt (or
cygwin), Emacs can't distinguish ".c" from ".C". Here is the relevant
code in function `set-auto-mode' in files.el, that set
`case-fold-search' before trying to `string-match' regexps in
`auto-mode-alist':
(let ((alist auto-mode-alist)
(mode nil))
;; Find first matching alist entry.
(let ((case-fold-search
(memq system-type '(vax-vms windows-nt cygwin))))
(while (and (not mode) alist)
(if (string-match (car (car alist)) name)
....
I use the following hack in my startup file, that fixes the problem:
(when (eq system-type 'windows-nt)
;; File system is case insensitive. Ensure that .C or .H will not
;; open in `c++-mode'. Reorder `auto-mode-alist' so `c-mode'
;; regexps will be matched before `c++-mode' ones.
(let* (aml cml)
(dolist (elt auto-mode-alist)
(if (eq 'c-mode (cdr elt))
(push elt cml)
(push elt aml)))
(setq auto-mode-alist (nreverse (nconc aml cml))))
)
Hope it helps.
Sincerely,
David
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2003-07-05 10:18 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-19 13:42 CC Mode 5.30 Martin Stjernholm
2003-07-03 12:56 ` Martin Stjernholm
2003-07-03 21:19 ` Tak Ota
2003-07-03 21:57 ` Martin Stjernholm
2003-07-03 22:19 ` Tak Ota
2003-07-04 12:14 ` Martin Stjernholm
-- strict thread matches above, loose matches on Subject: below --
2003-07-04 6:25 David Ponce
2003-07-04 11:05 ` Martin Stjernholm
2003-07-05 10:18 David Ponce
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.