1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-04 22:50:59 -08:00
Commit graph

159546 commits

Author SHA1 Message Date
Jim Porter
3d6c013a27 Allow checking specific Eshell handles for interactive output
This changes the default behavior of the function to check only stdout
for interactivity, but for most cases this should be what we want.

* lisp/eshell/esh-io.el (eshell-interactive-output-p): Pass HANDLES
and handle INDEX.

* lisp/eshell/em-term.el (eshell-visual-command-p): Check for
interactivity of both stdout and stderr.
2022-09-04 15:15:01 -07:00
Jim Porter
1be925faa1 Simplify Eshell handle functions and add tests/documentation
* lisp/eshell/esh-arg.el (eshell-parse-argument-hook): Explain how to
use 'eshell-finish-arg'.

* lisp/eshell/esh-io.el (eshell-create-handles): Only call
'eshell-get-target' for stderr if necessary.
(eshell-protect-handles): Use 'dotimes'.
(eshell-set-output-handle): Pass HANDLES and fix an edge case with
setting a duplicate TARGET.

* test/lisp/eshell/eshell-tests-helpers.el (eshell-with-temp-buffer):
New macro.

* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/quoted-lisp-form)
(esh-cmd-test/backquoted-lisp-form)
(esh-cmd-test/backquoted-lisp-form/splice): New tests.

* test/lisp/eshell/eshell-tests.el (eshell-test/redirect-buffer)
(eshell-test/redirect-buffer-escaped): Move to...
* test/lisp/eshell/esh-io-tests.el: ... here, and add other I/O tests.

