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

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

[debbugs-tracker] bug#9560: closed (24.0.50; c-mode syntax problems)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#9560: closed (24.0.50; c-mode syntax problems)
Date: Sat, 22 Oct 2011 11:33:02 +0000

Your message dated Sat, 22 Oct 2011 11:26:47 +0000
with message-id <address@hidden>
and subject line Bug #9560 fixed
has caused the debbugs.gnu.org bug report #9560,
regarding 24.0.50; c-mode syntax problems
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
9560: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9560
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.0.50; c-mode syntax problems Date: Tue, 20 Sep 2011 11:25:08 -0400 User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)
I really wish I could give an exact recipe for this, but this particular
failure is extremely transient.  I can leave an emacs open in an bad
state for postmortem diagnosis, but I cannot predict when or under what
conditions this problem and ones similar to it will happen.

In this particular case, I am editing an immediate struct at top level.
For example:

static const sk_stringmap_entry_t field_map_entries[] = {
    {"class",    RWST_CLASS,     "class name",    NULL},
    {"type",     RWST_TYPE,      "type name",     NULL},
    {"flowtype", RWST_FLOWTYPE,  "flowtype name", NULL},
    {"id-flowtype", RWST_FLOWTYPE_ID, "flowtype integer identifier", NULL},
    {"sensor", RWST_SENSOR, "sensor name", NULL},
    {"id-sensor", RWST_SENSOR_ID, "sensor integer identifier", NULL},
    {"describe-sensor", RWST_SENSOR_DESC, "sensor description", NULL},
    {"default-class", RWST_DEFAULT_CLASS, "default class name", NULL},
    {"default-type", RWST_DEFAULT_TYPE, "default type name", NULL},
    {"mark-defaults", RWST_MARK_DEFAULTS, 
     "'+' for default classes, '*' for types", NULL},
    {"class:list", RWST_CLASS_LIST, "list of class names", NULL},
    {"type:list",     RWST_TYPE_LIST,      "list of type names",     NULL},
    {"flowtype:list", RWST_FLOWTYPE_LIST,  "list of flowtype names", NULL},
    {"id-flowtype:list", RWST_FLOWTYPE_ID_LIST,
     "list of flowtype integer identifier", NULL},
    {"sensor:list", RWST_SENSOR, "list of sensor names", NULL},
    {"id-sensor:list", RWST_SENSOR_ID, 
     "list of sensor integer identifier", NULL},
    {"default-class:list", RWST_DEFAULT_CLASS_LIST, 
     "list of default class name", NULL},
    {"default-type:list", RWST_DEFAULT_TYPE_LIST,
            "list of default type name", NULL},
};

Note the indentation of that next-to-last line.  That's because the
syntax thinks it is ((statement-block-intro 4740) (statement-cont
4740)), indent: 12.  It thinks the line above it is ((defun-open 4740)),
indent: 4.  But if I cursor up a few lines before hitting TAB, I get
((brace-list-entry 4557)), indent: 5, and tabbing down from there fixes
the problem.  This has happened to me three times while adding entries
to this struct.  I will include the entire file as I am editing it in
this bug report, in case someone can recreate it by emptying the struct
and typing the stuff in again.

This sort of problem happens to me relatively frequently when editing C
files, on the order of 1-10 times a day.  Usually saving and reloading
the file fixes the problem.  Sometimes reindenting the section does.  If
there is any in-situ debugging I can do when this happens again, please
let me know.

