From unknown Mon Jun 23 23:50:19 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#43652 <43652@debbugs.gnu.org> To: bug#43652 <43652@debbugs.gnu.org> Subject: Status: [PATCH] cperl-mode: Add helpers to run on Emacs 26.1 Reply-To: bug#43652 <43652@debbugs.gnu.org> Date: Tue, 24 Jun 2025 06:50:19 +0000 retitle 43652 [PATCH] cperl-mode: Add helpers to run on Emacs 26.1 reassign 43652 emacs submitter 43652 haj@posteo.de (Harald J=C3=B6rg) severity 43652 normal tag 43652 patch fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 27 12:45:26 2020 Received: (at submit) by debbugs.gnu.org; 27 Sep 2020 16:45:26 +0000 Received: from localhost ([127.0.0.1]:50312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMZni-0006g8-Gi for submit@debbugs.gnu.org; Sun, 27 Sep 2020 12:45:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:41922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMZnh-0006g0-2M for submit@debbugs.gnu.org; Sun, 27 Sep 2020 12:45:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMZnd-0005sB-By for bug-gnu-emacs@gnu.org; Sun, 27 Sep 2020 12:45:24 -0400 Received: from mout02.posteo.de ([185.67.36.66]:33339) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMZnY-0006BC-22 for bug-gnu-emacs@gnu.org; Sun, 27 Sep 2020 12:45:19 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 44B702400FB for ; Sun, 27 Sep 2020 18:45:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1601225112; bh=JIHNO6fladakJJ8v2N/+JmARya53pb1zJSCkeVBySsI=; h=From:To:Subject:Date:From; b=iAeSw/V2kc/E2pmF0tZXKyejsXPZtVhMVErrbonSf99FnecPNEAKT1mjRac3gSsIO 7p6jhx3vi8XMjMQoNpnHjDg+DSTuZQQg4W8FI0zicQ7yZFjsn1Bx/jhXg93aZZzExN B4Ut7t7dLWax5/nt0WZD/faSgQp/ZiwThhakUMECjqu3CB76njGf69sz78P37dvWkX hN9YkDbeiY80H13alhVPNQGz3LpgVzqEnAjAkVno6AULLohL+qyhxzYOy2kucq79VM mh9wgXUPuak4XdylFwCiJvbIOh34WZv/5wJXhxa/uDNa/siyCE0vMhfDgMT7kxKU5Y hqo2Xb/TzRZdQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Bzs2b3sB0z9rxc; Sun, 27 Sep 2020 18:45:11 +0200 (CEST) From: haj@posteo.de (Harald =?utf-8?Q?J=C3=B6rg?=) To: bug-gnu-emacs@gnu.org Subject: [PATCH] cperl-mode: Add helpers to run on Emacs 26.1 Date: Sun, 27 Sep 2020 18:45:10 +0200 Message-ID: <87mu1bqicp.fsf@hajtower> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=haj@posteo.de; helo=mout02.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/27 12:42:52 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain I plan to suggest that cperl-mode.el gets a "dual life" in both Emacs and on ELPA on emacs-devel. As a preparation, I added two helpers for the newer functions 'time-convert' and 'format-patch', following a suggestion by Stefan Monnier. He actually wrote cperl--format-patch in a message to emacs-devel and therefore is listed as co-author in the commit message. -- Cheers, haj --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-cperl-mode-Add-compatibility-for-Emacs-26.1.patch Content-Description: Patch: Add cperl-mode compatibility >From a70829396d569656dda5864c4dbece97eddb5167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20J=C3=B6rg?= Date: Sun, 27 Sep 2020 18:32:48 +0200 Subject: [PATCH] cperl-mode: Add compatibility for Emacs 26.1 * lisp/progmodes/cperl-mode.el (cperl--time-convert): New compatibility helper for time-convert (available in Emacs 27.1) (cperl--format-prompt): New compatibility helper for format-prompt (available in Emacs 28) (cperl-info-on-command): use cperl--format-prompt (cperl-perldoc): use cperl--format-prompt (cperl-time-fontification): use cperl--time-convert Co-authored-by: Stefan Monnier --- lisp/progmodes/cperl-mode.el | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 6313d015e9..c62fbab059 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -7,6 +7,7 @@ ;; Jonathan Rockway ;; Maintainer: emacs-devel@gnu.org ;; Keywords: languages, Perl +;; Package-Requires: ((emacs "26.1")) ;; This file is part of GNU Emacs. @@ -75,6 +76,26 @@ ;;; Code: +;;; Compatibility with older versions (for publishing on ELPA) +;; The following helpers allow cperl-mode.el to work with older +;; versions of Emacs. +;; +;; Whenever the minimum version is bumped (see "Package-Requires" +;; above), please eliminate the corresponding compatibility-helpers. +;; Whenever you create a new compatibility-helper, please add it here. + +;; Available in Emacs 27.1: time-convert +(defalias 'cperl--time-convert + (if (fboundp 'time-convert) 'time-convert + 'encode-time)) + +;; Available in Emacs 28: format-prompt +(defalias 'cperl--format-prompt + (if (fboundp 'format-prompt) 'format-prompt + (lambda (msg default) + (if default (format "%s (default %s): " msg default) + (concat msg ": "))))) + (eval-when-compile (require 'cl-lib)) (defvar msb-menu-cond) @@ -6126,7 +6147,7 @@ cperl-info-on-command (interactive (let* ((default (cperl-word-at-point)) (read (read-string - (format-prompt "Find doc for Perl function" default)))) + (cperl--format-prompt "Find doc for Perl function" default)))) (list (if (equal read "") default read)))) @@ -8085,7 +8106,7 @@ cperl-perldoc (interactive (list (let* ((default-entry (cperl-word-at-point)) (input (read-string - (format-prompt "perldoc entry" default-entry)))) + (cperl--format-prompt "perldoc entry" default-entry)))) (if (string= input "") (if (string= default-entry "") (error "No perldoc args given") @@ -8312,7 +8333,7 @@ cperl-time-fontification (or l (setq l 1)) (or step (setq step 500)) (or lim (setq lim 40)) - (let* ((timems (function (lambda () (car (time-convert nil 1000))))) + (let* ((timems (function (lambda () (car (cperl--time-convert nil 1000))))) (tt (funcall timems)) (c 0) delta tot) (goto-char (point-min)) (forward-line (1- l)) -- 2.20.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 28 08:13:33 2020 Received: (at 43652) by debbugs.gnu.org; 28 Sep 2020 12:13:33 +0000 Received: from localhost ([127.0.0.1]:51826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMs29-0005uC-K3 for submit@debbugs.gnu.org; Mon, 28 Sep 2020 08:13:33 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49000) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMs27-0005tw-O9 for 43652@debbugs.gnu.org; Mon, 28 Sep 2020 08:13:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=gAeW5iJXydIEFGOVZ3LUzCJYslTHhYCXzA/T+QCnn9c=; b=oUwctIammd/kewplH3PKDMgBgY HYlsUOiBfvK1BSjFFuncgpDNDQD2Wya5t/uO73V7+lyVswe4cyVSu2kzlyKvYUUMJCt0hNjb7n0jq YhkyRb5LdVZx6UF5dtQqdq5N+yfR1QbHkaMXvQgcAJ7JpHgPdJLnC4pK5r7ZflZM97XA=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kMs1z-0006wr-Dd; Mon, 28 Sep 2020 14:13:26 +0200 From: Lars Ingebrigtsen To: haj@posteo.de (Harald =?utf-8?Q?J=C3=B6rg?=) Subject: Re: bug#43652: [PATCH] cperl-mode: Add helpers to run on Emacs 26.1 References: <87mu1bqicp.fsf@hajtower> X-Now-Playing: Sir Stephen's _By Design_: "Public Style" Date: Mon, 28 Sep 2020 14:13:22 +0200 In-Reply-To: <87mu1bqicp.fsf@hajtower> ("Harald =?utf-8?Q?J=C3=B6rg=22's?= message of "Sun, 27 Sep 2020 18:45:10 +0200") Message-ID: <873632w13x.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: haj@posteo.de (Harald Jörg) writes: > I plan to suggest that cperl-mode.el gets a "dual life" in both Emacs > and on ELPA on emacs-devel. > > As a preparation, I added two helpers for the newer functions > 'time-convert' and 'format-pat [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43652 Cc: 43652@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) haj@posteo.de (Harald J=C3=B6rg) writes: > I plan to suggest that cperl-mode.el gets a "dual life" in both Emacs > and on ELPA on emacs-devel. > > As a preparation, I added two helpers for the newer functions > 'time-convert' and 'format-patch', following a suggestion by Stefan > Monnier. He actually wrote cperl--format-patch in a message to > emacs-devel and therefore is listed as co-author in the commit message. Thanks; applied to Emacs 28. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 28 08:13:40 2020 Received: (at control) by debbugs.gnu.org; 28 Sep 2020 12:13:40 +0000 Received: from localhost ([127.0.0.1]:51829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMs2F-0005uU-S7 for submit@debbugs.gnu.org; Mon, 28 Sep 2020 08:13:40 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMs2E-0005uB-Bp for control@debbugs.gnu.org; Mon, 28 Sep 2020 08:13:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yMOixvddXgGzF/uB+Cyw7ORPWUMzPJtcSPYDCBUg9to=; b=Kspu4hokFWZDfX7UBN8Wsnwu/f ZwBB5off0SiAnxyL3b5kj0FSQZjVuOVdOv4yO/owfn2pYmjFuNa4yB8U3+U8c70dyvOEIr67IzyEt 2rCqEzLGmaYzRh0JK1Ok0DOhFgTZkdVHuk7Joly+pCl0kdvsMUQkrP+EFkbYvuoHluEI=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kMs26-0006wy-Jg for control@debbugs.gnu.org; Mon, 28 Sep 2020 14:13:32 +0200 Date: Mon, 28 Sep 2020 14:13:29 +0200 Message-Id: <871rimw13q.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #43652 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 43652 fixed close 43652 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 43652 fixed close 43652 28.1 quit From unknown Mon Jun 23 23:50:19 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 27 Oct 2020 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator