diff options
| author | Lars Ingebrigtsen | 2021-07-15 10:33:22 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-07-15 10:33:22 +0200 |
| commit | eb4a120ea580bf628f65ff7e571016d5efa2293e (patch) | |
| tree | f3adef2727d997acb3331f7487346f99dc86563a | |
| parent | 28e7b5104141225f997c82c168a5e60a80caaf3e (diff) | |
| download | emacs-eb4a120ea580bf628f65ff7e571016d5efa2293e.tar.gz emacs-eb4a120ea580bf628f65ff7e571016d5efa2293e.zip | |
Allow using spaces in `inferior-lisp' command names
* lisp/progmodes/inf-lisp.el (inferior-lisp): Allow using spaces
in the command names (by splitting using shell syntax) (bug#16005).
| -rw-r--r-- | lisp/progmodes/inf-lisp.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index 0a72ae96bba..e69a9ff394e 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el | |||
| @@ -62,6 +62,7 @@ | |||
| 62 | 62 | ||
| 63 | (require 'comint) | 63 | (require 'comint) |
| 64 | (require 'lisp-mode) | 64 | (require 'lisp-mode) |
| 65 | (require 'shell) | ||
| 65 | 66 | ||
| 66 | 67 | ||
| 67 | (defgroup inferior-lisp nil | 68 | (defgroup inferior-lisp nil |
| @@ -289,15 +290,20 @@ to continue it." | |||
| 289 | "Run an inferior Lisp process, input and output via buffer `*inferior-lisp*'. | 290 | "Run an inferior Lisp process, input and output via buffer `*inferior-lisp*'. |
| 290 | If there is a process already running in `*inferior-lisp*', just switch | 291 | If there is a process already running in `*inferior-lisp*', just switch |
| 291 | to that buffer. | 292 | to that buffer. |
| 293 | |||
| 292 | With argument, allows you to edit the command line (default is value | 294 | With argument, allows you to edit the command line (default is value |
| 293 | of `inferior-lisp-program'). Runs the hooks from | 295 | of `inferior-lisp-program'). Runs the hooks from |
| 294 | `inferior-lisp-mode-hook' (after the `comint-mode-hook' is run). | 296 | `inferior-lisp-mode-hook' (after the `comint-mode-hook' is run). |
| 297 | |||
| 298 | If any parts of the command name contains spaces, they should be | ||
| 299 | quoted using shell quote syntax. | ||
| 300 | |||
| 295 | \(Type \\[describe-mode] in the process buffer for a list of commands.)" | 301 | \(Type \\[describe-mode] in the process buffer for a list of commands.)" |
| 296 | (interactive (list (if current-prefix-arg | 302 | (interactive (list (if current-prefix-arg |
| 297 | (read-string "Run lisp: " inferior-lisp-program) | 303 | (read-string "Run lisp: " inferior-lisp-program) |
| 298 | inferior-lisp-program))) | 304 | inferior-lisp-program))) |
| 299 | (if (not (comint-check-proc "*inferior-lisp*")) | 305 | (if (not (comint-check-proc "*inferior-lisp*")) |
| 300 | (let ((cmdlist (split-string cmd))) | 306 | (let ((cmdlist (split-string-shell-command cmd))) |
| 301 | (set-buffer (apply (function make-comint) | 307 | (set-buffer (apply (function make-comint) |
| 302 | "inferior-lisp" (car cmdlist) nil (cdr cmdlist))) | 308 | "inferior-lisp" (car cmdlist) nil (cdr cmdlist))) |
| 303 | (inferior-lisp-mode))) | 309 | (inferior-lisp-mode))) |