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

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

[nongnu] elpa/geiser 669960e216 1/3: New geiser-repl-switch[-to-module]


From: ELPA Syncer
Subject: [nongnu] elpa/geiser 669960e216 1/3: New geiser-repl-switch[-to-module] obsoleting switch-to-geiser[module]
Date: Wed, 24 Aug 2022 20:58:29 -0400 (EDT)

branch: elpa/geiser
commit 669960e216131b1ef5e26a368e28053eeab8aa9a
Author: jao <jao@gnu.org>
Commit: jao <jao@gnu.org>

    New geiser-repl-switch[-to-module] obsoleting switch-to-geiser[module]
---
 doc/cheat.texi        |  4 ++--
 doc/parens.texi       |  4 ++--
 doc/repl.texi         |  2 +-
 elisp/geiser-debug.el |  2 --
 elisp/geiser-doc.el   |  4 ++--
 elisp/geiser-impl.el  |  6 ++++--
 elisp/geiser-mode.el  |  2 +-
 elisp/geiser-repl.el  | 26 ++++++++++++++++----------
 elisp/geiser.el       |  2 +-
 news.org              |  8 +++++---
 10 files changed, 34 insertions(+), 26 deletions(-)

diff --git a/doc/cheat.texi b/doc/cheat.texi
index 105d0c3176..aa51eb7a89 100644
--- a/doc/cheat.texi
+++ b/doc/cheat.texi
@@ -137,7 +137,7 @@ third key not modified by @key{Control}; e.g.,
 @multitable @columnfractions .20 .4 .4
 @headitem Key @tab Command @tab Description
 @item C-c C-z
-@tab @code{switch-to-geiser}
+@tab @code{geiser-repl-switch}
 @tab Start Scheme REPL, or jump to previous buffer
 @item C-c M-o
 @tab @code{geiser-repl-clear-buffer}
@@ -182,7 +182,7 @@ third key not modified by @key{Control}; e.g.,
 @tab (comint commands)
 @tab Previous/next prompt inputs
 @item C-c C-m
-@tab @code{switch-to-geiser-module}
+@tab @code{geiser-repl-switch-to-module}
 @tab Set current module
 @item C-c C-i
 @tab @code{geiser-repl-import-module}
diff --git a/doc/parens.texi b/doc/parens.texi
index 3c2c38d0e5..b95958adcc 100644
--- a/doc/parens.texi
+++ b/doc/parens.texi
@@ -243,7 +243,7 @@ startup.
 @anchor{switching-repl-buff} Once you have a working @i{geiser-mode},
 you can switch from Scheme source buffers to the REPL or @kbd{C-c
 C-z}.  Those shortcuts map to the interactive command
-@code{switch-to-geiser}.
+@code{geiser-repl-switch}.
 
 @cindex switching to module
 If you use a numeric prefix, as in @kbd{C-u C-c C-z}, besides being
@@ -257,7 +257,7 @@ command is also bound to @kbd{C-c C-a}.
 Once you're in the REPL, the same @kbd{C-c C-z} shortcut will bring
 you back to the buffer you jumped from, provided you don't kill the
 Scheme process in between.  This is why the command is called
-@i{switch-to-geiser} instead of @i{switch-to-repl}, and what makes it
+@i{geiser-repl-switch} instead of @i{switch-to-repl}, and what makes it
 really handy, if you ask me.
 
 @cindex switching schemes
diff --git a/doc/repl.texi b/doc/repl.texi
index 6734d82c35..0c20dccd17 100644
--- a/doc/repl.texi
+++ b/doc/repl.texi
@@ -159,7 +159,7 @@ In tune with Geiser's
 evaluations in the REPL take place in the namespace of the current
 module.  As noted above, the REPL's prompt tells you the name of the
 current module.  To switch to a different one, you can use the command
-@command{switch-to-geiser-module}, bound to @kbd{C-c C-m}.  You'll
+@command{geiser-repl-switch-to-module}, bound to @kbd{C-c C-m}.  You'll
 notice that Geiser simply uses a couple of meta-commands provided by
 the Scheme REPL (the stock @command{,m} in Guile and Chicken and the
 (geiser-defined) @command{,enter} in Racket), and that it doesn't even
