aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorJim Porter2023-03-20 17:25:54 -0700
committerJim Porter2023-03-28 12:03:29 -0700
commitcde38f0df3fa3540ce411a48d95da1c2f1be1b60 (patch)
tree7cf41e920e16da219f6a2bc26dcb803bc2538916 /java
parentbb088885df7a8e8a32670286a8636db8c6fadcf4 (diff)
downloademacs-cde38f0df3fa3540ce411a48d95da1c2f1be1b60.tar.gz
emacs-cde38f0df3fa3540ce411a48d95da1c2f1be1b60.zip
Avoid parsing some Eshell forms when performing completion
During completion, we want to evaluate most Eshell forms (e.g. variable references), but skip others (e.g. globbing, subcommands). For globbing, we want to pass the literal glob to Pcomplete so it can use the glob for selecting completion candidates. For subcommands (including Lisp forms), we especially want to avoid evaluation, since they can produce arbitary side effects! (Bug#50470) * lisp/eshell/esh-cmd.el (eshell-allow-commands): New variable... (eshell-commands-forbidden): New error... (eshell-named-command, eshell-lisp-command): ... use them. * lisp/eshell/em-cmpl.el (eshell-complete--eval-argument-form): Disallow command forms and handle errors ourselves. (eshell-complete-parse-arguments): Don't parse glob characters. * test/lisp/eshell/em-cmpl-tests.el (em-cmpl-test/parse-arguments/unevaluated-subcommand) (em-cmpl-test/parse-arguments/unevaluated-lisp-form) (em-cmpl-test/parse-arguments/unevaluated-inner-subcommand) (em-cmpl-test/file-completion/glob, em-cmpl-test/command-completion) (em-cmpl-test/subcommand-completion): New tests. (em-cmpl-test/parse-arguments/pipeline): Remove superfluous let-binding. (em-cmpl-test/file-completion/after-list): Use a list variable rather than a subexpression; the latter is no longer evaluated during completion. (em-cmpl-test/lisp-function-completion): Check "$(func)" syntax.
Diffstat (limited to 'java')
0 files changed, 0 insertions, 0 deletions