From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jonathan Marchand Newsgroups: gmane.emacs.bugs Subject: bug#6231: 23.2; ede-cpp-root-projects spp table is not taken into account by semantic in cedet Date: Thu, 20 May 2010 16:03:30 +0200 Message-ID: <20100520140330.GD13702@loria.fr> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jCrbxBqMcLqd4mOl" X-Trace: dough.gmane.org 1274390665 5042 80.91.229.12 (20 May 2010 21:24:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 20 May 2010 21:24:25 +0000 (UTC) To: 6231@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 20 23:24:23 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OFDE6-0008Ka-VD for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 May 2010 23:24:23 +0200 Original-Received: from localhost ([127.0.0.1]:55542 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFDE5-0005VE-SR for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 May 2010 17:24:21 -0400 Original-Received: from [140.186.70.92] (port=52415 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OF87Q-0007Yn-4E for bug-gnu-emacs@gnu.org; Thu, 20 May 2010 11:57:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OF87K-0001CA-VH for bug-gnu-emacs@gnu.org; Thu, 20 May 2010 11:57:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58694) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OF87K-0001C5-SO for bug-gnu-emacs@gnu.org; Thu, 20 May 2010 11:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OF82U-0006G3-I7; Thu, 20 May 2010 11:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jonathan Marchand Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 May 2010 15:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6231 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.127437067023990 (code B ref -1); Thu, 20 May 2010 15:52:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 May 2010 15:51:10 +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 1OF81d-0006Et-5Z for submit@debbugs.gnu.org; Thu, 20 May 2010 11:51:09 -0400 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OF6Kk-0005OI-J6 for submit@debbugs.gnu.org; Thu, 20 May 2010 10:02:47 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:38890) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OF6Kf-0005hC-ET for submit@debbugs.gnu.org; Thu, 20 May 2010 10:02:41 -0400 Original-Received: from [140.186.70.92] (port=42276 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OF6Ka-0006fE-Ie for bug-gnu-emacs@gnu.org; Thu, 20 May 2010 10:02:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OF6KT-00005C-Fi for bug-gnu-emacs@gnu.org; Thu, 20 May 2010 10:02:36 -0400 Original-Received: from mail-ww0-f41.google.com ([74.125.82.41]:64505) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OF6KT-0008W9-Az for bug-gnu-emacs@gnu.org; Thu, 20 May 2010 10:02:29 -0400 Original-Received: by wwi14 with SMTP id 14so141522wwi.0 for ; Thu, 20 May 2010 07:02:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:mime-version:content-type:content-disposition:x-face :user-agent; bh=YlEpynMSGMHcW+VlyQBWW7Et3cY+L2SPnsujI0ATD8g=; b=YprafDyquG6OFbZ2jBRcApaKCQWZwCc1BJucmjOKi3BbB8M7fIR03CltyiMlW8/CPY 5z9pfbptzXFe3jMAjCv9wFezHMF5JrWpE+WlgfAVrD5bktVf0VMVdi9KJP0eyQgUszY9 E7jROLDBqEtMd0EAL0e+jGbkZYJGG1IqdWA9o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:x-face:user-agent; b=XWK+vxr+xlcCbNzYy+40+O0GNlzpVeR2E6OaF67Q53TNUO7DCBfkWT+3WPrXeT6E9n jFvvGy2XoszZVtjkrau6c7eyBulYbN0ZmpkrQvy08o7QLEHqJN8DyL2/JAPLrH0Jh8To XXjGDruGkuro5hiPNYNwVe8dNKoCSoLklL2DY= Original-Received: by 10.216.184.6 with SMTP id r6mr3863891wem.87.1274364138289; Thu, 20 May 2010 07:02:18 -0700 (PDT) Original-Received: from loria.fr (tarski.loria.fr [152.81.12.16]) by mx.google.com with ESMTPS id v59sm3684868wec.3.2010.05.20.07.02.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 20 May 2010 07:02:17 -0700 (PDT) Content-Disposition: inline X-Face: $E+9I)Z6dz:'fsF<%3HN; Aay8\o ^e1`Z0Wea`jUjo2z0v,+VB9NJX@^tk^CKp*r{qgNl)-; \ILRfs7_rwa}WP5/PcDJ User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Thu, 20 May 2010 11:51:08 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 20 May 2010 11:52:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Thu, 20 May 2010 17:24:14 -0400 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:37112 Archived-At: --jCrbxBqMcLqd4mOl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, I can't find a way to make the autocompletion fully works with semantic in emacs 23.2 with the built-in CEDET. This happens in the debian packaged version, the release tarball and in the last bazaar snapshot of emacs23.2. The reason is that the include filen are not parsed with the needed #define. I found one reason for that to happen. When loading a file located in a ede-cpp-root-project, the spp-table preprocesser symbols are not taken into account by semantic. By browsing the code, I find the problem : In file lisp/cedet/ede/cpp-root.el, in the function ede-set-project-variabl= es=20 (called when you load a file within a ede-cpp-root-project), the semantic= =20 spp-table needs semantic/c and semantic/lex-spp to be loaded to get the sym= bols defined in the ede-cpp-root-project. However, no file elisp file provides semantic/c (and thus it's always evalu= ated as nil). In the original CVS version of CEDET, this function waits for semantic-c, which is provided by the semantic/bovine/semantic-c.el file. In= the emacs23.2 distribution, this file is renamed semantic/bovine/c.el and provi= des semantic/bovine/c. If I replace semantic/c by semantic/bovine/c, the semant= ic spp-table is updated correctly (furthermore I need to eval (require 'semantic/bovine/c) before loading the files in the project, it se= ems that this file is not evaluated when calling semantic-mode). This bug is due to a bad translation from original package to the built-in emacs one. Here is the files with the changes I had to made to overcome this bug : --.emacs--- (semantic-mode 1) (global-ede-mode 1) (global-semantic-decoration-mode) + (require 'semantic/bovine/c) (ede-cpp-root-project "tlh" :name "tlh" :file "/home/jonathlela/tlh/Makefile" :system-include-path '( "/home/jonathlela/devkitPro/l= ibnds/include" ) :spp-table '( ( "ARM9" . "1" ) ( "ARM7" . "1" ) ) )=20 ---cpp-root.el--- (defmethod ede-set-project-variables ((project ede-cpp-root-project) &optio= nal buffer) "Set variables local to PROJECT in BUFFER. Also set up the lexical preprocessor map." (call-next-method) - (when (and (featurep 'semantic/c) (featurep 'semantic/lex-spp)) + (when (and (featurep 'semantic/bovine/c) (featurep 'semantic/lex-spp)) (setq semantic-lex-spp-project-macro-symbol-obarray (semantic-lex-make-spp-table (oref project spp-table))) )) Nevertheless, The include files are still not parsed with the right #define= =2E I don't know yet if it's a bug or a PEBCAK. Have somenone successfully use ede-cpp-root-project with the emacs23.2 build ? Regards, Jonathan Marchand --jCrbxBqMcLqd4mOl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkv1QTIACgkQuiLBEP1tB4o+zQCePqfLnzLkyiEoHMYH/b3x7K7q KeYAnif3M+ShxCDymq9IfJI1U6VoNWBM =IfuD -----END PGP SIGNATURE----- --jCrbxBqMcLqd4mOl--