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

157635 commits

Author SHA1 Message Date
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
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
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
Paul Eggert
250a5e8bdd Pacify Oracle Studio re xterm.c
* src/xterm.c (xErrorHandler,  xIOErrorHandler):
New typedefs.
(xm_get_drag_window_1, x_connection_closed): Use them instead of
void *, since the C standard frowns on converting function
pointers to and from void *.  This pacifies Oracle Studio
diagnostics like “warning: assignment type mismatch: pointer to
void "=" pointer to function(pointer to struct _XDisplay {})\
returning int”.
(x_detect_pending_selection_requests, x_had_errors_p): Do not rely
on implicit conversion of a pointer to a bool return value; use !!
instead.  This pacifies Oracle Studio’s “warning: improper
pointer/integer combination: op "="”.
(xim_open_dpy) [HAVE_X11R6 && !HAVE_X11R6_XIM]: Do not use
xim_destroy_callback; configure.ac says “inoue@ainet.or.jp says
Solaris has a bug related to X11R6-style ## XIM support” and
Oracle Studio complains “warning: assignment type mismatch:
pointer to function(pointer to struct _XIC {}, pointer to char,
pointer\ to char) returning void "=" pointer to function(pointer
to struct _XIM {}, pointer to char, pointer to char) returning
void”.
2022-06-25 15:28:09 -05:00
Paul Eggert
bdedfd927c Pacify Oracle Studio re print_vectorlike
* src/print.c (print_vectorlike): Use explicit cast of function
pointer to void *, to pacify Oracle Studio 12.6’s “warning:
assignment type mismatch: pointer to void "=" pointer to
function(pointer to void) returning void”.  Admittedly this is
not strictly conforming C code even with the cast.
2022-06-25 15:28:09 -05:00
Paul Eggert
728968a2e6 Pacify Oracle Studio re Time_to_position
* src/keyboard.c (Time_to_position): Use no-op position_to_Time to
pacify Oracle Studio 12.6’s “warning: initializer will be
sign-extended”.
2022-06-25 15:28:08 -05:00
Lars Ingebrigtsen
040c03cae2 Make `M-q' work on the first line of a multi-line string again
* lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Exclude the
quote marks from the region so that filling works (bug#56197).
2022-06-25 14:58:17 +02:00
Po Lu
bdf495f25f Update input_pending after deferring selection requests
* src/xterm.c (x_defer_selection_requests): If kbd_fetch_ptr
moved, update input_pending.  Bug found calling
`input-pending-p' inside the DND movement function.
2022-06-25 20:08:52 +08:00
Stefan Kangas
3d3029353b New command recentf-open
* lisp/recentf.el (recentf-open): New command.  (Bug#56148)
(recentf): New alias.
(recentf, recentf-mode): Update documentation to focus more on the
list of recently opened files and ways of accessing it, instead of
focusing on the menu bar only.
(recentf-list, recentf-enabled-p): Minor doc fixes.

* doc/emacs/files.texi (File Conveniences): Update documentation.
2022-06-25 12:55:18 +02:00
Lars Ingebrigtsen
a2c25d5b2f Fix subr-x fix that was missed when re-reverting
* lisp/replace.el (require): Fix subr-x build warning.
2022-06-25 12:45:40 +02:00
Stefan Kangas
37315f9895 Don't error out on invalid literal key substitutions
It would be backwards-incompatible to error out on invalid literal key
substitutions.  Consider this docstring fragment, where "\\`" should
have been escaped but wasn't:

    "Example value: \"\\(?:\\`[#.]\\)\\|\\(?:[#~]\\'\\)\"."

If we error out, we can't display this docstring at all.  However, it
is clearly better to display something in such cases, even if
suboptimal, than refusing to display anything at all.

* lisp/help.el (substitute-command-keys): Don't error out on invalid
literal key substitutions: just ignore them instead.
* test/lisp/help-tests.el
(help-tests-substitute-command-keys/literal-key-sequence-errors):
Delete test.
(help-tests-substitute-command-keys/literal-key-sequence-ignore-invalid):
New test.
2022-06-25 12:25:58 +02:00
Lars Ingebrigtsen
2f346b0ab1 Re-fix build warnings about subr-x defsubsts
* lisp/term/haiku-win.el (require):
* lisp/progmodes/elisp-mode.el (require):
* lisp/isearch.el (require): Require subr-x at compile time, since
these use defsubsts/macros from there.

* lisp/emacs-lisp/subr-x.el (string-empty-p): Move from here...
* lisp/simple.el (string-empty-p): ... to here.  This is to help
with a build problem where files.el is using the defsubst, but
requiring subr-x.el at compile time leads to load errors.
2022-06-25 12:20:05 +02:00
Eli Zaretskii
376ecd5346 ; Fix last change regarding 'record-all-keys'
* src/keyboard.c (syms_of_keyboard):
* etc/NEWS: Minor fixes of documentation of 'record-all-keys'.
2022-06-25 12:33:45 +03:00
Manuel Giraud
f01024b94d Avoid recording passwords' chars
* lisp/cus-start.el (standard): New user custom `record-all-keys'.
* src/keyboard.c (syms_of_keyboard): Un-obsolete
`inhibit--record-char'.
* lisp/subr.el (read-passwd): Use `inhibit--record-char' to
inhibit passwords recording.
2022-06-25 12:27:27 +03:00
Eli Zaretskii
ab5de9e3ee ; * CONTRIBUTE: Mention checks performed by commit hooks. (Bug#56108) 2022-06-25 12:17:46 +03:00
Eli Zaretskii
473affe5c6 Minor optimization of the "abort redisplay" feature
* src/xdisp.c (init_iterator, set_iterator_to_next)
(redisplay_internal):
* src/syntax.c (scan_sexps_forward):
* src/regex-emacs.c (re_match_2_internal):
* src/bidi.c (bidi_fetch_char, bidi_paragraph_init)
(bidi_find_bracket_pairs, bidi_find_other_level_edge): Don't call
'update_redisplay_ticks' if aborting too-long redisplay is
disabled.  (Bug#45898)
2022-06-25 10:46:10 +03:00
Po Lu
230891d9f3 Implement image transform smoothing on Haiku
* src/dispextern.h (struct image): New field
`use_bilinear_filtering'.
* src/haiku_draw_support.cc (BView_DrawBitmap): Accept it.
* src/haiku_support.h: Update prototypes.
* src/haikuterm.c (haiku_draw_image_glyph_string):
* src/image.c (image_set_transform): Set it.
2022-06-25 07:35:45 +00:00
Eli Zaretskii
1754b0df75 Fix false positive due to 'max-redisplay-ticks' feature
* src/xdisp.c (redisplay_internal): Reset the tick count at end of
redisplay cycle.  (Bug#45898)
2022-06-25 10:14:11 +03:00
Po Lu
d392ad7c5c Fix non-XI2 build
* src/xterm.c (handle_one_xevent): Don't make `event' const when
passing it to RandR functions.  Also, update out of date
comment.
2022-06-25 14:38:54 +08:00
Po Lu
a70f731e41 ; Fix typo in last change
; * src/dispextern.h (struct image): Fix typo.
2022-06-25 14:24:18 +08:00
Po Lu
b257a7894b Implement "flip" image transforms on Haiku
* src/dispextern.h (struct image): New field `transform',
`original_width' and `original_height'.
* src/haiku_draw_support.cc (BView_DrawMask): Rename to
`be_draw_image_mask' and fix coding style.
(rotate_bitmap_270, BBitmap_transform_bitmap, rotate_bitmap_90):
Delete functions.
(be_apply_affine_transform): New function.
(be_apply_inverse_transform): New function.

* src/haiku_support.h: Update prototypes.

* src/haikuterm.c (haiku_translate_transform): New function.
(haiku_draw_image_glyph_string): Use affine transforms to
implement images.

* src/image.c (image_set_transform): Implement using affine
transforms on Haiku too.
2022-06-25 06:21:29 +00:00
Stefan Kangas
fc46552dc8 Merge from origin/emacs-28
1f6750b53a Avoid treating number as an enum in the org manual
2022-06-25 06:30:26 +02:00
Lars Ingebrigtsen
b6238a26c9 Revert "Fix some byte-compilation warnings about subr-x"
This reverts commit cd479aa8bd.

This led to build failures when doing bootstraps.
2022-06-25 00:19:23 +02:00