1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

159558 commits

Author SHA1 Message Date
Juri Linkov
1763cd4727 Fit the re-builder window to the buffer
* lisp/emacs-lisp/re-builder.el (re-builder): Fit the height to
the buffer (bug#56772).
2022-09-05 20:58:27 +02:00
Hugo Heagren
6a2ee981c3 Add new functions for splitting the root window
* lisp/window.el (split-window-right): Add optional argument to
control which window is split (previously, would only split selected
window).  Update docstring.
* doc/lispref/windows.texi (Splitting Windows): Update docs for
`split-window-right'.
* lisp/window.el (split-window-below): Add optional argument to
control which window is split (previously, would only split selected
window).  Update docstring.
* doc/lispref/windows.texi (Splitting Windows): Update docs for
`split-window-below'.
* lisp/window.el (ctl-x-map): Bind `split-root-window-right' to 9 in
ctl-x-map.  This is consistent with binding other window-splitting
operations to numbers in this map.
* lisp/window.el (ctl-x-map): Bind `split-root-window-below' to 7 in
ctl-x-map.  This is consistent with binding other window-splitting
operations to numbers in this map.
* lisp/window.el (split-root-window-right): New function to split
whole frame.
* doc/lispref/windows.texi (Splitting Windows): Add documentation for
`split-root-window-right'.
* lisp/window.el (split-root-window-below): New function to split
whole frame.
* doc/lispref/windows.texi (Splitting Windows): Add documentation for
`split-root-window-below' (bug#56791).
2022-09-05 20:57:21 +02:00
Sean Whitton
21c725dfe0 Font lock long Git commit summary lines
* lisp/vc/vc-git.el (vc-git-log-edit-summary-target-len)
(vc-git-log-edit-summary-max-len): New defcustoms.
(vc-git-log-edit-summary-target-warning)
(vc-git-log-edit-summary-max-warning): New faces.
(vc-git--log-edit-summary-check): New function.
(vc-git-log-edit-mode): Add vc-git--log-edit-summary-check to
log-edit-font-lock-keywords to font lock long Git commit summary
lines.
* etc/NEWS (VC): Document the change.
* .dir-locals.el: Set vc-git-log-edit-summary-target-len.
2022-09-05 11:12:23 -07:00
Eli Zaretskii
3f1efe33d6 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2022-09-05 15:17:49 +03:00
Eli Zaretskii
0773d1a03a ; * doc/emacs/mark.texi (Mark): Improve wording. 2022-09-05 15:17:03 +03:00
Stefan Kangas
5c8b76fc87 Merge from origin/emacs-28
5713c730f2 Update to Org 9.5.5
aad38d6010 * lisp/emacs-lisp/comp.el (comp-run-async-workers): Fail m...
2022-09-05 06:30:32 +02:00
Po Lu
21c8a9d944 Fix crash while converting empty vector to X data
* src/xselect.c (lisp_data_to_selection_data): Assume an empty
vector represents INTEGER data, instead of blindly trying to
aref it's first element.
2022-09-05 09:51:22 +08:00
Jim Porter
f07505d1ec Let external Eshell processes send stdout and stderr to different places
* lisp/eshell/esh-proc.el (eshell-put-process-properties): Pass INDEX.
(eshell-gather-process-output): Create a pipe process for stderr when
stderr goes somewhere different than stdout.
(eshell-insertion-filter, eshell-sentinel): Consult
':eshell-handle-index' property.

* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/output/stdout-to-buffer)
(esh-proc-test/output/stderr-to-buffer)
(esh-proc-test/exit-status/with-stderr-pipe): New tests (bug#21605).
2022-09-04 15:15:01 -07:00
Jim Porter
a87c7aff55 Put Eshell's bookkeeping data for external processes on the process object
This allows tracking this information for process objects not recorded
in 'eshell-process-list', which will be useful for pipe processes for
stderr output.

* lisp/eshell/esh-proc.el (eshell-process-list): Add docstring.
(eshell-record-process-object): Only record the process object and
whether it's a subjob.
(eshell-remove-process-entry): Adapt to changes in
'eshell-record-process-object'.
(eshell-record-process-properties): New function...
(eshell-gather-process-output): ... call it.
(eshell-insertion-filter, eshell-sentinel): Use new process
properties, don't require process to be in 'eshell-process-list'.

* test/lisp/eshell/esh-proc-tests.el (esh-proc-test--output-cmd): New
variable.
(esh-proc-test--detect-pty-cmd): Add docstring.
(esh-proc-test/output/to-screen)
(esh-proc-test/output/stdout-and-stderr-to-buffer)
(esh-proc-test/exit-status/success, esh-proc-test/exit-status/failure)
(esh-proc-test/kill-process/foreground-only): New tests.
(esh-proc-test/kill-background-process): Rename to...
(esh-proc-test/kill-process/background-prompt): ... this, and use
'eshell-wait-for-subprocess' instead of 'sit-for'.
2022-09-04 15:15:01 -07:00
Jim Porter
ab7e94fb1d Add support for more kinds of redirect operators in Eshell
* lisp/eshell/esh-arg.el: Require cl-lib.
(eshell-finish-arg): Allow passing multiple ARGUMENTS.
(eshell-quote-argument): Handle the case when 'eshell-finish-arg' was
passed multiple arguments.

* lisp/eshell/esh-cmd.el (eshell-do-pipelines)
(eshell-do-pipelines-synchronously): Only set stdout output handle.

* lisp/eshell/esh-io.el (eshell-redirection-operators-alist): New
constant.
(eshell-io-initialize): Prefer sharp quotes for functions.
(eshell-parse-redirection, eshell-strip-redirections): Add support for
more redirection forms.
(eshell-copy-output-handle, eshell-set-all-output-handles): New
functions.

* test/lisp/eshell/esh-io-tests.el
(esh-io-test/redirect-all/overwrite, esh-io-test/redirect-all/append)
(esh-io-test/redirect-all/insert, esh-io-test/redirect-copy)
(esh-io-test/redirect-copy-first, esh-io-test/redirect-pipe): New
tests.

* doc/misc/eshell.texi (Redirection): Document new redirection syntax.
(Pipelines): Document '|&' syntax.
(Bugs and ideas): Update item about redirection syntax.

* etc/NEWS: Announce this change.
2022-09-04 15:15:01 -07:00
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
Kyle Meyer
5713c730f2 Update to Org 9.5.5 2022-09-03 21:32:20 -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
Stefan Monnier
aad38d6010 * lisp/emacs-lisp/comp.el (comp-run-async-workers): Fail more gracefully
Otherwise Emacs may fail to start if it can't find a writable
`~/.emacs.d/eln-cache` directory.
Fixes bug#57562.  See also Debian's bug #1017739.
2022-09-03 15:14:58 -04: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