]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoDon't use the original sender's address as the envelope-from
Sean Whitton [Thu, 17 Mar 2022 10:57:14 +0000 (11:57 +0100)]
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).

2 years agoImprove LaTeX symbol prettification
Arash Esbati [Thu, 17 Mar 2022 10:44:15 +0000 (11:44 +0100)]
Improve LaTeX symbol prettification

* lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist):
Support macros which used to be part of textcomp package.

2 years agoPrevent invisible frames from acting as drag sources
Po Lu [Thu, 17 Mar 2022 09:41:41 +0000 (17:41 +0800)]
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.

2 years ago* src/haikuselect.c (Fhaiku_drag_message): Clear display grab after drag ends.
Po Lu [Thu, 17 Mar 2022 09:14:53 +0000 (09:14 +0000)]
* src/haikuselect.c (Fhaiku_drag_message): Clear display grab after drag ends.

2 years agoFix creating frames with an initial value of `fullscreen' on Haiku
Po Lu [Thu, 17 Mar 2022 08:51:32 +0000 (08:51 +0000)]
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'.

2 years agoDo not cache directories with Tramp sshfs
Michael Albinus [Thu, 17 Mar 2022 08:09:54 +0000 (09:09 +0100)]
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)

2 years agoFix mouse movement on Haiku
Po Lu [Thu, 17 Mar 2022 07:17:13 +0000 (07:17 +0000)]
Fix mouse movement on Haiku

* src/haiku_support.cc (MouseMoved): Make sure grab view exists
before comparing against it.

2 years agoDisplay drag-and-drop messages in echo area on non-graphics displays
Po Lu [Thu, 17 Mar 2022 07:12:23 +0000 (15:12 +0800)]
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.

2 years agoFix compilation error of xterm.c
Eli Zaretskii [Thu, 17 Mar 2022 06:56:42 +0000 (08:56 +0200)]
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>.

2 years agoPrevent delivery of duplicate events when window is grabbed on Haiku
Po Lu [Thu, 17 Mar 2022 05:31:03 +0000 (05:31 +0000)]
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.

2 years ago* src/xterm.c (x_dnd_begin_drag_and_drop): Always initialize hold_quit.
Po Lu [Thu, 17 Mar 2022 04:53:36 +0000 (12:53 +0800)]
* src/xterm.c (x_dnd_begin_drag_and_drop): Always initialize hold_quit.

2 years agoRestore old PGTK scrolling code
Po Lu [Thu, 17 Mar 2022 03:59:56 +0000 (11:59 +0800)]
Restore old PGTK scrolling code

* src/pgtkterm.c (pgtk_copy_bits): Restore old code using
cairo_surface_create_similar.  (bug#54040)

2 years agoMake GTK inspector available on PGTK
Po Lu [Thu, 17 Mar 2022 03:51:32 +0000 (11:51 +0800)]
Make GTK inspector available on PGTK

* src/pgtkfns.c (Fx_gtk_debug): New function.
(syms_of_pgtkfns): Define new subr.

2 years ago; * lisp/term/haiku-win.el (x-begin-drag): Fix compiler warning.
Po Lu [Thu, 17 Mar 2022 03:49:23 +0000 (11:49 +0800)]
; * lisp/term/haiku-win.el (x-begin-drag): Fix compiler warning.

2 years ago* lisp/term/haiku-win.el (x-begin-drag): Fix type code of B_MIME_TYPE.
Po Lu [Thu, 17 Mar 2022 03:46:18 +0000 (03:46 +0000)]
* lisp/term/haiku-win.el (x-begin-drag): Fix type code of B_MIME_TYPE.

2 years agoImplement cross-program drag-and-drop on Haiku
Po Lu [Thu, 17 Mar 2022 03:42:19 +0000 (03:42 +0000)]
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.

2 years agoImprove GTK support for X11 drag-n-drop
Po Lu [Thu, 17 Mar 2022 00:54:30 +0000 (08:54 +0800)]
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.

2 years agoSimplify generate-new-buffer-name randomness
Paul Eggert [Thu, 17 Mar 2022 00:21:55 +0000 (17:21 -0700)]
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.

2 years agoImprove random bignum generation
Paul Eggert [Thu, 17 Mar 2022 00:21:55 +0000 (17:21 -0700)]
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.

2 years agoStrip positions from symbols before the eval in eval-{when,and}-compile.
Alan Mackenzie [Wed, 16 Mar 2022 19:23:24 +0000 (19:23 +0000)]
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.

2 years agoReport buffer-name when local mode-line is invalid
Robert Pluim [Mon, 7 Mar 2022 10:26:25 +0000 (11:26 +0100)]
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.

2 years agoGuard against custom entries that can contain NULs
Robert Pluim [Sat, 26 Feb 2022 10:46:32 +0000 (11:46 +0100)]
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.

2 years agoImprove error message for 'not running' processes
Robert Pluim [Wed, 9 Feb 2022 09:01:36 +0000 (10:01 +0100)]
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.

2 years ago* lisp/net/tramp-sh.el (tramp-find-file-exists-command): Fix comment.
Manuel Giraud [Wed, 16 Mar 2022 16:38:18 +0000 (17:38 +0100)]
* lisp/net/tramp-sh.el (tramp-find-file-exists-command): Fix comment.

2 years agoLink with libdl when using pgtk
Robert Pluim [Wed, 16 Mar 2022 14:24:35 +0000 (15:24 +0100)]
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)

2 years ago* doc/lispref/frames.texi (x-begin-drag): Improve wording.
Po Lu [Wed, 16 Mar 2022 13:47:37 +0000 (21:47 +0800)]
* doc/lispref/frames.texi (x-begin-drag): Improve wording.

2 years agoFix 32-bit Haiku build
Po Lu [Wed, 16 Mar 2022 13:43:37 +0000 (13:43 +0000)]
Fix 32-bit Haiku build

* src/haikuselect.h (be_enum_message): Fix declaration for
32-bit types.

2 years agoAdd support for dropping plain text on Haiku
Po Lu [Wed, 16 Mar 2022 13:24:18 +0000 (13:24 +0000)]
Add support for dropping plain text on Haiku

* haiku-win.el (haiku-dnd-handle-drag-n-drop-event): Handle
`text/plain'.

