unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5350: 23.1.91; error in c++-mode highlighting/indentation
@ 2010-01-10 14:18 Jose Antonio Ortega Ruiz
  2010-01-20 13:03 ` Alan Mackenzie
       [not found] ` <20100120130359.GC2573@muc.de>
  0 siblings, 2 replies; 3+ messages in thread
From: Jose Antonio Ortega Ruiz @ 2010-01-10 14:18 UTC (permalink / raw)
  To: emacs-pretest-bug; +Cc: rfrancoise


Hi, this is a bugs somewhere in c-mode syntactic analyser (or so it
seems). It happens to me in several circumstances; below i describe a
simple instance for a C++ file (i've seen it happening also in pure C
files).

1) Start emacs with -nw and -Q
2) Create a new C++ file, say test.cpp
3) Insert the following text:

/* Copyright (C) 2009, 2100 Foo Industries */

#include <libPlasma/c++/Pool.h>

4) When pressing the closing '>' an error occurs with the following
backtrace:

Debugger entered--Lisp error: (args-out-of-range 79 80)
  put-text-property(79 80 category c-cpp-delimiter)
  byte-code("\306 \x18\307\211\x19\x1a\307^[\310\211\x1c\x1d\310\211\x1e
\x1e\x0e\310\x1e\x0f\311\216\x0e\x10\x1e\x11\312\x0e\x11\211T\313\314$\210)\x0e\x12\x1e\x11\312\x0e\x11\211T\313\314$\210.\v\310\207" [modified buffer-undo-list inhibit-read-only inhibit-point-motion-hooks before-change-functions after-change-functions buffer-modified-p t nil ((byte-code "\b\204

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

* bug#5350: 23.1.91; error in c++-mode highlighting/indentation
  2010-01-10 14:18 bug#5350: 23.1.91; error in c++-mode highlighting/indentation Jose Antonio Ortega Ruiz
@ 2010-01-20 13:03 ` Alan Mackenzie
       [not found] ` <20100120130359.GC2573@muc.de>
  1 sibling, 0 replies; 3+ messages in thread
From: Alan Mackenzie @ 2010-01-20 13:03 UTC (permalink / raw)
  To: Jose Antonio Ortega Ruiz, 5350; +Cc: emacs-devel

Hi, Jose,

On Sun, Jan 10, 2010 at 03:18:27PM +0100, Jose Antonio Ortega Ruiz wrote:

> Hi, this is a bugs somewhere in c-mode syntactic analyser (or so it
> seems). It happens to me in several circumstances; below i describe a
> simple instance for a C++ file (i've seen it happening also in pure C
> files).

> 1) Start emacs with -nw and -Q
> 2) Create a new C++ file, say test.cpp
> 3) Insert the following text:

> /* Copyright (C) 2009, 2100 Foo Industries */
>
> #include <libPlasma/c++/Pool.h>

> 4) When pressing the closing '>' an error occurs with the following
> backtrace:

I've just committed a patch which I think fixes this.  Either update your
bzr version of Emacs, or apply the following patch (and then byte-compile
cc-langs.el, cc-engine.el, and cc-mode.el):


*** cc-defs.el~	2010-01-19 13:24:48.000000000 +0000
--- cc-defs.el	2010-01-19 17:23:44.000000000 +0000
***************
*** 1217,1228 ****
    ;; This macro does a hidden buffer change.
    `(progn
       (c-put-char-property ,beg 'category 'c-cpp-delimiter)
!      (c-put-char-property ,end 'category 'c-cpp-delimiter)))
  (defmacro c-clear-cpp-delimiters (beg end)
    ;; This macro does a hidden buffer change.
    `(progn
       (c-clear-char-property ,beg 'category)
!      (c-clear-char-property ,end 'category)))
  
  (defsubst c-comment-out-cpps ()
    ;; Render all preprocessor constructs syntactically commented out.
--- 1217,1230 ----
    ;; This macro does a hidden buffer change.
    `(progn
       (c-put-char-property ,beg 'category 'c-cpp-delimiter)
!      (if (< ,end (point-max))
! 	 (c-put-char-property ,end 'category 'c-cpp-delimiter))))
  (defmacro c-clear-cpp-delimiters (beg end)
    ;; This macro does a hidden buffer change.
    `(progn
       (c-clear-char-property ,beg 'category)
!      (if (< ,end (point-max))
! 	 (c-clear-char-property ,end 'category))))
  
  (defsubst c-comment-out-cpps ()
    ;; Render all preprocessor constructs syntactically commented out.


-- 
Alan Mackenzie (Nuremberg, Germany).






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

* bug#5350: 23.1.91; error in c++-mode highlighting/indentation
       [not found] ` <20100120130359.GC2573@muc.de>
@ 2010-01-20 15:24   ` Chong Yidong
  0 siblings, 0 replies; 3+ messages in thread
From: Chong Yidong @ 2010-01-20 15:24 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: 5350, Jose Antonio Ortega Ruiz, emacs-devel

Alan Mackenzie <acm@muc.de> writes:

> I've just committed a patch which I think fixes this.  Either update your
> bzr version of Emacs, or apply the following patch (and then byte-compile
> cc-langs.el, cc-engine.el, and cc-mode.el):

Yes, the bug seems to be fixed now.  Thanks!






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

end of thread, other threads:[~2010-01-20 15:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-10 14:18 bug#5350: 23.1.91; error in c++-mode highlighting/indentation Jose Antonio Ortega Ruiz
2010-01-20 13:03 ` Alan Mackenzie
     [not found] ` <20100120130359.GC2573@muc.de>
2010-01-20 15:24   ` Chong Yidong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).