• Stefan Monnier's avatar
    * lisp/shell.el: Use lexical-binding and std completion UI. · c0a193ea
    Stefan Monnier authored
    (shell-filter-ctrl-a-ctrl-b): Work as a preoutput filter.
    (shell-mode): Put shell-filter-ctrl-a-ctrl-b on
    comint-preoutput-filter-functions rather than on
    comint-output-filter-functions.
    (shell-command-completion, shell--command-completion-data)
    (shell-filename-completion, shell-environment-variable-completion)
    (shell-c-a-p-replace-by-expanded-directory): New functions.
    (shell-dynamic-complete-functions, shell-dynamic-complete-command)
    (shell-dynamic-complete-filename, shell-replace-by-expanded-directory)
    (shell-dynamic-complete-environment-variable): Use them.
    (shell-dynamic-complete-as-environment-variable)
    (shell-dynamic-complete-as-command): Remove.
    (shell-match-partial-variable): Match past point.
    * lisp/comint.el: Clean up use of completion-at-point-functions.
    (comint-completion-at-point): New function.
    (comint-mode): Use it completion-at-point-functions.
    (comint-dynamic-complete): Make it obsolete.
    (comint-replace-by-expanded-history-before-point): Add dry-run arg.
    (comint-c-a-p-replace-by-expanded-history): New function.
    (comint-dynamic-complete-functions)
    (comint-replace-by-expanded-history): Use it.
    * lisp/minibuffer.el (completion-table-with-terminator): Allow dynamic
    termination strings.  Try harder to avoid second try-completion.
    (completion-in-region-mode-map): Disable bindings that don't work yet.
    c0a193ea
shell.el 47.9 KB