bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18970: 24.3; indent region fails in C++ mode after adding a #include


From: Piotr Sipika
Subject: bug#18970: 24.3; indent region fails in C++ mode after adding a #include
Date: Fri, 07 Nov 2014 21:27:15 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

> To confirm that your problem is the same one, would you please do the
> following:
> (i) Kill a line starting with "#include" with C-k, then yank it back
> again with C-y.
> (ii) Move point to the beginning of that line and type C-u C-x =
> (`what-cursor-position' with a C-u prefix argument).
> (iii) You should see something like this:
Awesome directions, here's the output from my instance of that command:

             position: 110 of 3316 (3%), column: 0
            character: # (displayed as #) (codepoint 35, #o43, #x23)
    preferred charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x23
               syntax: .        which means: punctuation
             category: .:Base, a:ASCII, l:Latin, r:Roman
             to input: type "C-x 8 RET HEX-CODEPOINT" or "C-x 8 RET NAME"
          buffer code: #x23
            file code: #x23 (encoded by coding system undecided-unix)
              display: by this font (glyph code)
    xft:-unknown-Liberation
Mono-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1 (#x06)

Character code properties: customize what to show
  name: NUMBER SIGN
  general-category: Po (Punctuation, Other)
  decomposition: (35) ('#')

There are text properties here:
  c-in-sws             t
  c-is-sws             t
  category             c-cpp-delimiter
  face                 font-lock-preprocessor-face
  fontified            t
  risky-local-variable t
  syntax-table         nil

> If you see the syntax-table text property set to nil, as in the above,
> then we have found the bug.
As you can see that is the exact output indicating the bug.

> Either upgrade your Emacs to version 24.4, or apply the following patch
> to ..../emacs-24.3/lisp/progmodes/cc-mode.el:
Thank you for the patch and further directions/suggestions.

> Restart Emacs, and hopefully the bug will be gone.  Please let me know
> whether or not this works.
Will do.

Best!
Piotr






reply via email to

[Prev in Thread] Current Thread [Next in Thread]