From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#10357: 24.0.92; etags misses C tags due to brackets Date: Sat, 24 Dec 2011 11:08:07 +0200 Message-ID: <83mxaixrpk.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1324717737 15933 80.91.229.12 (24 Dec 2011 09:08:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 24 Dec 2011 09:08:57 +0000 (UTC) To: 10357@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 24 10:08:53 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ReNb2-0003J3-Rc for geb-bug-gnu-emacs@m.gmane.org; Sat, 24 Dec 2011 10:08:53 +0100 Original-Received: from localhost ([::1]:56729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ReNb2-0006tB-5Q for geb-bug-gnu-emacs@m.gmane.org; Sat, 24 Dec 2011 04:08:52 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:59946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ReNax-0006t3-ET for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2011 04:08:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ReNas-0002QK-Kd for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2011 04:08:47 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50517) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ReNas-0002QC-GY for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2011 04:08:42 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1ReNd8-000344-4o for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2011 04:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Dec 2011 09:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10357 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.132471783811747 (code B ref -1); Sat, 24 Dec 2011 09:11:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Dec 2011 09:10:38 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ReNcj-00033Q-Ou for submit@debbugs.gnu.org; Sat, 24 Dec 2011 04:10:38 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ReNcg-00033H-HH for submit@debbugs.gnu.org; Sat, 24 Dec 2011 04:10:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ReNaO-00027F-4i for submit@debbugs.gnu.org; Sat, 24 Dec 2011 04:08:13 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:41170) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ReNaN-000276-W1 for submit@debbugs.gnu.org; Sat, 24 Dec 2011 04:08:12 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:59842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ReNaM-0006sp-5y for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2011 04:08:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ReNaK-00026F-Mo for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2011 04:08:10 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:53981) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ReNaK-000262-8m; Sat, 24 Dec 2011 04:08:08 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LWP00700ANYVA00@a-mtaout22.012.net.il>; Sat, 24 Dec 2011 11:08:06 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.127.84.173]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LWP0049HAPHZZC1@a-mtaout22.012.net.il>; Sat, 24 Dec 2011 11:08:06 +0200 (IST) X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 24 Dec 2011 04:11:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:55148 Archived-At: cd src ../lib-src/etags xdisp.c -o xdisp.TAGS Then look at xdisp.TAGS and you will see many functions missing from the tags table. Specifically, all the functions between lines 9097 and 21242 are not tagged. Here's the relevant excerpt from the tags table: in_display_vector_p ^?9025,284143 add_to_log ^?9042,284592 message_log_maybe_newline ^?9079,285427 message_dolog ^?9096,285971 display_count_lines ^?21243,659558 display_string ^?21385,663522 Note the gap between line number 9096 and 21243. This misses a large number of functions that are actually present in xdisp.c. What causes that is this fragment from message_dolog: char dupstr[sizeof " [ times]" + INT_STRLEN_BOUND (printmax_t)]; If you remove it, the problem goes away. Looking at the code in etags.c:C_entries, I think that the problem might be here: else if (bracketlev > 0) { switch (c) { case ']': if (--bracketlev > 0) continue; break; case '\0': CNL_SAVE_DEFINEDEF (); break; } continue; } This seems to ignore everything except ']' inside brackets [], but it does not pay attention to strings, comments, 'c' character constants etc. that can happen inside brackets, and which can also include bracket characters. In GNU Emacs 24.0.92.1 (i386-mingw-nt5.1.2600) of 2011-12-02 on HOME-C4E4A596F7 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4)' 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: ENU value of $XMODIFIERS: nil locale-coding-system: cp1255 default enable-multibyte-characters: t Major mode: Mail Minor modes in effect: shell-dirtrack-mode: t auto-fill-function: mail-mode-auto-fill flyspell-mode: t diff-auto-refine-mode: t desktop-save-mode: t show-paren-mode: t display-time-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 blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t temp-buffer-resize-mode: t line-number-mode: t abbrev-mode: t Recent input: C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-x b C-SPC C-u 2 1 2 4 3 C-x g C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-x C-x C-x b M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z C-r C-w C-r C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-x C-x C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z M-x r e p C-g M-x r e p o r t - e m Recent messages: Saving file d:/gnu/bzr/emacs/trunk/src/xdisp.c... Wrote d:/gnu/bzr/emacs/trunk/src/xdisp.c Undo! Saving file d:/gnu/bzr/emacs/trunk/src/xdisp.c... Wrote d:/gnu/bzr/emacs/trunk/src/xdisp.c Undo! Saving file d:/gnu/bzr/emacs/trunk/src/xdisp.c... Wrote d:/gnu/bzr/emacs/trunk/src/xdisp.c Mark set [4 times] Mark saved where search started Quit Load-path shadows: None found. Features: (shadow emacsbug ind-util shell thingatpt add-log texinfo iso-transl tar-mode etags mule-util ebuff-menu electric cus-start cus-load quail help-mode view network-stream starttls tls smtpmail auth-source eieio assoc gnus-util password-cache dabbrev mailalias sendmail multi-isearch rmailout ld-script sh-script executable dired-x dired tcl parse-time nxml-uchnm rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok sgml-mode arc-mode archive-mode generic conf-mode newcomment org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html org-exp ob-exp org-exp-blocks org-agenda org-info org-gnus org-docview org-bibtex bibtex org-bbdb org byte-opt warnings bytecomp byte-compile cconv macroexp advice help-fns advice-preload ob-emacs-lisp ob-tangle ob-ref ob-lob ob-table org-footnote org-src ob-comint ob-keys ob ob-eval org-pcomplete pcomplete comint ring org-list org-faces org-compat org-entities org-macs cal-menu calendar cal-loaddefs jka-compr vc-cvs flyspell ispell noutline outline make-mode diff-mode easy-mmode autorevert info vc-bzr cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt qp rmailsum rmailmm message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader mail-parse rfc2231 rmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils desktop server filecache saveplace midnight generic-x paren battery time time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 disp-table ls-lisp w32-win w32-vars 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 multi-tty emacs)