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

155074 commits

Author SHA1 Message Date
Juri Linkov
a31be116ae * lisp/tab-bar.el (tab-bar-new-tab-to): Don't funcall const values.
Filter out the values 'clone' and 'window' of 'tab-bar-new-tab-choice'
from function call.
2022-03-20 20:59:04 +02:00
Michael Albinus
aec44a5be3 Extend connection-local variables example in Elisp manual
* doc/lispref/variables.texi (Connection Local Variables):
Explain, how to append variable settings to an existing profile.
2022-03-20 19:15:53 +01:00
Paul Eggert
5feddb4b1a Remove duplicate INLINE_HEADER_BEGIN
* src/thread.h: Remove duplicate INLINE_HEADER_BEGIN.
Problem reportd by Mattias Engdegård.
2022-03-20 10:46:45 -07:00
Po Lu
0afef91fa1 Fix confusion of wanted action with actual action on X
* src/xterm.c (x_dnd_begin_drag_and_drop)
(x_dnd_update_state, handle_one_xevent): Differentiate between
wanted action and chosen action correctly.
2022-03-20 21:21:43 +08:00
Manuel Giraud
978681e782 Fix wrong password stored in Tramp
* lisp/net/tramp.el (tramp-process-actions):
Unset `tramp-password-save-function'.
2022-03-20 11:08:31 +01:00
Po Lu
e1178eb640 Make DND between frames work properly
* src/xterm.c (handle_one_xevent): Don't wait for a finish event
when dropping on top of another Emacs frame.
2022-03-20 16:21:45 +08:00
Po Lu
9b34005c32 Improve compliance with version 5 of the XDND specification
* src/xterm.c (x_dnd_cleanup_drag_and_drop): New function.
(x_dnd_begin_drag_and_drop): Handle selection request events
immediately.
(handle_one_xevent): Wait for XdndFinished events and return the
action chosen there.
2022-03-20 15:00:36 +08:00
Po Lu
34ac8088b0 Fix some crashes in shut_down_emacs on Haiku
* src/emacs.c (shut_down_emacs): Stop quitting be app, since
it's not always there.
2022-03-20 05:53:30 +00:00
Po Lu
a232a8a22c Implement `haiku_delete_terminal'
* src/haikuterm.c (haiku_delete_terminal): Actually delete the
terminal instead of aborting.
2022-03-20 05:52:30 +00:00
Po Lu
b19b9cbe51 Check list tail properly in x-begin-drag
* src/xfns.c (Fx_begin_drag): Check that TARGETS is actually a
proper list.
* src/xterm.c (x_dnd_update_state): Remove debugging code.
2022-03-20 12:51:46 +08:00
Po Lu
629ac0803f Fix crash on some compositing managers
* src/xterm.c (x_dnd_get_target_window): Catch errors around
CompositeReleaseOverlayWindow.
2022-03-20 11:23:11 +08:00
Po Lu
77f5eb874b Improve behaviour of drag-n-drop during window manager operations
* src/xterm.c (x_dnd_begin_drag_and_drop): Select for some
events on the root window.
(x_dnd_update_state): New function.
(handle_one_xevent): Call that function when we get some events
from the root window substructure or the window manager.
(x_term_init): New atom `_NET_CLIENT_LIST_STACKING'.
* src/xterm.h (struct x_display_info): New atom
`_NET_CLIENT_LIST_STACKING'.
2022-03-20 09:53:52 +08:00
Eli Zaretskii
d2ac7447db Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2022-03-19 22:18:47 +02:00
Paul Eggert
ccf4a4fa48 Port to gcc -D EMACS_EXTERN_INLINE
* src/comp.h, src/thread.h: Add INLINE_HEADER_BEGIN and
INLINE_HEADER_END, since it uses INLINE.
* src/emacs.c: Include these two files.
2022-03-19 12:48:54 -07:00
Paul Eggert
c11b4758b7 valid_sp inline fix
* src/bytecode.c (valid_sp): static, not INLINE, as INLINE
should be used only in headers and between INLINE_HEADER_BEGIN
and INLINE_HEADER_END.  No need for ‘inline’ here.
2022-03-19 12:48:54 -07:00
Paul Eggert
495d8519ca Simplify alloc.c static function decls
* src/alloc.c: Omit unnecessary static function declarations.
Don’t use ‘inline static’ as the C standard says that keyword
order is obsolescent.  Anyway, no need for ‘inline’ as compilers
inline without it well enough.
2022-03-19 12:48:53 -07:00
Paul Eggert
c386f7e825 Make native helper functions static
These don’t need to be extern, even with -flto, since
their addresses are taken.
* src/comp.c (helper_unwind_protect, helper_unbind_n)
(helper_save_restriction, helper_GET_SYMBOL_WITH_POSITION)
(helper_PSEUDOVECTOR_TYPEP_XUNTAG): Now static.
2022-03-19 12:48:53 -07:00
Paul Eggert
0fed561042 Remove unused fns/data and make fns static
* src/comp.c (saved_sigset, helper_temp_output_buffer_setup):
Remove; unused.
* src/comp.c (logfile, helper_link_table):
* src/fns.c (hashfn_equal, hashfn_eql):
* src/frame.c (frame_windows_min_size):
* src/gnutls.c (emacs_gnutls_global_init):
* src/minibuf.c (Vcommand_loop_level_list):
* src/syntax.c (syntax_code_spec):
* src/timefns.c (time_overflow):
* src/xterm.c (x_xrender_color_from_gc_foreground)
(x_display_set_last_user_time):
Now static, since it’s not used elsewhere.
* src/xterm.c (x_xrender_color_from_gc_foreground)
(x_xrender_color_from_gc_background): Move earlier to avoid
forward use.
(x_xrender_color_from_gc_foreground): Do not define unless
!defined USE_CAIRO && (RENDER_MAJOR > 0 || RENDER_MINOR >= 2),
since it’s not used otherwise.
2022-03-19 12:48:53 -07:00
Paul Eggert
c3c5e50ba4 Use filenvercmp instead of doing it by hand
* src/fns.c (Fstring_version_lessp): Use filenvercmp,
not string_version_cmp.
(string_version_cmp): Remove; no longer used.
2022-03-19 12:48:52 -07:00
Paul Eggert
a5cbd98376 Omit unnecessary code when !HAVE_NATIVE_COMP
* src/decompress.c (MD5_BLOCKSIZE, acc_buf, acc_size)
(accumulate_and_process_md5, final_process_md5, md5_gz_stream):
* src/dynlib.c (dynlib_open_for_eln, dynlib_close) [!WINDOWSNT]:
* src/fileio.c (internal_delete_file_1, internal_delete_file):
Define only if HAVE_NATIVE_COMP && WINDOWSNT,
as they’re not used otherwise.
2022-03-19 12:48:52 -07:00
Paul Eggert
abfb76732c Remove internal_condition_case_[345]
* src/comp.c (directory_files_matching) [WINDOWSNT]: New function.
(eln_load_path_final_clean_up) [WINDOWSNT]: Use it.
This removes the need for internal_condition_case_5.
* src/eval.c (internal_condition_case_3)
(internal_condition_case_4, internal_condition_case_5): Remove.
The first two were never used; the last only in now-removed code.
2022-03-19 12:48:51 -07:00
Paul Eggert
035e8e4d45 Remove sanitize_window_sizes
* src/window.c (sanitize_window_sizes): Remove; no-longer-used.
A previous refactoring moved this to Lisp without removing the C code.
2022-03-19 12:48:51 -07:00
Eli Zaretskii
6887bf555f Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2022-03-19 17:19:19 +02:00
Lars Ingebrigtsen
71b8f1fc63 Make `command-modes' work for (native-compiled) subrs, too
* lisp/emacs-lisp/comp.el (comp-func): Add a command-modes slot.
(comp-spill-lap-function, comp-intern-func-in-ctxt): Fill it.
(comp-emit-for-top-level, comp-emit-lambda-for-top-level): Use it.

* src/alloc.c (mark_object): Mark the command_modes slot.

* src/comp.c (make_subr): Add a command_modes parameter.
(Fcomp__register_lambda): Use it.
(Fcomp__register_subr): Ditto.

* src/data.c (Fcommand_modes): Output the command_modes data for subrs
(bug#54437).

* src/lisp.h (GCALIGNED_STRUCT): Add a command_modes slot.

* src/pdumper.c (dump_subr): Update hash.
(dump_subr): Dump the command_modes slot.
2022-03-19 15:11:37 +01:00
Po Lu
c79e0188e8 Improve protection against faulty clients during DND
* src/xterm.c (x_dnd_send_enter, x_dnd_send_position)
(xdnd_send_leave, x_dnd_send_drop): Catch errors around call to
XSendEvent.  The target window could be gone.
2022-03-19 18:47:44 +08:00
F. Jason Park
2f1fbf20ad ; * test/lisp/erc/erc-tests.el (erc--switch-to-buffer): Fix test failure. 2022-03-19 02:35:42 -07:00
Guy Gastineau
f755daafb9 Remove redundant checks in erc--switch-to-buffer
* lisp/erc/erc.el (erc--switch-to-buffer): Commit
f925fc93ba "Add `predicate' arg to
`read-buffer' and use it for erc-iswitchb" meant to remove this, but
it was left behind. (Bug#53617)

Copyright-paperwork-exempt: yes
2022-03-19 01:47:06 -07:00
F. Jason Park
17bd063a67 Add unit test for erc--switch-to-buffer
* test/lisp/erc/erc-tests.el (erc--switch-to-buffer): Add new test.
(Bug#53617)
2022-03-19 01:46:18 -07:00
Eli Zaretskii
9c68894399 Merge from origin/emacs-28
e059d7c Fix region highlight in non-selected windows
2022-03-19 09:25:19 +02:00
Eli Zaretskii
e059d7c156 Fix region highlight in non-selected windows
* src/xdisp.c (prepare_menu_bars): Include in the windows passed
to pre-redisplay-functions windows whose point was moved from the
last recorded position.  (Bug#54450)
2022-03-19 09:19:53 +02:00
Po Lu
43ee6f291d Ignore drag source frame on Haiku in line with documentation
* src/haiku_support.cc (class EmacsWindow): New field
`window_id'.
(MessageReceived): Ignore dropped messages with same window id.
(be_drag_message): Add source frame's window ID to message.
2022-03-19 07:00:28 +00:00
Stefan Kangas
5781f0af7d Merge from origin/emacs-28
c4596c8522 Fix a regression in 'decipher-digram-list'
2022-03-19 06:30:38 +01:00
Po Lu
c7f085b53f Document dired-mouse-drag-files
* doc/emacs/dired.texi (Misc Dired Features): Explain that
dragging files is now supported.
* etc/NEWS: Update documentation status.
* lisp/dired.el (dired-mouse-drag-files): Fix typo in doc
string.
2022-03-19 11:35:55 +08:00
Po Lu
d2ba793ed9 * src/xterm.c (XTread_socket): Don't filter GenericEvents. 2022-03-19 10:52:27 +08:00
Po Lu
808a6f8f5f Fix some glitches when dragging files from dired
* lisp/dired.el (dired-mouse-drag-files): Fix initial values.

