summaryrefslogtreecommitdiff
path: root/lisp/eshell/em-cmpl.el
AgeCommit message (Collapse)Author
2024-05-29Use 'esh-module-autoload' for Eshell modules' defgroupsJim Porter
This will let modules define their own, regular autoloads, independent of the core Eshell machinery for defining modules. * lisp/eshell/em-alias.el (em-alias): * lisp/eshell/em-banner.el (em-banner): * lisp/eshell/em-basic.el (em-basic): * lisp/eshell/em-cmpl.el (em-cmpl): * lisp/eshell/em-dirs.el (em-dirs): * lisp/eshell/em-elecslash.el (em-elecslash): * lisp/eshell/em-extpipe.el: * lisp/eshell/em-glob.el (em-glob): * lisp/eshell/em-hist.el (em-hist): * lisp/eshell/em-ls.el (em-ls): * lisp/eshell/em-pred.el (em-pred): * lisp/eshell/em-prompt.el (em-prompt): * lisp/eshell/em-rebind.el (em-rebind): * lisp/eshell/em-script.el (em-script): * lisp/eshell/em-smart.el (em-smart): * lisp/eshell/em-term.el (em-term): * lisp/eshell/em-tramp.el (em-tramp): * lisp/eshell/em-unix.el (em-unix): * lisp/eshell/em-xtra.el (em-xtra): Use 'esh-module-autoload'. * lisp/eshell/esh-module.el ("esh-module-loaddefs"): Load this instead of "esh-groups". * .gitignore: Change esh-groups.el to esh-module-loaddefs.el
2024-01-02Merge from savannah/emacs-29Po Lu
dc4e6b13296 ; Update copyright years in more files 64b37776318 ; Run set-copyright from admin.el 8e1c56ae467 ; Add 2024 to copyright years # Conflicts: # doc/misc/modus-themes.org # doc/misc/texinfo.tex # etc/NEWS # etc/refcards/ru-refcard.tex # etc/themes/modus-operandi-theme.el # etc/themes/modus-themes.el # etc/themes/modus-vivendi-theme.el # lib/alloca.in.h # lib/binary-io.h # lib/c-ctype.h # lib/c-strcasecmp.c # lib/c-strncasecmp.c # lib/careadlinkat.c # lib/cloexec.c # lib/close-stream.c # lib/diffseq.h # lib/dup2.c # lib/filemode.h # lib/fpending.c # lib/fpending.h # lib/fsusage.c # lib/getgroups.c # lib/getloadavg.c # lib/gettext.h # lib/gettime.c # lib/gettimeofday.c # lib/group-member.c # lib/malloc.c # lib/md5-stream.c # lib/md5.c # lib/md5.h # lib/memmem.c # lib/memrchr.c # lib/nanosleep.c # lib/save-cwd.h # lib/sha1.c # lib/sig2str.c # lib/stdlib.in.h # lib/strtoimax.c # lib/strtol.c # lib/strtoll.c # lib/time_r.c # lib/xalloc-oversized.h # lisp/auth-source-pass.el # lisp/emacs-lisp/lisp-mnt.el # lisp/emacs-lisp/timer.el # lisp/info-look.el # lisp/jit-lock.el # lisp/loadhist.el # lisp/mail/rmail.el # lisp/net/ntlm.el # lisp/net/webjump.el # lisp/progmodes/asm-mode.el # lisp/progmodes/project.el # lisp/progmodes/sh-script.el # lisp/textmodes/flyspell.el # lisp/textmodes/reftex-toc.el # lisp/textmodes/reftex.el # lisp/textmodes/tex-mode.el # lisp/url/url-gw.el # m4/alloca.m4 # m4/clock_time.m4 # m4/d-type.m4 # m4/dirent_h.m4 # m4/dup2.m4 # m4/euidaccess.m4 # m4/fchmodat.m4 # m4/filemode.m4 # m4/fsusage.m4 # m4/getgroups.m4 # m4/getloadavg.m4 # m4/getrandom.m4 # m4/gettime.m4 # m4/gettimeofday.m4 # m4/gnulib-common.m4 # m4/group-member.m4 # m4/inttypes.m4 # m4/malloc.m4 # m4/manywarnings.m4 # m4/mempcpy.m4 # m4/memrchr.m4 # m4/mkostemp.m4 # m4/mktime.m4 # m4/nproc.m4 # m4/nstrftime.m4 # m4/pathmax.m4 # m4/pipe2.m4 # m4/pselect.m4 # m4/pthread_sigmask.m4 # m4/readlink.m4 # m4/realloc.m4 # m4/sig2str.m4 # m4/ssize_t.m4 # m4/stat-time.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/stdio_h.m4 # m4/stdlib_h.m4 # m4/stpcpy.m4 # m4/strnlen.m4 # m4/strtoimax.m4 # m4/strtoll.m4 # m4/time_h.m4 # m4/timegm.m4 # m4/timer_time.m4 # m4/timespec.m4 # m4/unistd_h.m4 # m4/warnings.m4 # nt/configure.bat # nt/preprep.c # test/lisp/register-tests.el
2024-01-02; Add 2024 to copyright yearsPo Lu
2023-10-24Add 'eshell-special-ref-alist' to allow extending Eshell special refsJim Porter
* lisp/eshell/esh-cmd.el (eshell--region-p, eshell-with-temp-command): Move to... * lisp/eshell/esh-util.el (eshell--region-p) (eshell-with-temp-command): ... here. * lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Fix edge case when 'end' is at beginning of (possibly-narrowed) buffer. * lisp/eshell/esh-arg.el (eshell-special-ref-alist) New variable... (eshell-special-ref-default): ... New option... (eshell--special-ref-function): ... New function... (eshell-parse-special-reference): ... use them. (eshell-insert-special-reference): New function. (eshell-complete-special-reference): Reimplement to use a nested call to Pcomplete. (eshell-complete-buffer-ref): New function. * lisp/eshell/esh-proc.el (eshell-proc-initialize): Add "process" special ref type here. (eshell-complete-process-ref): New function. * doc/misc/eshell.texi (Bugs and ideas): Remove now-implemented idea.
2023-10-02Support Eshell iterative evaluation in the backgroundJim Porter
This really just generalizes Eshell's previous support for iterative evaluation of a single current command to a list of multiple commands, of which at most one can be in the foreground (bug#66066). * lisp/eshell/esh-cmd.el (eshell-last-async-procs) (eshell-current-command): Make obsolete in favor of... (eshell-foreground-command): ... this (eshell-background-commands): New variable. (eshell-interactive-process-p): Make obsolete. (eshell-head-process, eshell-tail-process): Use 'eshell-foreground-command'. (eshell-cmd-initialize): Initialize new variables. (eshell-add-command, eshell-remove-command) (eshell-commands-for-process): New functions. (eshell-parse-command): Make 'eshell-do-subjob' the outermost call. (eshell-do-subjob): Call 'eshell-resume-eval' to split this command off from its parent forms. (eshell-eval-command): Use 'eshell-add-command'. (eshell-resume-command): Use 'eshell-commands-for-process'. (eshell-resume-eval): Take a COMMAND argument. Return ':eshell-background' form for deferred background commands. (eshell-do-eval): Remove check for 'eshell-current-subjob-p'. This is handled differently now. * lisp/eshell/eshell.el (eshell-command): Wait for all processes to exit when running synchronously. * lisp/eshell/esh-mode.el (eshell-intercept-commands) (eshell-watch-for-password-prompt): * lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): * lisp/eshell/em-smart.el (eshell-smart-display-move): Use 'eshell-foreground-command'. * test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/background/simple-command) (esh-cmd-test/background/subcommand): New tests. (esh-cmd-test/throw): Use 'eshell-foreground-command'. * test/lisp/eshell/eshell-tests.el (eshell-test/queue-input): Use 'eshell-foreground-command'. * test/lisp/eshell/em-script-tests.el (em-script-test/source-script/background): Make the test script more complex. * test/lisp/eshell/eshell-tests.el (eshell-test/eshell-command/pipeline-wait): New test. * doc/misc/eshell.texi (Bugs and ideas): Remove implemented feature.
2023-08-23Enable remote file name completion in eshell depending on command (bug#65356)Michael Albinus
* lisp/eshell/em-cmpl.el (eshell-cmpl-remote-file-ignore): New user option. (eshell-cmpl-initialize): Use it. (eshell-external-command-p): New defun. (eshell-complete-parse-arguments): Set `pcomplete-remote-file-ignore' depending on the command.
2023-03-28Avoid parsing some Eshell forms when performing completionJim Porter
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.
2023-03-11Add support for completing special references (e.g. buffers) in EshellJim Porter
* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Handle special references. * lisp/eshell/em-arg.el (eshell-parse-special-reference): Ensure point is just after the "#<" when incomplete, and handle backslash escapes more thoroughly. (eshell-complete-special-reference): New function. * test/lisp/eshell/esh-arg-tests.el (esh-arg-test/special-reference/default) (esh-arg-test/special-reference/buffer) (esh-arg-test/special-reference/special): * test/lisp/eshell/em-cmpl-tests.el (em-cmpl-test/special-ref-completion/type) (em-cmpl-test/special-ref-completion/implicit-buffer) (em-cmpl-test/special-ref-completion/buffer): New tests.
2023-02-23Add support for completing quoted variables in Eshell like $'FOO'Jim Porter
This also adds the ability for Pcomplete handlers to set their own exit functions that will get called as appropriate. * lisp/pcomplete.el (pcomplete-default-exit-function): New function. (pcomplete-exit-function): New variable... (pcomplete-completions-at-point): ... let-bind and use it. * lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Handle quoted variables. We also build the 'posns' list from right-to-left now. * lisp/eshell/esh-var.el (eshell-envvar-names): Ensure that variable aliases are included in this list. (eshell-complete-variable-reference): Handle quoted variables and set the exit function on the completions. (eshell-variables-list): Simplify. We now add the trailing slash for directories in the exit function inside 'eshell-complete-variable-reference'. * test/lisp/eshell/em-cmpl-tests.el (em-cmpl-test/quoted-variable-ref-completion) (em-cmpl-test/variable-ref-completion/directory): New tests.
2023-02-23; Throw strings as the values for 'eshell-incomplete'Jim Porter
This lets us distinguish between cases like "'foo" and "$'foo". * lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Use strings when checking the delimiter. * lisp/eshell/em-glob.el (eshell-parse-glob-chars): * lisp/eshell/em-pred.el (eshell-parse-arg-modifier): * lisp/eshell/esh-arg.el (eshell-parse-backslash) (eshell-parse-literal-quote, eshell-parse-double-quote) (eshell-parse-special-reference): * lisp/eshell/esh-cmd.el (eshell-parse-subcommand-argument) (eshell-parse-lisp-argument): * lisp/eshell/esh-var (eshell-parse-variable-ref) (eshell-parse-indices): Throw strings instead of characters. * lisp/eshell/esh-mode.el (eshell-parse-command-input): Print delimiter as a string.
2023-02-15; Don't require 'eshell' in other Eshell filesJim Porter
This isn't necessary and just makes unloading Eshell harder. * lisp/eshell/em-banner.el: * lisp/eshell/em-basic.el: * lisp/eshell/em-cmpl.el: * lisp/eshell/em-glob.el: * lisp/eshell/em-prompt.el: * lisp/eshell/em-rebind.el: * lisp/eshell/em-smart.el: * lisp/eshell/em-term.el: * lisp/eshell/em-tramp.el: * lisp/eshell/em-xtra.el: Stop requiring 'eshell', and instead require specific subcomponents. * lisp/eshell/em-hist.el: Stop requiring 'eshell' and 'em-pred' (extension modules shouldn't require each other so they can be independent). (eshell-hist-parse-modifier): Ensure this can only be called when 'em-pred' is in use, and declare the relevant function. * lisp/eshell/eshell.el (eshell-non-interactive-p): Move from here... * lisp/eshell/esh-mode.el (eshell-non-interactive-p): ... to here.
2023-02-02Merge from origin/emacs-29Stefan Kangas
9715715ac16 (eshell--complete-commands-list): Fix regression in fix t... ea1bb263153 * doc/emacs/basic.texi (Repeating): Mention describe-repe... f91bf9df892 Unbreak the MS-Windows build
2023-02-01(eshell--complete-commands-list): Fix regression in fix to bug#48995Nicolas Martyanoff
Copyright-Paperwork-Exempt: Yes * lisp/eshell/em-cmpl.el (eshell--complete-commands-list): Fix misuse of `completion-table-dynamic` when completing a file name.
2023-01-30During completion, convert all Eshell arguments to stringsJim Porter
Eshell was already converting some types (numbers, nil) to strings, as well as fixing up multiple-dot forms like ".../", so this way is more consistent and should produce fewer problems for Pcomplete functions. * lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Always convert parsed arguments to strings. * test/lisp/eshell/em-cmpl-tests.el (eshell-arguments-equal, eshell-arguments-equal--equal-explainer): New functions. (em-cmpl-test/parse-arguments/pipeline) (em-cmpl-test/parse-arguments/multiple-dots) (em-cmpl-test/parse-arguments/variable/numeric) (em-cmpl-test/parse-arguments/variable/nil) (em-cmpl-test/parse-arguments/variable/list) (em-cmpl-test/parse-arguments/variable/splice): Use 'eshell-arguments-equal'.
2023-01-30Properly parse Eshell variable splices for interactive completionJim Porter
Previously, the code simply ignored the splice operator, which usually worked, but isn't actually correct. * lisp/eshell/em-cmpl.el (eshell-complete-eval-argument-form): New function. (eshell-complete-parse-arguments): Properly parse variable splices. * test/lisp/eshell/em-cmpl-tests.el (em-cmpl-test/parse-arguments/variable/splice): New test.
2023-01-14Make 'eshell-bol' obsoleteJim Porter
Now that Eshell uses fields for its output, 'eshell-bol' is no longer needed, and we can just use 'beginning-of-line'. * lisp/eshell/esh-mode.el (eshell-bol): Mark obsolete. (eshell-mode-map): Remove 'C-a' mapping. (eshell-command-map): Use 'move-beginning-of-line'. (eshell-move-argument, eshell-kill-input): Use 'beginning-of-line'. (eshell-get-old-input): Remove unnecessary call to 'eshell-skip-prompt-function'. * lisp/eshell/em-rebind.el (eshell-rebind-keys-alist): Remove 'C-a' and '<home>' mappings; the global mapping for these ('move-beginning-of-line') does the same thing now. * lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): * lisp/eshell/em-elecslash.el (eshell-electric-forward-slash): * lisp/eshell/em-hist.el (eshell-hist-word-reference) (eshell-previous-matching-input-from-input, eshell-test-imatch): * lisp/eshell/em-prompt.el (eshell-backward-matching-input): * lisp/eshell/em-rebind.el (eshell-point-within-input-p): * test/lisp/eshell/eshell-tests.el (eshell-test/forward-arg): Use 'beginning-of-line'. * test/lisp/eshell/eshell-tests.el (eshell-test/run-old-command): Rename to... (eshell-test/get-old-input): ... this, and expand the test.
2023-01-01Merge from origin/emacs-29Eli Zaretskii
cae528457c ; Add 2023 to copyright years. b394359261 Improve documentation of 'isearch-open-overlay-temporary' ab3210e709 Document 'use-package' in the 2 main manuals # Conflicts: # etc/refcards/ru-refcard.tex # lib/explicit_bzero.c # m4/explicit_bzero.m4
2023-01-01; Add 2023 to copyright years.Eli Zaretskii
2022-12-15Add support for the "splice operator" in EshellJim Porter
This allows splicing lists in-place in argument lists, which is particularly important when defining aliases using the '$*' special variable (bug#59960). * lisp/eshell/esh-var.el (eshell-parse-variable): Add support for the splice operator. (eshell-interpolate-variable): Let 'eshell-parse-variable' handle adding 'eshell-escape-arg'. (eshell-complete-variable-reference): Handle the splice operator. * lisp/eshell/esh-arg.el (eshell-concat-groups) (eshell-prepare-splice): New functions... (eshell-resolve-current-argument): ... use them. (eshell-splice-args): New function. * lisp/eshell/esh-cmd.el (eshell-rewrite-named-command): Handle 'eshell-splice-args'. * lisp/eshell/esh-util.el (eshell-list-to-string): New function... (eshell-flatten-and-stringify): ... use it. * lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Remove 'eshell-splice-args' sigils in Eshell command forms so that we can perform completion on splice-expansions. * lisp/eshell/em-unix.el (eshell-complete-host-reference): Don't try to complete arguments containing "$@". * test/lisp/eshell/esh-var-tets.el (esh-var-test/interp-list-var) (esh-var-test/interp-list-var-concat, esh-var-test/interp-var-splice) (esh-var-test/interp-var-splice-concat) (esh-var-test/quoted-interp-list-var) (esh-var-test/quoted-interp-list-var-concat) (esh-var-test/quoted-interp-var-splice) (esh-var-test/quoted-interp-var-splice-concat): New tests. * test/lisp/eshell/em-alias-tests.el (em-alias-test/alias-all-args-var-splice): New test. * doc/misc/eshell.texi (Dollars Expansion): Explain the splice operator. (Aliases): Expand documentation and use '$@*'. (Built-ins, Bugs and Ideas): Use '$@*' where appropriate. * etc/NEWS: Announce this change.
2022-09-19Fix eshell directory and executable completion on action tDaniel Pettersson
* lisp/eshell/em-cmpl.el (eshell--pcomplete-executables): New function (bug#57905). (eshell--complete-commands-list): Use it. Copyright-paperwork-exempt: yes
2022-07-08Remove many items obsolete since 24.1Stefan Kangas
* lisp/allout.el (allout-abbreviate-flattened-numbering) (allout-mode-deactivate-hook): * lisp/ansi-color.el (ansi-color-unfontify-region): * lisp/auth-source.el (auth-source-hide-passwords) (auth-source-user-or-password) (auth-source-forget-user-or-password): * lisp/cedet/data-debug.el (data-debug-map): * lisp/cedet/semantic/grammar.el (semantic-grammar-syntax-table) (semantic-grammar-map): * lisp/chistory.el (command-history-map): * lisp/comint.el (comint-dynamic-complete) (comint-dynamic-complete-as-filename) (comint-dynamic-simple-complete): * lisp/dired-x.el (read-filename-at-point) (dired-x-submit-report): * lisp/dos-fns.el (register-name-alist, make-register) (register-value, set-register-value, intdos, mode25, mode4350): * lisp/emacs-lisp/bytecomp.el (byte-compile-disable-print-circle): * lisp/emacs-lisp/chart.el (chart-map): * lisp/emacs-lisp/package.el (package-menu-view-commentary): * lisp/emacs-lock.el (toggle-emacs-lock, emacs-lock-from-exiting): * lisp/erc/erc.el (erc-complete-word): * lisp/eshell/em-cmpl.el (eshell-cmpl-suffix-list): * lisp/eshell/esh-util.el (eshell-for): * lisp/files.el (inhibit-first-line-modes-regexps) (inhibit-first-line-modes-suffixes): * lisp/gnus/gnus-msg.el (gnus-outgoing-message-group) (gnus-debug-files, gnus-debug-exclude-variables): * lisp/gnus/gnus-registry.el (gnus-registry-user-format-function-M): * lisp/gnus/gnus.el (gnus-local-domain, gnus-carpal): * lisp/gnus/nnimap.el (nnimap-split-rule): * lisp/iimage.el (turn-on-iimage-mode): * lisp/image.el (image-extension-data, image-library-alist): * lisp/mail/emacsbug.el (report-emacs-bug-pretest-address): * lisp/mail/mail-utils.el (rmail-dont-reply-to): * lisp/mail/mailalias.el (mail-complete-function) (mail-completion-at-point-function): * lisp/mail/rmail.el (rmail-dont-reply-to-names) (rmail-default-dont-reply-to-names): * lisp/mail/sendmail.el (mail-mailer-swallows-blank-line) (mail-sent-via): * lisp/menu-bar.el (menu-bar-kill-ring-save): * lisp/minibuffer.el (completion-annotate-function) (minibuffer-local-filename-must-match-map): * lisp/msb.el (msb-after-load-hooks): * lisp/obsolete/eieio-compat.el (eieio-defmethod) (eieio-defgeneric): * lisp/obsolete/info-edit.el (Info-edit-map): * lisp/obsolete/starttls.el (starttls-any-program-available): * lisp/progmodes/cfengine.el (cfengine-mode-abbrevs): * lisp/progmodes/cwarn.el (turn-on-cwarn-mode): * lisp/progmodes/make-mode.el (makefile-complete): * lisp/progmodes/meta-mode.el (meta-complete-symbol) (meta-mode-map): * lisp/progmodes/pascal.el (pascal-toggle-completions) (pascal-last-completions, pascal-show-completions): * lisp/progmodes/prolog.el (prolog-char-quote-workaround): * lisp/progmodes/which-func.el (which-func-mode): [FUNCTION] * lisp/simple.el (count-lines-region, minibuffer-completing-symbol): * lisp/speedbar.el (speedbar-syntax-table, speedbar-key-map): * lisp/strokes.el (strokes-report-bug): * lisp/subr.el (condition-case-no-debug): * lisp/term/ns-win.el (ns-alternatives-map) (ns-store-cut-buffer-internal): * lisp/term/w32-win.el (w32-default-color-map): * lisp/term/x-win.el (x-cut-buffer-or-selection-value): * lisp/textmodes/bibtex.el (bibtex-complete) (bibtex-entry-field-alist): * lisp/textmodes/reftex-index.el (reftex-index-map) (reftex-index-phrases-map): * lisp/textmodes/reftex-sel.el (reftex-select-label-map) (reftex-select-bib-map): * lisp/textmodes/reftex-toc.el (reftex-toc-map): * lisp/textmodes/rst.el (rst-block-face, rst-external-face) (rst-definition-face, rst-directive-face, rst-comment-face) (rst-emphasis1-face, rst-emphasis2-face, rst-literal-face) (rst-reference-face): * lisp/vc/vc-hooks.el (vc-toggle-read-only): * lisp/view.el (view-return-to-alist) (view-return-to-alist-update): Remove many functions and variables obsolete since 24.1. * lisp/textmodes/bibtex.el (bibtex-entry-alist): Don't use above removed variable 'bibtex-entry-field-alist'. * lisp/cedet/data-debug.el (data-debug-edebug-expr) (data-debug-eval-expression): * lisp/emacs-lisp/trace.el (trace--read-args): * lisp/files-x.el (read-file-local-variable-value): * lisp/simple.el (read--expression): Don't use above removed variable 'minibuffer-completing-symbol'. * lisp/textmodes/rst.el (rst-font-lock-keywords): Don't use above removed variables. * src/w32fns.c (Fw32_default_color_map): Delete obsolete function. (syms_of_w32fns): Delete defsubr for above defun. * src/keyboard.c (syms_of_keyboard) <Vdeferred_action_list> <Vdeferred_action_function>: Delete DEFVARs. <Qdeferred_action_function>: Delete DEFSYM. (syms_of_keyboard_for_pdumper): Adjust for above change. (command_loop_1): Don't run deferred-action-function hook. * lisp/subr.el (deferred-action-list, deferred-action-function): Delete obsoletion statements. * lisp/emacs-lisp/ert-x.el (ert-simulate-command): Don't run 'deferred-action-list' hook. * doc/lispref/hooks.texi (Standard Hooks): Delete 'deferred-action-function'. * lisp/emacs-lisp/lisp.el (field-complete): * lisp/eshell/em-cmpl.el (eshell-cmpl-initialize): * lisp/gnus/gnus-msg.el (gnus-inews-insert-gcc): * lisp/gnus/nnmail.el (nnmail-fancy-expiry-target): * lisp/mail/mail-utils.el (mail-dont-reply-to): * lisp/mail/sendmail.el (sendmail-send-it): * lisp/mail/smtpmail.el (smtpmail-send-it): * lisp/minibuffer.el (minibuffer-completion-help): * lisp/progmodes/python.el: Don't use above removed items. * lisp/emacs-lisp/eieio-core.el: * lisp/mail/mailalias.el (mail-complete-alist): Doc fixes; don't refer to above removed items. ; * etc/NEWS: List removed items.
2022-03-18Pcomplete: Better obey `completion-at-point-functions`Stefan Monnier
Functions on `completion-at-point-functions` should not modify the buffer. Pcomplete itself mostly abides by this but Eshell's use of it doesn't. Try and catch those cases. Also fix one of those cases. * lisp/pcomplete.el (pcomplete-allow-modifications): New var. (pcomplete-completions-at-point): Enforce it. (pcomplete, pcomplete-expand-and-complete, pcomplete-expand): Rebind it since these commands expect the extra side effects. * lisp/eshell/em-cmpl.el (eshell--pcomplete-insert-tab): New function, extracted from `eshell-complete-parse-arguments`. (eshell-complete-parse-arguments): Use it and obey `pcomplete-allow-modifications`.
2022-02-03When executing an Eshell pipeline, send input to the first processJim Porter
Previously, input was sent to the last process in the pipeline, resulting in unexpected behavior when running commands like 'tr a-z A-Z | rev'. * lisp/eshell/esh-util.el (eshell-process-pair-p) (eshell-make-process-pair): New functions. * lisp/eshell/esh-cmd.el (eshell-last-async-proc): Rename to... (eshell-last-async-procs): ... this, and store a pair of processes. (eshell-interactive-process): Replace with... (eshell-interactive-process-p, eshell-head-process) (eshell-tail-process): ... these. (eshell-cmd-initialize): Set 'eshell-last-async-procs'. (eshell-do-pipelines): Set 'headproc'. (eshell-execute-pipeline): Return 'headproc' and 'tailproc'. (eshell-resume-eval): Use 'eshell-last-async-procs'. (eshell-do-eval): Make sure we work with a pair of processes. * lisp/eshell/esh-proc.el (eshell-send-eof-to-process): Move from here... * lisp/eshell/esh-mode.el (eshell-send-eof-to-process): ... to here, and only send EOF to the head process. * lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments) * lisp/eshell/esh-mode.el (eshell-intercept-commands) (eshell-watch-for-password-prompt): Use 'eshell-interactive-process-p'. * lisp/eshell/em-rebind.el (eshell-delchar-or-maybe-eof) * lisp/eshell/em-term.el (eshell-term-send-raw-string) * lisp/eshell/esh-mode.el (eshell-self-insert-command) (eshell-send-input, eshell-send-invisible): Use 'eshell-head-process'. * lisp/eshell/esh-cmd.el (eshell-as-subcommand): Use 'eshell-tail-process'. * lisp/eshell/eshell.el (eshell-command): * test/lisp/eshell/eshell-tests-helpers.el (eshell-wait-for-subprocess): Use 'eshell-interactive-process-p' and 'eshell-tail-process'. * test/lisp/eshell/eshell-tests.el (eshell-test/pipe-headproc-stdin): New test.
2022-01-01Merge from origin/emacs-28Eli Zaretskii
836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
2022-01-01; Add 2022 to copyright years.Eli Zaretskii
2021-12-28Merge from origin/emacs-28Stefan Kangas
c0815aca18 Fix typos in in 'reset-language-environment' ea65de7577 eshell-complete-parse-arguments: don't use string-match on...
2021-12-27eshell-complete-parse-arguments: don't use string-match on a listÓscar Fuentes
When there is more than one candidate for completion, `val' is a list. Fixes bug#52794. * lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): protect use of string-match with stringp.
2021-12-24Use defvar-keymap in eshellStefan Kangas
* lisp/eshell/em-cmpl.el (eshell-cmpl-mode-map): * lisp/eshell/em-hist.el (eshell-isearch-map, eshell-hist-mode-map): * lisp/eshell/em-pred.el (eshell-pred-mode-map): * lisp/eshell/em-prompt.el (eshell-prompt-mode-map): * lisp/eshell/em-rebind.el (eshell-rebind-mode-map): * lisp/eshell/esh-arg.el (eshell-arg-mode-map): * lisp/eshell/esh-mode.el (eshell-mode-map, eshell-command-map): * lisp/eshell/esh-proc.el (eshell-proc-mode-map): * lisp/eshell/esh-var.el (eshell-var-mode-map): Use defvar-keymap.
2021-08-27Fix completion of extended "..." syntax in eshellMichalis V
* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Expand "..." (bug#19626).
2021-02-09Make pcomplete-ignore-case obsoleteLars Ingebrigtsen
* lisp/pcomplete.el (pcomplete-completions-at-point) (pcomplete-stub, pcomplete--entries, pcomplete-insert-entry): * lisp/eshell/em-cmpl.el (eshell-cmpl-initialize): * lisp/eshell/em-cmpl.el (eshell-cmpl-ignore-case): * lisp/erc/erc-pcomplete.el (pcomplete-erc-setup): Use `completion-ignore-case' instead (bug#23117). * lisp/pcomplete.el (pcomplete-ignore-case): Make obsolete.
2021-01-31* lisp/eshell/em-cmpl.el (eshell--complete-commands-list): Fix last fixStefan Monnier
Complete `*firef` to `*firefox` rather than to `firefox`.
2021-01-31* lisp/eshell/em-cmpl.el: Try and fix bug#41423Stefan Monnier
(eshell--complete-commands-list): Rename from `eshell-complete-commands-list`. Return a (dynamic) completion table rather than a list of completions. Use `dolist` and `push`.
2021-01-01Update copyright year to 2021Paul Eggert
Run "TZ=UTC0 admin/update-copyright".
2020-12-04Prefer setq-local in eshellStefan Kangas
* lisp/eshell/em-cmpl.el (eshell-cmpl-initialize): * lisp/eshell/em-dirs.el (eshell-dirs-initialize): * lisp/eshell/em-glob.el (eshell-glob-initialize, eshell-glob-regexp): * lisp/eshell/em-hist.el (eshell-hist-initialize): * lisp/eshell/em-prompt.el (eshell-prompt-initialize): * lisp/eshell/em-rebind.el (eshell-rebind-initialize) (eshell-setup-input-keymap): * lisp/eshell/em-script.el (eshell-script-initialize): * lisp/eshell/em-smart.el (eshell-smart-initialize): * lisp/eshell/em-term.el (eshell-term-initialize, eshell-exec-visual): * lisp/eshell/em-tramp.el (eshell-tramp-initialize): * lisp/eshell/em-unix.el (eshell-unix-initialize, eshell/diff): * lisp/eshell/esh-arg.el (eshell-arg-initialize): * lisp/eshell/esh-cmd.el (eshell-cmd-initialize): * lisp/eshell/esh-io.el (eshell-get-target): * lisp/eshell/esh-mode.el (eshell-mode): * lisp/eshell/esh-var.el (eshell-var-initialize): Prefer setq-local.
2020-11-16Don't quote lambdas in eshell/*.elStefan Kangas
* lisp/eshell/em-basic.el (eshell-echo): * lisp/eshell/em-cmpl.el (eshell-command-completion-function) (eshell-default-completion-function, eshell-cmpl-initialize) (eshell-complete-parse-arguments, eshell-complete-commands-list): * lisp/eshell/em-dirs.el (eshell-complete-user-reference): * lisp/eshell/em-hist.el (eshell-hist-unload-hook) (eshell-hist-initialize): * lisp/eshell/em-ls.el (eshell-ls-sort-entries): * lisp/eshell/em-pred.el (eshell-modifier-alist) (eshell-display-predicate-help, eshell-display-modifier-help) (eshell-pred-substitute, eshell-split-members): * lisp/eshell/em-prompt.el (eshell-prompt-function): * lisp/eshell/em-smart.el (eshell-smart-unload-hook) (eshell-smart-initialize, eshell-refresh-windows): * lisp/eshell/em-unix.el (eshell-shuffle-files): * lisp/eshell/esh-arg.el (eshell-parse-argument-hook): * lisp/eshell/esh-cmd.el (eshell-cmd-initialize) (eshell-parse-command): * lisp/eshell/esh-mode.el (eshell-preinput-scroll-to-bottom) (eshell-postoutput-scroll-to-bottom): * lisp/eshell/esh-module.el (eshell-modules-list): * lisp/eshell/esh-proc.el (eshell-read-process-name) (eshell-round-robin-kill): * lisp/eshell/esh-var.el (eshell-envvar-names) (eshell-variables-list): Don't quote lambdas.
2020-09-11Add some eshell completion patternsStefan Kangas
* lisp/eshell/em-cmpl.el (eshell-command-completions-alist): Add 'gunzip', 'bunzip2' and 'unxz'.
2020-01-01Update copyright year to 2020Paul Eggert
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2019-10-03* lisp/pcomplete.el: Mark 'pcomplete' command as obsoleteStefan Monnier
Remove redundant ':group's. (pcomplete, pcomplete-help): Mark as obsolete.
2019-10-03Don't use obsolete name in em-cmpl.elStefan Kangas
* lisp/eshell/em-cmpl.el (eshell-complete-lisp-symbol): Update reference to 'elisp-completion-at-point' from its obsolete name. Reported by Carlos Pita <carlosjosepita@gmail.com>. (Bug#31906)
2019-08-15Fix eshell-mode-map initializationAlex Branham
* lisp/eshell/esh-mode.el (eshell-mode-map, eshell-command-map): Set up normal keymaps and prefix commands rather than re-initializing them in each eshell buffer * lisp/eshell/em-cmpl.el (eshell-cmpl-mode-map, eshell-cmpl-mode) (eshell-cmpl-initialize): * lisp/eshell/em-hist.el (eshell-hist-mode-map, eshell-hist-mode) (eshell-hist-initialize): * lisp/eshell/em-pred.el (eshell-pred-mode-map, eshell-pred-mode) (eshell-pred-initialize): * lisp/eshell/em-prompt.el (eshell-prompt-mode-map, eshell-prompt-mode) (eshell-prompt-initialize): * lisp/eshell/em-rebind.el (eshell-rebind-mode-map, eshell-rebind-mode) (eshell-rebind-initialize): * lisp/eshell/esh-arg.el (eshell-arg-mode-map, eshell-arg-mode) (eshell-arg-initialize): * lisp/eshell/esh-proc.el (eshell-proc-mode-map, eshell-proc-mode) (eshell-proc-initialize): * lisp/eshell/esh-var.el (eshell-var-mode-map, eshell-var-mode) (eshell-var-initialize): Create a new minor mode with a keymap and call it in the module initialization function. bug#33808 bug#22792
2019-06-08Fix path for current directory in eshell on MS-WindowsBernhard Rotter
On MS-Windows, PATH implicitly includes the current directory. Do it right for Eshell by adding "./" instead of ".", to avoid finding .FOO instead of ./FOO. * lisp/eshell/esh-util.el (eshell-get-path): New function. * lisp/eshell/em-cmpl.el (eshell-complete-commands-list): * lisp/eshell/esh-ext.el (eshell-search-path): Use eshell-get-path.
2019-04-09Fix up Eshell 'require's after previous dependency reshuffle.Stefan Monnier
* lisp/eshell/em-unix.el: * lisp/eshell/em-script.el: * lisp/eshell/em-pred.el: * lisp/eshell/em-dirs.el: * lisp/eshell/em-alias.el: Fix up 'require's to silence byte-compiler. * lisp/eshell/esh-util.el (eshell-read-hosts-file): Don't limit number of entries per line. Preserve the structure. (eshell-read-hosts): Adjust accordingly.
2019-03-19* lisp/eshell/em-cmpl.el: Use completion-at-point i.s.o pcompleteStefan Monnier
(eshell-cmpl-initialize): Refrain from binding to the `tab` key, which prevents the tab -> TAB remapping. Use completion-at-point and completion-help-at-point. (eshell-complete-commands-list): Use `fboundp` test instead of ugly gymnastics to try and hide the function call from the compiler. (eshell-pcomplete): Make it an alias of completion-at-point. * doc/misc/eshell.texi (Completion): Change wording to reflect different default behavior.
2018-12-31Merge from origin/emacs-26Paul Eggert
2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
2019-01-01Update copyright year to 2019Paul Eggert
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2018-03-20Merge from origin/emacs-26Paul Eggert
23527013c7 ; Rewrap doc string 4328d5f744 Correct Info link markup 2fb52abd9e Improve documentation of 'with-help-window' ec08c62f03 Minor improvements in building.texi 663aafe1ff * lisp/textmodes/bibtex.el (bibtex-mark-entry): activate mark 05781b2e88 ; Spelling fix aa40014ba3 * doc/emacs/building.texi (Starting GUD): Mention 'guiler'. 23072e468f Yet more proofreading of the Emacs manual ba5a372540 * doc/emacs/rmail.texi: Fix broken link. 6b2210cc29 ; Spelling fix 067c8c4f5b Fix recently-added POP doc glitch fb3dc0e8aa More proofreading of the Emacs manual a776ce7be6 Fix typo in the Emacs manual's VC chapter 7f27d42f0b Pass json-readtable-error data as a list (bug#30489) 10bd3b3af8 Improve word motion docs (Bug#30815) 2b8507fbdc Replace "carriage-return" by "carriage return" in manuals 2616cd94f1 Minor copyedits in mule.texi 36a1d52814 Fix problems caused by fontconfig-2.13.0
2018-03-19; Spelling fixPaul Eggert
2018-03-08Merge from origin/emacs-26Glenn Morris
cb0d40e (origin/emacs-26) Minor change in the manual 7e26d83 More minor changes in the manual 6851754 Replace some obsolete aliases in code 6bcb48c Replace some obsolete aliases in documentation 317da2a Minor improvements in manuals 61c1f80 Minor copyedits in display.texi d523e4a Remove some unused spam.el variables 501808c Replace some obsolete aliases in code 19afff3 Replace some obsolete aliases in documentation c797bc9 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emac... 0efe0bd Obsolete eshell-cmpl-suffix-list add48d2 More minor changes in the Glossary of the Emacs manual f6bd7e0 Revert last commit af4697f Define if-let* and derivatives as aliases for if-let etc ec79bdc Minor fix in Emacs manual's Glossary
2018-03-06Condition em-cmpl's setting of pcomplete-suffix-listGlenn Morris
* lisp/eshell/em-cmpl.el (eshell-cmpl-initialize): Only set pcomplete-suffix-list if it is defined.
2018-03-06Obsolete eshell-cmpl-suffix-listGlenn Morris
* lisp/eshell/em-cmpl.el (eshell-cmpl-suffix-list): Make obsolete, to match pcomplete-suffix-list.