mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-09 07:40:39 -08:00
Previously, '$?' (last exit code) was only useful for external commands, and '$$' (last result) was only useful for Lisp commands. * lisp/eshell/esh-cmd.el (eshell-lisp-form-nil-is-failure): New option. (eshell-lisp-command): Set last exit code to 1 when the command signals an error, and 2 if it returns nil (for Lisp forms only). * lisp/eshell/esh-proc.el (eshell-sentinel): Set last result to t if the command succeeded. * test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/while-loop-lisp-form, esh-cmd-test/until-loop-lisp-form) (esh-cmd-test/if-else-statement-lisp-form) (esh-cmd-test/if-else-statement-lisp-form-2) (esh-cmd-test/unless-else-statement-lisp-form): New tests. * test/lisp/eshell/esh-var-tests.el (esh-var-test/last-status-var-lisp-command) (esh-var-test/last-status-var-lisp-form) (esh-var-test/last-status-var-lisp-form-2) (esh-var-test/last-status-var-ext-cmd) (esh-var-test/last-status-var-ext-cmd): New tests. (esh-var-test/last-result-var2): Rename from this... ( esh-var-test/last-result-var-twice): ... to this. * doc/misc/eshell.texi (Variables): Update documentation about '$?' and '$$'. (Control Flow): Mention that '(lisp forms)' can be used as conditionals. * etc/NEWS: Announce this change (bug#57129). |
||
|---|---|---|
| .. | ||
| em-alias.el | ||
| em-banner.el | ||
| em-basic.el | ||
| em-cmpl.el | ||
| em-dirs.el | ||
| em-elecslash.el | ||
| em-extpipe.el | ||
| em-glob.el | ||
| em-hist.el | ||
| em-ls.el | ||
| em-pred.el | ||
| em-prompt.el | ||
| em-rebind.el | ||
| em-script.el | ||
| em-smart.el | ||
| em-term.el | ||
| em-tramp.el | ||
| em-unix.el | ||
| em-xtra.el | ||
| esh-arg.el | ||
| esh-cmd.el | ||
| esh-ext.el | ||
| esh-io.el | ||
| esh-mode.el | ||
| esh-module.el | ||
| esh-opt.el | ||
| esh-proc.el | ||
| esh-util.el | ||
| esh-var.el | ||
| eshell.el | ||