From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Lucien Pullen Newsgroups: gmane.emacs.devel Subject: [ELPA] Update package: psgml: handle (compile-internal) obsoletion Date: Thu, 18 May 2017 02:45:21 -0600 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1495097147 5615 195.159.176.226 (18 May 2017 08:45:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 18 May 2017 08:45:47 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (darwin) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 18 10:45:41 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBH3x-0001Bo-Go for ged-emacs-devel@m.gmane.org; Thu, 18 May 2017 10:45:37 +0200 Original-Received: from localhost ([::1]:52451 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBH3z-0005Je-VJ for ged-emacs-devel@m.gmane.org; Thu, 18 May 2017 04:45:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBH3q-0005In-55 for emacs-devel@gnu.org; Thu, 18 May 2017 04:45:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dBH3l-00049f-B1 for emacs-devel@gnu.org; Thu, 18 May 2017 04:45:30 -0400 Original-Received: from mail-it0-x232.google.com ([2607:f8b0:4001:c0b::232]:36822) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dBH3l-00048g-54 for emacs-devel@gnu.org; Thu, 18 May 2017 04:45:25 -0400 Original-Received: by mail-it0-x232.google.com with SMTP id o5so96022983ith.1 for ; Thu, 18 May 2017 01:45:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:mail-followup-to:date:message-id:user-agent :mime-version; bh=F0gpmaUaNl3BynU6z+F1JJ0ruT2KuPCCPjlqBCQ7YGU=; b=D+8FbBxVdmYEaRk+TeUu4gdWwjx+ksD2BqvSLqrJW3d8POq21JLkCF9ZFaIUP/ZsIX ntcP5FjDJd5Ri+0kMxTXGzg+WRI9anD+X+IqwvHvaKvcGHdg7O/gQioNj+AOFFaSE2Ck 7ipPjorbcoHBHfGd+3sRE+XeE4S0PqhHlIIbACBfAKBRftCiVQ6uUd5QSFC/ALGTuVmN OJZ3KKtdk8gg7crKO1KkHNJVQCIx2SOr9BoQhpDZP5ZKoaUQjHmkGkCptR4tn/Df1PrY H0qj9ke5UqQIH/fZzZhn8xyJkTd8SL4KaGNI+bdnWJdcNabJnNZxJA31ExxQ6sMcl5zE Da1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:mail-followup-to:date:message-id :user-agent:mime-version; bh=F0gpmaUaNl3BynU6z+F1JJ0ruT2KuPCCPjlqBCQ7YGU=; b=rtpB58ZI4PtuqG9Kcs3C+t6BUQC/4ZdaofoFMXYD66iH6x6yEUt/192uyN7ECdwtN8 Cop88OzvuRYBkBSE5LJH9Q85WidiYdt01AaLUpNwEoRfPd91BYaVfmrBQ2sJvfvbdsxT 3UvxaZITmVAFCVnyP+GZSI6aAqGb7L9BeuvBICx7Q+UZr16mKUwREq2D41PzpC4JgH1E OWP5TXq8NZR/FBrv/QZdf1CZYu5BrWqlueYI1XgKmgtdlxS5zBh9NJ6F4rdF1hq3orFw E61ETI/v4HUWwL4znzciGoks8LCrjp3ps6MkWCnNcgsUDkEMZfZI/+hZ2a9hNw6MHGGI SZQw== X-Gm-Message-State: AODbwcCFA1BntgA/pMJwOaave8X0l8Pl0XzYnmk8KToOcjXqhTw5UnrL AITBsMO0yt6plQ== X-Received: by 10.36.101.135 with SMTP id u129mr3409423itb.21.1495097124202; Thu, 18 May 2017 01:45:24 -0700 (PDT) Original-Received: from lucien.drurowin.org (c-71-56-236-181.hsd1.co.comcast.net. [71.56.236.181]) by smtp.googlemail.com with ESMTPSA id g12sm2065901ioi.44.2017.05.18.01.45.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 May 2017 01:45:23 -0700 (PDT) Mail-Followup-To: emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c0b::232 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:214938 Archived-At: --=-=-= Content-Type: text/plain; format=flowed It looks like (compile-internal) has been deleted, finally. This patch (see attached) adds a check to use the new (compilation-start) while still being compatible with really old versions. Is it really necessary to keep the legacy call in there?... how far back should we support old versions? My computer ships with v22, but my OS is from 2013, and the new procedure was already marked as the one to use by that point. Unrelated... ... I'm not very familiar with Emacs' dynamic loader. Does it optimize out the branch instruction on load since it's a comparison of a constant? or does compiled code get interpreted literally? It's only a quick branch and calling the external procedure takes much longer, but I used the version check instead of (fboundp) since it's probably faster than the obarray lookup if the check is performed every time you call the procedure. Old assembly habits die hard. Anyways, on to the patch file. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-psgml.el-sgml-validate-use-compilation-start-for-rec.patch >From 810f33f50b7c47250e41fb23387a96d862162452 Mon Sep 17 00:00:00 2001 From: Lucien Pullen Date: Thu, 18 May 2017 01:54:05 -0600 Subject: [PATCH] * psgml.el (sgml-validate): use (compilation-start) for recent emacs The procedure (compile-internal) has been deprecated since Emacs v22 and is removed in at least v24.4. --- psgml.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/psgml.el b/psgml.el index 9ab7eef..eb98071 100644 --- a/psgml.el +++ b/psgml.el @@ -1133,9 +1133,11 @@ and move to the line in the SGML document that caused it." nil nil 'sgml-validate-command-history))) (if sgml-offer-save (save-some-buffers nil nil)) - (compile-internal command "No more errors" "SGML validation" - nil - sgml-validate-error-regexps)) + (if (< emacs-major-version 22) + (compile-internal command "No more errors" "SGML validation" + nil + sgml-validate-error-regexps) + (compilation-start command nil nil sgml-validate-error-regexps))) ;;;; Autoloads and hooks -- 2.3.4 --=-=-=--