unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob daf1eb6faab16a05840b05aabc59159e65119c28 5882 bytes (raw)
name: gnu/packages/patches/emacs-volatile-highlights-use-cl-lib.patch 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
 
From f5801779ba3e8f52020a34313fdfaa55f6c0c967 Mon Sep 17 00:00:00 2001
From: Joerg Bornemann <emacs@jbornemann.de>
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 <emacs@jbornemann.de>
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 <emacs@jbornemann.de>
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))

debug log:

solving daf1eb6faa ...
found daf1eb6faa in https://yhetil.org/guix-patches/y768rmcnqws.wl-hako@ultrarare.space/

applying [1/1] https://yhetil.org/guix-patches/y768rmcnqws.wl-hako@ultrarare.space/
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

1:22: trailing whitespace.
 
1:28: trailing whitespace.
 
1:73: trailing whitespace.
 
1:102: trailing whitespace.
 
1:104: trailing whitespace.
 
Checking patch gnu/packages/patches/emacs-volatile-highlights-use-cl-lib.patch...
Applied patch gnu/packages/patches/emacs-volatile-highlights-use-cl-lib.patch cleanly.
warning: squelched 6 whitespace errors
warning: 11 lines add whitespace errors.

index at:
100644 daf1eb6faab16a05840b05aabc59159e65119c28	gnu/packages/patches/emacs-volatile-highlights-use-cl-lib.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).