diff options
author | Andy Wingo <wingo@pobox.com> | 2010-06-22 22:34:23 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-06-22 22:39:21 +0200 |
commit | 049ec2029982d98983413365b66ecc7d95060987 (patch) | |
tree | 54c4bb37b0229b70ae0944f5e2f19069ae2cf5e6 | |
parent | 6669cd81371c7449a4fd817589542bafb2f99699 (diff) | |
download | guile-049ec2029982d98983413365b66ecc7d95060987.tar.gz |
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.
-rw-r--r-- | doc/ref/scheme-scripts.texi | 9 | ||||
-rw-r--r-- | libguile/script.c | 8 | ||||
-rw-r--r-- | module/ice-9/boot-9.scm | 18 | ||||
-rw-r--r-- | module/ice-9/deprecated.scm | 17 | ||||
-rwxr-xr-x | module/ice-9/gds-client.scm | 3 |
5 files changed, 19 insertions, 36 deletions
diff --git a/doc/ref/scheme-scripts.texi b/doc/ref/scheme-scripts.texi index f43d360f3..fcb22a6e2 100644 --- a/doc/ref/scheme-scripts.texi +++ b/doc/ref/scheme-scripts.texi @@ -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 diff --git a/libguile/script.c b/libguile/script.c index 7b606ae9c..3c0992165 100644 --- a/libguile/script.c +++ b/libguile/script.c @@ -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, diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index 16f728017..226156752 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -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) diff --git a/module/ice-9/deprecated.scm b/module/ice-9/deprecated.scm index ebc9709fa..4e80a8d22 100644 --- a/module/ice-9/deprecated.scm +++ b/module/ice-9/deprecated.scm @@ -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))) diff --git a/module/ice-9/gds-client.scm b/module/ice-9/gds-client.scm index aa45b543c..848b77485 100755 --- a/module/ice-9/gds-client.scm +++ b/module/ice-9/gds-client.scm @@ -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>)) |