Eli Zaretskii [Wed, 7 Sep 2022 13:20:29 +0000 (16:20 +0300)]
Add instructions to 'standard-display-by-replacement-char'
* lisp/disp-table.el (standard-display-by-replacement-char): Add a
preamble to the generated code with instructions. Suggested by
Richard Stallman <rms@gnu.org>.
Eli Zaretskii [Wed, 7 Sep 2022 12:18:54 +0000 (15:18 +0300)]
Don't follow symlinks in w32notify file watches
* src/w32notify.c (add_watch): On filesystems that support
symlinks, don't follow symlinks. (Bug#57536)
* src/w32.c (symlinks_supported): New function.
* src/w32.h (symlinks_supported): Add prototype.
Mattias Engdegård [Wed, 7 Sep 2022 11:48:20 +0000 (13:48 +0200)]
Simplify dolist and dotimes
We no longer care enough about non-lexbind code generation for it
to merit special attention; better to keep the code simple.
Suggested by Philip Kaludercic in
https://lists.gnu.org/archive/html/emacs-devel/2022-09/msg00354.html .
* lisp/subr.el (dolist, dotimes): Use uninterned symbols for variable
bindings generated by the macros, and discard the alternative code
versions for non-lexbind code. Use sensible variable names.
Philip Kaludercic [Tue, 6 Sep 2022 15:07:12 +0000 (17:07 +0200)]
Untabify rcirc.el
Gerd Möllmann [Wed, 7 Sep 2022 04:54:49 +0000 (06:54 +0200)]
; TODO for writing to the bottom-right corner of a TTY (bug#57607)
Po Lu [Wed, 7 Sep 2022 01:52:01 +0000 (09:52 +0800)]
Fix nsfont breakage since
6b1ed2f2c99a1c2da56c5f434570c438cad6576d
* nsfont.m (ns_spec_to_descriptor): Fix coding style, also
handle `monospace' special family.
(ns_descriptor_to_entity): Fix reporting of spacing on fonts.
(ns_findfonts): Fix coding style.
Po Lu [Wed, 7 Sep 2022 01:07:59 +0000 (09:07 +0800)]
Reenable reporting of frame movement on NS
* src/nsterm.m ([EmacsView windowDidMove:]): Restore code to
generate MOVE_FRAME_EVENTS, and use kbd_buffer_store_event
instead.
Stefan Kangas [Wed, 7 Sep 2022 01:22:15 +0000 (03:22 +0200)]
Improve image-tests.el Commentary
* test/src/image-tests.el: Doc fix; explain how to run from
command line.
Stefan Kangas [Wed, 7 Sep 2022 00:59:50 +0000 (02:59 +0200)]
; * lib-src/emacsclient.c (main): Fix previous change.
Stefan Monnier [Tue, 6 Sep 2022 21:29:25 +0000 (17:29 -0400)]
* lisp/jit-lock.el (jit-lock-function): Update comment
Stefan Monnier [Tue, 6 Sep 2022 21:24:11 +0000 (17:24 -0400)]
* lisp/jit-lock.el (jit-lock-function): Don't fontify invisible text
See bug#57447. This can speed up fontification significantly when using
things like outline-mode.
Stefan Monnier [Tue, 6 Sep 2022 21:20:16 +0000 (17:20 -0400)]
* etc/NEWS.28: Mention `make-closure`
Stefan Kangas [Tue, 6 Sep 2022 20:40:19 +0000 (22:40 +0200)]
* doc/misc/mh-e.texi (Getting MH-E): Update.
Stefan Kangas [Tue, 6 Sep 2022 20:44:49 +0000 (22:44 +0200)]
; Fix deleting XEmacs references from MH-E manual
* doc/misc/mh-e.texi (Incorporating Mail): Also remove index entries
for gnuclient.
Stefan Kangas [Tue, 6 Sep 2022 20:43:26 +0000 (22:43 +0200)]
Don't mention ancient Gnus versions in MH-E manual
* doc/misc/mh-e.texi (Preface, Reading PGP, Procmail): Don't mention
pre-2000 versions of Gnus.
Eli Zaretskii [Tue, 6 Sep 2022 12:09:09 +0000 (15:09 +0300)]
Fix the MS-Windows build
* lib-src/emacsclient.c (DEFAULT_TIMEOUT): Move out of the
!WINDOWSNT condition, to fix the MS-Windows compilation.
(set_socket_timeout) [WINDOWSNT]: Protect against too-large values
of timeout.
Stefan Kangas [Tue, 6 Sep 2022 11:48:49 +0000 (13:48 +0200)]
* doc/misc/semantic.texi: Delete unused macro.
Stefan Kangas [Tue, 6 Sep 2022 11:44:21 +0000 (13:44 +0200)]
; Minor doc fix in gnus.texi
* doc/misc/gnus.texi (Writing New Back Ends): Delete now obsolete
version variable.
Po Lu [Tue, 6 Sep 2022 11:39:05 +0000 (19:39 +0800)]
Correctly handle frame synchronization on fullscreen KWin
* src/xfns.c (x_set_use_frame_synchronization): Announce that we
do not want the compositor to unredirect the frame while
fullscreen.
* src/xterm.c (x_atom_refs): New atom
`_NET_WM_BYPASS_COMPOSITOR'.
* src/xterm.h (struct x_display_info): Likewise.
Kai Tetzlaff [Mon, 28 Feb 2022 10:08:07 +0000 (11:08 +0100)]
Fix (mostly multibyte) issues in sieve-manage.el (Bug#54154)
The managesieve protocol (s. RFC5804) requires support for (a sightly
restricted variant of) UTF-8 in script content and script names. This
commit fixes/improves the handling of multibyte characters.
In addition, `sieve-manage-getscript' now properly handles NO
responses from the server instead of inflooping.
There are also some logging improvements.
* lisp/net/sieve-manage.el
(sieve-manage--append-to-log):
(sieve-manage--message):
(sieve-manage--error):
(sieve-manage-encode):
(sieve-manage-decode):
(sieve-manage-no-p): New functions.
(sieve-manage-make-process-buffer): Switch process buffer to unibyte.
(sieve-manage-open-server): Add `:coding 'raw-text-unix` to
`open-network-stream' call. Use unix EOLs in order to keep matching
CRLF (aka "\r\n") intact.
(sieve-manage-send): Make sure that UTF-8 multibyte characters are
properly encoded before sending data to the server.
(sieve-manage-getscript):
(sieve-manage-putscript): Use the changes above to fix down/uploading
scripts containing UTF-8 multibyte characters.
(sieve-manage-listscripts):
(sieve-manage-havespace)
(sieve-manage-getscript)
(sieve-manage-putscript):
(sieve-manage-deletescript):
(sieve-manage-setactive): Use the changes above to fix handling of
script names which contain UTF-8 multibyte characters.
(sieve-manage-parse-string):
(sieve-manage-getscript): Add handling of server responses with type
NO. Abort `sieve-manage-getscript' and show error message in message
area.
(sieve-manage-erase):
(sieve-manage-drop-next-answer):
(sieve-manage-parse-crlf): Return erased/dropped data (instead of nil).
(sieve-sasl-auth):
(sieve-manage-getscript):
(sieve-manage-erase):
(sieve-manage-open-server):
(sieve-manage-open):
(sieve-manage-send): Improve logging.
Kai Tetzlaff [Mon, 28 Feb 2022 10:33:56 +0000 (11:33 +0100)]
Improve robustnes of `sieve-manage-quit' in case of errors
* lisp/net/sieve.el (sieve-manage-quit): Avoid killing buffers it's
not supposed to touch (bug#54154).
Stefan Kangas [Tue, 6 Sep 2022 11:03:40 +0000 (13:03 +0200)]
Add tests for opening different image formats
* test/src/image-tests.el
(image-tests-make-load-image-test): New macro.
(image-tests-load-image/gif)
(image-tests-load-image/jpeg)
(image-tests-load-image/pbm)
(image-tests-load-image/png)
(image-tests-load-image/svg)
(image-tests-load-image/tiff)
(image-tests-load-image/webp)
(image-tests-load-image/xbm)
(image-tests-load-image/xpm): New tests.
Stefan Kangas [Tue, 6 Sep 2022 10:56:51 +0000 (12:56 +0200)]
Fix interactive image.c tests
* test/src/image-tests.el (image-tests-image-metadata/gif)
(image-tests-image-metadata/webp): Fix tests.
Drew Adams [Tue, 6 Sep 2022 10:53:50 +0000 (12:53 +0200)]
Add some new find-lisp commands
* lisp/find-lisp.el (find-lisp-find-dired-other-window): New command.
(find-lisp-find-dired): Improve the doc string.
(find-lisp-find-dired-subdirectories): Clarify doc string.
(find-lisp-find-dired-subdirs-other-window): New command.
(find-lisp-find-dired-internal): Adjust to allow being called by
the new command.
(find-lisp-format): Make symlink output more regular.
Laurence Warne [Tue, 6 Sep 2022 10:28:12 +0000 (12:28 +0200)]
Apply syntax highlighting for all python f-strings
* lisp/progmodes/python.el (python--f-string-p)
(python--font-lock-f-strings): Edit functions to use a regular
expression matching all f-strings (bug#56757).
Michael Albinus [Tue, 6 Sep 2022 10:33:45 +0000 (12:33 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Tue, 6 Sep 2022 10:33:19 +0000 (12:33 +0200)]
Use secondary groups when checking permissions in Tramp (Bug#57044)
* lisp/net/tramp.el (tramp-check-cached-permissions): Check also for
secondary groups. (Bug#57044)
(tramp-get-remote-groups):
* lisp/net/tramp-adb.el (tramp-adb-handle-get-remote-groups):
* lisp/net/tramp-sh.el (tramp-sh-handle-get-remote-groups):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-get-remote-groups):
New defuns.
* lisp/net/tramp.el (tramp-file-name-for-operation):
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Add `tramp-get-remote-groups'.
* lisp/net/tramp.el:
* lisp/net/tramp-adb.el:
* lisp/net/tramp-cache.el:
* lisp/net/tramp-crypt.el:
* lisp/net/tramp-fuse.el:
* lisp/net/tramp-gvfs.el:
* lisp/net/tramp-integration.el:
* lisp/net/tramp-rclone.el:
* lisp/net/tramp-sh.el:
* lisp/net/tramp-smb.el:
* lisp/net/tramp-sudoedit.el: Use `blank' in `rx' forms.
* test/lisp/net/tramp-archive-tests.el:
* test/lisp/net/tramp-tests.el: Use `blank' in `rx' forms.
Lars Ingebrigtsen [Tue, 6 Sep 2022 10:24:32 +0000 (12:24 +0200)]
Make ffap-file-finder work again
* lisp/ffap.el (find-file-at-point): Allow people to set
ffap-file-finder again (bug#50279).
* lisp/ido.el (ido-everywhere): Add an interstitial to fulfil
ffap-file-handler semantics.
Stefan Kangas [Tue, 6 Sep 2022 04:30:27 +0000 (06:30 +0200)]
Merge from origin/emacs-28
ecbdb3b0ad * lisp/server.el: Improve Commentary.
ee5c591249 Explain how the font appearance can be fine-tuned in fbterm.
Stefan Monnier [Tue, 6 Sep 2022 04:08:35 +0000 (00:08 -0400)]
cl-symbol-macrolet: Fix recent regression
The recent fix for bug#57397 introduced a regression, breaking
the `cl-lib-symbol-macrolet-hide` test. It turned out that the
origin of the problem was that `gv.el` uses `macroexpand-1` which
does not (can't) use `macroexpand` but `cl-symbol-macrolet` failed
to advise `macroexpand-1` the way it advised `macroexpand`.
To fix this, we change `cl-symbol-macrolet` so it advises both, and we
do that with a new `macroexpand` advice which delegates the bulk of
the work to `macroexpand-1`.
Along the way, I bumped into another bug in the interaction between
`cl-letf` and `cl-symbol-macrolet`, which I tried to fix in `cl-letf`.
I hear the war on `cl-symbol-macrolet` was a failure.
Maybe ... just say no?
* lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand-1): New function,
extracted from `cl--sm-macroexpand`.
(cl--sm-macroexpand): Rewrite completely.
(cl-symbol-macrolet): Advise both `macroexpand` and `macroexpand-1`.
(cl--letf): Don't use the "simple variable" code for symbol macros.
* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-symbol-macrolet-hide):
Revert last change because the test was right.
* test/lisp/emacs-lisp/cl-macs-tests.el
(cl-macs-test--symbol-macrolet): Add a test case.
Sean Whitton [Tue, 6 Sep 2022 00:39:21 +0000 (17:39 -0700)]
; Document that a value of any other type means no highlighting
* lisp/vc/vc-git.el (vc-git-log-edit-summary-target-len)
(vc-git-log-edit-summary-max-len): Document that a value of any other
type means no highlighting.
Stefan Kangas [Tue, 6 Sep 2022 00:05:18 +0000 (02:05 +0200)]
Add new --timeout flag to emacsclient
* lib-src/emacsclient.c (DEFAULT_TIMEOUT): New constant.
(timeout): New static variable.
(longopts, shortopts, decode_options, print_help_and_exit): Add new
flag --timeout.
(set_socket_timeout, check_socket_timeout): New helper functions.
(main): Display a status message or exit after Emacs has not responded
for a while, depending on above new --timeout flag. (Bug#50849)
* doc/emacs/misc.texi (emacsclient Options):
* doc/man/emacsclient.1: Document the above new option.
* etc/NEWS: Announce it.
Gregory Heytings [Mon, 5 Sep 2022 22:13:07 +0000 (22:13 +0000)]
; * lisp/help-fns.el (help-fns--key-bindings): Fix previous change.
Lars Ingebrigtsen [Mon, 5 Sep 2022 22:06:34 +0000 (00:06 +0200)]
Disable failing cl-lib-symbol-macrolet-hide test for now
* test/lisp/emacs-lisp/cl-lib-tests.el
(cl-lib-symbol-macrolet-hide): Disable until code is fixed.
Gregory Heytings [Mon, 5 Sep 2022 21:28:32 +0000 (21:28 +0000)]
Simplify describe-function.
* lisp/help-fns.el (describe-function-1): Do not pass
'describe-function-orig-buffer' as argument to...
(help-fns--key-bindings): but use it directly there instead.
This simplifies
1d1158397b.
Juri Linkov [Mon, 5 Sep 2022 18:58:27 +0000 (20:58 +0200)]
Fit the re-builder window to the buffer
* lisp/emacs-lisp/re-builder.el (re-builder): Fit the height to
the buffer (bug#56772).
Hugo Heagren [Mon, 5 Sep 2022 18:54:51 +0000 (20:54 +0200)]
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).
Sean Whitton [Sun, 4 Sep 2022 23:20:15 +0000 (16:20 -0700)]
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.
Stefan Kangas [Mon, 5 Sep 2022 13:44:01 +0000 (15:44 +0200)]
* lisp/server.el: Improve Commentary.
Eli Zaretskii [Mon, 5 Sep 2022 12:17:49 +0000 (15:17 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Mon, 5 Sep 2022 12:17:03 +0000 (15:17 +0300)]
; * doc/emacs/mark.texi (Mark): Improve wording.
Gregory Heytings [Mon, 5 Sep 2022 08:55:10 +0000 (08:55 +0000)]
Explain how the font appearance can be fine-tuned in fbterm.
* doc/misc/efaq.texi (Emacs in a Linux console): Briefly document
Xft font specifications with which the font appearance can be
fine-tuned.
Stefan Kangas [Mon, 5 Sep 2022 04:30:32 +0000 (06:30 +0200)]
Merge from origin/emacs-28
5713c730f2 Update to Org 9.5.5
aad38d6010 * lisp/emacs-lisp/comp.el (comp-run-async-workers): Fail m...
Po Lu [Mon, 5 Sep 2022 01:51:05 +0000 (09:51 +0800)]
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.
Jim Porter [Sun, 28 Aug 2022 18:53:07 +0000 (11:53 -0700)]
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).
Jim Porter [Sun, 28 Aug 2022 18:19:30 +0000 (11:19 -0700)]
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'.
Jim Porter [Sat, 9 Jul 2022 23:26:55 +0000 (16:26 -0700)]
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.
Jim Porter [Mon, 29 Aug 2022 03:50:27 +0000 (20:50 -0700)]
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.
Jim Porter [Sat, 9 Jul 2022 17:34:31 +0000 (10:34 -0700)]
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.
Matt Armstrong [Sun, 4 Sep 2022 21:58:55 +0000 (23:58 +0200)]
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).
Lars Ingebrigtsen [Sun, 4 Sep 2022 20:58:52 +0000 (22:58 +0200)]
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).
Lars Ingebrigtsen [Sun, 4 Sep 2022 18:44:30 +0000 (20:44 +0200)]
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.
Eli Zaretskii [Sun, 4 Sep 2022 18:30:53 +0000 (21:30 +0300)]
; * etc/NEWS: Move WebP entry to a proper place.
Michael Albinus [Sun, 4 Sep 2022 17:25:21 +0000 (19:25 +0200)]
Fix comment in tramp.el
Juri Linkov [Sun, 4 Sep 2022 17:02:20 +0000 (20:02 +0300)]
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).
Juri Linkov [Sun, 4 Sep 2022 16:55:59 +0000 (19:55 +0300)]
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.
Lars Ingebrigtsen [Sun, 4 Sep 2022 14:29:06 +0000 (16:29 +0200)]
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.
Eli Zaretskii [Sun, 4 Sep 2022 13:30:03 +0000 (16:30 +0300)]
; * doc/lispref/sequences.texi (Sequence Functions): Fix punctuation.
Eli Zaretskii [Sun, 4 Sep 2022 13:27:55 +0000 (16:27 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sun, 4 Sep 2022 13:27:05 +0000 (16:27 +0300)]
; * etc/NEWS: Fix a recently-added entry.
Po Lu [Sun, 4 Sep 2022 13:03:31 +0000 (21:03 +0800)]
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.
Michael Albinus [Sun, 4 Sep 2022 11:44:30 +0000 (13:44 +0200)]
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.
Damien Cassou [Sun, 4 Sep 2022 11:21:59 +0000 (13:21 +0200)]
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).
Augusto Stoffel [Sun, 4 Sep 2022 11:14:58 +0000 (13:14 +0200)]
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).
Augusto Stoffel [Sun, 4 Sep 2022 11:13:57 +0000 (13:13 +0200)]
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).
Damien Cassou [Sat, 3 Sep 2022 16:47:04 +0000 (18:47 +0200)]
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.
Damien Cassou [Sun, 4 Sep 2022 11:00:22 +0000 (13:00 +0200)]
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).
Lars Ingebrigtsen [Sun, 4 Sep 2022 10:41:02 +0000 (12:41 +0200)]
Rename the Mice node in the Emacs manual
* doc/emacs/commands.texi (User Input, Keys): Rename "Mice" to
Mouse Input.
Lars Ingebrigtsen [Sun, 4 Sep 2022 09:37:32 +0000 (11:37 +0200)]
Fix some help-fns test failures
* lisp/help-fns.el (help-fns--key-bindings): Fix test failures
from recent change.
Eli Zaretskii [Sun, 4 Sep 2022 07:03:22 +0000 (10:03 +0300)]
; * lisp/disp-table.el (standard-display-by-replacement-char): Doc fix.
Eli Zaretskii [Sun, 4 Sep 2022 06:03:30 +0000 (09:03 +0300)]
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.
Eli Zaretskii [Sun, 4 Sep 2022 05:40:52 +0000 (08:40 +0300)]
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)
Stefan Monnier [Sun, 4 Sep 2022 02:58:44 +0000 (22:58 -0400)]
* lisp/term/linux.el (gpm-mouse-enable): Remove left-over declaration
Stefan Monnier [Sun, 4 Sep 2022 02:38:28 +0000 (22:38 -0400)]
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.
Kyle Meyer [Sun, 4 Sep 2022 01:32:20 +0000 (21:32 -0400)]
Update to Org 9.5.5
Gregory Heytings [Sat, 3 Sep 2022 22:43:26 +0000 (22:43 +0000)]
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.
Stefan Monnier [Sat, 3 Sep 2022 15:03:01 +0000 (11:03 -0400)]
* 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.
Jeff Walsh [Thu, 9 Jun 2022 00:02:01 +0000 (10:02 +1000)]
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
8436e0bee9cf7a was already
merged from `emacs-28`, yet the code says it was not. :-( ]
Eli Zaretskii [Sat, 3 Sep 2022 16:12:49 +0000 (19:12 +0300)]
; Fix last change.
Eli Zaretskii [Sat, 3 Sep 2022 16:11:51 +0000 (19:11 +0300)]
Fix indexing of mouse-wheel events
* doc/emacs/frames.texi (Mouse Commands): Add index entries for
wheel events.
Eli Zaretskii [Sat, 3 Sep 2022 16:02:18 +0000 (19:02 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 3 Sep 2022 16:01:21 +0000 (19:01 +0300)]
Revert "* doc/emacs/commands.texi (Mice): Improve indexing."
This reverts commit
1cea0ae4133bb22fd70d483df105e5a4653bc56c.
The index entries it added don't belong to the place where they were
added.
Mattias Engdegård [Sat, 3 Sep 2022 14:35:16 +0000 (16:35 +0200)]
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.
Stefan Kangas [Sat, 3 Sep 2022 15:47:14 +0000 (17:47 +0200)]
* doc/emacs/commands.texi (Mice): Improve indexing.
Stefan Monnier [Sat, 3 Sep 2022 15:28:44 +0000 (11:28 -0400)]
Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs
Eli Zaretskii [Sat, 3 Sep 2022 15:07:53 +0000 (18:07 +0300)]
; * doc/emacs/commands.texi: Fix a typo.
Stefan Monnier [Sat, 3 Sep 2022 14:52:57 +0000 (10:52 -0400)]
* lisp/emacs-lisp/macroexp.el (macroexp--compiler-macro): Soften message
Clarify that the error is "harmless".
Stefan Monnier [Sat, 3 Sep 2022 14:46:46 +0000 (10:46 -0400)]
* 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.
Stefan Monnier [Sat, 3 Sep 2022 14:40:47 +0000 (10:40 -0400)]
* lisp/loadhist.el (loadhist-unload-element): Remove auxiliary function info
See bug#50869.
Eli Zaretskii [Sat, 3 Sep 2022 14:38:53 +0000 (17:38 +0300)]
; Fix recent additions to Emacs manual
* doc/emacs/commands.texi (User Input, Mice): Fix punctuation,
indexing, and wording.
Stefan Monnier [Sat, 3 Sep 2022 14:33:02 +0000 (10:33 -0400)]
* lisp/help-fns.el (find-lisp-object-file-name): Revert last change
Po Lu [Sat, 3 Sep 2022 13:50:04 +0000 (21:50 +0800)]
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.
Po Lu [Sat, 3 Sep 2022 13:45:46 +0000 (21:45 +0800)]
; * character.c (Fmax_char): Fix build with type checking.
Po Lu [Sat, 3 Sep 2022 13:39:30 +0000 (21:39 +0800)]
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.
Lars Ingebrigtsen [Sat, 3 Sep 2022 13:12:16 +0000 (15:12 +0200)]
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).
Philip Kaludercic [Sat, 3 Sep 2022 12:15:29 +0000 (14:15 +0200)]
* subr.el (buffer-match-p): Use 'pcase' (bug#57502)
Lars Ingebrigtsen [Sat, 3 Sep 2022 12:46:21 +0000 (14:46 +0200)]
Mention M-x list-packages in the Help node in the Emacs manual
* doc/emacs/help.texi (Help): Mention listing packages
(bug#50936).
Lars Ingebrigtsen [Sat, 3 Sep 2022 12:23:26 +0000 (14:23 +0200)]
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.
Po Lu [Sat, 3 Sep 2022 11:55:31 +0000 (19:55 +0800)]
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)
Eli Zaretskii [Sat, 3 Sep 2022 10:45:53 +0000 (13:45 +0300)]
Teach 'max-char' about the Unicode code range
* src/character.c (Fmax_char): Accept an optional argument
UNICODE, and, if non-nil, return the maximum codepoint defined by
Unicode.
* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Update the
signature of 'max-char'.
* etc/NEWS:
* doc/lispref/nonascii.texi (Character Codes): Update the
documentation of 'max-char'.