From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Dynamic loading progress; funcall of goto-char fails Date: Tue, 05 May 2015 21:21:05 -0700 Message-ID: <554996B1.4030400@dancol.org> References: <85a90ggf2d.fsf@stephe-leake.org> <54E0A40F.5080603@dancol.org> <83sie7un20.fsf@gnu.org> <54E0D181.2080802@dancol.org> <83r3trulse.fsf@gnu.org> <54E0D7E0.305@87.69.4.28> <83h9unukbg.fsf@gnu.org> <54E0DEF8.7020901@dancol> <83egpruiyp.fsf@gnu.org> <54E0FF93.2000104@dancol.org> <833865vp4d.fsf@gnu.org> <54E2355A.90@87.69.4.28> <83vbj1u020.fsf@gnu.org> <54E24CA4.9020601@dancol.org> <83h9uk7ddb.fsf@gnu.org> <54E382A5.5030408@dancol.org> <85a8zcu8gn.fsf@stephe-leake.org> <85383amjkx.fsf_-_@stephe-leake.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5IEFMemeGfxNoGcce2NdR77wQeFjkuGPS" X-Trace: ger.gmane.org 1430886096 13557 80.91.229.3 (6 May 2015 04:21:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 May 2015 04:21:36 +0000 (UTC) To: Stephen Leake , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 06 06:21:30 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ypqpt-0001WF-Pg for ged-emacs-devel@m.gmane.org; Wed, 06 May 2015 06:21:29 +0200 Original-Received: from localhost ([::1]:42877 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ypqpt-0001rB-3b for ged-emacs-devel@m.gmane.org; Wed, 06 May 2015 00:21:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ypqpg-0001r3-NY for emacs-devel@gnu.org; Wed, 06 May 2015 00:21:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ypqpd-0000z0-Gy for emacs-devel@gnu.org; Wed, 06 May 2015 00:21:16 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:49344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ypqpd-0000xI-5n for emacs-devel@gnu.org; Wed, 06 May 2015 00:21:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:To:MIME-Version:From:Date:Message-ID; bh=ZTRnXEPVnhfWybHUT9qK71oS+5CZPgjuJvC0lliiMnM=; b=CPKWVqeCMeMRgoXDAS89OY/I0NUl/ywMavagipZgNSsysg5QS396145lwJsa4F2Y0nBeAw6i2xTC6UMMHAOtFsnSsofgyMNxDrgMD/0qOf/Spyta/GtHdsHMwDbftHobtgZvyuJAUHDyuPJT/zuazLXQrRS315fR2aLZXS1F/jLphb03jyQjxbPuw20o2X2LEzbXWpN8mtbExcILr52n+M8H2SkxDJShV05eoxDWRqLZowhI8/5UofEmMi3oG5IEykht6Qg2TNcOn1wTBga6J8Ycxc65U7K5iC4xWueu2vXwPNiMOlczpu5YwmZPV7y1kkznjPHendvyiZHNd9kE5w==; Original-Received: from [12.144.188.5] (helo=[10.10.3.3]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1YpqpW-0004G2-B3; Tue, 05 May 2015 21:21:06 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 In-Reply-To: <85383amjkx.fsf_-_@stephe-leake.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:186272 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --5IEFMemeGfxNoGcce2NdR77wQeFjkuGPS Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/05/2015 09:11 PM, Stephen Leake wrote: > Stephen Leake writes: >=20 >> Aur=C3=A9lien Aptel writes: >> >>> I've tried to implement modules using Daniel's plan. It turned out to= >>> be pretty easy, mostly because I'm more familiar with the Emacs >>> codebase now and because it's a lot less intrusive than my previous >>> attempt. >>> >>> It's not finished but I have a basic module working on linux. It's a >>> proof of concept, basically. >> >> I've implemented a test module that calls two Ada mode parser actions >> (see below). >> >> The real module will call the actual parser and build the action args >> from the parse results. >> >> I did not have to modify anything in the Emacs C code to make this wor= k, >> so it shows this module design is adquate for my use case so far. >=20 > I've made more progress; I've got a module that should run the full Ada= > parser on a buffer. >=20 > However, when I run it, it crashes on a call like: >=20 > emacs_value goto_char_sym =3D env.intern (env, "goto-char"); > env.funcall (env, goto_char_sym, env.make_fixnum (env, 1)); >=20 > When I trace the 'funcall' (in eval.c DEFUN funcall), it hits this code= : >=20 > fun =3D original_fun; > if (SYMBOLP (fun) && !NILP (fun) > && (fun =3D XSYMBOL (fun)->function, SYMBOLP (fun))) > fun =3D indirect_function (fun); >=20 > and sets fun to 0, which then signals a failure. >=20 > Is this because 'goto-char' is implemented in C? That's odd. Why would it matter? For me, (symbol-function 'goto-char) is a subr, so the second SYMBOLP above should fail and `fun' should be a subr object, not nil. --5IEFMemeGfxNoGcce2NdR77wQeFjkuGPS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJVSZaxAAoJEN4WImmbpWBl6j4P/1ahuyagKsqRPrpGEzMW2GD+ 42woh3b1IzVBfsO1UPq88d6UkBcgPOkYdmepfz1jaucQ6bk4KW14R5TrAUsk5cLS 8OTc5yQ+MN1LvoFqE44GWcV8MDPqxPJeFTAz++pI0F6FUNqUg/FUf4zd5L43XKFR EW/3LEGTDoiJSXKFUhhGdsBj/G9Gl5etp0bT/XkAdDW/NjYbI/w6VbaDYEWhPiKQ QLe2FnUeSOk2HvIKd106QUgQUMMhl9lAS2VSgnmxItgexEfbf1fEafD7hz9EzY0U 6VPLDX/Uw0Asjm6q/4x5IwbNwUcTMc2FuoXAtm0L7fIS+1yJiEQqcxhYzP9KsaA6 Y/MlguQc6TYN8uWvG2b/7vszXWuyP4Xtgo/2qBuqShnZVFb9VFJumu/Snw0xFCyp LwgBDmkPMBfeA1PoaZrM0KPd0CI8N4SsAQnwQAZg4Z/nl4YFWyHD/zaGhCefFJUq Et2GA6tFCDXANIsL0qK/ZjkVbRz4+YubnrFRQrLc+mdQhnD8wNi2iG/wik2Ck8JU Pwxnfud1I3/VrPBVfP4WcwWK826qVASxB9uIZwrP2tc82pXeSm4GO3uLVnvPqy6t fhsBhah37th6BnWXX55FIpFX8o2qr/jHv2TN37bqCMbI2c9Eb/KNfBd+C3emtOa6 ev9doXsBr/K4u5LZURrV =osK6 -----END PGP SIGNATURE----- --5IEFMemeGfxNoGcce2NdR77wQeFjkuGPS--