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

155029 commits

Author SHA1 Message Date
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
Stefan Monnier
06ea82e4e3 Remove some early-bootstrap dependencies for advice
The dependencies between `advice`, cl-generic`, `bytecomp`, `cl-lib`,
`simple`, `help`, ... were becoming unmanageable.
Break the reliance on `advice` (which includes making sure the
compiler is not needed during the early bootstrap).

* lisp/simple.el (pre-redisplay-function): Set without using `add-function`.

* lisp/loadup.el (advice, simple): Move to after `cl-generic`.

* lisp/help.el (command-error-function): Set without using `add-function`.
(help-command-error-confusable-suggestions): Explicitly call
`command-error-default-function` instead.

* lisp/emacs-lisp/cl-macs.el (pcase--mutually-exclusive-p): Don't
optimize during early-bootstrap.

* lisp/emacs-lisp/cl-generic.el (cl--generic-lambda): Tiny simplification.
(cl-defmethod): Label the obsolescence warning as it should.
(cl--generic-compiler): New variable.
(cl--generic-get-dispatcher): Use it.
(cl--generic-prefill-dispatchers): Make freshly made dispatchers.
2022-03-17 19:07:59 -04:00
Mattias Engdegård
751c8f88c4 Put bytecode stack frame metadata in a struct
Using a plain C struct instead of type-punning Lisp_Object stack slots
makes the bytecode interpreter code more type-safe and potentially
faster (from better alias analysis), and the special-purpose accessors
are no longer needed.  It also reduces the stack requirements when
using 64-bit Lisp_Object on 32-bit platforms.

* src/bytecode.c (enum stack_frame_index)
(sf_get_ptr, sf_set_ptr, sf_get_lisp_ptr, sf_set_lisp_ptr,
sf_get_saved_pc, sf_set_saved_pc): Remove.
(BC_STACK_SIZE): Now in bytes, not Lisp words.
(struct bc_frame): New.
(init_bc_thread, mark_bytecode, Finternal_stack_stats, valid_sp)
(exec_byte_code):
* src/lisp.h (struct handler, get_act_rec, set_act_rec):
Adapt to new struct bc_frame.
2022-03-17 16:38:22 +01:00
Lars Ingebrigtsen
edb28bf669 Restore HOME after mailcap-parsing-and-mailcap-mime-info
* test/lisp/net/mailcap-tests.el
(mailcap-parsing-and-mailcap-mime-info): Restore HOME after the
test (bug#54435).
2022-03-17 16:13:01 +01:00
Michael Albinus
52dd3fcf89 Enable Tramp reloading
* lisp/net/tramp.el (tramp-file-name): Add ;;;###tramp-autoload
cookie.  (Bug#50869)

* test/lisp/net/tramp-tests.el (tramp-test47-unload): Do not skip.
Test reload.
2022-03-17 15:32:01 +01:00
Stefan Monnier
693484d36b * lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Warn suspicious args 2022-03-17 10:07:35 -04:00
Lars Ingebrigtsen
e55ceca8c7 Avoid repeated prompts in `M-x shell' if using ~/.emacs_bash
* lisp/shell.el (shell): Use `shell-eval-command' to avoid
repeated prompts (bug#9961).
2022-03-17 15:04:42 +01:00
Lars Ingebrigtsen
55e18e5649 Make shell-resync-dirs work with zsh
* lisp/shell.el (shell-resync-dirs): Use shell-eval-command to
avoid getting confused by zsh (bug#54384).
(shell-eval-command): New function.
2022-03-17 15:04:42 +01:00
Stefan Monnier
81bcad03e9 (seq-contains-p): Refine the non-nil returned value
* lisp/emacs-lisp/seq.el (seq-contains-p): Like `cl-some` return the
value returned by the test function rather than t.
2022-03-17 09:54:41 -04:00
Eli Zaretskii
11492259b1 ; * doc/lispref/display.texi (Overlay Arrow): More accurate text. 2022-03-17 14:55:59 +02:00
Philipp Stephani
6ed3f04e5a Fix a use of 'cl-defgeneric'.
* lisp/progmodes/xref.el (xref-match-length): Use 'cl-defmethod'
instead of 'cl-defgeneric'.
2022-03-17 12:58:52 +01:00
Lars Ingebrigtsen
06488ded6b Make `?' work again in read-multiple-choice
* lisp/emacs-lisp/rmc.el (read-multiple-choice): Make the `?' key
work again to show the help text.
2022-03-17 12:55:39 +01:00
Felician Nemeth
6bbd1cc5c9 Format long help texts better in read-multiple-choice
* lisp/emacs-lisp/rmc.el (rmc--show-help): Format long help texts
better (bug#54430).
2022-03-17 12:55:39 +01:00
Andrew G Cohen
7fef2e04b2 Improve propagation of gnus/nnselect group info
* lisp/gnus/nnselect.el (nnselect-push-info): Speed up pushing the
nnselect info back to the originating groups.
2022-03-17 19:19:39 +08:00
Andrew G Cohen
90040f0e9f Fix bug in nnselect fetching new articles in a thread
* lisp/gnus/nnselect.el (nnselect-request-thread): Ignore the
Retrieval Status Value in comparing whether articles are the same.
2022-03-17 19:19:39 +08:00
Sean Whitton
da0d598190 Don't use the original sender's address as the envelope-from
* lisp/gnus/message.el (message-resend): Avoid setting the
envelope-from to the original sender's address rather than the
resender's (bug#54429).
2022-03-17 11:57:14 +01:00
Arash Esbati
1d3b7474c7 Improve LaTeX symbol prettification
* lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist):
Support macros which used to be part of textcomp package.
2022-03-17 11:44:15 +01:00
Po Lu
140d7cc9cb Prevent invisible frames from acting as drag sources
* src/xterm.c (x_dnd_begin_drag_and_drop): Error out if f is
invisible.  It makes no sense for an invisible frame to be a
drag source, so the function just hangs.
2022-03-17 17:41:41 +08:00
Po Lu
51bf066b30 * src/haikuselect.c (Fhaiku_drag_message): Clear display grab after drag ends. 2022-03-17 09:14:53 +00:00
Po Lu
bc17a10708 Fix creating frames with an initial value of `fullscreen' on Haiku
* src/haikufns.c (haiku_create_frame): Set configury_done and do
pending fullscreen change if any.
* src/haikuterm.c (haiku_fullscreen): Defer actually setting
fullscreen until configury_done is set.
* src/haikuterm.h (struct haiku_output): New field
`configury_done'.
2022-03-17 08:51:59 +00:00
Michael Albinus
22239f2141 Do not cache directories with Tramp sshfs
* lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>:
Add "-o dir_cache=no" to `tramp-mount-args'.  (Bug#54126)
2022-03-17 09:09:54 +01:00
Po Lu
4fc585418b Fix mouse movement on Haiku
* src/haiku_support.cc (MouseMoved): Make sure grab view exists
before comparing against it.
2022-03-17 07:17:13 +00:00
Po Lu
13762d24b8 Display drag-and-drop messages in echo area on non-graphics displays
* lisp/mouse.el (mouse-drag-and-drop-region-display-tooltip)
(mouse-drag-and-drop-region-hide-tooltip): New functions.
(mouse-drag-and-drop-region): Use them instead of calling
`x-hide-tip' and `x-show-tip' directly.
2022-03-17 15:12:23 +08:00
Eli Zaretskii
af90a45471 Fix compilation error of xterm.c
* src/xterm.c (x_dnd_begin_drag_and_drop): Use current_count only
if defined.  Reported by Tassilo Horn <tsdh@gnu.org>.
2022-03-17 08:56:42 +02:00
Po Lu
9916b49e41 Prevent delivery of duplicate events when window is grabbed on Haiku
* src/haiku_support.cc (grab_view, grab_view_locker): New
variables.
(MouseMoved, MouseDown, MouseUp): Keep track of the grab and
don't deliver motion events to any other view.
2022-03-17 05:31:03 +00:00
Po Lu
f4a71e17f4 * src/xterm.c (x_dnd_begin_drag_and_drop): Always initialize hold_quit. 2022-03-17 12:53:36 +08:00
Po Lu
a06ac9b6fd Restore old PGTK scrolling code
* src/pgtkterm.c (pgtk_copy_bits): Restore old code using
cairo_surface_create_similar.  (bug#54040)
2022-03-17 11:59:56 +08:00
Po Lu
667775e1ae Make GTK inspector available on PGTK
* src/pgtkfns.c (Fx_gtk_debug): New function.
(syms_of_pgtkfns): Define new subr.
2022-03-17 11:51:32 +08:00
Po Lu
bbfad0a788 ; * lisp/term/haiku-win.el (x-begin-drag): Fix compiler warning. 2022-03-17 11:49:23 +08:00
Po Lu
dfdd2f6f23 * lisp/term/haiku-win.el (x-begin-drag): Fix type code of B_MIME_TYPE. 2022-03-17 03:46:35 +00:00
Po Lu
00172ae0c8 Implement cross-program drag-and-drop on Haiku
* doc/lispref/frames.texi (Drag and Drop): Fix documentation of
`x-begin-drag' to match actual function arity.
* lisp/term/haiku-win.el (haiku-dnd-selection-value): New
variable.
(haiku-dnd-selection-converters): New variable.
(haiku-dnd-convert-string): New function.
(gui-backend-get-selection, gui-backend-set-selection): Handle
XdndSelection specially.
(x-begin-drag): New function.

* src/haiku_select.cc (be_create_simple_message)
(be_add_message_data): New functions.
* src/haiku_support.cc (WAIT_FOR_RELEASE): New message type.
(class EmacsView, MouseUp): If waiting for release, reply and
drop event.
(be_drag_message, be_drag_message_thread_entry): New functions.
* src/haiku_support.h: Update prototypes.

* src/haikuselect.c (lisp_to_type_code, haiku_lisp_to_message)
(Fhaiku_drag_message): New functions.
(syms_of_haikuselect): Define new subr.

* src/haikuselect.h: Update prototypes.
2022-03-17 03:42:19 +00:00
Po Lu
c223e2aefc Improve GTK support for X11 drag-n-drop
* src/xterm.c (x_dnd_begin_drag_and_drop): Run nested GTK event
loop instead, so GTK gets the correct events.
2022-03-17 08:55:16 +08:00
Paul Eggert
f7e0e5b7ae Simplify generate-new-buffer-name randomness
* src/buffer.c (Fgenerate_new_buffer_name):
Simplify by calling get_random instead of Frandom;
that’s random enough here.
2022-03-16 17:52:42 -07:00
Paul Eggert
2ef037c0dd Improve random bignum generation
* src/bignum.c (get_random_limb, get_random_limb_lim)
(get_random_bignum): New functions, for more-efficient
generation of random bignums without using Frem etc.
* src/fns.c (get_random_fixnum): New function.
(Frandom): Use it, and get_random_bignum.
Be consistent about signalling nonpositive integer arguments;
since zero is invalid, Qnatnump is not quite right here.
* src/sysdep.c (get_random_ulong): New function.
2022-03-16 17:52:41 -07:00
Alan Mackenzie
31a2428d6f Strip positions from symbols before the eval in eval-{when,and}-compile.
This fixes bug #54079.

* lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment): Change
the position of 'byte-run-strip-symbol-positions' in the eval-when-compile
entry.  Add a call to `byte-run-strip-symbol-positions' in the
eval-and-compile entry.
2022-03-16 19:23:24 +00:00
Robert Pluim
0e5f8e24af Report buffer-name when local mode-line is invalid
* lisp/files.el (hack-local-variables-prop-line): Add '(buffer-name)'
to the message reporting the malformed mode-line.
2022-03-16 19:05:17 +01:00
Robert Pluim
a86205b060 Guard against custom entries that can contain NULs
There are custom entries that contain lambda's as values by default,
which can result in them containing embedded NULs after
byte-compilation, which wreaks havoc when they are saved to .emacs and
later read in.  (Bug#52554)

* lisp/cus-edit.el (custom-save-all): Bind
print-escape-control-characters to t.
* lisp/startup.el (startup--load-user-init-file): Bind
inhibit-null-byte-detection to t.
2022-03-16 18:58:49 +01:00
Robert Pluim
fa8c93ad9a Improve error message for 'not running' processes
The current error message is simply 'not running', but
'status_message' can give information about why the process is in that
state, such as network errors, so return that as well.  (Bug#53762)

* src/process.c (send_process, Fprocess_send_eof): Add the output of
'status_message' to the error string.
2022-03-16 18:58:49 +01:00
Manuel Giraud
6b2e6a53ec * lisp/net/tramp-sh.el (tramp-find-file-exists-command): Fix comment. 2022-03-16 17:38:18 +01:00
Robert Pluim
679b9cc9ff Link with libdl when using pgtk
* configure.ac: Define LIBMODULES on GNU/Linux when using pgtk, even
when not using modules, since pgtkterm.c uses dlsym.  (Bug#54378)
2022-03-16 15:31:27 +01:00
Po Lu
d5e8f483f9 * doc/lispref/frames.texi (x-begin-drag): Improve wording. 2022-03-16 21:47:37 +08:00
Po Lu
549d0a4413 Fix 32-bit Haiku build
* src/haikuselect.h (be_enum_message): Fix declaration for
32-bit types.
2022-03-16 13:43:37 +00:00
Po Lu
79f3d9c8f3 Add support for dropping plain text on Haiku
* haiku-win.el (haiku-dnd-handle-drag-n-drop-event): Handle
`text/plain'.
2022-03-16 13:28:53 +00:00
Po Lu
3de3f12b94 Redo Haiku DND support
* lisp/term/haiku-win.el (haiku-dnd-handle-drag-n-drop-event):
Update for new DND event format.
* src/haiku_io.c (haiku_len): Handle DRAG_AND_DROP_EVENTs.
* src/haiku_select.cc (be_enum_message, be_get_refs_data)
(be_get_message_data): New function.
* src/haiku_support.cc (class Emacs): Remove `RefsReceived'.
(MessageReceived): Generate new kind of drag-n-drop events.
* src/haiku_support.h (enum haiku_event_type): Rename
`REFS_EVENT' to `DRAG_AND_DROP_EVENT'.
(struct haiku_refs_event): Delete struct.
(struct haiku_drag_and_drop_event): New struct.
* src/haikuselect.c (haiku_message_to_lisp): New function.
(syms_of_haikuselect): New symbols.
* src/haikuselect.h: Update prototypes.
* src/haikuterm.c (haiku_read_socket): Handle new type of
drag-and-drop events by serializing drop message to Lisp and
letting Lisp code do the processing.
* src/haikuterm.h: Update prototypes.
2022-03-16 13:28:53 +00:00
Eli Zaretskii
65f92837fa Fix last change in frames.texi
* doc/lispref/frames.texi (Drag and Drop): Improve and clarify the
wording.
2022-03-16 14:46:36 +02:00
Po Lu
4f46ec8ddd Pacify compiler warning in handle_one_xevent
* src/xterm.c (x_dnd_get_target_window): Set proto_out even if
it won't be used because target is None.  Reported by Lars
Ingebrigtsen <larsi@gnus.org>.
2022-03-16 19:43:06 +08:00