2 years agoRedo Haiku DND support
Po Lu [Wed, 16 Mar 2022 13:18:12 +0000 (13:18 +0000)]
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.

2 years agoFix last change in frames.texi
Eli Zaretskii [Wed, 16 Mar 2022 12:46:36 +0000 (14:46 +0200)]
Fix last change in frames.texi

* doc/lispref/frames.texi (Drag and Drop): Improve and clarify the
wording.

2 years agoPacify compiler warning in handle_one_xevent
Po Lu [Wed, 16 Mar 2022 11:43:06 +0000 (19:43 +0800)]
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>.

2 years agoCorrect last change for return-frame drags
Po Lu [Wed, 16 Mar 2022 09:07:17 +0000 (17:07 +0800)]
Correct last change for return-frame drags

* src/xterm.c (handle_one_xevent): Use `x_any_window_to_frame'
to determine `x_dnd_return_frame_object'.

2 years agoFix minor bugs with XDND support
Po Lu [Wed, 16 Mar 2022 09:03:19 +0000 (17:03 +0800)]
Fix minor bugs with XDND support

* lisp/mouse.el (mouse-drag-and-drop-region): Report more
selection targets for the benefit of Qt and Mozilla.
* lisp/select.el (xselect--encode-string)
(selection-converter-alist): Add new selection targets.

* src/xterm.c (x_dnd_get_window_proxy): New function.
(x_dnd_get_target_window): New argument proto_out, and return
first window with XdndAware instead of bottommost window.
(handle_one_xevent): Use new argument `proto_out'.

2 years agoFix XI 2.0 build
Po Lu [Wed, 16 Mar 2022 07:51:02 +0000 (15:51 +0800)]
Fix XI 2.0 build

* src/xterm.c (handle_one_xevent): Move declaration of dummy out
of HAVE_XINPUT2_1.

2 years agoFix tooltip text properties showing up in dragged text
Po Lu [Wed, 16 Mar 2022 07:18:02 +0000 (15:18 +0800)]
Fix tooltip text properties showing up in dragged text

* lisp/mouse.el (mouse-drag-and-drop-region): Directly call
x-show-tip and x-hide-tip instead of going through tooltip-show.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Wed, 16 Mar 2022 05:30:35 +0000 (06:30 +0100)]
Merge from origin/emacs-28

62e830c3d9 * doc/misc/transient.texi: Fix @dircategory to "Emacs misc...

2 years agoBetter handle drag-and-drop from one Emacs frame to another
Po Lu [Wed, 16 Mar 2022 04:33:15 +0000 (12:33 +0800)]
Better handle drag-and-drop from one Emacs frame to another

* doc/lispref/frames.texi (Drag and Drop): Document new
parameter `return-frame' to `x-begin-drag'.
* lisp/mouse.el (mouse-drag-and-drop-region): Utilize new
feature.

