1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 03:30:27 +02:00

deprecate named-module-use!, load-emacs-interface, and remove --emacs

* module/ice-9/boot-9.scm:
* module/ice-9/deprecated.scm (named-module-use!)
  (load-emacs-interface): Deprecate these.

* module/ice-9/gds-client.scm (run-utility): Redefine to not use
  named-module-use!.

* libguile/script.c (scm_shell_usage): Remove --emacs option.
  (scm_compile_shell_switches): Remove support for --emacs.

* module/ice-9/boot-9.scm (top-repl): Don't muck with --emacs.

* doc/ref/scheme-scripts.texi (Invoking Guile): Remove note about
  --emacs.
This commit is contained in:
Andy Wingo 2010-06-22 22:34:23 +02:00
parent 6669cd8137
commit 049ec20299
5 changed files with 19 additions and 36 deletions

View file

@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Guile Reference Manual.
@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005
@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2010
@c Free Software Foundation, Inc.
@c See the file guile.texi for copying conditions.
@ -162,13 +162,6 @@ Examples}.
Read more command-line arguments, starting from the second line of the
script file. @xref{The Meta Switch}.
@item --emacs
Assume Guile is running as an inferior process of Emacs, and use a
special protocol to communicate with Emacs's Guile interaction mode.
This switch sets the global variable use-emacs-interface to @code{#t}.
This switch is still experimental.
@item --use-srfi=@var{list}
The option @code{--use-srfi} expects a comma-separated list of numbers,
each representing a SRFI number to be loaded into the interpreter

View file

@ -385,7 +385,6 @@ scm_shell_usage (int fatal, char *message)
" Default is to enable autocompilation of source\n"
" files.\n"
" -q inhibit loading of user init file\n"
" --emacs enable Emacs protocol (experimental)\n"
" --use-srfi=LS load SRFI modules for the SRFIs in LS,\n"
" which is a list of numbers like \"2,13,14\"\n"
" -h, --help display this help and exit\n"
@ -454,7 +453,6 @@ scm_compile_shell_switches (int argc, char **argv)
SCM user_load_path = SCM_EOL; /* for -L switch */
int interactive = 1; /* Should we go interactive when done? */
int inhibit_user_init = 0; /* Don't load user init file */
int use_emacs_interface = 0;
int turn_on_debugging = 0;
int dont_turn_on_debugging = 0;
@ -603,9 +601,6 @@ scm_compile_shell_switches (int argc, char **argv)
scm_variable_set_x (scm_c_lookup ("%load-should-autocompile"),
SCM_BOOL_F);
else if (! strcmp (argv[i], "--emacs")) /* use emacs protocol */
use_emacs_interface = 1;
else if (! strcmp (argv[i], "-q")) /* don't load user init */
inhibit_user_init = 1;
@ -676,9 +671,6 @@ scm_compile_shell_switches (int argc, char **argv)
script/command/whatever. */
scm_set_program_arguments (argc ? argc - i : 0, argv + i, argv0);
/* If the --emacs switch was set, now is when we process it. */
scm_c_define ("use-emacs-interface", scm_from_bool (use_emacs_interface));
/* Handle the `-e' switch, if it was specified. */
if (!scm_is_null (entry_point))
tail = scm_cons (scm_cons2 (entry_point,

View file

@ -3331,19 +3331,6 @@ module '(ice-9 q) '(make-q q-length))}."
;;; {Load emacs interface support if emacs option is given.}
;;;
(define (named-module-use! user usee)
(module-use! (resolve-module user) (resolve-interface usee)))
(define (load-emacs-interface)
(and (provided? 'debug-extensions)
(debug-enable 'backtrace))
(named-module-use! '(guile-user) '(ice-9 emacs)))
(define using-readline?
(let ((using-readline? (make-fluid)))
(make-procedure-with-setter
@ -3353,11 +3340,6 @@ module '(ice-9 q) '(make-q q-length))}."
(define (top-repl)
(let ((guile-user-module (resolve-module '(guile-user))))
;; Load emacs interface support if emacs option is given.
(if (and (module-defined? guile-user-module 'use-emacs-interface)
(module-ref guile-user-module 'use-emacs-interface))
(load-emacs-interface))
;; Use some convenient modules (in reverse order)
(set-current-module guile-user-module)

View file

@ -62,7 +62,9 @@
handle-system-error
stack-saved?
the-last-stack
save-stack)
save-stack
named-module-use!
load-emacs-interface)
#:replace (module-ref-submodule module-define-submodule!))
@ -670,3 +672,16 @@ if you need it.")
"`save-stack' is deprecated. Use it from `(ice-9 save-stack)' if you need
it.")
(apply (@ (ice-9 save-stack) save-stack) args))
(define (named-module-use! user usee)
(issue-deprecation-warning
"`named-module-use!' is deprecated. Define it yourself if you need it.")
(module-use! (resolve-module user) (resolve-interface usee)))
(define (load-emacs-interface)
(issue-deprecation-warning
"`load-emacs-interface' and the old emacs interface itself are deprecated.
Use Geiser.")
(and (provided? 'debug-extensions)
(debug-enable 'backtrace))
(named-module-use! '(guile-user) '(ice-9 emacs)))

View file

@ -504,7 +504,8 @@ Thanks!\n\n"
(write (getpid))
(newline)
(force-output)
(named-module-use! '(guile-user) '(ice-9 session))
(module-use! (resolve-module '(guile-user))
(resolve-interface '(ice-9 session)))
(gds-accept-input #f))
(define-method (trap-description (trap <trap>))