all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 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-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-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.