* src/xfns.c (Fx_begin_drag): New parameter `return-frame'.
* src/xterm.c (x_dnd_begin_drag_and_drop): New parameter
return_frame_p.
(handle_one_xevent): Set new flags and return frame whenever
appropriate.
* src/xterm.h: Update prototypes.

2 years ago* src/xfns.c (Fx_begin_drag): Improve doc string.
Po Lu [Wed, 16 Mar 2022 03:45:46 +0000 (11:45 +0800)]
* src/xfns.c (Fx_begin_drag): Improve doc string.

2 years agoAdd support for dragging text from Emacs to other programs
Po Lu [Wed, 16 Mar 2022 03:29:36 +0000 (11:29 +0800)]
Add support for dragging text from Emacs to other programs

This still probably needs some more protection from
malfunctioning clients which delete windows at random, but I
don't know if that's a problem in practice.

* doc/emacs/frames.texi (Drag and Drop):
* doc/lispref/frames.texi (Drag and Drop): Document new
features.

* etc/NEWS: Announce new function `x-begin-drag' and new user
option `mouse-drag-and-drop-region-cross-program'.

* lisp/mouse.el (mouse-drag-and-drop-region-cross-program): New
user option.
(x-begin-drag): New variable declaration.
(mouse-drag-and-drop-region): If the mouse moves out of an Emacs
frame, begin a window system drag.
* lisp/x-dnd.el (x-dnd-handle-xdnd): Remove left-over debugging
code.

* src/xfns.c (Fx_set_mouse_absolute_pixel_position): Fix
indentation of opening paren.
(Fx_begin_drag): New function.
(syms_of_xfns): Define new subr.
* src/xselect.c (x_timestamp_for_selection): New function.

* src/xterm.c (X_DND_SUPPORTED_VERSION): New preprocessor
declaration.
(x_dnd_get_window_proto, x_dnd_send_enter, x_dnd_send_position)
(x_dnd_send_leave, x_dnd_send_drop, x_set_dnd_targets)
(x_dnd_begin_drag_and_drop): New functions.
(handle_one_xevent): Handle drag-and-drop motion and button
events when active.
(x_free_frame_resources): If f is the DND source, stop
drag-and-drop.
(x_term_init): Intern new atoms.
(syms_of_xterm): New symbol QXdndSelection.

* src/xterm.h (struct x_display_info): New atoms
Xatom_XdndAware, Xatom_XdndSelection, Xatom_XdndTypeList,
Xatom_XdndActionCopy, Xatom_XdndActionMove,
Xatom_XdndActionLink, Xatom_XdndActionAsk,
Xatom_XdndActionPrivate, Xatom_XdndActionList,
Xatom_XdndActionDescription, Xatom_XdndProxy, Xatom_XdndEnter,
Xatom_XdndPosition, Xatom_XdndStatus, Xatom_XdndLeave,
Xatom_XdndDrop, and Xatom_XdndFinished.

2 years agoFix build with GTK 3.18.0 or earlier
Po Lu [Wed, 16 Mar 2022 00:41:24 +0000 (08:41 +0800)]
Fix build with GTK 3.18.0 or earlier

* src/gtkutil.c (xg_update_scroll_bar_pos)
(xg_update_horizontal_scrollbar_pos): Avoid
gtk_widget_queue_allocate on older GTK versions.

2 years agoClean up implementation of N0 per UAX#9
Eli Zaretskii [Tue, 15 Mar 2022 19:21:20 +0000 (21:21 +0200)]
Clean up implementation of N0 per UAX#9

* src/bidi.c (bidi_resolve_brackets): Instead of requiring
prev_for_neutral's type to be known, fall back on SOS, per
the UBA.

2 years ago* doc/misc/transient.texi: Fix @dircategory to "Emacs misc features" for dir.
Juri Linkov [Tue, 15 Mar 2022 17:28:50 +0000 (19:28 +0200)]
* doc/misc/transient.texi: Fix @dircategory to "Emacs misc features" for dir.

2 years agoExtract `gnus-collect-urls-from-article' from `gnus-summary-browse-url'
Sam Steingold [Tue, 15 Mar 2022 16:22:48 +0000 (12:22 -0400)]
Extract `gnus-collect-urls-from-article' from `gnus-summary-browse-url'