diff --git a/elisp/geiser-debug.el b/elisp/geiser-debug.el
index e8392e6ce3..9b6073238a 100644
--- a/elisp/geiser-debug.el
+++ b/elisp/geiser-debug.el
@@ -231,8 +231,6 @@ buffer.")
         (newline 2)
         (and no (> no 0))))))
 
-(declare-function switch-to-geiser "geiser-repl")
-
 (defun geiser-debug--display-retort (what ret &optional res _auto-p)
   (let* ((err (geiser-eval--retort-error ret))
          (key (geiser-eval--error-key err))
diff --git a/elisp/geiser-doc.el b/elisp/geiser-doc.el
index f8e2bebe4e..8aca591a23 100644
--- a/elisp/geiser-doc.el
+++ b/elisp/geiser-doc.el
@@ -291,11 +291,11 @@ help (e.g. browse an HTML page) implementing this 
method.")
     map)
   "Keymap for `geiser-doc-mode'.")
 
-(declare-function switch-to-geiser "geiser-repl")
+(declare-function geiser-repl--switch-to-repl "geiser-repl")
 
 (defun geiser-doc-switch-to-repl ()
   (interactive)
-  (switch-to-geiser nil nil (current-buffer)))
+  (geiser-repl--switch-to-repl))
 
 (geiser-menu--defmenu doc geiser-doc-mode-map
   ("Next link" ("n") forward-button)
diff --git a/elisp/geiser-impl.el b/elisp/geiser-impl.el
index 67258cc8d7..67af8f4328 100644
--- a/elisp/geiser-impl.el
+++ b/elisp/geiser-impl.el
@@ -211,7 +211,8 @@ switcher (switch-to-NAME), and provides geiser-NAME."
     (unless (symbolp name)
       (error "Malformed implementation name: %s" name))
     (let ((runner (intern (format "run-%s" name)))
-          (switcher (intern (format "switch-to-%s" name)))
+          (old-switcher (intern (format "switch-to-%s" name)))
+          (switcher (intern (format "geiser-%s-switch" name)))
           (runner-doc (format "Start a new %s REPL." name))
           (switcher-doc (format "Switch to a running %s REPL, or start one."
                                 name))
@@ -224,10 +225,11 @@ switcher (switch-to-NAME), and provides geiser-NAME."
            ,runner-doc
            (interactive)
            (run-geiser ',name))
+         (define-obsolete-function-alias ',old-switcher ',switcher "Geiser 
0.26")
          (defun ,switcher (&optional ,ask)
            ,switcher-doc
            (interactive "P")
-           (switch-to-geiser ,ask ',name))
+           (geiser-repl-switch ,ask ',name))
          (geiser-menu--add-impl ',name ',runner ',switcher)))))
 
 ;;;###autoload
diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el
index bc074f091c..464bf4568e 100644
--- a/elisp/geiser-mode.el
+++ b/elisp/geiser-mode.el
@@ -86,7 +86,7 @@ result is an error msg."
 ;;; Evaluation commands:
 
 (defun geiser--go-to-repl ()
-  (switch-to-geiser nil nil (current-buffer))
+  (geiser-repl--switch-to-repl)
   (push-mark)
   (goto-char (point-max)))
 
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index bf26f1a891..95137c412a 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -751,7 +751,7 @@ If SAVE-HISTORY is non-nil, save CMD in the REPL history."
           (insert "\nIt's been nice interacting with you!\n")
           (insert
            (substitute-command-keys
-            "Press \\[switch-to-geiser] to bring me back.\n")))))))
+            "Press \\[geiser-repl-switch] to bring me back.\n")))))))
 
 (defun geiser-repl--on-kill ()
   (geiser-repl--on-quit)
@@ -835,7 +835,7 @@ If SAVE-HISTORY is non-nil, save CMD in the REPL history."
         (comint-send-string proc "\n")))))
 
 (define-obsolete-function-alias 'geiser-repl--maybe-send
-  #'geiser-repl-maybe-send "0.25.2")
+  #'geiser-repl-maybe-send "0.26")
 
 (defun geiser-repl-maybe-send ()
   "Handle the current input at the REPL's prompt.
@@ -907,7 +907,7 @@ buffer."
        :enable (geiser--symbol-at-point))
       --
       ("Load scheme file..." "\C-c\C-l" geiser-load-file)
-      ("Switch to module..." "\C-c\C-m" switch-to-geiser-module)
+      ("Switch to module..." "\C-c\C-m" geiser-repl-switch-to-module)
       ("Import module..." "\C-c\C-i" geiser-repl-import-module)
       ("Add to load path..." "\C-c\C-r" geiser-add-to-load-path)
       --
@@ -940,7 +940,8 @@ buffer."
       --
       ("Kill Scheme interpreter" "\C-c\C-q" geiser-repl-exit
        :enable (geiser-repl--live-p))
-      ("Restart" "\C-c\C-z" switch-to-geiser :enable (not 
(geiser-repl--live-p)))
+      ("Restart" "\C-c\C-z" geiser-repl-switch
+       :enable (not (geiser-repl--live-p)))
 
       --
       (custom "REPL options" geiser-repl))