(dired-mouse-drag): Clear mark if active and only make button
release events unread.
2022-03-19 10:27:19 +08:00
Po Lu
1467b04f5c Handle composite overlay window during drag and drop sessions
* configure.ac: Test for the composite extension and use it if
available.
* msdos/sed1v2.inp: Update.
* src/Makefile.in (XCOMPOSITE_LIBS, XCOMPOSITE_CFLAGS): New
variables.
(EMACS_CFLAGS, LIBES): Add new libs and cflags.
* src/xterm.c (x_dnd_get_target_window): Look for proxy on
composite overlay window if mapped.
(x_term_init): Test if the composite extension is available.
* src/xterm.h (struct x_display_info): New fields for composite
extension presence.
2022-03-19 09:29:08 +08:00
Po Lu
ae9a0b7808 Fix some XIM servers getting confused during drag-and-drop
* src/xterm.c (x_dnd_begin_drag_and_drop): Clear XIC while event
loop is in progress.
(x_filter_event): Return 0 if DND is in progress.
(xim_instantiate_callback): Likewise.
2022-03-19 07:45:14 +08:00
Stefan Monnier
ab8a34ce8a * lisp/emacs-lisp/bytecomp.el (byte-compile-make-closure): Minor optimization 2022-03-18 16:07:42 -04:00
Stefan Monnier
ce28de5d3a Pcomplete: Better obey completion-at-point-functions
Functions on `completion-at-point-functions` should not modify
the buffer.  Pcomplete itself mostly abides by this but Eshell's
use of it doesn't.  Try and catch those cases.  Also fix one of
those cases.