* lisp/gnus-sum.el (gnus-collect-urls-from-article):
New function, extracted from `gnus-summary-browse-url'.
(gnus-summary-browse-url): Use it.

2 years ago* lisp/url/url-vars.el: Cosmetic changes
Stefan Monnier [Tue, 15 Mar 2022 14:18:07 +0000 (10:18 -0400)]
* lisp/url/url-vars.el: Cosmetic changes

(url-mime-separator-chars): Simplify.
(url-interactive-p): Tweak docstring.

2 years agodoctex-mode: Try and fix bug#35140
Stefan Monnier [Tue, 15 Mar 2022 14:12:46 +0000 (10:12 -0400)]
doctex-mode: Try and fix bug#35140

* lisp/textmodes/tex-mode.el (doctex-syntax-propertize-rules):
Add support for the new ^^X and consider the first ^ of ^^A to be the
closing char for the previous comment.
(doctex-font-lock-^^A): Simplify accordingly.

2 years agoFix byte-code button in help--describe-command
Lars Ingebrigtsen [Tue, 15 Mar 2022 11:44:50 +0000 (12:44 +0100)]
Fix byte-code button in help--describe-command

* lisp/help.el (help--describe-command): Fix byte-code button
(bug#24235).

2 years agoRevert "New command `gnus-summary-browse-all-urls' bound to "v""
Lars Ingebrigtsen [Tue, 15 Mar 2022 11:36:06 +0000 (12:36 +0100)]
Revert "New command `gnus-summary-browse-all-urls' bound to "v""

This reverts commit f52dcfd03ad542704d9a43faab0c33be09ab442e.

It was never agreed that this should be added.

2 years agoFix some minor glitches with Haiku scroll bars
Po Lu [Tue, 15 Mar 2022 04:46:01 +0000 (04:46 +0000)]
Fix some minor glitches with Haiku scroll bars

* src/haiku_support.cc (MouseDown): Don't start overscroll if
dragging started inside a button.

2 years agoFix crashes when trying to pop up a menu on GTK 2
Po Lu [Tue, 15 Mar 2022 04:14:56 +0000 (12:14 +0800)]
Fix crashes when trying to pop up a menu on GTK 2

* src/xterm.c (handle_one_xevent): Respect finish when
dispatching copy.

2 years agoFix some issues with input on GTK 2 builds
Po Lu [Tue, 15 Mar 2022 04:09:45 +0000 (12:09 +0800)]
Fix some issues with input on GTK 2 builds

* src/xfns.c (setup_xi_event_mask): Don't ask for XI key press
on GTK 2.

2 years agoFix extraneous ifdef in xwidgets code
Po Lu [Tue, 15 Mar 2022 02:28:54 +0000 (10:28 +0800)]
Fix extraneous ifdef in xwidgets code

* xterm.c (handle_one_xevent): Pass GesturePinchEnd events to
xwidgets regardless of no-longer-present define.

2 years ago* src/xterm.c (handle_one_xevent): Fix use of wrong motion structure.
Po Lu [Tue, 15 Mar 2022 02:24:13 +0000 (10:24 +0800)]
* src/xterm.c (handle_one_xevent): Fix use of wrong motion structure.

2 years agoStop relying on dynlib for PGTK interrupt input
Po Lu [Tue, 15 Mar 2022 00:54:30 +0000 (08:54 +0800)]
Stop relying on dynlib for PGTK interrupt input