@@ -1024,7 +1025,9 @@ over a Unix-domain socket."
     (save-window-excursion
       (with-current-buffer b (funcall cmd)))))
 
-(defun switch-to-geiser (&optional ask impl buffer)
+(define-obsolete-function-alias 'switch-to-geiser 'geiser-repl-switch "0.26")
+
+(defun geiser-repl-switch (&optional ask impl buffer)
   "Switch to running Geiser REPL.
 
 If REPL is the current buffer, switch to the previously used
@@ -1053,7 +1056,10 @@ If no REPL is running, execute `run-geiser' to start a 
fresh one."
           (t (call-interactively 'run-geiser)))
     (geiser-repl--maybe-remember-scm-buffer buffer)))
 
-(defun switch-to-geiser-module (&optional module buffer)
+(define-obsolete-function-alias 'switch-to-geiser-module
+  'geiser-repl-switch-to-module "0.26")
+
+(defun geiser-repl-switch-to-module (&optional module buffer)
   "Switch to running Geiser REPL and try to enter a given module."
   (interactive)
   (let* ((module (or module
@@ -1063,13 +1069,13 @@ If no REPL is running, execute `run-geiser' to start a 
fresh one."
                    (geiser-repl--enter-cmd geiser-impl--implementation
                                            module))))
     (unless (eq major-mode 'geiser-repl-mode)
-      (switch-to-geiser nil nil (or buffer (current-buffer))))
+      (geiser-repl-switch nil nil (or buffer (current-buffer))))
     (geiser-repl--send cmd)))
 
 (defun geiser-repl--switch-to-repl (arg)
   (if arg
-      (switch-to-geiser-module (geiser-eval--get-module) (current-buffer))
-    (switch-to-geiser nil nil (current-buffer))))
+      (geiser-repl-switch-to-module (geiser-eval--get-module) (current-buffer))
+    (geiser-repl-switch nil nil (current-buffer))))
 
 (defun geiser-repl--repl-buffer-p ()
   (and (buffer-live-p geiser-repl--repl) geiser-repl--repl))
@@ -1096,7 +1102,7 @@ If no REPL is running, execute `run-geiser' to start a 
fresh one."
          (cmd (and module
                    (geiser-repl--import-cmd geiser-impl--implementation
                                             module))))
-    (switch-to-geiser nil nil (current-buffer))
+    (geiser-repl--switch-to-repl)
     (geiser-repl--send cmd)))
 
 (defun geiser-repl-exit (&optional arg)
diff --git a/elisp/geiser.el b/elisp/geiser.el
index f9a246cfd5..89aad339a2 100644
--- a/elisp/geiser.el
+++ b/elisp/geiser.el
@@ -86,7 +86,7 @@
   t)
 
 ;;;###autoload
-(autoload 'switch-to-geiser "geiser-repl"
+(autoload 'geiser-repl-switch "geiser-repl"
   "Switch to a running one Geiser REPL." t)
 
 ;;;###autoload
diff --git a/news.org b/news.org
index 15420e47cc..6a98a18aa0 100644
--- a/news.org
+++ b/news.org
@@ -1,7 +1,9 @@
-* Version 0.25.2 (unreleased)
+* Version 0.26 (unreleased)
 
-  - Ask interactively for REPL startup on C-c C-k as needed
-  - New public command geiser-repl-maybe-send
+  - Ask interactively for REPL startup on C-c C-k as needed.
+  - New public command geiser-repl-maybe-send.
+  - ~switch-to-geiser~ and ~switch-to-geiser-module~ deprecated in favour of
+    ~geiser-repl-switch~ and geiser-~repl-switch-to-module~.
 
 * Version 0.25.1 (August 2022)
 



reply via email to

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