auto-fill-mode (setq
 c-basic-offset 4
 c-comment-only-line-offset '(0 . 0)
 c-indent-comment-alist '((anchored-comment column . 0) (end-block space . 1)
                          (cpp-end-block space . 2))
 c-indent-comments-syntactically-p nil
 c-block-comment-prefix "* "
 c-comment-prefix-regexp '((pike-mode . "//+!?\\|\\**") (awk-mode . "#+")
                           (other . "//+\\|\\**"))
 c-doc-comment-style '((java-mode . javadoc) (pike-mode . autodoc)
                       (c-mode . gtkdoc))
 c-cleanup-list '(scope-operator)
 c-hanging-braces-alist '((substatement-open before after)
                          (arglist-cont-nonempty))
 c-hanging-colons-alist nil
 c-hanging-semi&comma-criteria '(c-semi&comma-inside-parenlist)
 c-backslash-column 48
 c-backslash-max-column 72
 c-special-indent-hook '(c-gnu-impose-minimum)
 c-label-minimum-indentation 1
 c-offsets-alist '((inexpr-class . +)
                   (inexpr-statement . +)
                   (lambda-intro-cont . +)
                   (inlambda . c-lineup-inexpr-block)
                   (template-args-cont c-lineup-template-args +)
                   (incomposition . +)
                   (inmodule . +)
                   (innamespace . +)
                   (inextern-lang . +)
                   (composition-close . 0)
                   (module-close . 0)
                   (namespace-close . 0)
                   (extern-lang-close . 0)
                   (composition-open . 0)
                   (module-open . 0)
                   (namespace-open . 0)
                   (extern-lang-open . 0)
                   (objc-method-call-cont
                    c-lineup-ObjC-method-call-colons
                    c-lineup-ObjC-method-call
                    +
                    )
                   (objc-method-args-cont . c-lineup-ObjC-method-args)
                   (objc-method-intro . [0])
                   (friend . 0)
                   (cpp-define-intro c-lineup-cpp-define +)
                   (cpp-macro-cont . +)
                   (cpp-macro . [0])
                   (inclass . +)
                   (stream-op . c-lineup-streamop)
                   (arglist-cont-nonempty
                    c-lineup-gcc-asm-reg
                    c-lineup-arglist
                    )
                   (arglist-cont c-lineup-gcc-asm-reg 0)
                   (comment-intro
                    c-lineup-knr-region-comment
                    c-lineup-comment
                    )
                   (catch-clause . 0)
                   (else-clause . 0)
                   (do-while-closure . 0)
                   (access-label . -)
                   (case-label . *)
                   (substatement . +)
                   (statement-case-intro . *)
                   (statement . 0)
                   (brace-entry-open . 0)
                   (brace-list-entry . 0)
                   (brace-list-intro . +)
                   (brace-list-close . 0)
                   (block-close . 0)
                   (block-open . 0)
                   (inher-cont . c-lineup-multi-inher)
                   (inher-intro . +)
                   (member-init-cont . c-lineup-multi-inher)
                   (member-init-intro . +)
                   (annotation-var-cont . +)
                   (annotation-top-cont . 0)
                   (topmost-intro . 0)
                   (knr-argdecl . 0)
                   (func-decl-cont . +)
                   (inline-close . 0)
                   (class-close . 0)
                   (class-open . 0)
                   (defun-block-intro . +)
                   (defun-close . 0)
                   (defun-open . 0)
                   (c . c-lineup-C-comments)
                   (string . c-lineup-dont-change)
                   (topmost-intro-cont
                    first
                    c-lineup-topmost-intro-cont
                    c-lineup-gnu-DEFUN-intro-cont
                    )
                   (brace-list-open . +)
                   (inline-open . 0)
                   (arglist-close . c-lineup-arglist)
                   (arglist-intro . +)
                   (statement-cont . c-lineup-math)
                   (statement-case-open . *)
                   (label . *)
                   (substatement-label . 0)
                   (substatement-open . 0)
                   (knr-argdecl-intro . 5)
                   (statement-block-intro . +)
                   )
 c-buffer-is-cc-mode 'c-mode
 c-tab-always-indent t
 c-syntactic-indentation t
 c-syntactic-indentation-in-macros t
 c-ignore-auto-fill '(string cpp code)
 c-auto-align-backslashes t
 c-backspace-function 'backward-delete-char-untabify
 c-delete-function 'delete-char
 c-electric-pound-behavior nil
 c-default-style '((java-mode . "java") (awk-mode . "awk") (other . "gnu"))
 c-enable-xemacs-performance-kludge-p nil
 c-old-style-variable-behavior nil
 defun-prompt-regexp nil
 tab-width 8
 comment-column 32
 parse-sexp-ignore-comments t
 parse-sexp-lookup-properties t
 auto-fill-function nil
 comment-multi-line t
 comment-start-skip "\\(//+\\|/\\*+\\)\\s *"
 fill-prefix nil
 fill-column 70
 paragraph-start "[     ]*\\(//+\\|\\**\\)[     ]*$\\|^\f"
 adaptive-fill-mode t
 adaptive-fill-regexp "[        ]*\\(//+\\|\\**\\)[     ]*\\([  
]*\\([-–!|#%;>*·•‣⁃◦]+[         ]*\\)*\\)"
 )

Package: CC Mode 5.31.8 (C/l)
Buffer Style: gnu
c-emacs-features: (pps-extended-state col-0-paren posix-char-classes 
gen-string-delim gen-comment-delim syntax-properties 1-bit)

In GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.10.4)
 of 2011-09-19 on waterbuck.yellow.cert.org
