1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-08 12:40:49 -08:00
Commit graph

157655 commits

Author SHA1 Message Date
Lars Ingebrigtsen
dedd19a2f5 Add new type predicate plistp
* lisp/subr.el (plistp): New type predicate (bug#47427).  This
referred to in the error message from plist-put: "Debugger
entered--Lisp error: (wrong-type-argument plistp (a b c))".
2022-06-27 12:36:37 +02:00
Lars Ingebrigtsen
abdf35fac6 Adjust plist calls in .m files
* src/nsterm.m (mod_of_kind):
* src/nsimage.m (ns_load_image): Adjust plist calls in .m files.
2022-06-27 12:26:19 +02:00
Lars Ingebrigtsen
513acdc9b4 Allow plist-get/plist-put/plist-member to take a comparison function
* doc/lispref/lists.texi (Plist Access): Document it.

* lisp/filesets.el (filesets-reset-fileset)
(filesets-ingroup-cache-get):
(filesets-ingroup-cache-put):
(filesets-build-menu-now): Don't use lax-plist functions.

* lisp/simple.el (lax-plist-put, lax-plist-get): Moved here from
fns.c and make obsolete.

* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Don't mark
plist functions as side-effect-free or pure.

* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Adjust type.

* lisp/emacs-lisp/shortdoc.el (list): Don't document deprecated
functions.

* src/xdisp.c (build_desired_tool_bar_string):
(display_mode_element):
(store_mode_line_string):
(display_string):
(produce_stretch_glyph):
(note_mode_line_or_margin_highlight):
(note_mouse_highlight):
* src/w32.c (serial_configure):
* src/sysdep.c (serial_configure):
* src/sound.c (parse_sound):
* src/process.c (Fset_process_buffer):
(Fset_process_sentinel):
(Fprocess_contact):
(Fmake_process):
(Fmake_pipe_process):
(Fset_network_process_option):
(Fserial_process_configure):
(Fmake_serial_process):
(set_network_socket_coding_system):
(finish_after_tls_connection):
(connect_network_socket):
(Fmake_network_process):
(server_accept_connection):
* src/lread.c (ADDPARAM):
(hash_table_from_plist):
* src/keyboard.c (make_lispy_position):
* src/indent.c (check_display_width):
* src/image.c (postprocess_image):
* src/gnutls.c (gnutls_verify_boot):
(Fgnutls_boot):
(gnutls_symmetric):
(Fgnutls_hash_mac):
(Fgnutls_hash_digest):
* src/dired.c (filter):
* src/data.c (add_to_function_history):
* src/coding.c (Fcoding_system_put): Adjust callers from
Fplist_put (etc) to plist_put.

* src/fns.c (plist_get):
(plist_put):
(plist_member): New functions (without optional third parameter)
to be used in C code.

* src/fns.c (Fplist_get, Fplist_put, Fplist_member): Take an
optional predicate parameter (bug#47425).

* src/lisp.h: Declare new plist_put, plist_get and plist_member
functions.

* test/lisp/json-tests.el (test-json-add-to-plist): Use plist-get.

* test/src/fns-tests.el (test-cycle-lax-plist-get):
(test-cycle-lax-plist-put):
(lax-plist-get/odd-number-of-elements):
(test-plist): Remove lax-plist tests, since semantics have changed
(they no longer error out on cycles).
2022-06-27 12:22:05 +02:00
Lars Ingebrigtsen
5b1bb1af03 Add NEWS entry about C-h v font locking 2022-06-27 10:11:06 +02:00
hokomo
c21487b2be Fix detecting dotted pairs in icalendar-export-region
* lisp/calendar/icalendar.el (icalendar-export-region): Fix detecting
dotted pairs (bug#56241).
Copyright-paperwork-exempt: yes
2022-06-27 10:03:30 +02:00
Allen Li
bc3b20b441 find-dired: Add find-dired-with-command
Add a command that runs and sets up the find-dired buffer with an
arbitrary find command.  Also rewrite the existing find-dired commands
using it.

The set of commands possible with find-dired is limited; the new
command allows users to run the full set of commands, but also leaves
the responsibility to the user to construct the command manually.

* lisp/find-dired.el (find-command-history): New var.
(find-dired-with-command): New command.
(find-dired): Rewritten with new command.
2022-06-27 09:46:27 +02:00
Allen Li
995fb1677d find-dired: Factor out find-dired--escaped-ls-option
Deduplicate this logic for other future find-dired commands.

* lisp/find-dired.el (find-dired--escaped-ls-option): New function.
(find-dired): Use find-dired--escaped-ls-option.
2022-06-27 09:44:29 +02:00
Lars Ingebrigtsen
f7149f73b1 Fix off-by-one error in Fsignal_names
* src/process.c (Fsignal_names): Fix off-by-one error.
2022-06-27 09:02:38 +02:00
Po Lu
0c01f3fa18 Use correct background for image mask color on Haiku
* src/haikuterm.c (haiku_draw_image_glyph_string): Use adjusted
background for image mask.
2022-06-27 06:21:32 +00:00
Po Lu
d1f63b2b06 Implement stipples for images on Haiku
* src/haiku_draw_support.cc (be_draw_bitmap_with_mask): New
function.
* src/haiku_support.h: Add prototype.

* src/haikuterm.c (haiku_draw_image_glyph_string): Draw stipple
correctly.
(haiku_draw_glyph_string): Fix conditions under which
row->stipple_p is set.
2022-06-27 06:21:31 +00:00
Stefan Kangas
087476bce1 Merge from origin/emacs-28
48bda83d35 Update to Org 9.5.4-3-g6dc785
c66b90a534 Mention Solaris 10 'make clean' and 'make check'
ade34cf821 Mention further crashes on Solaris 10
2022-06-27 06:30:25 +02:00
Stefan Kangas
677d740e14 ; Merge from origin/emacs-28
The following commit was skipped:

fd04009d16 Port distribution tarball to Solaris 10
2022-06-27 06:30:25 +02:00
Stefan Kangas
9533676302 Merge from origin/emacs-28
a9d338818a ; elec-pair: Fix docstring typo (bug#56233)
2022-06-27 06:30:24 +02:00
Kyle Meyer
48bda83d35 Update to Org 9.5.4-3-g6dc785 2022-06-26 23:00:38 -04:00
Po Lu
363821344d Correctly convert event state in more places
* src/xterm.c (handle_one_xevent): Use `xi_convert_event_state'
to handle synthetic and xwidget button events.
2022-06-27 09:13:33 +08:00
Paul Eggert
c66b90a534 Mention Solaris 10 'make clean' and 'make check' 2022-06-26 17:38:04 -05:00
Paul Eggert
ade34cf821 Mention further crashes on Solaris 10 2022-06-26 17:38:01 -05:00
Lars Ingebrigtsen
7865b516c8 Minor clean up of previous Fsignal_names patch
* src/process.c (Fsignal_names): Clean up code slightly.
2022-06-26 22:50:50 +02:00
Lars Ingebrigtsen
ed84f24a21 Make `signal-process' allow completing over signal names
* lisp/simple.el (read-signal-name): New function.
* src/process.c (Fsignal_process): Use it to allow completing over
the signal names (bug#56239).
(Fsignal_names): New function.
2022-06-26 22:45:39 +02:00
Lars Ingebrigtsen
19c44e2be3 Font-lock variable values in *Help*
* lisp/help-fns.el (describe-variable): Font-lock the variable
value (bug#47363).
2022-06-26 21:43:05 +02:00
Mattias Engdegård
f2a5d48e89 Optimise away functions in for-effect context
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Turn functions into nil when compiled for-effect since they have no
side-effects on their own.  This may enable further improvements such
as the elimination of variable bindings.
`unwind-protect` forms can be treated as plain function call at this
point.  In particular, their unwind function argument should be
not optimised for effect since it's a function.
2022-06-26 20:43:28 +02:00
Stefan Monnier
d3893d7e8e (oclosure-test-limits): Fix test failure when interpreted
* test/lisp/emacs-lisp/oclosure-tests.el (oclosure-test-limits):
Make sure we bind `byte-compile-debug` dynamically.
2022-06-26 13:15:15 -04:00
Eli Zaretskii
e6e818f6cf Fix re-composition under 'composition-break-at-point'
* src/xdisp.c (try_window_id): Disable this optimization if
'composition-break-at-point' is non-nil.
2022-06-26 19:55:13 +03:00
Eli Zaretskii
da5ef57fe4 * lisp/simple.el (delete-forward-char): Fix bug #56237. 2022-06-26 19:35:57 +03:00
Jim Porter
7faea4a15e When closing an Eshell process target, send EOF three times
* lisp/eshell/esh-io.el (eshell-close-target): Send EOF 3 times.

* test/lisp/eshell/em-extpipe-tests.el (em-extpipe-tests--deftest):
Re-enable these tests on EMBA.

This patch is adapted by one from Ken Brown, who uncovered the reason
for this bug (bug#56025).
2022-06-26 18:27:20 +02:00
Kjartan Óli Ágústsson
51f24fe2f4 Reconvert EPUB buffers when user CSS is changed
* lisp/doc-view.el (doc-view-epub-user-stylesheet): Add
`doc-view-custom-set-mutool-user-stylesheet' as setter, change name.
(doc-view-custom-set-epub-font-size): Factor reconvert logic out
(doc-view--epub-reconvert): Add defun
(doc-view--epub-stylesheet-watcher): Add defvar
(doc-view-custom-set-epub-user-stylesheet): Add defun (bug#55825).
2022-06-26 17:52:29 +02:00
Visuwesh
9e08c04798 Make <mouse-2> in mode line more careful as well
* lisp/mouse.el (mouse-delete-other-windows): Only delete other
windows if the user didn't move the cursor off the
mode-line (bug#56198).
2022-06-26 17:45:45 +02:00
Visuwesh
cd6ce7e546 Make <mouse-3> in the mode line more careful
* lisp/mouse.el (mouse-delete-window): Only delete the window if
the user hasn't moved point out of the mode line before releasing
the button (bug#56198).
2022-06-26 17:30:04 +02:00
Jim Porter
7fc3f1b0d1 Make Eshell globs ending in "/" match directories only
* lisp/eshell/em-glob.el (eshell-glob-convert): Return whether to
match directories only.
(eshell-glob-entries): Add ONLY-DIRS argument.

* test/lisp/eshell/em-glob-tests.el
(em-glob-test/match-any-directory): New test.
(em-glob-test/match-recursive)
(em-glob-test/match-recursive-follow-symlinks): Add test cases for
when "**/" or "***/" are the last components in a glob.

* etc/NEWS: Announce this change (bug#56227).
2022-06-26 16:52:38 +02:00
Jim Porter
ea3681575f Convert Eshell globs ahead of time instead of doing it repeatedly
* lisp/eshell/em-glob.el (eshell-glob-recursive): New variable.
(eshell-glob-convert-1, eshell-glob-convert): New functions.
(eshell-extended-glob): Use 'eshell-glob-convert'.
(eshell-glob-entries): Adapt function to use pre-converted globs.

* test/lisp/eshell-em-glob-tests.el (em-glob-test/match-dot-files):
New test.
2022-06-26 16:52:36 +02:00
Jim Porter
598d7c5d1c Optionally signal an error if an Eshell predicate fails to match anything
* lisp/eshell/em-pred.el (eshell-error-if-no-glob): Declare it.
(eshell-apply-modifiers): Add STRING-DESC argument and signal an error
if there are no matches and 'eshell-error-if-no-glob' is set.
(eshell-parse-arg-modifier): Pass modifier string to
'eshell-apply-modifiers'.

* test/lisp/eshell/em-pred-tests.el (eshell-eval-predicate): Simplify.
(em-pred-test/no-matches): New test.

* doc/misc/eshell.texi (Bugs and ideas): Remove todo entry about this
change.
2022-06-26 16:51:21 +02:00
Daniel Martín
b637d9c075 Fix typo in signal-process-functions
* doc/lispref/processes.texi (Signals to Processes): Update reference
to correct default variable in the ELisp manual.
* etc/NEWS: The same for the NEWS entry (bug#56234).
2022-06-26 16:47:20 +02:00
Lars Ingebrigtsen
e12f5ca9a5 Update term-char-mode doc string
* lisp/term.el (term-char-mode): Update doc string.
2022-06-26 16:45:09 +02:00
Michael Heerdegen
edf6f5d0ca Fix Bug#56110 (switching from line-mode to char-mode)
* lisp/term.el (term-char-mode): Make `add-function' override the
correct place (the buffer local variable `term-input-sender').
2022-06-26 16:41:30 +02:00
Lars Ingebrigtsen
8f5d9d0abd Fix a recent Lisp mode filling test failure
* lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Restore the
"fill first line separately" logic.
2022-06-26 16:31:43 +02:00
Paul Eggert
fd04009d16 Port distribution tarball to Solaris 10
* make-dist (taropt): Use 'tar -H ustar' to generate a portable
tar file format instead of a GNU-specific format.  Needed now that
Emacs tarballs contain file names longer than 100 bytes, e.g.:
emacs-28.1/test/lisp/gnus/mml-sec-resources/private-keys-v1.d/C072AF82DCCCB9A7F1B85FFA10B802DC4ED16703.key
emacs-28.1/test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-run-hook-with-args-until-success.el
Without this patch, extracting a tarball on Solaris 10 fails with
many diagnostics like “tar: ././@LongLink: typeflag 'L' not
recognized, converting to regular file”.

(cherry picked from commit 4410f5d869)
2022-06-26 16:22:04 +03:00
Stefan Monnier
6a96d17734 * lisp/emacs-lisp/syntax.el: Rework the handling of nested calls.
Nested calls to `syntax-ppss` and `syntax-propertize` can easily
happen unexpectedly via ondemand propertizing or `forward-sexp`.
Refine the handling of nested calls so we detect them more reliably
(e.g. also within `syntax-propertize-extend-region-functions`)
and so that the `syntax-ppss` cache is automatically flushed in case
it might have been filled with data that's become obsolete since.

(syntax-propertize--inhibit-flush): Delete var.
(syntax-propertize--in-process-p): New function to replace it.
(syntax-ppss-flush-cache): Use it.
(syntax-ppss--updated-cache): New var.
(syntax-propertize): Make `syntax-propertize--done` binding apply to
`syntax-propertize-extend-region-functions` as well, as intended (fixes
bug#46713).  Use `syntax-ppss--updated-cache` to flush
syntax-ppss cache at the end when needed.
Don't bind `syntax-propertize--inhibit-flush` any more.
(syntax-ppss): Set `syntax-ppss--updated-cache` when applicable.
2022-06-26 08:59:38 -04:00
Lars Ingebrigtsen
502e861af7 Don't create HOME if it doesn't exist
* lisp/files.el (locate-user-emacs-file): Don't create HOME if it
doesn't exist (bug#47298).  This returns us to Emacs 26.3
behaviour here.
2022-06-26 14:34:59 +02:00
Basil L. Contovounesios
0808da91e3 ; Pacify unknown fun warning in mh-utils-tests.el. 2022-06-26 15:08:57 +03:00
Po Lu
05ee87d423 ; Minor cosmetics adjustment to xterm.c
* src/xterm.c: Rename xIOErrorHandler & friends to
"Emacs_XIOErrorHandler" so they don't look like X protocol
header types.
2022-06-26 18:14:34 +08:00
Michael Albinus
3b7d8dd3b3 Fix narrowing problem in tramp-debug-buffer-command-completion-p
* lisp/net/tramp.el (tramp-debug-buffer-command-completion-p):
Respect narrowing.  (Bug#56225)
2022-06-26 10:57:00 +02:00
Allen Li
a9d338818a ; elec-pair: Fix docstring typo (bug#56233)
* lisp/elec-pair.el (electric-pair-post-self-insert-function): Fix typo.
2022-06-26 11:14:34 +03:00
Eli Zaretskii
a399eeac15 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2022-06-26 11:11:28 +03:00
Po Lu
afcec5f0a5 Add some more common predefined atoms
* src/xterm.c (x_intern_cached_atom, x_get_atom_name): Add
DRAWABLE, BITMAP, COLORMAP, CURSOR and FONT.
2022-06-26 15:36:43 +08:00
Eli Zaretskii
f3b876fa75 Fix ispell-word on colorless TTY frames
* lisp/textmodes/ispell.el
(ispell-highlight-spelling-error-generic): Keep marker position of
END intact, deletion of text notwithstanding.  (Bug#56219)
2022-06-26 10:22:20 +03:00
Po Lu
1c4cd5e7d9 Stop catching errors for some requests
* src/xterm.c (x_dnd_compute_toplevels)
(frame_set_mouse_pixel_position, x_focus_frame): Use
`x_ignore_errors_for_next_request'.  This results in a healthy
~30% speedup for the involved requests.
2022-06-26 13:34:43 +08:00
Po Lu
c2e07f2258 Handle errors while sending client events asynchronously
* src/xterm.c (xm_send_drop_message)
(xm_send_top_level_enter_message, xm_send_drag_motion_message)
(xm_send_top_level_leave_message, x_dnd_send_enter)
(x_dnd_send_position, x_dnd_send_leave, x_dnd_send_drop): Avoid
sync to check for errors while sending client events.
(x_dnd_begin_drag_and_drop, handle_one_xevent, XTread_socket):
Clean up failable requests.
(x_request_can_fail): New functions.
(x_clean_failable_requests, x_ignore_errors_for_next_request)
(x_uncatch_errors): Clean up failable requests.
(x_error_handler): If a request is allowed to fail, just return.
(x_term_init): Set up new pointer.
* src/xterm.h (N_FAILABLE_REQUESTS): New macro.
(struct x_display_info): New field `failable_requests' and
associated next pointer.
2022-06-26 10:20:35 +08:00
Paul Eggert
78c0c8673b Port ‘make clean’ to Solaris 10
* test/Makefile.in (CLEAN_XML_FILES): New macro.
(clean): Use it.
2022-06-25 16:46:47 -05:00
Paul Eggert
4410f5d869 Port distribution tarball to Solaris 10
* make-dist (taropt): Use 'tar -H ustar' to generate a portable
tar file format instead of a GNU-specific format.  Needed now that
Emacs tarballs contain file names longer than 100 bytes, e.g.:
emacs-28.1/test/lisp/gnus/mml-sec-resources/private-keys-v1.d/C072AF82DCCCB9A7F1B85FFA10B802DC4ED16703.key
emacs-28.1/test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-run-hook-with-args-until-success.el
Without this patch, extracting a tarball on Solaris 10 fails with
many diagnostics like “tar: ././@LongLink: typeflag 'L' not
recognized, converting to regular file”.
2022-06-25 15:28:10 -05:00
Paul Eggert
b0ed2d1f46 Port test SUBDIRS to Solaris 10
* test/Makefile.in (SUBDIRS): Port to traditional ‘find’, which
lacks -path.
2022-06-25 15:28:09 -05:00