From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.help Subject: Re: How to test for native JSON support? Date: Tue, 4 May 2021 17:30:28 +0300 Message-ID: <2510de19-5b28-06d3-9a7b-631c9e506578@yandex.ru> References: <87k0ohuybx.fsf@fastmail.fm> <785b4132-da32-0da8-519d-b39a58270f32@gmail.com> <87y2cuybeu.fsf@passepartout.tim-landscheidt.de> <838s4u66f0.fsf@gnu.org> <87fsz2n075.fsf@fastmail.fm> <834kfi64ts.fsf@gnu.org> <8a5699f0-5532-2f6f-f2dd-4f804f02468f@yandex.ru> <83v97y4my9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37528"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 To: Eli Zaretskii , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 04 16:31:32 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ldw5E-0009eX-4T for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 04 May 2021 16:31:32 +0200 Original-Received: from localhost ([::1]:48170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldw5D-0006Os-6f for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 04 May 2021 10:31:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58112) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldw4J-0006KM-4d for help-gnu-emacs@gnu.org; Tue, 04 May 2021 10:30:35 -0400 Original-Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:34625) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldw4H-0001rg-9U; Tue, 04 May 2021 10:30:34 -0400 Original-Received: by mail-wr1-x434.google.com with SMTP id t18so9675224wry.1; Tue, 04 May 2021 07:30:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=8QU0u/ZXmmm6nCSQyb+APCCNQvHfo5V0EpPyNVUW8xQ=; b=Yj7fPD7nE3f3Ygm5ZtA2Udg+e7+QnKPmqBHzs7dmVWJWNKbQhNA5WZ0Rf5Ft/3LxfP Aabw7LlurFuthDgBqmsuREYsQJOT3zHjgTq7X4HDWSWst3GOZaMZmO8qjW188uQw7nia TRuo1UHT84ptzGvYyy+LbZjOZChs2lRvgZlCKzcq/tjqTsubieBOXbI972qJ1LxkWePV 5xgh8kPReXKYgFzUCqeiZ0eVxCjWUxK8RAShB5OyrRL40k5y0HhMzZGOGq/c+Vmt+oZL njOLH3ViN2LJhNqCHW9auQjsgkAsd/U6PivbXDB7uJVyTWdLx08MQgkexM+015eMH+FL YCEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8QU0u/ZXmmm6nCSQyb+APCCNQvHfo5V0EpPyNVUW8xQ=; b=ETFtzm2TNNrTiyo+9x/uyD2OHcjtw20a7t6XTjN/L4wyWgVbmbvUJLi3SpmKZEZ8bU PflBW6sIGgQlYS+MtGa0XQXKOG3n02eYmNM1a/OtYJFPmUL3kescRWvWLL+iCVyAEYCY HmEWvWV7CszVZVz032eKiSDc42wEhYqnjOJ8krkrYjQtQnRHhU076BzbV8r1dDsqLW8+ rdtVAL4fEWNLz60ZiipmcMroFHqYPqeN4Ykh36C1DEyhThVL4GrE+0lTYDlejeNZlTSH YLPbj+O0SUh/ICh+JYEekkkgQutYtHFuWj81G4D65ou+Ml39eJj++NBXOqwKlMPR1CAx +kFQ== X-Gm-Message-State: AOAM532Lyqm0fFLsw/RBGbE7YqFxrC7MIPBvc76v3SHxzW4td7xZsOTD DRfLuCq1YaJj7FN7vhDLCIo0g09KeoA= X-Google-Smtp-Source: ABdhPJztPJW4Al5vz0muZfVP9/mqzcEpqj0OyNemadkwegexH9FindA4hwZccrFCPkdL2KmwpdqOYA== X-Received: by 2002:adf:f14c:: with SMTP id y12mr33373762wro.382.1620138630897; Tue, 04 May 2021 07:30:30 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id o17sm17357338wrs.48.2021.05.04.07.30.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 May 2021 07:30:30 -0700 (PDT) In-Reply-To: <83v97y4my9.fsf@gnu.org> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=raaahh@gmail.com; helo=mail-wr1-x434.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:129429 Archived-At: On 04.05.2021 17:01, Eli Zaretskii wrote: > Feel free to suggest a patch, Like this? diff --git a/src/json.c b/src/json.c index 3f1d27ad7f..ece057ae41 100644 --- a/src/json.c +++ b/src/json.c @@ -596,8 +596,7 @@ DEFUN ("json-serialize", Fjson_serialize, Sjson_serialize, 1, MANY, } if (!json_initialized) { - message1 ("jansson library not found"); - return Qnil; + Fsignal (Qerror, list1 (build_unibyte_string ("jansson library not found"))); } #endif @@ -707,8 +706,7 @@ DEFUN ("json-insert", Fjson_insert, Sjson_insert, 1, MANY, } if (!json_initialized) { - message1 ("jansson library not found"); - return Qnil; + Fsignal (Qerror, list1 (build_unibyte_string ("jansson library not found"))); } #endif @@ -966,8 +964,7 @@ DEFUN ("json-parse-string", Fjson_parse_string, Sjson_parse_string, 1, MANY, } if (!json_initialized) { - message1 ("jansson library not found"); - return Qnil; + Fsignal (Qerror, list1 (build_unibyte_string ("jansson library not found"))); } #endif @@ -1065,8 +1062,7 @@ DEFUN ("json-parse-buffer", Fjson_parse_buffer, Sjson_parse_buffer, } if (!json_initialized) { - message1 ("jansson library not found"); - return Qnil; + Fsignal (Qerror, list1 (build_unibyte_string ("jansson library not found"))); } #endif > and let's see if you will be able to > convince The Powers That Be. Praise the Powers! I pray they be convinced!