* doc/misc/eshell.texi (Arguments): Add documentation for special
argument types.
(Input/Output): Expand documentation for redirection and pipelines.
2022-09-04 15:15:01 -07:00
Matt Armstrong
5af5ed6c62 Add basic test coverage for overlay modification hooks
* test/src/buffer-tests.el: (overlay-modification-hooks) new
ert-deftest.
(overlay-tests-start-recording-modification-hooks): New function.
(overlay-tests-get-recorded-modification-hooks): New function
(bug#57150).
2022-09-04 23:58:55 +02:00
Lars Ingebrigtsen
72ba9efe72 Clarify that the region is in the Emacs manual
* doc/emacs/mark.texi (Mark): Try to clarify what's so special
about Emacs' regions (bug#50950).
2022-09-04 22:58:52 +02:00
Lars Ingebrigtsen
1dad2cba15 Mark some filenotify tests unstable on EMBA
* test/lisp/filenotify-tests.el (file-notify-test03-events)
(file-notify-test09-watched-file-in-watched-dir): Mark as unstable
on EMBA, because they seem to fail regularly.
2022-09-04 20:44:30 +02:00
Eli Zaretskii
0fd0d07249 ; * etc/NEWS: Move WebP entry to a proper place. 2022-09-04 21:30:53 +03:00
Michael Albinus
4eb3e6bdda Fix comment in tramp.el 2022-09-04 19:25:21 +02:00
Juri Linkov
2dfce43103 Don't replace the first character with an arrow in outline-minor-mode
* lisp/outline.el (outline--make-button-overlay): Add the first character
to the displayed outline button (bug#56820).
2022-09-04 20:02:20 +03:00
Juri Linkov
40cdbf6dc1 Use use-region-beginning/end in replacement commands (bug#45607)
* lisp/isearch.el (isearch-query-replace): Use use-region-beginning
and use-region-end.

* lisp/textmodes/paragraphs.el (repunctuate-sentences):
* lisp/replace.el (query-replace, query-replace-regexp)
(map-query-replace-regexp, replace-string, replace-regexp):
Add 'interactive-args' to 'declare' and use use-region-beginning,
use-region-end, use-region-noncontiguous-p.

* lisp/simple.el (use-region-noncontiguous-p): New function.
(region-noncontiguous-p): Return more meaningful value.
2022-09-04 19:55:59 +03:00
Lars Ingebrigtsen
ad6878005d Add a basic widget type for buffer predicates
* lisp/paren.el (show-paren-predicate):
* lisp/outline.el (outline-minor-mode-use-buttons): Use it.
* lisp/wid-edit.el (buffer-predicate): New widget type.
2022-09-04 16:29:06 +02:00
Eli Zaretskii
9aed695241 ; * doc/lispref/sequences.texi (Sequence Functions): Fix punctuation. 2022-09-04 16:30:03 +03:00
Eli Zaretskii
bcde498a73 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2022-09-04 16:27:55 +03:00
Eli Zaretskii
fd47e62b01 ; * etc/NEWS: Fix a recently-added entry. 2022-09-04 16:27:05 +03:00
Po Lu
55ff36485f Fix earlier change to xterm.c
* src/xterm.c (x_detect_focus_change): Finally figure out what
the call to x_new_focus_frame does with the core focus, and do
the equivalent with the XInput 2 focus.
2022-09-04 21:04:19 +08:00
Michael Albinus
f1635c8efb Fix rx forms in Tramp
* lisp/net/tramp.el (tramp-restricted-shell-hosts-alist)
(tramp-local-host-regexp, tramp-echoed-echo-mark-regexp)
(tramp-login-prompt-regexp, tramp-terminal-prompt-regexp)
(tramp-antispoof-regexp)
(tramp-build-completion-file-name-regexp)
(tramp-debug-outline-regexp)
(tramp-use-absolute-autoload-file-names)
(tramp-lock-file-info-regexp, tramp-shell-quote-argument):
* lisp/net/tramp-adb.el (tramp-do-parse-file-attributes-with-ls)
* lisp/net/tramp-cache.el (tramp-flush-file-function):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name):
* lisp/net/tramp-integration.el (tramp-rfn-eshadow-update-overlay-regexp)
(info-lookup-maybe-add-help):
* lisp/net/tramp-sh.el (tramp-default-user-alist, tramp-sunos-unames)
(tramp-scp-direct-remote-copying, tramp-get-remote-locale):
* lisp/net/tramp-smb.el (tramp-smb-prompt, tramp-smb-wrong-passwd-regexp)
(tramp-smb-errors, tramp-smb-get-localname)
(tramp-smb-read-file-entry): Simplify rx forms.

* lisp/net/tramp.el (tramp-handle-find-backup-file-name)
(tramp-handle-lock-file, tramp-handle-make-auto-save-file-name):
* lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times)
(tramp-adb-maybe-open-connection):
* lisp/net/tramp-gvfs.el
(tramp-gvfs-file-attributes-with-gvfs-ls-regexp):
* lisp/net/tramp-sh.el (tramp-open-shell, tramp-find-shell): Do not use
`eval-when-compile'.

* lisp/net/tramp-cmds.el (tramp-rename-files, tramp-rename-these-files):
Use rx.

* lisp/net/tramp-gvfs.el (tramp-gvfs-password-tcrypt): New defonst.
(tramp-gvfs-handle-file-attributes): Use `number-to-string'.

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test17-insert-directory):
* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory)
(tramp--test-share-p): Simplify rx forms.
2022-09-04 13:44:30 +02:00
Damien Cassou
4751b51d5e Add new function `seq-positions'
* doc/lispref/sequences.texi (Sequence Functions): Document it.

* lisp/emacs-lisp/seq.el (seq-positions): New function.

* lisp/emacs-lisp/shortdoc.el (sequence): Mention it.

* test/lisp/emacs-lisp/seq-tests.el (test-seq-positions): Test it
(bug#57548).
2022-09-04 13:21:59 +02:00
Augusto Stoffel
4d50d413e6 Add Python import management commands
* lisp/progmodes/python.el (python-interpreter): New variable
(python-mode-map): Keybindings and menu entries for new commands
(python--list-imports, python-import-history, python--query-import)
(python--do-isort):  New variables and helper functions.
(python-add-import, python-import-symbol-at-point)
(python-remove-import, python-sort-imports, python-fix-imports): New
interactive commands (bug#57574).
2022-09-04 13:14:58 +02:00
Augusto Stoffel
4932d26b5d Python shells dedicated to a project
* lisp/progmodes/python.el: Require 'seq' and (optionally) 'compat'
and 'project' libraries.
(python-shell-dedicated): New user option
(python-shell-get-process-name): Adapt to project-dedicated shells.
(run-python): Offer possibility to create a project-dedicated shell,
or use 'python-shell-dedicated' as the default behavior.
(python-shell-get-buffer): Adapt to project-dedicated shells
(bug#56997).
2022-09-04 13:13:57 +02:00
Damien Cassou
2db8b0e12f Add new function `seq-remove-at-position'
* doc/lispref/sequences.texi (Sequence Functions): Document it.

