summaryrefslogtreecommitdiff
path: root/lisp/shell.el
Commit message (Collapse)AuthorAgeFilesLines
* Allow old input to include continuation lines in shell-modeBob Rogers2023-03-311-0/+40
| | | | | | | | | | | * lisp/shell.el (shell-get-old-input-include-continuation-lines): New defcustom (default nil). (shell-get-old-input): New function. Like 'comint-get-old-input-default' but include all continuation lines if 'shell-get-old-input-include-continuation-lines' is non-nil. (shell-mode): Install shell-get-old-input. (Bug#61069) * etc/NEWS: Advertise the new defcustom.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* Use the new keyword ':repeat' in repeatable keymaps.Juri Linkov2022-12-221-3/+1
| | | | | | | | | | | | | | | | | | | | | | | * lisp/bindings.el (undo-repeat-map) (buffer-navigation-repeat-map, next-error-repeat-map) (page-navigation-repeat-map): * lisp/comint.el (comint-repeat-map): * lisp/dired.el (dired-jump-map): * lisp/outline.el (outline-navigation-repeat-map) (outline-editing-repeat-map): * lisp/shell.el (shell-repeat-map): * lisp/tab-bar.el (tab-bar-switch-repeat-map) (tab-bar-move-repeat-map): * lisp/window.el (other-window-repeat-map) (resize-window-repeat-map): * lisp/winner.el (winner-repeat-map): * lisp/eshell/em-prompt.el (eshell-prompt-repeat-map): * lisp/eshell/esh-mode.el (eshell-command-repeat-map): Add the keyword ':repeat' to 'defvar-keymap' instead of setting the symbol property 'repeat-map' explicitly. * lisp/keymap.el (defvar-keymap): Check for 'props' that is used in 'defvar-form'.
* Fix infloop in 'shell-resync-dirs' with tcshEli Zaretskii2022-12-101-0/+1
| | | | | * lisp/shell.el (shell-resync-dirs): Remove trailing slash from output of 'dirs', for csh/tcsh's sake. (Bug#59804)
* ; Fix typos (don't abbreviate "with" or "without")Stefan Kangas2022-12-011-1/+1
|
* shell: Add repeat-map for shell-{forward,backward}-promptBrian Leung2022-11-171-0/+8
| | | | * lisp/shell.el (shell-repeat-map): New defvar. (Bug#59144)
* Rename comint-fl-* to comint-fontify-input-* and mention it in NEWSMiha Rihtaršič2022-09-301-16/+17
| | | | | | | | | | | | | | | | | | | | | | | * lisp/comint.el (comint-fontify-input-mode): (comint--fontify-input-saved-jit-lock-contextually): (comint--fontify-input-on): (comint--fontify-input-off): (comint--fontify-input-ppss-flush-indirect): (comint--fontify-input-fontify-region): Replace comint-fl-* with comint-fontify-input-*. * lisp/ielm.el (ielm-fontify-input-enable): (ielm-fontify-input-enable): (ielm-indirect-setup-hook): (inferior-emacs-lisp-mode): Replace comint-fl-* with comint-fontify-input-*. * lisp/shell.el (shell-comint-fl-enable): (shell-mode): Replace comint-fl-* with comint-fontify-input-*. * etc/NEWS: Mention the new modes and how to disable or enable them (bug#58169).
* ; Fix typos (prefer American spelling)Stefan Kangas2022-09-291-1/+1
|
* Improve some shell highlight doc stringsMiha Rihtaršič2022-09-111-8/+19
| | | | | | | | * lisp/shell.el (shell-highlight-undef-mode-restart): Rename function. * lisp/shell.el (shell-comint-fl-enable): (shell--highlight-undef-indirect) * lisp/ielm.el (ielm-comint-fl-enable): * lisp/comint.el: (comint--fl-fontify-region): Improve doc strings.
* ; Fix doc strings in shell.elEli Zaretskii2022-09-091-7/+7
| | | | | | * lisp/shell.el (shell-highlight-undef-defined-face) (shell-highlight-undef-remote-file-name-inhibit-cache) (shell--highlight-undef-exec-cache): Fix wording and typos.
* Input indentation for M-x shellMiha Rihtaršič2022-09-091-0/+4
| | | | | | | | | | | | * lisp/comint.el (comint-indent-input-line): (comint-indent-input-line-default): (comint-indent-input-region): (comint-indent-input-region-default): New functions that implement a general mechanism for input indentation through an indirect buffer in comint derived major modes. * lisp/shell.el (shell-mode): Set up input indentation according to sh-mode (bug#51940).
* Highlight non-existent commands in M-x shellMiha Rihtaršič2022-09-091-3/+227
| | | | | | | | | | | | | | | | | | | | | | * lisp/shell.el (shell-mode): Enable highlighting of non-existent commands if requested. (shell-highlight-undef-aliases): (shell-highlight-undef-remote-file-name-inhibit-cache): New user options. (shell-highlight-undef-mode): New minor mode. (shell-highlight-undef-defined-face): (shell-highlight-undef-undefined-face): (shell-highlight-undef-alias-face): New faces. (shell-highlight-undef--exec-cache): (shell-highlight-undef--face): (shell-highlight-undef-keywords): (shell-highlight-undef-regexp): (shell-highlight-undef--executable-find): (shell-highlight-undef-matcher): (shell-highlight-undef--indirect): (shell-highlight--setup): (shell-highlight-undef-reset-mode): New functions and buffer local variables (bug#51940).
* Input fontification for M-x shellMiha Rihtaršič2022-09-091-0/+41
| | | | | | | | | | | | | | | | | | | | | * lisp/comint.el (comint-indent-input-line): (comint-indent-input-line-default): (comint-indent-input-region): (comint-indent-input-region-default): New functions that implement a general mechanism for input indentation through an indirect buffer in comint derived major modes. * lisp/shell.el (shell-mode): Set up input indentation according to sh-mode (bug#51940). * lisp/comint.el (comint-indent-input-line): (comint-indent-input-line-default): (comint-indent-input-region): (comint-indent-input-region-default): New functions that implement a general mechanism for input indentation through an indirect buffer in comint derived major modes. * lisp/shell.el (shell-mode): Set up input indentation according to sh-mode (bug#51940).
* Remove some useless `eval-when-compile`Mattias Engdegård2022-07-041-6/+5
| | | | | | | | | | | | | | | | | | | * lisp/cedet/semantic/java.el (semantic-java-number-regexp): * lisp/cedet/semantic/lex.el (semantic-lex-number-expression): * lisp/emacs-lisp/cl-indent.el (common-lisp-indent-function-1): * lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression) (lisp--el-match-keyword, lisp-string-in-doc-position-p): * lisp/emacs-lisp/shorthands.el (shorthands-font-lock-shorthands): * lisp/net/socks.el (socks-send-command): * lisp/progmodes/meta-mode.el (meta-font-lock-keywords): * lisp/shell.el (shell--parse-pcomplete-arguments): * lisp/textmodes/sgml-mode.el (sgml-mode): * lisp/textmodes/tex-mode.el (tex--guess-mode) (tex-common-initialization, tex-input-files-re): * lisp/textmodes/tildify.el (tildify-mode): * lisp/xdg.el (xdg-line-regexp): Eliminate `eval-when-compile` when the argument would be evaluated by the compiler anyway.
* * lisp/shell.el (shell): Fix last changeStefan Monnier2022-05-291-32/+41
| | | | | | | Wrap the file-name prompt within `with-connection-local-variables` as it was before the previous change. While at it, make sure we set the `default-directory` of the actual shell buffer after querying the user.
* * lisp/shell.el (shell): Query shell file name from `interactive`Stefan Monnier2022-05-271-17/+19
| | | | | | This avoids the use of the brittle `called-interactively-p` and makes it easier to start a shell buffer running another shell than your usual one.
* Add option to kill a shell buffer when the process endsPhilip Kaludercic2022-05-201-0/+17
| | | | | | * shell.el (shell-kill-buffer-on-quit): Add new option (bug#55426). (shell): Respect 'shell-kill-buffer-on-quit'. * NEWS: Mention 'shell-kill-buffer-on-quit'.
* Advertise OSC directory tracking moreLars Ingebrigtsen2022-05-051-1/+3
| | | | | | | * doc/emacs/misc.texi (Interactive Shell): Document OSC directory tracking more. * lisp/shell.el (shell-dirtrack-mode): Link to the OSC directory tracking function.
* Further doc string quoting fixesLars Ingebrigtsen2022-04-221-2/+2
| | | | | | | | | | | | | | | * test/lisp/progmodes/cperl-mode-tests.el (cperl--run-test-cases): * lisp/simple.el (undo-equiv-table): * lisp/shell.el (shell-mode): (shell-mode): * lisp/recentf.el (recentf-mode): * lisp/org/ob-table.el (org-sbe): * lisp/net/eudc.el (eudc-rfc5322-cctext-token): * lisp/mail/ietf-drums-date.el (ietf-drums-date--slot-ranges): * lisp/faces.el (color-luminance-dark-limit): * lisp/erc/erc.el (erc-tls): * lisp/emacs-lisp/pcase.el (pcase-setq): Further quoting fixes in doc strings.
* Ensure shell.el loading properlyLars Ingebrigtsen2022-04-111-0/+1
| | | | | * lisp/shell.el (subr-x): Require for string-chop-newline (bug#54834).
* Add a shell-filter-ring-bell functionLars Ingebrigtsen2022-03-221-1/+15
| | | | | * lisp/shell.el (shell-mode): Mention it. (shell-filter-ring-bell): New function (bug#21652).
* Avoid repeated prompts in `M-x shell' if using ~/.emacs_bashLars Ingebrigtsen2022-03-171-3/+12
| | | | | * lisp/shell.el (shell): Use `shell-eval-command' to avoid repeated prompts (bug#9961).
* Make shell-resync-dirs work with zshLars Ingebrigtsen2022-03-171-70/+68
| | | | | | * lisp/shell.el (shell-resync-dirs): Use shell-eval-command to avoid getting confused by zsh (bug#54384). (shell-eval-command): New function.
* Merge from origin/emacs-28Eli Zaretskii2022-02-181-1/+1
|\ | | | | | | | | | | | | | | c8442df ; Separate command and concept index in Transient manual 8aa052c ; Fix Transient manual 5b7752a Fix problem with popd for in remote shell buffers 38f6ea1 Import texi source file for transient manual df34929 Update to Org 9.5.2-15-gc5ceb6
| * Fix problem with popd for in remote shell buffersMichael Albinus2022-02-151-1/+1
| | | | | | | | | | * lisp/shell.el (shell-prefixed-directory-name): Use `file-local-name' for DIR. (Bug#53927)
* | More fixes for display-comint-buffer-actionJuri Linkov2022-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/window.el (display-comint-buffer-action): Use display-buffer--same-window-action as the default value. * lisp/progmodes/sh-script.el (sh-show-shell): * lisp/shell.el (shell): Add display-comint-buffer-action to pop-to-buffer. * lisp/progmodes/project.el (project-shell, project-eshell): Use `bound-and-true-p display-comint-buffer-action' for backward-compatibility. https://lists.gnu.org/archive/html/emacs-devel/2021-12/msg02964.html
* | Merge from origin/emacs-28Eli Zaretskii2022-01-011-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
| |
* | Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action'Sam Steingold2021-12-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/window.el (display-comint-buffer-action): New `defcustom`, defaults to 'display-buffer-same-window' for backward compatibility. * lisp/cmuscheme.el (run-scheme, switch-to-scheme): Pass 'display-comint-buffer-action' to 'pop-to-buffer' instead of using 'pop-to-buffer-same-window'. * lisp/eshell/eshell.el (eshell): Likewise. * lisp/shell.el (shell): Likewise. * lisp/org/ol-eshell.el (org-eshell-open): Likewise. * lisp/progmodes/inf-lisp.el (inferior-lisp): Likewise. * lisp/progmodes/project.el (project-shell, project-eshell): Likewise. * lisp/textmodes/tex-mode.el (tex-display-shell, tex-compile-default) (tex-recenter-output-buffer): Pass 'display-comint-buffer-action' to 'pop-to-buffer'.
* | Prefer locate-user-emacs-fileStefan Kangas2021-11-091-1/+2
|/ | | | | | | | | | | * lisp/cmuscheme.el (scheme-start-file): * lisp/erc/erc.el (erc-startup-file-list): * lisp/net/nsm.el (nsm-settings-file): * lisp/net/tramp-crypt.el (tramp-crypt-config-file-name): * lisp/org/org-clock.el (org-clock-persist-file): * lisp/org/org-id.el (org-id-locations-file) * lisp/shell.el (shell): Prefer 'locate-user-emacs-file' to fiddling with 'user-emacs-directory' directly.
* Revert commit 225ca617b7, and apply another fixMichael Albinus2021-10-231-5/+9
| | | | | | | | * lisp/minibuffer.el (read-file-name-default): Revert commit 225ca617b7. (Bug#50976). * lisp/shell.el (shell): Remove volume letter for remote shell file name. (Bug#49229)
* ; More minor stylistic fixes found by checkdocStefan Kangas2021-09-221-1/+2
|
* Correctly call completion-in-region in shell.elMadhu2021-08-191-2/+2
| | | | | | | | * lisp/shell.el (shell-dynamic-complete-command) (shell-dynamic-complete-environment-variable): Correctly call completion-in-region (bug#50125). Copyright-paperwork-exempt: yes
* Use string-search instead of string-match[-p]Mattias Engdegård2021-08-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `string-search` is easier to understand, less error-prone, much faster, does not pollute the regexp cache, and does not mutate global state. Use it where applicable and obviously safe (erring on the conservative side). * admin/authors.el (authors-canonical-file-name) (authors-scan-change-log): * lisp/apropos.el (apropos-command) (apropos-documentation-property, apropos-symbols-internal): * lisp/arc-mode.el (archive-arc-summarize) (archive-zoo-summarize): * lisp/calc/calc-aent.el (math-read-factor): * lisp/calc/calc-ext.el (math-read-big-expr) (math-format-nice-expr, math-format-number-fancy): * lisp/calc/calc-forms.el (math-read-angle-brackets): * lisp/calc/calc-graph.el (calc-graph-set-range): * lisp/calc/calc-keypd.el (calc-keypad-press): * lisp/calc/calc-lang.el (tex, latex, math-read-big-rec): * lisp/calc/calc-prog.el (calc-fix-token-name) (calc-user-define-permanent, math-define-exp): * lisp/calc/calc.el (calc-record, calcDigit-key) (calc-count-lines): * lisp/calc/calcalg2.el (calc-solve-for, calc-poly-roots) (math-do-integral): * lisp/calc/calcalg3.el (calc-find-root, calc-find-minimum) (calc-get-fit-variables): * lisp/cedet/ede/speedbar.el (ede-tag-expand): * lisp/cedet/semantic/java.el (semantic-java-expand-tag): * lisp/cedet/semantic/sb.el (semantic-sb-show-extra) (semantic-sb-expand-group): * lisp/cedet/semantic/wisent/python.el (semantic-python-instance-variable-p): * lisp/cus-edit.el (get): * lisp/descr-text.el (describe-text-sexp): * lisp/dired-aux.el (dired-compress-file): * lisp/dired-x.el (dired-make-relative-symlink): * lisp/dired.el (dired-glob-regexp): * lisp/dos-fns.el (dos-convert-standard-filename, dos-8+3-filename): * lisp/edmacro.el (edmacro-format-keys): * lisp/emacs-lisp/eieio-opt.el (eieio-sb-expand): * lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-object-expand): * lisp/emacs-lisp/lisp-mnt.el (lm-keywords-list): * lisp/emacs-lisp/warnings.el (display-warning): * lisp/emulation/viper-ex.el (viper-ex-read-file-name) (ex-print-display-lines): * lisp/env.el (read-envvar-name, setenv): * lisp/epa-mail.el (epa-mail-encrypt): * lisp/epg.el (epg--start): * lisp/erc/erc-backend.el (erc-parse-server-response): * lisp/erc/erc-dcc.el (erc-dcc-member): * lisp/erc/erc-speedbar.el (erc-speedbar-expand-server) (erc-speedbar-expand-channel, erc-speedbar-expand-user): * lisp/erc/erc.el (erc-send-input): * lisp/eshell/em-glob.el (eshell-glob-entries): * lisp/eshell/esh-proc.el (eshell-needs-pipe-p): * lisp/eshell/esh-util.el (eshell-convert): * lisp/eshell/esh-var.el (eshell-envvar-names): * lisp/faces.el (x-resolve-font-name): * lisp/ffap.el (ffap-file-at-point): * lisp/files.el (wildcard-to-regexp, shell-quote-wildcard-pattern): * lisp/forms.el (forms--update): * lisp/frameset.el (frameset-filter-unshelve-param): * lisp/gnus/gnus-art.el (article-decode-charset): * lisp/gnus/gnus-kill.el (gnus-kill-parse-rn-kill-file): * lisp/gnus/gnus-mlspl.el (gnus-group-split-fancy): * lisp/gnus/gnus-msg.el (gnus-summary-resend-message-insert-gcc) (gnus-inews-insert-gcc): * lisp/gnus/gnus-rfc1843.el (rfc1843-decode-article-body): * lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output) (gnus-search--complete-key-data): * lisp/gnus/gnus-spec.el (gnus-parse-simple-format): * lisp/gnus/gnus-sum.el (gnus-summary-refer-article): * lisp/gnus/gnus-util.el (gnus-extract-address-components) (gnus-newsgroup-directory-form): * lisp/gnus/gnus-uu.el (gnus-uu-grab-view): * lisp/gnus/gnus.el (gnus-group-native-p, gnus-short-group-name): * lisp/gnus/message.el (message-check-news-header-syntax) (message-make-message-id, message-user-mail-address) (message-make-fqdn, message-get-reply-headers, message-followup): * lisp/gnus/mm-decode.el (mm-dissect-buffer): * lisp/gnus/nnheader.el (nnheader-insert): * lisp/gnus/nnimap.el (nnimap-process-quirk) (nnimap-imap-ranges-to-gnus-ranges): * lisp/gnus/nnmaildir.el (nnmaildir--ensure-suffix): * lisp/gnus/nnmairix.el (nnmairix-determine-original-group-from-path): * lisp/gnus/nnrss.el (nnrss-match-macro): * lisp/gnus/nntp.el (nntp-find-group-and-number): * lisp/help-fns.el (help--symbol-completion-table-affixation): * lisp/help.el (help-function-arglist): * lisp/hippie-exp.el (he-concat-directory-file-name): * lisp/htmlfontify.el (hfy-relstub): * lisp/ido.el (ido-make-prompt, ido-complete, ido-copy-current-word) (ido-exhibit): * lisp/image/image-converter.el (image-convert-p): * lisp/info-xref.el (info-xref-docstrings): * lisp/info.el (Info-toc-build, Info-follow-reference) (Info-backward-node, Info-finder-find-node) (Info-speedbar-expand-node): * lisp/international/mule-diag.el (print-fontset-element): * lisp/language/korea-util.el (default-korean-keyboard): * lisp/linum.el (linum-after-change): * lisp/mail/ietf-drums.el (ietf-drums-parse-address): * lisp/mail/mail-utils.el (mail-dont-reply-to): * lisp/mail/rfc2047.el (rfc2047-encode-1, rfc2047-decode-string): * lisp/mail/rfc2231.el (rfc2231-parse-string): * lisp/mail/rmailkwd.el (rmail-set-label): * lisp/mail/rmailsum.el (rmail-header-summary): * lisp/mail/smtpmail.el (smtpmail-maybe-append-domain) (smtpmail-user-mail-address): * lisp/mail/uce.el (uce-reply-to-uce): * lisp/man.el (Man-default-man-entry): * lisp/mh-e/mh-alias.el (mh-alias-gecos-name) (mh-alias-minibuffer-confirm-address): * lisp/mh-e/mh-comp.el (mh-forwarded-letter-subject): * lisp/mh-e/mh-speed.el (mh-speed-parse-flists-output): * lisp/mh-e/mh-utils.el (mh-collect-folder-names-filter) (mh-folder-completion-function): * lisp/minibuffer.el (completion--make-envvar-table) (completion-file-name-table, completion-flex-try-completion) (completion-flex-all-completions): * lisp/mpc.el (mpc--proc-quote-string, mpc-cmd-special-tag-p) (mpc-constraints-tag-lookup): * lisp/net/ange-ftp.el (ange-ftp-send-cmd) (ange-ftp-allow-child-lookup): * lisp/net/mailcap.el (mailcap-mime-types): * lisp/net/mairix.el (mairix-search-thread-this-article): * lisp/net/pop3.el (pop3-open-server): * lisp/net/soap-client.el (soap-decode-xs-complex-type): * lisp/net/socks.el (socks-filter): * lisp/nxml/nxml-outln.el (nxml-highlighted-qname): * lisp/nxml/rng-cmpct.el (rng-c-expand-name, rng-c-expand-datatype): * lisp/nxml/rng-uri.el (rng-uri-file-name-1): * lisp/obsolete/complete.el (partial-completion-mode) (PC-do-completion): * lisp/obsolete/longlines.el (longlines-encode-string): * lisp/obsolete/nnir.el (nnir-compose-result): * lisp/obsolete/terminal.el (te-quote-arg-for-sh): * lisp/obsolete/tpu-edt.el (tpu-check-search-case): * lisp/obsolete/url-ns.el (isPlainHostName): * lisp/pcmpl-unix.el (pcomplete/scp): * lisp/play/dunnet.el (dun-listify-string2, dun-get-path) (dun-unix-parse, dun-doassign, dun-cat, dun-batch-unix-interface): * lisp/progmodes/ebnf2ps.el: (ebnf-eps-header-footer-comment): * lisp/progmodes/gdb-mi.el (gdb-var-delete) (gdb-speedbar-expand-node, gdbmi-bnf-incomplete-record-result): * lisp/progmodes/gud.el (gud-find-expr): * lisp/progmodes/idlw-help.el (idlwave-do-context-help1): * lisp/progmodes/idlw-shell.el (idlwave-shell-mode) (idlwave-shell-filter-hidden-output, idlwave-shell-filter): * lisp/progmodes/idlwave.el (idlwave-skip-label-or-case) (idlwave-routine-info): * lisp/progmodes/octave.el (inferior-octave-completion-at-point): * lisp/progmodes/sh-script.el (sh-add-completer): * lisp/progmodes/sql.el (defun): * lisp/progmodes/xscheme.el (xscheme-process-filter): * lisp/replace.el (query-replace-compile-replacement) (map-query-replace-regexp): * lisp/shell.el (shell--command-completion-data) (shell-environment-variable-completion): * lisp/simple.el (display-message-or-buffer): * lisp/speedbar.el (speedbar-dired, speedbar-tag-file) (speedbar-tag-expand): * lisp/subr.el (split-string-and-unquote): * lisp/tar-mode.el (tar-extract): * lisp/term.el (term-command-hook, serial-read-name): * lisp/textmodes/bibtex.el (bibtex-print-help-message): * lisp/textmodes/ispell.el (ispell-lookup-words, ispell-filter) (ispell-parse-output, ispell-buffer-local-parsing): * lisp/textmodes/reftex-cite.el (reftex-do-citation): * lisp/textmodes/reftex-parse.el (reftex-notice-new): * lisp/textmodes/reftex-ref.el (reftex-show-entry): * lisp/textmodes/reftex.el (reftex-compile-variables): * lisp/textmodes/tex-mode.el (tex-send-command) (tex-start-tex, tex-append): * lisp/thingatpt.el (thing-at-point-url-at-point): * lisp/tmm.el (tmm-add-one-shortcut): * lisp/transient.el (transient-format-key): * lisp/url/url-auth.el (url-basic-auth) (url-digest-auth-directory-id-assoc): * lisp/url/url-news.el (url-news): * lisp/url/url-util.el (url-parse-query-string): * lisp/vc/vc-cvs.el (vc-cvs-parse-entry): * lisp/wid-browse.el (widget-browse-sexp): * lisp/woman.el (woman-parse-colon-path, woman-mini-help) (WoMan-getpage-in-background, woman-negative-vertical-space): * lisp/xml.el: * test/lisp/emacs-lisp/check-declare-tests.el (check-declare-tests-warn): * test/lisp/files-tests.el (files-tests-file-name-non-special-dired-compress-handler): * test/lisp/net/network-stream-tests.el (server-process-filter): * test/src/coding-tests.el (ert-test-unibyte-buffer-dos-eol-decode): Use `string-search` instead of `string-match` and `string-match-p`.
* Autoload `split-string-shell-command'Lars Ingebrigtsen2021-07-151-0/+1
| | | | * lisp/shell.el (split-string-shell-command): Autoload.
* Rename shell-split-string to split-string-shell-commandLars Ingebrigtsen2021-07-151-1/+1
| | | | | | * lisp/shell.el (split-string-shell-command): * doc/lispref/processes.texi (Shell Arguments): Rename from shell-split-string.
* Add a new function 'shell-split-string'Lars Ingebrigtsen2021-07-151-0/+9
| | | | | * doc/lispref/processes.texi (Shell Arguments): Document it. * lisp/shell.el (shell-split-string): New function.
* Fix bug#49229 in shell.elMichael Albinus2021-06-281-1/+2
| | | | | * lisp/shell.el (shell): Ensure, that a remote shell is remote. (Bug#49229)
* Handle auto-cd in shell-modeJason Kim2021-06-091-2/+15
| | | | | | | * lisp/shell.el (shell-has-auto-cd): New defcustom. (shell-directory-tracker): Handle implicit "cd". Copyright-paperwork-exempt: yes
* * lisp/**/*.el: Avoid positional args to `define-minor-mode`Stefan Monnier2021-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Back in Emacs-21.1, `define-minor-mode` grew keywords arguments to replace its old positional arguments. Let's make sure we don't use the old-style any more. * lisp/org/ox-beamer.el (org-beamer-mode-map): Move initialization into declaration. (org-beamer-mode): * lisp/textmodes/tildify.el (tildify-mode): * lisp/textmodes/sgml-mode.el (html-autoview-mode): * lisp/textmodes/rst.el (rst-minor-mode): * lisp/textmodes/remember.el (remember-notes-mode): * lisp/textmodes/ispell.el (ispell-minor-mode): * lisp/tar-mode.el (tar-subfile-mode): * lisp/strokes.el (strokes-mode): * lisp/so-long.el (so-long-minor-mode): * lisp/shell.el (shell-dirtrack-mode): * lisp/scroll-all.el (scroll-all-mode): * lisp/ruler-mode.el (ruler-mode): * lisp/rect.el (rectangle-mark-mode): * lisp/progmodes/sh-script.el (sh-electric-here-document-mode): * lisp/outline.el (outline-minor-mode): * lisp/org/org.el (org-cdlatex-mode): * lisp/org/org-table.el (org-table-header-line-mode) (org-table-follow-field-mode, orgtbl-mode): * lisp/org/org-src.el (org-src-mode): * lisp/org/org-list.el (org-list-checkbox-radio-mode): * lisp/org/org-indent.el (org-indent-mode): * lisp/org/org-capture.el (org-capture-mode): * lisp/obsolete/pc-select.el (pc-selection-mode): * lisp/obsolete/iswitchb.el (iswitchb-mode): * lisp/net/rcirc.el (rcirc-omit-mode, rcirc-multiline-minor-mode) (rcirc-track-minor-mode): * lisp/net/goto-addr.el (goto-address-mode, goto-address-prog-mode): * lisp/image-mode.el (image-minor-mode): * lisp/ibuf-ext.el (ibuffer-auto-mode): * lisp/gnus/gnus-cite.el (gnus-message-citation-mode): * lisp/font-core.el (font-lock-mode): * lisp/erc/erc.el (define-erc-module): * lisp/erc/erc-track.el (erc-track-minor-mode): * lisp/erc/erc-fill.el (erc-fill-mode): * lisp/epa-mail.el (epa-mail-mode): * lisp/emacs-lisp/checkdoc.el (checkdoc-minor-mode): * lisp/dirtrack.el (dirtrack-mode, dirtrack-debug-mode): * lisp/dired-aux.el (dired-isearch-filenames-mode): * lisp/cedet/semantic/idle.el (semantic-idle-scheduler-mode): * lisp/cedet/semantic/decorate/mode.el (semantic-decoration-mode): * lisp/autoarg.el (autoarg-mode, autoarg-kp-mode): * lisp/vc/pcvs.el (cvs-minor-mode): Avoid old-style positional args to `define-minor-mode`.
* Delete some commented out defgroupsStefan Kangas2021-03-241-5/+0
| | | | | | | | * lisp/eshell/esh-opt.el: * lisp/international/ccl.el: * lisp/pcmpl-linux.el: * lisp/shell.el: * lisp/url/url-news.el: Delete some commented out defgroups.
* Use pop-to-buffer-same-window for shellTheodor Thornhill2021-03-211-1/+1
| | | | | | | | * lisp/progmodes/project.el (project-shell): Behave the same way as 'M-x project-eshell'. * lisp/shell.el (shell): Behave the same way as 'M-x eshell'. * etc/NEWS: Add news entry describing the change. * lisp/tutorial.el: Use lexical-binding.
* Fix how `shell-mode' avoids being called interactivelyLars Ingebrigtsen2021-02-141-2/+1
| | | | | * lisp/shell.el (shell-mode): Make noninteractive instead of erroring out after being called.
* Use `declare` instead of `def-edebug-spec` in most placesStefan Monnier2021-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/speedbar.el: Use lexical-binding. (speedbar-with-writable): Use `declare`. * lisp/subr.el (def-edebug-spec): Use `declare`. * lisp/cedet/ede/base.el: Use lexical-binding. (ede-with-projectfile): Use `declare`. (recentf-exclude): Declare var. * lisp/cedet/ede/pmake.el: Use lexical-binding. (ede-pmake-insert-variable-shared, ede-pmake-insert-variable-once): Use `declare`. * lisp/cedet/ede/proj-comp.el: Use lexical-binding. (ede-compiler-begin-unique, ede-compiler-only-once) (ede-linker-begin-unique, ede-linker-only-once): Use `declare`. * lisp/cedet/semantic/ctxt.el: Use lexical-binding. (semantic-with-buffer-narrowed-to-context) (semantic-with-buffer-narrowed-to-command): Use `declare`. (semantic--progress-reporter): Declare var. (semantic-ctxt-end-of-symbol-default): Remove unused var `fieldsep`. * lisp/cedet/semantic/lex-spp.el: Use lexical-binding. (define-lex-spp-macro-declaration-analyzer) (define-lex-spp-include-analyzer, semantic-lex-with-macro-used) (define-lex-spp-macro-undeclaration-analyzer): Use `declare`. (semantic-lex-spp-symbol-remove): Rename arg to avoid colliding with dynamic variable `obarray`. (semantic-lex-spp-symbol-pop): Remove unused var `oldvalue`. (semantic-lex-spp-lex-text-string): Remove unused var `analyzer`. * lisp/cedet/semantic/lex.el (define-lex) (semantic-lex-unterminated-syntax-protection, define-lex-analyzer) (define-lex-regex-analyzer, define-lex-block-analyzer) (semantic-lex-catch-errors): Use `declare`. * lisp/cedet/semantic/tag.el: Use lexical-binding. (semantic-with-buffer-narrowed-to-current-tag) (semantic-with-buffer-narrowed-to-tag): Use `declare`. * lisp/cedet/semantic/wisent.el: Use lexical-binding. (define-wisent-lexer): Use `declare`. * lisp/emacs-lisp/cl-lib.el (cl-pushnew): The arg to :test can be any form not just function form. * lisp/org/ob-comint.el (org-babel-comint-in-buffer) (org-babel-comint-with-output): Use `declare`. * lisp/org/ob-core.el (org-babel-map-src-blocks): Use `declare`. (org-babel-result-cond): Simplify edebug spec. * lisp/org/org-clock.el (org-with-clock-position, org-with-clock): * lisp/org/org-agenda.el (org-agenda-with-point-at-orig-entry): * lisp/org/ob-tangle.el (org-babel-with-temp-filebuffer): Use `declare`. * lisp/textmodes/rst.el (push): Remove redundant edebug spec. * lisp/vc/pcvs-parse.el: Use lexical-binding. (cvs-parse-buffer): Rename arg to avoid dynbound conflict. (cvs-or): Use `declare`.
* Remove some unnecessary references to Emacs 18Stefan Kangas2021-02-051-5/+2
| | | | | | * lisp/progmodes/cmacexp.el: * lisp/progmodes/f90.el: * lisp/shell.el: Doc fix; don't mention Emacs 18.
* Make comint-read-input-ring skip uninteresting text in .zsh_historyBrian Leung2021-01-111-0/+1
| | | | | | | | | | | | | | | | | | * lisp/comint.el (comint-read-input-ring): Simplify (bug#45606). * lisp/shell.el (shell-mode): Add "~/.zsh_history". * lisp/comint.el (comint-read-input-ring): Bind `comint-input-ring-file-prefix' in anticipation of a buffer switch. * lisp/comint.el (comint-read-input-ring): Skip the separator. Because re-search-backward moves point to the beginning of the match, and since we don't want the separator appearing in the output, we skip over it. This is required to properly detect instances of the value that zsh uses for `comint-input-ring-file-prefix'; if the `comint-input-ring-file-prefix' is ':potato', the subsequent invocation `looking-at' sees '\n:potato' for all entries after the one at the very beginning of the history file.
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Prefer setq-local in shell.elStefan Kangas2020-12-081-23/+23
| | | | | * lisp/shell.el (shell-completion-vars, shell-mode): Prefer setq-local.
* Define explicit-shell-file-name only in shell.elBasil L. Contovounesios2020-12-031-12/+12
| | | | | | | | | | | | | | | | | | | | For discussion, see the following thread: https://lists.gnu.org/r/emacs-devel/2020-04/msg00880.html * doc/emacs/cmdargs.texi (General Variables): Mention shell-file-name in relation to SHELL. * doc/emacs/misc.texi (Interactive Shell): Move index entry for SHELL environment variable from here, where it is not mentioned... (Single Shell): ...to here, where it is discussed along with shell-file-name. * lisp/dired.el (dired-insert-directory): Use shell-file-name instead of explicit-shell-file-name when a shell is implicitly requested. * lisp/obsolete/terminal.el (explicit-shell-file-name): * lisp/term.el (explicit-shell-file-name): Remove duplicate defcustoms and load lisp/shell.el instead. (Bug#40679) * lisp/shell.el (explicit-shell-file-name): Clarify docstring. (shell): Simplify.
* Use null-device where appropriateMichael Albinus2020-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * lisp/filesets.el (filesets-select-command): * lisp/shell.el (shell-mode): * lisp/term.el (term-exec-1): * lisp/wdired.el (wdired-do-symlink-changes): * lisp/cedet/ede/pmake.el (ede-proj-makefile-create): * lisp/eshell/esh-io.el (eshell-set-output-handle): * lisp/gnus/gnus-fun.el (gnus-grab-cam-x-face): * lisp/gnus/mml2015.el (mml2015-epg-key-image): * lisp/gnus/smime.el (smime-noverify-region): * lisp/org/ob-picolisp.el (org-babel-execute:picolisp): * lisp/org/ob-screen.el (org-babel-prep-session:screen) (org-babel-prep-session:screen): * lisp/play/fortune.el (fortune-quiet-strfile-options): * lisp/progmodes/cperl-mode.el (cperl-pod2man-build-command): * lisp/progmodes/sh-script.el (sh-tmp-file): * lisp/vc/diff-mode.el (diff-add-log-current-defuns) (diff--font-lock-prettify): * lisp/vc/ediff-mult.el (ediff-patch-file-form-meta): * lisp/vc/ediff-ptch.el (ediff-map-patch-buffer) (ediff-fixup-patch-map, ediff-dispatch-file-patching-job): * lisp/vc/vc.el (vc-diff-internal): Use null-device or (null-device), respectively. (Bug#3736)