From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: arthur miller Newsgroups: gmane.emacs.devel Subject: Question: how to read elisp declared variable in C code? Date: Thu, 19 Dec 2019 16:08:04 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_VI1P194MB04292218D567777EF71353BE96520VI1P194MB0429EURP_" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="188469"; mail-complaints-to="usenet@blaine.gmane.org" To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 19 17:08:38 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ihyLu-000mv4-2s for ged-emacs-devel@m.gmane.org; Thu, 19 Dec 2019 17:08:38 +0100 Original-Received: from localhost ([::1]:44070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihyLs-0004Av-Gh for ged-emacs-devel@m.gmane.org; Thu, 19 Dec 2019 11:08:36 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40308) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihyLT-0003jN-J2 for emacs-devel@gnu.org; Thu, 19 Dec 2019 11:08:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihyLQ-0005g3-Vb for emacs-devel@gnu.org; Thu, 19 Dec 2019 11:08:10 -0500 Original-Received: from mail-am6eur05olkn2011.outbound.protection.outlook.com ([40.92.91.11]:18113 helo=EUR05-AM6-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihyLQ-0005aP-0j for emacs-devel@gnu.org; Thu, 19 Dec 2019 11:08:08 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hqyqCi8vZxkQH/6PR8A/YpiLt/2Bwa5KjG3Z+jUjc8eJ+7Y9spAEVE+SFLAGIlP2sY2gtLVHMdu0kpdqB2VQ0IVnvBez89+vjkFC/sv1o38O7sxWFRzXp/RLXR7nGOBy3ZhbW/g843VAex9p7tISvA3qsDZryGfJznxKOpLGaH6Vvel5I453UtLpmDz9dmVPiIizmV9wxn/Fpsfky0c7zxEhelnDt02kFTx+wLcFOmVerUwDqrvWKH+k2tX7EbK8peTSgZZHHzpJEkfjl1EGVxE9G2dXeTDcoaLRHkIXLP0TlcXP4MqrMsY4Z+RoIrSeiUbyQZwmugFtdtoQWFVIHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ijwrxLYDJz6NMNmbKonKqeKuXYXMsPeR4/to+8NcBPA=; b=TWawhTR23bAfjDw+nfqN2fJtALKRb0GWz9KvtxQ0JXT6gXRSUZTeG6WuWopKat3E2TO3l9qj+xvyKInTmbzVAxZlRvwyNBkDkQh6b24CkUDw/h5+EnwvFIU14KnUAm2jkB5ARTeE6yl7CS/Yz0VKwHoAyl9zVZW4SS8k9eOnN7yUaFGPPqgO13bJFZUrZ5qdhs6/k55TuAyuKOZWSfvmVbXfjo/PTfcR4Shs+Vd8gHfVpLGrUWil3OnWuJvWtnz3MZn3Kvsc6pDIgJ1vM6i/sI8oSFnDMK0Q32hpUNuXr/MBTu1Y+LaN1rLG+JRK7U7M5zsEoCvbajfCwsIhHmTb4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ijwrxLYDJz6NMNmbKonKqeKuXYXMsPeR4/to+8NcBPA=; b=imaXY9NAxuTz5XxTHEVwui/2pjme51HV3NHniX7HMotRlv5/sq2rcGNvW++0X+v5lQ2RcF2+SbwtESyB6330J8YQ7TbxHUAPeBPb+aA556qza0D3wqoWGQ9INJ17JHsTPwRXK8O69mqw1HZJP1Uze09nP1CJJ0KxwfweMnoER7jd9bMRvl8rYVXB4kN/wonE9ukGTyfhFvEOJXbsEc1ezJcMbe5/3VUX/FxLF0deefDklShm4q/giPbhsZHQ3cieJatvzF2GApkEbj3Kv7xxSzTX4VsPNucX4x/9ElKosO30Gp7zUuFSW1d0riYo4TYOejIGOZXyRL3ISVLLulCNCg== Original-Received: from DB8EUR05FT019.eop-eur05.prod.protection.outlook.com (10.233.238.57) by DB8EUR05HT229.eop-eur05.prod.protection.outlook.com (10.233.238.126) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2559.14; Thu, 19 Dec 2019 16:08:05 +0000 Original-Received: from VI1P194MB0429.EURP194.PROD.OUTLOOK.COM (10.233.238.57) by DB8EUR05FT019.mail.protection.outlook.com (10.233.239.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2559.14 via Frontend Transport; Thu, 19 Dec 2019 16:08:05 +0000 Original-Received: from VI1P194MB0429.EURP194.PROD.OUTLOOK.COM ([fe80::35f2:9ea2:efd6:1d46]) by VI1P194MB0429.EURP194.PROD.OUTLOOK.COM ([fe80::35f2:9ea2:efd6:1d46%5]) with mapi id 15.20.2559.015; Thu, 19 Dec 2019 16:08:05 +0000 Thread-Topic: Question: how to read elisp declared variable in C code? Thread-Index: AQHVtoWfebRdGvTyfU6TGTmamgw1yg== Accept-Language: sv-SE, en-US Content-Language: sv-SE x-incomingtopheadermarker: OriginalChecksum:4D3BA440972A54778741F24DBEA4B3A324450C3F50B8FA2F5BC9186A39B3014D; UpperCasedChecksum:7EDBB998EBCC6F1546E97243E5C390AABF4F0D19C5F0E75691994F1442A15C3C; SizeAsReceived:6704; Count:42 x-tmn: [vxFo+mcAoACVw8xWUPXIUaOJw0Iv4SAG] x-ms-publictraffictype: Email x-incomingheadercount: 42 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 486e29eb-2518-47e0-dee6-08d7849da18b x-ms-traffictypediagnostic: DB8EUR05HT229: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 24U6RkpB3nsYgMFg8cPqyv0DXEpIR9of2tahh8+D3S1VkmTDi6GcRM8tX1JbJ+yKxM0AMhWSmum5yr65e7zAMJIxJ9ndnBC7npJrgCbw+cPGPsD5fg6h7DB3pVFYcHCzMlFcld17SwAt+nG18n/ADiQMrPHR62qz8t300wManAC4mBQ6jlSV6EDvbyXtmdLl x-ms-exchange-transport-forked: True X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 486e29eb-2518-47e0-dee6-08d7849da18b X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Dec 2019 16:08:04.8826 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8EUR05HT229 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.92.91.11 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.org gmane.emacs.devel:243480 Archived-At: --_000_VI1P194MB04292218D567777EF71353BE96520VI1P194MB0429EURP_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable If I defcustom a variable in Elisp, how do I read t's value in from within Emacs C source code? I am sorry for such a newbie question, but if someone can point me to some example in sources so I can save some time I will be very greatfull. I was able to patch bytecomp.el to allow byte compilation of "literate elisp", and I can turn it off/on with elisp variable. I just need tofix readevalpath for elisp to also enable off/on for this feature. Readevalloop is btw, declared as static function in C and not exposed to elisp, so if I would to implement everything in Elisp, I would need to rewrite lots which I don't have neither skills nor time for. I would just like to introduce a variable to turn off/on that path, which is quite trivial, I just don't know how to read Elisp values from C code. Or do I need to do it other way around and expose var from C to Elisp? --_000_VI1P194MB04292218D567777EF71353BE96520VI1P194MB0429EURP_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
If I defcustom a variable in Elisp, how do I read
t's value in from within Emacs C source code?
I am sorry for such a newbie question, but if
someone can point me to some example in
sources so I can save some time I will be very
greatfull.

I was able to patch bytecomp.el to allow
byte compilation of "literate elisp", and I can
turn it off/on with elisp variable.

I just need tofix readevalpath for elisp to also
enable off/on for this feature. Readevalloop is btw,
declared as static function in C and not
exposed to elisp, so if I would to implement
everything in Elisp, I would need to rewrite lots
which I don't have neither skills nor time for. I
would just like to introduce a variable to turn
off/on that path, which is quite trivial, I just don't
know how to read Elisp values from C code. Or
do I need to do it other way around and
expose var from C to Elisp?
--_000_VI1P194MB04292218D567777EF71353BE96520VI1P194MB0429EURP_--