From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WIuxEEK5K2O4ZwAAbAwnHQ (envelope-from ) for ; Thu, 22 Sep 2022 03:24:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id ACOpEEK5K2MfWQEAauVa8A (envelope-from ) for ; Thu, 22 Sep 2022 03:24:18 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CD5CBF505 for ; Thu, 22 Sep 2022 03:24:17 +0200 (CEST) Received: from localhost ([::1]:55396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obAwq-0001jh-PQ for larch@yhetil.org; Wed, 21 Sep 2022 21:24:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obAwc-0001ig-58 for guix-patches@gnu.org; Wed, 21 Sep 2022 21:24:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36440) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1obAwb-0003XU-Tb for guix-patches@gnu.org; Wed, 21 Sep 2022 21:24:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1obAwb-0005K3-NC for guix-patches@gnu.org; Wed, 21 Sep 2022 21:24:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57993] [PATCH] gnu: emacs-volatile-highlights: Emit deprecation messages. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 22 Sep 2022 01:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57993 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57993@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166380981520423 (code B ref -1); Thu, 22 Sep 2022 01:24:01 +0000 Received: (at submit) by debbugs.gnu.org; 22 Sep 2022 01:23:35 +0000 Received: from localhost ([127.0.0.1]:35518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obAwB-0005JL-5e for submit@debbugs.gnu.org; Wed, 21 Sep 2022 21:23:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:50030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obAw9-0005JB-DN for submit@debbugs.gnu.org; Wed, 21 Sep 2022 21:23:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obAw9-0001Lw-06 for guix-patches@gnu.org; Wed, 21 Sep 2022 21:23:33 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:52208) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obAw6-0003Ta-Pv for guix-patches@gnu.org; Wed, 21 Sep 2022 21:23:32 -0400 Date: Thu, 22 Sep 2022 09:23:15 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1663809809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eBqkAAFFR55W5FCKYDa9Jahlu+a/Dqgtkg1ke8MJefI=; b=MwVGElYpPdwX2yT+DNbMSWJHNKmNquRMWba3o0NW5DmT+/drG6KSY+4eWh3eRZubh83e5e JESnTH3b0ohhlZMK7m3/Xz2CSJyADZxgzmSAmldPhJ1qplONSAIb/R29ascdJ8NAOMFNYR 66SO1jdgNmIVVLDR9HlCVZPpIVzeOHz2FkNfiOfJO5gnffOSVdr6dzzae3W3oSDnpwNFDp Gc89FETQ9AJ1aEfbK0aac89hW4Wdm8dskMhgh+LqJzDHqy1rin9To1wdyg4qjaRRHNHFCa HQysRGTThI8ED+smfkx8b5vGqrQ8qWqk1B75gj7rOITjlYaqfastUlSxVS3AdA== Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-Spamd-Bar: / Received-SPF: pass client-ip=144.168.59.46; envelope-from=hako@ultrarare.space; helo=mail.boiledscript.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches From: Hilton Chain via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1663809857; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=eBqkAAFFR55W5FCKYDa9Jahlu+a/Dqgtkg1ke8MJefI=; b=IpgCWn5wa29b9abnv7VFeos4BjdP+SumHCR+zPRDglVUNkfiZ0V4PoebCp2xVXqOQhHosk MFsxTmvMroDFK4oem33Llc/gGTLnTGZUSqTJDaHcF7tCMgqPUcbGdWoojbCMo0ECMQc3xY XzZK1sFmRvhBf9TC9aDrf02nUgCC+FCEUmk/R+XZw45ExlrTV0oi1cvs2XcTUK0/uWtMcJ zUFDLmZ4Hlq1y/f5mWA1MfaMAGRyveBY52ACqzDh8vBwQ2yt+pqwtB3/4BOF6Om+ir2pHO k5zzb4rpjbU+xBNnhKQ/F+g/cfCjoxVAkSWVV1MPxhuEFZXLmxUKRW+LjWTJMQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663809857; a=rsa-sha256; cv=none; b=o+a3o8YgFM82O6yI8qKzzTBBrB3wWiVvVebPrv9ru9+blccLrFe4l0Xwsy23m3ZJ+os1HJ DdIJwBO1GUT/bwBHxNgD6XSvewDPVTdbETE6modKZGq+sYqmD4Fdx4mOO7dY7OQBUg0RFo LyXnIgp5sCfVafmdfSCKf37BldOoSuBxPyx6h8k+FylcXAE21NnddYVykk+Evgx7gq5y1+ yX26QeKmvTilGSdwMm/+UsH5t4Tk/wE6w3pdSvYel7cxqdeFb4tmnihexBxV1r1lYrGAcs aE5V1UC3OSJ9tUzynX+JDWsmRf/I8xWJSIP0RjX1e4VWMkCrTR3WmjN7b1siaw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=MwVGElYp; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.04 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=MwVGElYp; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: CD5CBF505 X-Spam-Score: -2.04 X-Migadu-Scanner: scn1.migadu.com X-TUID: Bh7egMcoUNli * gnu/packages/patches/emacs-volatile-highlights-use-cl-lib.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/emacs-xyz.scm (emacs-volatile-highlights)[patches]: Add emacs-volatile-highlights-use-cl-lib.patch --- gnu/local.mk | 1 + gnu/packages/emacs-xyz.scm | 6 +- ...emacs-volatile-highlights-use-cl-lib.patch | 159 ++++++++++++++++++ 3 files changed, 165 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/emacs-volatile-highlights-use-cl-lib.patch diff --git a/gnu/local.mk b/gnu/local.mk index ef1bae5f3c..d85c5992da 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1054,6 +1054,7 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-source-date-epoch.patch \ %D%/packages/patches/emacs-telega-path-placeholder.patch \ %D%/packages/patches/emacs-telega-test-env.patch \ + %D%/packages/patches/emacs-volatile-highlights-use-cl-lib.patch \ %D%/packages/patches/emacs-wordnut-require-adaptive-wrap.patch \ %D%/packages/patches/emacs-yasnippet-fix-tests.patch \ %D%/packages/patches/emacs-kv-fix-tests.patch \ diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 32e4c33f16..05ec770637 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -32319,7 +32319,11 @@ (define-public emacs-volatile-highlights (file-name (git-file-name name version)) (sha256 (base32 - "1dsa6769lphyyv7yg92vkkpk395w52q4m7hdn8xy7s6lh5c6a955")))) + "1dsa6769lphyyv7yg92vkkpk395w52q4m7hdn8xy7s6lh5c6a955")) + (patches + (search-patches + ;; https://github.com/k-talo/volatile-highlights.el/pull/22 + "emacs-volatile-highlights-use-cl-lib.patch")))) (build-system emacs-build-system) (home-page "http://github.com/k-talo/volatile-highlights.el") (synopsis "Emacs minor mode for visual feedback on some operations") diff --git a/gnu/packages/patches/emacs-volatile-highlights-use-cl-lib.patch b/gnu/packages/patches/emacs-volatile-highlights-use-cl-lib.patch new file mode 100644 index 0000000000..daf1eb6faa --- /dev/null +++ b/gnu/packages/patches/emacs-volatile-highlights-use-cl-lib.patch @@ -0,0 +1,159 @@ +From f5801779ba3e8f52020a34313fdfaa55f6c0c967 Mon Sep 17 00:00:00 2001 +From: Joerg Bornemann +Date: Fri, 14 Jan 2022 22:31:39 +0100 +Subject: [PATCH 1/3] Use cl-lib instead of the deprecated cl package + +--- + volatile-highlights.el | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +diff --git a/volatile-highlights.el b/volatile-highlights.el +index e946afd..c1d7f2e 100644 +--- a/volatile-highlights.el ++++ b/volatile-highlights.el +@@ -195,7 +195,7 @@ + (defconst vhl/version "1.8") + + (eval-when-compile +- (require 'cl) ++ (require 'cl-lib) + (require 'easy-mmode) + (require 'advice)) + +@@ -409,7 +409,7 @@ Optional args are the same as `vhl/add-range'." + (let ((fn-on (intern (format "vhl/ext/%s/on" sym))) + (fn-off (intern (format "vhl/ext/%s/off" sym))) + (cust-name (intern (format "vhl/use-%s-extension-p" sym)))) +- (pushnew sym vhl/.installed-extensions) ++ (cl-pushnew sym vhl/.installed-extensions) + (eval `(defcustom ,cust-name t + ,(format "A flag if highlighting support for `%s' is on or not." sym) + :type 'boolean +@@ -532,34 +532,34 @@ would be listed in english. + This is included as a private support function for generating + lists of symbols to be included docstrings of auto-generated + extensions." +- (assert (listp items)) ++ (cl-assert (listp items)) + (cond ((null items) + ;; Zero items + "") + ((null (cdr items)) + ;; One item +- (assert (stringp (first items))) +- (format "%s" (first items))) ++ (cl-assert (stringp (cl-first items))) ++ (format "%s" (cl-first items))) + ((null (cddr items)) + ;; Two items +- (assert (stringp (first items))) +- (assert (stringp (second items))) ++ (cl-assert (stringp (cl-first items))) ++ (cl-assert (stringp (cl-second items))) + (apply 'format "%s and %s" items)) + ((null (cdddr items)) + ;; Three items +- (assert (stringp (first items))) +- (assert (stringp (second items))) +- (assert (stringp (third items))) ++ (cl-assert (stringp (cl-first items))) ++ (cl-assert (stringp (cl-second items))) ++ (cl-assert (stringp (third items))) + (apply 'format "%s, %s, and %s" items)) + (t + ;; 4 or more items +- (format "%s, %s" (first items) (vhl/.make-list-string (rest items))))))) ++ (format "%s, %s" (cl-first items) (vhl/.make-list-string (rest items))))))) + + ;; The following makes it trivial to define simple vhl extensions + (defmacro vhl/define-extension (name &rest functions) + "Define a VHL extension called NAME that applies standard VHL + advice to each of FUNCTIONS." +- (assert (first functions)) ++ (cl-assert (cl-first functions)) + (let* ((name-string (symbol-name (eval name))) + (function-list-string (vhl/.make-list-string + (mapcar (lambda (f) (format "`%s'" (symbol-name (eval f)))) + +From 1480383952ac46b7d76df749a8ff7565303bc184 Mon Sep 17 00:00:00 2001 +From: Joerg Bornemann +Date: Fri, 14 Jan 2022 22:31:32 +0100 +Subject: [PATCH 2/3] Use lexical-binding to get rid of lexical-let + +This should be safe as the byte compiler does not warn about free +variables. +--- + volatile-highlights.el | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/volatile-highlights.el b/volatile-highlights.el +index d12b336..e946afd 100644 +--- a/volatile-highlights.el ++++ b/volatile-highlights.el +@@ -1,4 +1,4 @@ +-;;; volatile-highlights.el --- Minor mode for visual feedback on some operations. ++;;; volatile-highlights.el --- Minor mode for visual feedback on some operations. -*- lexical-binding: t; -*- + + ;; Copyright (C) 2001, 2010-2016 K-talo Miyazaki, all rights reserved. + +@@ -671,7 +671,7 @@ extensions." + "Turn on volatile highlighting for `occur'." + (interactive) + +- (lexical-let ((*occur-str* nil)) ;; Text in current line. ++ (let ((*occur-str* nil)) ;; Text in current line. + (defun vhl/ext/occur/.pre-hook-fn () + (save-excursion + (let* ((bol (progn (beginning-of-line) (point))) + +From 5e017d2e4a88acc562d90775cf9c746be2d7f277 Mon Sep 17 00:00:00 2001 +From: Joerg Bornemann +Date: Fri, 14 Jan 2022 22:31:19 +0100 +Subject: [PATCH 3/3] Fix trailing whitespace + +--- + volatile-highlights.el | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/volatile-highlights.el b/volatile-highlights.el +index cb46897..d12b336 100644 +--- a/volatile-highlights.el ++++ b/volatile-highlights.el +@@ -106,7 +106,7 @@ + ;; + ;; (vhl/define-extension 'vip 'vip-yank) + ;; (vhl/install-extension 'vip) +-;; ++;; + ;; - evil-mode + ;; + ;; (vhl/define-extension 'evil 'evil-paste-after 'evil-paste-before +@@ -826,16 +826,16 @@ extensions." + (defadvice hs-show-block (around vhl/ext/hideshow/vhl/around-hook (&optional end)) + (let* ((bol (save-excursion (progn (beginning-of-line) (point)))) + (eol (save-excursion (progn (end-of-line) (point)))) +- (ov-folded (car (delq nil ++ (ov-folded (car (delq nil + (mapcar #'(lambda (ov) + (and (overlay-get ov 'hs) + ov)) + (overlays-in bol (1+ eol)))))) + (boov (and ov-folded (overlay-start ov-folded))) + (eoov (and ov-folded (overlay-end ov-folded)))) +- ++ + ad-do-it +- ++ + (when (and boov eoov) + (vhl/add-range boov eoov)))) + (ad-activate 'hs-show-block)) +@@ -843,7 +843,7 @@ extensions." + (defun vhl/ext/hideshow/on () + "Turn on volatile highlighting for `hideshow'." + (interactive) +- ++ + (cond + ((featurep 'hideshow) + (vhl/ext/hideshow/.activate)) base-commit: 1a1ff7ed8fdaae58aff0e8625399cd7354038ca3 -- 2.37.3