* lisp/emacs-lisp/seq.el (seq-remove-at-position): New function.

* lisp/emacs-lisp/shortdoc.el (sequence): Mention it.

* test/lisp/emacs-lisp/seq-tests.el (test-seq-remove-at-position):
Test it.
2022-09-04 13:07:18 +02:00
Damien Cassou
77b761dafa Improve documentation of several functions in seq.el
* doc/lispref/sequences.texi (Sequence Functions):
* lisp/emacs-lisp/seq.el (seq-contains):
(seq-contains-p):
(seq-set-equal-p):
(seq-position):
(seq-union):
(seq-intersection):
(seq-difference): Use more standard wording in the docstrings
(bug#57561).
2022-09-04 13:00:22 +02:00
Lars Ingebrigtsen
40de3684fb Rename the Mice node in the Emacs manual
* doc/emacs/commands.texi (User Input, Keys): Rename "Mice" to
Mouse Input.
2022-09-04 12:41:02 +02:00
Lars Ingebrigtsen
500af031c8 Fix some help-fns test failures
* lisp/help-fns.el (help-fns--key-bindings): Fix test failures
from recent change.
2022-09-04 11:37:32 +02:00
Eli Zaretskii
d2abe9adf7 ; * lisp/disp-table.el (standard-display-by-replacement-char): Doc fix. 2022-09-04 10:03:22 +03:00
Eli Zaretskii
b35a93a061 New command to facilitate text-mode display of unsupported chars
* lisp/disp-table.el (standard-display-by-replacement-char): New
command.

* etc/NEWS: Announce it.
2022-09-04 09:03:30 +03:00
Eli Zaretskii
1d9e4900a3 Fix update of Dired display when it was called on a cons cell
* lisp/dired.el (dired-internal-do-deletions): Make sure that FN's
directory entry is updated on display.  (Bug#57565)
2022-09-04 08:40:52 +03:00
Stefan Monnier
0ffde8a81f * lisp/term/linux.el (gpm-mouse-enable): Remove left-over declaration 2022-09-03 22:58:44 -04:00
Stefan Monnier
2dd1c2ab19 gv.el and cl-macs.el: Fix bug#57397
* lisp/emacs-lisp/gv.el (gv-get): Obey symbol macros.
* lisp/emacs-lisp/cl-macs.el (cl--letf): Remove workaround placed to
try and handle symbol macros.

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-test--symbol-macrolet):
Add new testcase.
2022-09-03 22:38:28 -04:00
Gregory Heytings
1d1158397b Look up keybindings in correct buffer in describe-function.
* lisp/help-fns.el (help-fns--key-bindings): New parameter.
Use it when looking up keybindings.
(describe-function-1): Add the buffer in which the command
was invoked as argument to 'help-fns--key-bindings'.
Fixes bug#57568.
2022-09-04 00:45:04 +02:00
Jeff Walsh
22bee93d92 Update error message to reflect variable rename
* src/comp.c (Fcomp_el_to_eln_filename): Update error message.  (Bug#55861)

[ According to the Git metadata, this commit 8436e0bee9 was already
  merged from `emacs-28`, yet the code says it was not.  :-(  ]
2022-09-03 12:55:27 -04:00
Eli Zaretskii
9788f00cab ; Fix last change. 2022-09-03 19:12:49 +03:00
Eli Zaretskii
65e3568293 Fix indexing of mouse-wheel events
* doc/emacs/frames.texi (Mouse Commands): Add index entries for
wheel events.
2022-09-03 19:11:51 +03:00
Eli Zaretskii
aace5455b0 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2022-09-03 19:02:18 +03:00
Eli Zaretskii
ec72b55657 Revert "* doc/emacs/commands.texi (Mice): Improve indexing."
This reverts commit 1cea0ae413.

The index entries it added don't belong to the place where they were
added.
2022-09-03 19:01:21 +03:00
Mattias Engdegård
99a5a72537 lisp/emacs-lisp/seq.el: remove unnecessary compatibility code
* lisp/emacs-lisp/seq.el (seq-take, seq--activate-font-lock-keywords):
Simplify unnecessarily guarded code, as this file will only ever be
used with the same version of Emacs.
2022-09-03 17:59:42 +02:00
Stefan Kangas
1cea0ae413 * doc/emacs/commands.texi (Mice): Improve indexing. 2022-09-03 17:47:14 +02:00
Stefan Monnier
b39daf417b Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs 2022-09-03 11:28:44 -04:00
Eli Zaretskii
9a0c469085 ; * doc/emacs/commands.texi: Fix a typo. 2022-09-03 18:07:53 +03:00
Stefan Monnier
b01d529e8d * lisp/emacs-lisp/macroexp.el (macroexp--compiler-macro): Soften message
Clarify that the error is "harmless".
2022-09-03 11:03:32 -04:00
Stefan Monnier
d60e930d34 * lisp/emacs-lisp/cl-macs.el: Use define-symbol-prop (bug#50869)
(cl-define-compiler-macro, cl-defstruct, cl-deftype): Prefer
`define-symbol-prop` over `put` so `unload-feature` can undo
those definitions.
2022-09-03 10:55:10 -04:00
Stefan Monnier
bf37ea1873 * lisp/loadhist.el (loadhist-unload-element): Remove auxiliary function info
See bug#50869.
2022-09-03 10:54:50 -04:00
Eli Zaretskii
06f440eb81 ; Fix recent additions to Emacs manual
* doc/emacs/commands.texi (User Input, Mice): Fix punctuation,
indexing, and wording.
2022-09-03 17:38:53 +03:00
Stefan Monnier
996f8d85d7 * lisp/help-fns.el (find-lisp-object-file-name): Revert last change 2022-09-03 10:33:02 -04:00
Po Lu
88b895ee56 Improve documentation of scroll wheel event types in new Mice node
* doc/emacs/commands.texi (Mice): Improve documentation of
scroll wheel event types; fix doc for Emacs 29 and describe
horizontal wheel movement.
2022-09-03 21:50:04 +08:00
Po Lu
b861adce06 ; * character.c (Fmax_char): Fix build with type checking. 2022-09-03 21:45:46 +08:00
Po Lu
ab5ca80e74 Work around another X server bug in crossing event dispatch
* src/xterm.c (xi_focus_handle_for_device): Clear implicit focus
along with FocusOut.  (bug#57468)
(x_mouse_leave): Avoid invalid reads of
dpyinfo->x_focus_event_frame on input extension builds.
2022-09-03 21:44:48 +08:00
Lars Ingebrigtsen
419d757905 Add a Mice node in the Emacs manual
* doc/emacs/commands.texi (User Input): Don't claim to not
document mouse buttons.
(Mice): New node (bug#50948).
2022-09-03 15:12:58 +02:00
Philip Kaludercic
2d337ca577
* subr.el (buffer-match-p): Use 'pcase' (bug#57502) 2022-09-03 14:54:40 +02:00
Lars Ingebrigtsen
252f135f44 Mention M-x list-packages in the Help node in the Emacs manual
* doc/emacs/help.texi (Help): Mention listing packages
(bug#50936).
2022-09-03 14:46:21 +02:00
Lars Ingebrigtsen
6c11214dc1 Inhibit nativecomp of loaddefs files
* lisp/emacs-lisp/generate-lisp-file.el
(generate-lisp-file-trailer): Allow inhibiting nativecomp.

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric):
Inhibit native-comp, because it's not very useful for loaddefs files.
2022-09-03 14:23:26 +02:00
Po Lu
91ba20fff1 Work around potential X server bug
* src/xterm.c (handle_one_xevent): Ignore core crossing events
on input extension builds.  The X server is not actually
supposed to deliver them to us, and it messes up MPX focus
tracking.  (bug#57468)
2022-09-03 19:57:12 +08:00