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

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

[nongnu] elpa/idris-mode c1ded381e7 4/7: Replace use of `cl-gensym` with


From: ELPA Syncer
Subject: [nongnu] elpa/idris-mode c1ded381e7 4/7: Replace use of `cl-gensym` with Emacs internal `gensym`
Date: Tue, 22 Nov 2022 04:58:57 -0500 (EST)

branch: elpa/idris-mode
commit c1ded381e75086cd03d7737e75351a734513791d
Author: Marek L <nospam.keram@gmail.com>
Commit: Marek L <nospam.keram@gmail.com>

    Replace use of `cl-gensym` with Emacs internal `gensym`
---
 idris-common-utils.el  | 14 +++++++-------
 idris-compat.el        |  4 ++++
 idris-info.el          |  2 +-
 idris-warnings-tree.el |  2 +-
 inferior-idris.el      |  4 ++--
 5 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/idris-common-utils.el b/idris-common-utils.el
index 857bd36615..8b3cbf12a9 100644
--- a/idris-common-utils.el
+++ b/idris-common-utils.el
@@ -97,7 +97,7 @@ Lisp package.")
 (defmacro idris-save-marker (marker &rest body)
   "Save the contents of the marker MARKER while executing BODY."
   (declare (indent 1))
-  (let ((pos (cl-gensym "pos")))
+  (let ((pos (gensym "pos")))
   `(let ((,pos (marker-position ,marker)))
      (prog1 (progn . ,body)
        (set-marker ,marker ,pos)))))
@@ -107,7 +107,7 @@ Lisp package.")
 More precisely, PROPS are added to the region between the point's
 positions before and after executing BODY."
   (declare (indent 1))
-  (let ((start (cl-gensym)))
+  (let ((start (gensym "foo")))
     `(let ((,start (point)))
        (prog1 (progn ,@body)
          (add-text-properties ,start (point) ,props)))))
@@ -116,7 +116,7 @@ positions before and after executing BODY."
   "Execute BODY and add the properties indicated by SPANS to the
 inserted text (that is, relative to point prior to insertion)."
   (declare (indent 1))
-  (let ((start (cl-gensym)))
+  (let ((start (gensym)))
     `(let ((,start (point)))
        (prog1 (progn ,@body)
          (cl-loop for (begin length props) in ,spans
@@ -174,7 +174,7 @@ inserted text (that is, relative to point prior to 
insertion)."
                       (:underline '(underline))
                       (_ nil)))
          (link-face (if link-href '(idris-link-face) ()))
-         (unique-val (cl-gensym)) ; HACK to stop consecutive mouse-faces from 
interfering
+         (unique-val (gensym)) ; HACK to stop consecutive mouse-faces from 
interfering
          (mousable-face
           (cond ((member (cadr decor) 
idris-semantic-properties-clickable-decors)
                  `((:inherit (,decor-face highlight) :hack ,unique-val)))
@@ -348,9 +348,9 @@ The list of patterns is searched for a HEAD `eq' to the car 
of
 VALUE. If one is found, the BODY is executed with ARGS bound to the
 corresponding values in the CDR of VALUE."
   (declare (indent 1))
-  (let ((operator (cl-gensym "op-"))
-        (operands (cl-gensym "rand-"))
-        (tmp (cl-gensym "tmp-")))
+  (let ((operator (gensym "op-"))
+        (operands (gensym "rand-"))
+        (tmp (gensym "tmp-")))
     `(let* ((,tmp ,value)
             (,operator (car ,tmp))
             (,operands (cdr ,tmp)))
diff --git a/idris-compat.el b/idris-compat.el
index f406e598bb..2811f01bc8 100644
--- a/idris-compat.el
+++ b/idris-compat.el
@@ -30,5 +30,9 @@ attention to case differences."
            (eq t (compare-strings suffix nil nil
                                   string start-pos nil ignore-case))))))
 
+;; gensym fun introduced at or before Emacs version 26.1.
+(unless (fboundp 'gensym)
+  (defalias 'gensym 'cl-gensym))
+
 (provide 'idris-compat)
 ;;; idris-compat.el ends here
diff --git a/idris-info.el b/idris-info.el
index abb44243a0..228f596223 100644
--- a/idris-info.el
+++ b/idris-info.el
@@ -135,7 +135,7 @@ Ensure that the buffer is in `idris-info-mode'."
 (defmacro with-idris-info-buffer (&rest cmds)
   "Execute `CMDS' in a fresh Idris info buffer, then display it to the user."
   (declare (indent defun))
-  (let ((str-info (cl-gensym "STR-INFO")))
+  (let ((str-info (gensym "STR-INFO")))
     `(let ((,str-info (with-temp-buffer
                         ,@cmds
                         (buffer-string))))
diff --git a/idris-warnings-tree.el b/idris-warnings-tree.el
index 1a9ca7a6cb..4f897efd39 100644
--- a/idris-warnings-tree.el
+++ b/idris-warnings-tree.el
@@ -160,7 +160,7 @@ a preview and offer to widen."
   "Like with-slots but works only for structs.
 \(fn (CONC-NAME &rest SLOTS) STRUCT &body BODY)"
   (declare (indent 2))
-  (let ((struct-var (cl-gensym "struct")))
+  (let ((struct-var (gensym "struct")))
     `(let ((,struct-var ,struct))
        (cl-symbol-macrolet
            ,(mapcar (lambda (slot)
diff --git a/inferior-idris.el b/inferior-idris.el
index b0b7ff5527..3e31533382 100644
--- a/inferior-idris.el
+++ b/inferior-idris.el
@@ -309,7 +309,7 @@ asynchronously.
 Note: don't use backquote syntax for SEXP, because various Emacs
 versions cannot deal with that."
   (declare (indent 3))
-  (let ((result (cl-gensym)))
+  (let ((result (gensym)))
     `(let ,(cl-loop for var in saved-vars
                     collect (cl-etypecase var
                               (symbol (list var var))
@@ -354,7 +354,7 @@ or FAILURE-CONT in failure case."
 ignoring intermediate output. If `NO-ERRORS' is non-nil, don't
 trigger warning buffers and don't call `ERROR' if there was an
 Idris error."
-  (let* ((tag (cl-gensym (format "idris-result-%d-"
+  (let* ((tag (gensym (format "idris-result-%d-"
                                  (1+ idris-continuation-counter))))
          (idris-stack-eval-tags (cons tag idris-stack-eval-tags)))
     (apply



reply via email to

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