emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/pcre2el b093275bff 1/2: Silence byte-compiler dealing with


From: ELPA Syncer
Subject: [nongnu] elpa/pcre2el b093275bff 1/2: Silence byte-compiler dealing with replaced function
Date: Tue, 20 Feb 2024 13:00:24 -0500 (EST)

branch: elpa/pcre2el
commit b093275bffb103b94c0ddfae9200d48b8f8843ea
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Silence byte-compiler dealing with replaced function
    
    In [1: 34b35c0] we started to use the function/macro available
    in the current Emacs version.  This commit additionally keeps
    the byte-compiler from reporting that the other is undefined.
    
    1: 2023-01-03 34b35c0ba0f4d0658705591467617e9d7b3c516c
       Use ‘reb-target-value’ instead of ‘reb-target-binding’ if available
---
 pcre2el.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/pcre2el.el b/pcre2el.el
index fbacae5369..12c24f87db 100644
--- a/pcre2el.el
+++ b/pcre2el.el
@@ -3124,9 +3124,11 @@ in character classes as outside them."
   (around rxt () activate compile)
   "This function is hacked for emulated PCRE syntax and regexp conversion."
   (if (eq reb-re-syntax 'pcre)
-      (let ((src (if (fboundp #'reb-target-value)
-                     (reb-target-value 'reb-regexp-src)
-                   (reb-target-binding reb-regexp-src))))
+      (let ((src (cond ((fboundp 'reb-target-value)
+                        (reb-target-value 'reb-regexp-src))
+                       ((fboundp 'reb-target-binding)
+                        (reb-target-binding reb-regexp-src))
+                       ((error "BUG")))))
         (if src
             (insert "\n/" (replace-regexp-in-string "/" "\\/" src t t) "/")
           (insert "\n//")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]