* lisp/pcomplete.el (pcomplete-allow-modifications): New var.
(pcomplete-completions-at-point): Enforce it.
(pcomplete, pcomplete-expand-and-complete, pcomplete-expand):
Rebind it since these commands expect the extra side effects.

* lisp/eshell/em-cmpl.el (eshell--pcomplete-insert-tab): New function,
extracted from `eshell-complete-parse-arguments`.
(eshell-complete-parse-arguments): Use it and obey
`pcomplete-allow-modifications`.
2022-03-18 11:59:32 -04:00
Stefan Monnier
f51e12fece * lisp/gnus/mail-source.el (mail-source-set-1): Fix indent and simplify 2022-03-18 11:51:46 -04:00
Mattias Engdegård
4d61badad1 Speed up fixnum printing
Use the new number-to-string code to speed up fixnum printing, with
similar results (often more than twice as fast as before).

* src/data.c (Fnumber_to_string): Move fixnum conversion to...
(fixnum_to_string): ... this new function.
* src/lisp.h: (fixnum_to_string): External declaration.
* src/print.c (print_object): Use fixnum_to_string instead of sprintf.
2022-03-18 13:58:36 +01:00
Eli Zaretskii
c4596c8522 Fix a regression in 'decipher-digram-list'
* lisp/play/decipher.el (decipher-stats-buffer): Don't assume the
statistics buffer always exists.  (Bug#54443)
2022-03-18 13:54:46 +02:00
Michael Albinus
499f2085fa Make application configurable in 'with-connection-local-variables'
* doc/lispref/variables.texi (Connection Local Variables):
Explain 'connection-local-default-application'.

* etc/NEWS: Mention 'connection-local-default-application'.

* lisp/files-x.el (connection-local-default-application): New variable.
(connection-local-criteria-for-default-directory): Use it.  (Bug#54405)

* test/lisp/files-x-tests.el
(files-x-test-with-connection-local-variables): Extend test.
2022-03-18 12:25:32 +01:00
Mattias Engdegård
ce26657b5d Speed up number-to-string for fixnums
Do the binary-to-decimal conversion by hand for fixnums instead of
calling sprintf.  This results in a noticeable speed increase (on my
machine, 2.2× faster excluding GC).

* src/data.c (Fnumber_to_string): Don't use sprintf for fixnums.
2022-03-18 11:54:08 +01:00
Po Lu
2b05a06786 Implement drag-and-drop of files on Haiku
* lisp/term/haiku-win.el (haiku-dnd-selection-converters): Add
new selection converter.
(haiku-dnd-convert-uri-list): New function.
(x-begin-drag): Allow selection converters to change message
field type.

* src/haikuselect.c (haiku_lisp_to_message): Perform more error
checking.
2022-03-18 09:22:13 +00:00
Stefan Kangas
ff89d27c07 Merge from origin/emacs-28
530c3491e8 Improve documentation of bookmark default sorting
11492259b1 ; * doc/lispref/display.texi (Overlay Arrow): More accurat...
2022-03-18 07:01:18 +01:00
Po Lu
a96f6de544 Allow dragging messages with file names on Haiku
* src/haiku_select.cc (be_add_refs_data): New function.
* src/haikuselect.c (haiku_lisp_to_message): Handle `ref' type
correctly.
* src/haikuselect.h: Update prototypes.
2022-03-18 05:48:10 +00:00
Po Lu
45609c347e Allow dragging files from Dired to other programs
* etc/NEWS: Announce new user option `dired-mouse-drag-files'.
* lisp/dired.el (dired-mouse-drag-files): New user option.
(dired-mouse-drag): New command.
(dired-mouse-drag-files-map): New variable.
(dired-insert-set-properties): Add additional keymap if mouse
dragging is enabled.

* lisp/select.el (xselect-convert-to-targets): Handle new
form of selection converters.
(xselect-convert-to-username):
(xselect-convert-to-text-uri-list):
(xselect-uri-list-available-p): New functions.
(selection-converter-alist): Add them as selection converters.

* src/xselect.c (x_get_local_selection): Handle new form of
selection converters.
(syms_of_xselect): Update doc strings.
2022-03-18 13:17:19 +08:00
Karl Fogel
530c3491e8 Improve documentation of bookmark default sorting
* lisp/bookmark.el (bookmark-alist, bookmark-store,
  bookmark-maybe-sort-alist): Update doc strings and comments.
2022-03-17 21:18:26 -05:00
Po Lu
e781cbb2d3 Minor fixes to DND support
* src/xterm.c (x_dnd_begin_drag_and_drop): Free targets
afterwards.
(handle_one_xevent): Only calculate dnd_grab if DND is in
progress.
2022-03-18 08:22:50 +08:00