Windowing system distributor `The X.Org Foundation', version 11.0.70101000
configured using `configure  '--prefix=/home/mwd' 
'--without-toolkit-scroll-bars' '--with-gif=no''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: C/l

Minor modes in effect:
  flyspell-mode: t
  shell-dirtrack-mode: t
  display-time-mode: t
  diff-auto-refine-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  abbrev-mode: t

Recent messages:
Reading active file via nndraft...done
Checking new news...done
Don't touch it!  It's the History Eraser Button, you fool!
syntax: ((brace-list-entry 4646)), indent: 5
syntax: ((statement-block-intro 4740) (statement-cont 4740)), indent: 12
Don't touch it!  It's the History Eraser Button, you fool!
Type C-x 1 to remove help window.  
Type "q" in help window to restore its previous buffer.
Auto-saving...
syntax: ((statement-block-intro 4740) (statement-cont 4740)), indent: 12

Features:
(shadow emacsbug apropos align time-stamp tabify whitespace dabbrev
help-mode view vc-svn cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs browse-url mule-util
mailalias copyright cus-edit cus-start cus-load sendmail flyspell ispell
sort ansi-color gnus-cite mail-extr qp gnus-async gnus-bcklg gnus-ml
gnus-topic nndraft nnmh utf-7 rot13 disp-table epa-file epa derived epg
network-stream starttls nnimap parse-time tls utf7 netrc gnus-agent
gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu
mml2015 epg-config mm-view mml-smime mailcap gnus-cache edmacro kmacro
nnir gnus-sum gnus-demon nntp gnus-group gnus-undo nnmail mail-source
nnoo gnutls gnus-start gnus-spec gnus-int gnus-range gnus-win gnus-load
woman man uniquify warnings tramp tramp-compat auth-source eieio
byte-opt bytecomp byte-compile cconv macroexp assoc shell pcomplete
tramp-loaddefs time smime password-cache dig comint server psvn advice
help-fns advice-preload cl log-edit ring pcvs-util add-log diff-mode
easy-mmode pgg pgg-parse pgg-def message format-spec rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev gmm-utils mailheader gnus gnus-ems nnheader
gnus-util time-date mail-utils mm-util mail-prsvr wid-edit generic-x
dired-x easymenu dired regexp-opt tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)

-- 
Michael Welsh Duggan
(address@hidden)



--- End Message ---
--- Begin Message --- Subject: Bug #9560 fixed Date: Sat, 22 Oct 2011 11:26:47 +0000 User-agent: Mutt/1.5.21 (2010-09-15)
Bug fixed.

-- 
Alan Mackenzie (Nuremberg, Germany).


--- End Message ---

reply via email to

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