* src/pgtkterm.c (pgtk_term_init): Use dlopen and dlsym directly
instead of dynlib functions.  (bug#54378)

2 years agoEUDC: Fix a bug and some docstrings
Thomas Fitzsimmons [Mon, 14 Mar 2022 21:33:42 +0000 (17:33 -0400)]
EUDC: Fix a bug and some docstrings

* lisp/net/eudc.el (eudc-register-protocol): Add doc string.
(eudc-expand-inline): Add TRY-ALL-SERVERS to docstring.
(eudc-query-with-words): Fix early-return bug reported by
Alexander Adolf.
(eudc-menu): Add doc string.
(eudc-install-menu): Likewise.

2 years agoAnother fix for the no-toolkit build
Paul Eggert [Mon, 14 Mar 2022 20:14:23 +0000 (13:14 -0700)]
Another fix for the no-toolkit build

This should be better in the long run.
* oldXMenu/Activate.c (XMenuActivate): Revert previous change,
eliminating the goto it introduced.
* oldXMenu/XMenuInt.h: Include <attribute.h>, for FALLTHROUGH.

2 years agoPrefer CALLN
Paul Eggert [Mon, 14 Mar 2022 15:55:46 +0000 (08:55 -0700)]
Prefer CALLN

* src/bytecode.c (Fbyte_code):
* src/composite.c (Fclear_composition_cache):
Prefer CALLN to doing it by hand.
* src/fns.c (ccall2): Remove.  All uses replaced by CALLN.

2 years agoNew command `gnus-summary-browse-all-urls' bound to "v"
Sam Steingold [Fri, 11 Mar 2022 18:59:46 +0000 (13:59 -0500)]
New command `gnus-summary-browse-all-urls' bound to "v"

* lisp/gnus-sum.el (gnus-collect-urls-from-article): New function,
  extracted from `gnus-summary-browse-url'.
(gnus-summary-browse-url): Use it; also use `browse-url-button-open-url'
  to handle the prefix argument.
(gnus-summary-browse-all-urls): New command.
(gnus-summary-mode-map): Bind `gnus-summary-browse-all-urls' to "v".

2 years agoFix the no toolkit build
Po Lu [Mon, 14 Mar 2022 13:48:47 +0000 (21:48 +0800)]
Fix the no toolkit build

* Activate.c (XMenuActivate): Stop relying on fallthroughs
inside switch statement.  (bug#54382)

2 years agoFix RFC2047 encoding of Disposition-Notification-To
Lars Ingebrigtsen [Mon, 14 Mar 2022 13:46:25 +0000 (14:46 +0100)]
Fix RFC2047 encoding of Disposition-Notification-To

* lisp/mail/rfc2047.el (rfc2047-header-encoding-alist): Encode
Disposition-Notification-To as an address header (bug#54383).

2 years agoHandle position specification hints on X toolkit builds
Po Lu [Mon, 14 Mar 2022 13:37:42 +0000 (21:37 +0800)]
Handle position specification hints on X toolkit builds

* src/xterm.c (x_wm_set_size_hint): Set PPosition and USPosition
independently of Xt.

2 years ago* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Simplify Edebug spec
Stefan Monnier [Mon, 14 Mar 2022 13:28:18 +0000 (09:28 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Simplify Edebug spec

2 years agoImprove the execute-kbd-macro doc string
Lars Ingebrigtsen [Mon, 14 Mar 2022 11:16:27 +0000 (12:16 +0100)]
Improve the execute-kbd-macro doc string

* src/macros.c (Fexecute_kbd_macro): Improve the doc string
(bug#14206).

2 years agoMake Edebug specification for 'cl-defstruct' more lenient.
Philipp Stephani [Mon, 14 Mar 2022 09:59:03 +0000 (10:59 +0100)]
Make Edebug specification for 'cl-defstruct' more lenient.

For example, 'xref-item' uses the list form of ':noinline'.

* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Accept ':noinline' and
':named' with an argument.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-defstruct/edebug): New
unit test.

2 years agoDon't always escape "." and "?" in `prin1'
Lars Ingebrigtsen [Mon, 14 Mar 2022 09:27:12 +0000 (10:27 +0100)]
Don't always escape "." and "?" in `prin1'

* src/print.c (print_object): Only escape "." and "?" when
appearing as the first character in a symbol (bug#23130).

2 years agoInit 'rest' in 'balance-windows-2' (Bug#54380)
Martin Rudalics [Mon, 14 Mar 2022 09:26:36 +0000 (10:26 +0100)]
Init 'rest' in 'balance-windows-2' (Bug#54380)

* lisp/window.el (balance-windows-2): Give 'rest' an initial
value (Bug#54380).

2 years agoClean up some Haiku toolkit code
Po Lu [Mon, 14 Mar 2022 06:48:34 +0000 (06:48 +0000)]
Clean up some Haiku toolkit code

* src/haiku_io.c (haiku_read_with_timeout): Accept `bigtime_t'
instead of `time_t' for values which are cast to bigtime_t
anyway.
* src/haiku_support.cc (BMenu_run): Read all help events instead
of just one.
* src/haiku_support.h: Update prototypes.

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Mon, 14 Mar 2022 05:30:42 +0000 (06:30 +0100)]
; Merge from origin/emacs-28

The following commit was skipped:

8e7a3f21e0 Fix evaluation of negated argument predicates in Eshell

2 years agoMerge from origin/emacs-28
Stefan Kangas [Mon, 14 Mar 2022 05:30:41 +0000 (06:30 +0100)]
Merge from origin/emacs-28

1ec4063017 ; * admin/make-tarball.txt: Minor updates.

2 years agoFix extraneous overscroll activation on Haiku
Po Lu [Mon, 14 Mar 2022 02:45:55 +0000 (02:45 +0000)]
Fix extraneous overscroll activation on Haiku

* src/haiku_support.cc (class EmacsScrollBar): New field
`maybe_overscroll'.
(MouseDown): Set that field.
(MouseUp): Clear that field.
(MouseMoved): Also test `maybe_overscroll' to ensure that a grab
started inside the scroll bar.

2 years agoFix tool-bar highlight persisting after mouse moves onto WM frame
Po Lu [Mon, 14 Mar 2022 01:05:48 +0000 (09:05 +0800)]
Fix tool-bar highlight persisting after mouse moves onto WM frame

* src/xterm.c (handle_one_xevent): Always report MotionNotify
coordinates in terms of the edit widget.

2 years ago* src/bytecode.c: Include sysstdio.h, for fprint, stderr.
Glenn Morris [Mon, 14 Mar 2022 01:03:11 +0000 (18:03 -0700)]
* src/bytecode.c: Include sysstdio.h, for fprint, stderr.

; Ref https://hydra.nixos.org/build/169207408

2 years agoEnable overscroll on Haiku horizontal scroll bars
Po Lu [Mon, 14 Mar 2022 00:54:10 +0000 (00:54 +0000)]
Enable overscroll on Haiku horizontal scroll bars

* src/haiku_support.cc (MouseMoved): Handle horizontal
directions correctly.
* src/haikuterm.c (haiku_set_horizontal_scroll_bar_thumb):
Enable overscrolling on scroll bar widget.

2 years agoFix scroll bar movement right before overscroll begins on Haiku
Po Lu [Mon, 14 Mar 2022 00:45:00 +0000 (00:45 +0000)]
Fix scroll bar movement right before overscroll begins on Haiku

* src/haikuterm.c (haiku_set_scroll_bar_thumb): Make sure value
and size are within bounds even if portion adjustment is off.

2 years agoReally fix find-func for defgeneric
Lars Ingebrigtsen [Sun, 13 Mar 2022 20:15:35 +0000 (21:15 +0100)]
Really fix find-func for defgeneric

* lisp/emacs-lisp/find-func.el (find-function-regexp): Really add
defgeneric.

2 years agoMake vtable sorting stable
Lars Ingebrigtsen [Sun, 13 Mar 2022 20:13:49 +0000 (21:13 +0100)]
Make vtable sorting stable

* lisp/emacs-lisp/vtable.el (vtable--sort): Make the sorting
stable.

2 years agoClang debug notes
Paul Eggert [Sun, 13 Mar 2022 19:03:46 +0000 (12:03 -0700)]
Clang debug notes

* etc/DEBUG: Don’t imply Clang works as well as GCC when
debugging Emacs.  Mention a coverage problem with Clang.

2 years agoFix evaluation of negated argument predicates in Eshell
Jim Porter [Sun, 13 Mar 2022 14:36:37 +0000 (15:36 +0100)]
Fix evaluation of negated argument predicates in Eshell

* lisp/eshell/em-pred.el (eshell-add-pred-func): Let-bind 'pred' so
the lambdas see the original value (bug#54369).

Committed on the wrong branch.

Do not merge to master.

2 years agoFix evaluation of negated argument predicates in Eshell
Jim Porter [Sun, 13 Mar 2022 14:36:37 +0000 (15:36 +0100)]
Fix evaluation of negated argument predicates in Eshell

* lisp/eshell/em-pred.el (eshell-add-pred-func): Let-bind 'pred' so
the lambdas see the original value (bug#54369).

2 years ago* src/bytecode.c (sf_set_ptr): Cast pointer to type of right size.
Mattias Engdegård [Sun, 13 Mar 2022 18:35:50 +0000 (19:35 +0100)]
* src/bytecode.c (sf_set_ptr): Cast pointer to type of right size.

2 years agoSeparate bytecode stack
Mattias Engdegård [Sun, 13 Mar 2022 16:26:05 +0000 (17:26 +0100)]
Separate bytecode stack

Use a dedicated stack for bytecode, instead of using the C stack.
Stack frames are managed explicitly and we stay in the same
exec_byte_code activation throughout bytecode function calls and
returns.  In other words, exec_byte_code no longer uses recursion
for calling bytecode functions.

This results in better performance, and bytecode recursion is no
longer limited by the size of the C stack.  The bytecode stack is
currently of fixed size but overflow is handled gracefully by
signalling a Lisp error instead of the hard crash that we get now.

In addition, GC marking of the stack is now faster and more precise.
Full precision could be attained if desired.

* src/alloc.c (ATTRIBUTE_NO_SANITIZE_ADDRESS): Make non-static.
* src/bytecode.c (enum stack_frame_index, BC_STACK_SIZE)
(sf_get_ptr, sf_set_ptr, sf_get_lisp_ptr, sf_set_lisp_ptr)
(sf_get_saved_pc, sf_set_saved_pc, init_bc_thread, free_bc_thread)
(mark_bytecode, Finternal_stack_stats, valid_sp): New.
(exec_byte_code): Adapt to use the new bytecode stack.
(syms_of_bytecode): Add defsubr.
* src/eval.c (unwind_to_catch): Restore saved stack frame.
(push_handler_nosignal): Save stack frame.
* src/lisp.h (struct handler): Add act_rec member.
(get_act_rec, set_act_rec): New.
* src/thread.c (mark_one_thread): Call mark_bytecode.
(finalize_one_thread): Free bytecode thread state.
(Fmake_thread, init_threads): Set up bytecode thread state.
* src/thread.h (struct bc_thread_state): New.
(struct thread_state): Add bytecode thread state.

2 years agoSimplify exec_byte_code arguments
Mattias Engdegård [Tue, 18 Jan 2022 12:10:05 +0000 (13:10 +0100)]
Simplify exec_byte_code arguments

Pass the function object and encoded arity, not the other components.
This speeds up several call paths and is necessary for improvements to
come.

* src/bytecode.c (Fbyte_code): Make a new byte code object for
execution.  This is slower but performance isn't critical here.
(exec_byte_code): Retrieve components from the passed function.
* src/eval.c (fetch_and_exec_byte_code):
* src/lisp.h (exec_byte_code): Update signature.

2 years ago* lisp/net/ange-ftp.el (ange-ftp-ls): Make a loop when sanitizing LSARGS.
Michael Albinus [Sun, 13 Mar 2022 15:50:14 +0000 (16:50 +0100)]
* lisp/net/ange-ftp.el (ange-ftp-ls): Make a loop when sanitizing LSARGS.

2 years agoAdd cl-defgeneric to find-func, too
Lars Ingebrigtsen [Sun, 13 Mar 2022 14:07:59 +0000 (15:07 +0100)]
Add cl-defgeneric to find-func, too

* lisp/emacs-lisp/find-func.el (find-function-regexp): Add
cl-defgeneric, too (bug#54343).

2 years agoAllow overscrolling on Haiku scroll bars that are full
Po Lu [Sun, 13 Mar 2022 12:56:55 +0000 (12:56 +0000)]
Allow overscrolling on Haiku scroll bars that are full

* src/haiku_support.cc (MouseMoved): Allow overscrolling even if
portion is less than 1.0.

2 years agoFix pointer event tracking on top of Haiku scroll bars
Po Lu [Sun, 13 Mar 2022 12:53:01 +0000 (12:53 +0000)]
Fix pointer event tracking on top of Haiku scroll bars

* src/haiku_support.cc (MouseDown): Set correct mouse event mask
in case the scroll bar widget decides to not do that.

2 years agoFix splurious button events being generated on Haiku
Po Lu [Sun, 13 Mar 2022 12:32:15 +0000 (12:32 +0000)]
Fix splurious button events being generated on Haiku

* src/haiku_support.cc (MouseDown, MouseUp): Don't process if
the grab is not appropriate for the buttons that were pressed.

2 years agoFix setting IM spot after key press events
Po Lu [Sun, 13 Mar 2022 10:58:42 +0000 (18:58 +0800)]
Fix setting IM spot after key press events

* src/xterm.c (handle_one_xevent): Check f is not NULL before
trying to set its status area and set preedit spot location
after KeyPress events.

2 years agoFix esh-proc-tests on macOS
Mattias Engdegård [Sun, 13 Mar 2022 10:01:59 +0000 (11:01 +0100)]
Fix esh-proc-tests on macOS

* test/lisp/eshell/esh-proc-tests.el (esh-proc-test/kill-pipeline):
Add pattern matching output when killing a process on macOS (and
possibly other BSDs).

2 years ago; * etc/NEWS: Fix typo.
Eli Zaretskii [Sun, 13 Mar 2022 09:40:55 +0000 (11:40 +0200)]
; * etc/NEWS: Fix typo.

2 years ago; * etc/NEWS: Cleanups as followup to bug#50143.
Eli Zaretskii [Sun, 13 Mar 2022 08:20:37 +0000 (10:20 +0200)]
; * etc/NEWS: Cleanups as followup to bug#50143.

2 years ago* quail.el (quail-define-package): Describe VAR form in DOCSTRING better.
Visuwesh [Sun, 13 Mar 2022 07:01:16 +0000 (12:31 +0530)]
* quail.el (quail-define-package): Describe VAR form in DOCSTRING better.

Bug#50143

Copyright-paperwork-exempt: yes

2 years agoFollow contemporary practices in the Tamil input methods
Visuwesh [Sun, 13 Mar 2022 05:46:38 +0000 (11:16 +0530)]
Follow contemporary practices in the Tamil input methods

* lisp/language/ind-util.el (indian-tml-base-digits-table): New table
to translate digits.
(indian-tml-base-table): Don't translate digits.
(indian-tml-itrans-digits-v5-hash): Hashtable that translates digits.

* lisp/leim/quail/indian.el (quail-tamil-itrans-compute-signs-table)
(quail-tamil-itrans-various-signs-table)
(quail-tamil-itrans-various-signs-and-digits-table): Separate out the
digits from the signs table using the function
'quail-tamil-itrans-compute-signs-table'.
(tamil-itrans-digits, tamil-inscript-digits): New input methods that
translates digits.
(tamil-itrans, tamil-inscript): Fix table inclusion.

* etc/NEWS: Announce the change.

Fixes bug#50143.

Copyright-paperwork-exempt: yes

2 years ago; * admin/make-tarball.txt: Minor updates.
Eli Zaretskii [Sun, 13 Mar 2022 07:53:59 +0000 (09:53 +0200)]
; * admin/make-tarball.txt: Minor updates.

2 years agoFix small regression for horizontal scroll bars
Po Lu [Sun, 13 Mar 2022 07:27:24 +0000 (07:27 +0000)]
Fix small regression for horizontal scroll bars

* src/haikuterm.c (haiku_read_socket): Restore previous
horizontal scrollbar code, since the change it was intended for
was never made.

2 years agoImprove overscrolling support on Haiku
Po Lu [Sun, 13 Mar 2022 07:22:59 +0000 (07:22 +0000)]
Improve overscrolling support on Haiku

* src/haiku_support.cc (class EmacsScrollBar): New field
`real_max_value'.
(MessageReceived): Set real max value.
(MouseMoved): Get rid of magic numbers by using real max value
instead.

2 years ago; * haiku_support.cc (MessageReceived): Fix 32-bit build.
Po Lu [Sun, 13 Mar 2022 06:50:12 +0000 (06:50 +0000)]
; * haiku_support.cc (MessageReceived): Fix 32-bit build.

2 years agoAllow dragging scroll bar for overscroll on Haiku
Po Lu [Sun, 13 Mar 2022 06:41:58 +0000 (06:41 +0000)]
Allow dragging scroll bar for overscroll on Haiku

* src/haiku_support.cc (class EmacsScrollBar): New fields
`in_overscroll', `can_overscroll', `last_overscroll',
`last_reported_overscroll_value' and `max_value'.
(ValueChanged): Make very sure extraneous value are not
generated.
(MouseUp): Clear overscroll if enabled.
(MouseMoved): If overscroll is enabled and dragging downwards
fails to dislodge the maximum value, enable overscrolling.
(BView_scroll_bar_update): New parameter `can_overscroll'
* src/haiku_support.h: Update prototypes.
* src/haikuterm.c (haiku_set_scroll_bar_thumb)
(haiku_set_horizontal_scroll_bar_thumb): Adjust parameters to
scroll bar update functions.
(haiku_read_socket): Take ceiling of bar position if
horizontal.

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Sun, 13 Mar 2022 05:30:42 +0000 (06:30 +0100)]
; Merge from origin/emacs-28

The following commit was skipped:

5ba9c8c364 Emacs pretest 28.0.92

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sun, 13 Mar 2022 05:30:41 +0000 (06:30 +0100)]
Merge from origin/emacs-28

e5b191465d ; * admin/authors.el (authors-canonical-file-name): Remove...
6b0fdf73cf ; Fix data structures in authors.el

2 years agoFlocate_file_internal: Protect from `.eln` remapping
Stefan Monnier [Sun, 13 Mar 2022 04:51:22 +0000 (23:51 -0500)]
Flocate_file_internal: Protect from `.eln` remapping

Don't use `openp`s functionality to remap `.elc` files to `.eln` files
since `locate-file` is not specific to ELisp files.
This should be not just simpler but more robust than the current
hack which tries to undo the damage after the fact.

* src/lread.c (Flocate_file_internal): Don't map `.elc` to `.eln`.
* lisp/files.el (locate-file): Simplify accordingly.