all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* cc-mode in emacs 23.2 goes into infinte loop
@ 2011-01-22 22:41 jdiamond
  2011-01-23  9:54 ` rusi
  0 siblings, 1 reply; 7+ messages in thread
From: jdiamond @ 2011-01-22 22:41 UTC (permalink / raw)
  To: help-gnu-emacs

I have the following file (which is actually my real mode file with
almost everything removed):

----------------- zsd-c-mode.el -------------------
(require 'cc-mode)

(eval-and-compile
   (c-add-language 'zsd-c-mode 'c-mode))

(defvar zsd-c-mode-syntax-table nil
    "Syntax table in use in zsd-c-mode buffers."
)

(defun
    zsd-c-mode ()
    "Major mode for editing C source code.
    Based loosely upon the Unipress Emacs electric-c mode."
    (interactive)
    (c-init-language-vars zsd-c-mode)
    (c-common-init 'zsd-c-mode)
    (setq zsd-c-font-lock-keywords-3 nil)
)
---------------------------------------------------

If I start up emacs 23.2 with
	emacs -Q qqq.q
and them
	M-x load-file RET ~/emacs/zsd-c-mode.el
and then
	M-x zsd-c-mode RET
and then in the buffer I type
	#define as(
when I hit the '(' emacs goes into an (apparently) infinite loop.
(The '(' does not actually appear in the buffer until I hit ^G.)

Tracking it down (a bit), I see that in cc-mode c-neutralize-CPP-line
is not doing The Right Thing any more.  Specifically,
	(c-put-char-property (nth 1 s) 'syntax-table '(1))
is not changing anything in the result of the following call to
	(parse-partial-sexp beg end -1)
and so c-neutralize-CPP-line loops.

Before I file this as a bug, are there any cc-mode experts here who
can comment on whether I am committing some grievous sin with the code
above?  (This worked in earlier versions of emacs, but perhaps the
above has suffered from bit rot by changes to emacs.)

Thanks.
				Jim


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-01-23 19:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-22 22:41 cc-mode in emacs 23.2 goes into infinte loop jdiamond
2011-01-23  9:54 ` rusi
2011-01-23 14:05   ` foo-font-lock-keywords (was Re: cc-mode in emacs 23.2 goes into infinte loop) Jorgen Grahn
2011-01-23 16:49     ` rusi
2011-01-23 19:22       ` Jim Diamond
2011-01-23 16:47   ` cc-mode in emacs 23.2 goes into infinte loop Jim Diamond
2011-01-23 17:57     ` rusi

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.