]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoFix reader infinite recursion for circular mixed-type values
Mattias Engdegård [Sat, 26 Mar 2022 15:44:18 +0000 (16:44 +0100)]
Fix reader infinite recursion for circular mixed-type values

Make sure that the value added to the `read_objects_completed` set is
the one we actually return; previously this wasn't the case for conses
because of an optimisation (bug#54501).

Also add a check for vacuous self-references such as #1=#1# instead of
returning a nonsense value from thin air.

* src/lread.c (read1): Treat numbered conses correctly as described
above.  Detect vacuous self-references.
* test/src/lread-tests.el (lread-test-read-and-print)
(lread-test-circle-cases, lread-circle): Add tests.

2 years ago; * src/image.c (syms_of_image): Fix whitespace.
Eli Zaretskii [Sat, 26 Mar 2022 12:29:11 +0000 (15:29 +0300)]
; * src/image.c (syms_of_image): Fix whitespace.

2 years agoEnable the native display of BMP images on Haiku
Po Lu [Sat, 26 Mar 2022 12:16:46 +0000 (12:16 +0000)]
Enable the native display of BMP images on Haiku

* src/image.c (syms_of_image): Also register `bmp' image type on
Haiku when native image APIs are enabled.

2 years agoFix crash when timer signals or throws inside a popup menu on Haiku
Po Lu [Sat, 26 Mar 2022 12:01:58 +0000 (12:01 +0000)]
Fix crash when timer signals or throws inside a popup menu on Haiku

* src/haikumenu.c (haiku_process_pending_signals_for_menu_1)
(haiku_process_pending_signals_for_menu_2): New functions.
(haiku_process_pending_signals_for_menu): Catch non local exits
around `timer_check'.

2 years ago; * src/xterm.c (x_dnd_compute_toplevels): Fix cookie leak if rc is 0.
Po Lu [Sat, 26 Mar 2022 11:38:30 +0000 (19:38 +0800)]
; * src/xterm.c (x_dnd_compute_toplevels): Fix cookie leak if rc is 0.

2 years agoFix processing of emacs:window_id inside DND messages if it already exists
Po Lu [Sat, 26 Mar 2022 10:13:47 +0000 (10:13 +0000)]
Fix processing of emacs:window_id inside DND messages if it already exists

* src/haiku_support.cc (MessageReceived): Use DropPoint instead
of getting it manually.
(be_drag_message): Replace window_id if it already exists.

2 years ago; Improve readablity in grep.el
Michael Albinus [Sat, 26 Mar 2022 09:40:16 +0000 (10:40 +0100)]
; Improve readablity in grep.el

* lisp/progmodes/grep.el (grep-compute-defaults): Set a more
readable value for `grep-quoting-style'.

2 years agoDon't let Tramp block dired (Bug#54542)
Michael Albinus [Sat, 26 Mar 2022 09:39:39 +0000 (10:39 +0100)]
Don't let Tramp block dired  (Bug#54542)

* lisp/dired.el (dired-find-buffer-nocreate): Avoid avoid hangs in
remote buffers with a blocked connection.  (Bug#54542)

* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
Extend suppression rules.

2 years agoMinor fixes to last change
Po Lu [Sat, 26 Mar 2022 09:12:34 +0000 (17:12 +0800)]
Minor fixes to last change

* src/Makefile.in: Add XSHAPE_LIBS and XSHAPE_CFLAGS.
(LIBES, EMACS_CFLAGS): Likewise.

* src/xterm.c (x_dnd_compute_toplevels): Fix build without
HAVE_XCB_SHAPE.

2 years agoAlso fetch shapes via XCB for drag and drop
Po Lu [Sat, 26 Mar 2022 09:10:42 +0000 (17:10 +0800)]
Also fetch shapes via XCB for drag and drop

* configure.ac: Also look for xcb-shape.
* src/xterm.c (HAVE_XCB_SHAPE_INPUT_RECTS): New define.
(x_dnd_compute_toplevels): Use XCB for input shapes if possible.

2 years agoUse native image APIs on MS-Windows by default
Eli Zaretskii [Sat, 26 Mar 2022 08:52:41 +0000 (11:52 +0300)]
Use native image APIs on MS-Windows by default

* src/w32term.c (syms_of_w32term) <w32-use-native-image-API>: Now
t by default on W2K and later systems, but only on WINDOWSNT
builds.

* etc/NEWS: Announce the change.

2 years agoSupport display of BMP images on MS-Windows
Eli Zaretskii [Sat, 26 Mar 2022 08:31:46 +0000 (11:31 +0300)]
Support display of BMP images on MS-Windows

* src/w32image.c (w32_can_use_native_image_api): Support BMP
images.
* src/image.c (syms_of_image) <Qbmp>: New symbol.
[HAVE_NTGUI]: Add 'bmp' to list of supported image types.

* doc/lispref/display.texi (Image Formats): Document built-in
support for BMP images.

* etc/NEWS: Announce the change.

2 years agoImprove 'desktop--emacs-pid-running-p'
Eli Zaretskii [Sat, 26 Mar 2022 07:28:52 +0000 (10:28 +0300)]
Improve 'desktop--emacs-pid-running-p'

* lisp/desktop.el (desktop--emacs-pid-running-p): Avoid false
negatives on MS-Windows and with some symlinks to Emacs
executables.  (Bug#1474)

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

4ec9f9edd1 Fix eshell-explicit-command-char doc string typo

2 years agoFix crash when windows are destroyed by faulty clients
Po Lu [Sat, 26 Mar 2022 04:20:23 +0000 (12:20 +0800)]
Fix crash when windows are destroyed by faulty clients

* src/xterm.c (x_dnd_compute_toplevels): Make sure
property_reply is non-NULL before testing its format and length.

2 years agoAvoid excessive synchronization when initiating drag-and-drop
Po Lu [Sat, 26 Mar 2022 04:14:52 +0000 (12:14 +0800)]
Avoid excessive synchronization when initiating drag-and-drop

* src/xterm.c (x_dnd_compute_toplevels): Use XCB to get WM
state, attributes, geometry and to translate coordinates.  This
avoids 4 calls to XSync.

2 years agoFix compiler warning in x-dnd.el
Po Lu [Sat, 26 Mar 2022 02:17:12 +0000 (10:17 +0800)]
Fix compiler warning in x-dnd.el

* lisp/x-dnd.el (x-dnd-xdnd-to-action): Move declaration
earlier.

2 years agoAvoid ClientMessage overhead when dragging stuff to other frames
Po Lu [Sat, 26 Mar 2022 02:15:53 +0000 (10:15 +0800)]
Avoid ClientMessage overhead when dragging stuff to other frames

* lisp/dired.el (dired-mouse-drag): Handle correctly dragging
from dired buffers in nonselected windows.
* lisp/x-dnd.el (x-dnd-handle-drag-n-drop-event): Understand new
client message type.
* src/xterm.c (x_dnd_send_enter, x_dnd_send_position)
(x_dnd_send_leave): Ignore if window is the top window of a
frame.
(x_dnd_send_drop): Send special DND event in that case.

2 years agoFix minor issues with dired-mouse-drag-files
Po Lu [Sat, 26 Mar 2022 00:45:08 +0000 (08:45 +0800)]
Fix minor issues with dired-mouse-drag-files

* lisp/dired.el (dired-mouse-drag-files): Update doc string and
add setter.
(dired-insert-set-properties): Don't insert misleading tooltip
if feature is not available.

2 years ago; * lisp/gnus/nnselect.el (nnselect-get-artlist): Fix last change.
Andrew G Cohen [Fri, 25 Mar 2022 22:58:23 +0000 (06:58 +0800)]
; * lisp/gnus/nnselect.el (nnselect-get-artlist): Fix last change.

2 years ago; Restore regexp-quote for gnus subject match
Andrew G Cohen [Fri, 25 Mar 2022 08:06:34 +0000 (16:06 +0800)]
; Restore regexp-quote for gnus subject match

* lisp/gnus/gnus-sum.el (gnus-summary-limit-include-thread): Restore
regexp-quote that was inadvertently dropped in commit 2021-12-21 "Fix
gnus subject matching when subject is empty".

2 years agoFix eshell-explicit-command-char doc string typo
Lars Ingebrigtsen [Fri, 25 Mar 2022 18:01:51 +0000 (19:01 +0100)]
Fix eshell-explicit-command-char doc string typo

* lisp/eshell/esh-ext.el (eshell-explicit-command-char): Fix typo
in doc string (bug#54567).

2 years agoFix (bounds-of-thing-at-point 'number)
Lars Ingebrigtsen [Fri, 25 Mar 2022 16:32:40 +0000 (17:32 +0100)]
Fix (bounds-of-thing-at-point 'number)

* lisp/thingatpt.el (number): Make (bounds-of-thing-at-point
'number) work (bug#54555).

2 years agoFix reporting of read error line/columns in the init file
Lars Ingebrigtsen [Fri, 25 Mar 2022 16:20:35 +0000 (17:20 +0100)]
Fix reporting of read error line/columns in the init file

* src/lread.c (invalid_syntax_lisp): The comments here said that
we were supposed to be called with point in the readcharfun
buffer.  This was not the case (at least) when reading the Emacs
init file, so the reported line/column was always wrong (1 and 0,
respectively) (bug#54550).

2 years agoImprove pp-last-sexp ergonomics
Lars Ingebrigtsen [Fri, 25 Mar 2022 15:44:01 +0000 (16:44 +0100)]
Improve pp-last-sexp ergonomics

* lisp/emacs-lisp/pp.el (pp-last-sexp): Ignore ,@?
before a sexp, because eval-ing that will always lead to an error
(bug#54537).

2 years agoImplement new drag and drop parameter on Haiku
Po Lu [Fri, 25 Mar 2022 13:41:30 +0000 (13:41 +0000)]
Implement new drag and drop parameter on Haiku

* lisp/term/haiku-win.el (x-begin-drag): Implement
`allow-current-frame'.
* src/haiku_support.cc (be_drag_message): New argument
`allow_same_view'.
* src/haiku_support.h: Update prototypes.
* src/haikuselect.c (Fhaiku_drag_message): New parameter
`allow-same-frame'.

2 years agoAllow dragging files from dired to windows on the same frame
Po Lu [Fri, 25 Mar 2022 13:24:03 +0000 (21:24 +0800)]
Allow dragging files from dired to windows on the same frame

* doc/lispref/frames.texi (Drag and Drop): Document new
parameter to `x-begin-drag'.
* lisp/dired.el (dired-mouse-drag): Utilize new parameter.
* lisp/term/haiku-win.el (x-begin-drag): Add new parameter.
* src/xfns.c (Fx_begin_drag): New parameter
`allow-current-frame'.  Fix typo and update doc string.
* src/xterm.c (x_dnd_get_window_proto): Respect
`x_dnd_allow_current_frame'.
(x_dnd_begin_drag_and_drop): New parameter
`allow_current_frame'.
* src/xterm.h: Update prototypes.

2 years agoImprove documentation of 'completion-auto-select'
Eli Zaretskii [Fri, 25 Mar 2022 12:39:44 +0000 (15:39 +0300)]
Improve documentation of 'completion-auto-select'

* lisp/simple.el (completion-auto-select):
* doc/emacs/mini.texi (Completion Options): Improve documentation
and description of customization options of 'completion-auto-select'.

2 years agoMake it easier to select text inside dired when mouse dragging is on
Po Lu [Fri, 25 Mar 2022 12:33:23 +0000 (20:33 +0800)]
Make it easier to select text inside dired when mouse dragging is on

* lisp/dired.el (dired-insert-set-properties): Only set drag
keymap on the filename itself.

2 years ago* admin/notes/emba: Mention workflow rules for branches.
Michael Albinus [Fri, 25 Mar 2022 08:28:44 +0000 (09:28 +0100)]
* admin/notes/emba: Mention workflow rules for branches.

2 years agoFix quitting DND while waiting for finish
Po Lu [Fri, 25 Mar 2022 08:21:17 +0000 (16:21 +0800)]
Fix quitting DND while waiting for finish

* src/xterm.c (x_dnd_begin_drag_and_drop): Always clear finish
flag before quitting.

2 years agoTake window shapes into account when processing drag and drop
Po Lu [Fri, 25 Mar 2022 08:15:57 +0000 (16:15 +0800)]
Take window shapes into account when processing drag and drop

* configure.ac: Test for the Nonrectangular Window Shape
extension.
* msdos/sed1v2.inp: Update.
* src/xterm.c (struct x_client_list_window): New fields for
shapes.
(x_dnd_free_toplevels): Free shapes.
(x_dnd_compute_toplevels): Populate window shapes.
(x_dnd_get_target_window_2): New function.
(x_dnd_get_target_window_1): Test WM state of window before
taking it into account.
(x_dnd_begin_drag_and_drop): Use outer window as the initial
last seen window.
(x_dnd_update_state): Small fixes to frame tracking.
(handle_one_xevent): Handle ShapeNotify events correctly.
(x_term_init): Test for the Nonrectangular Window Shape
extension.
* src/xterm.h (struct x_display_info): New atom `WM_STATE'.

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

d3d6f1c9bd Clarify the description of "selected tags table"

2 years agoUse _NET_CLIENT_LIST_STACKING to optimize drag and drop window discovery
Po Lu [Fri, 25 Mar 2022 03:09:43 +0000 (11:09 +0800)]
Use _NET_CLIENT_LIST_STACKING to optimize drag and drop window discovery

* src/xterm.c (struct x_client_list_window): New struct.
(x_dnd_free_toplevels, x_dnd_compute_toplevels)
(x_dnd_get_target_window_1): New functions.
(x_dnd_get_target_window): Search in the toplevel list if it
exists.
(x_dnd_cleanup_drag_and_drop): Clean up toplevel list.
(x_dnd_begin_drag_and_drop): Compute toplevel list if the
window manager supports it.
(handle_one_xevent): Update the toplevel list if prudent.

2 years agoFix wrapping of 'previous-completion' at the beginning of buffer
Philip Kaludercic [Thu, 24 Mar 2022 18:11:01 +0000 (20:11 +0200)]
Fix wrapping of 'previous-completion' at the beginning of buffer

* lisp/simple.el (next-completion): Prevent an error of
'previous-completion' at the beginning of completions buffer.
Also fix 'previous-completion' to wrap to the last completion.
(bug#54374)

2 years agoSmall fixes for the new feature 'second-tab' of 'completion-auto-select'
Juri Linkov [Thu, 24 Mar 2022 17:54:14 +0000 (19:54 +0200)]
Small fixes for the new feature 'second-tab' of 'completion-auto-select'

* lisp/simple.el (completion-auto-select): Extend the docstring.

2 years agoClarify the description of "selected tags table"
Eli Zaretskii [Thu, 24 Mar 2022 15:22:43 +0000 (17:22 +0200)]
Clarify the description of "selected tags table"

* doc/emacs/maintaining.texi (Select Tags Table): Clarify the
distinction between the "selected tags table" and the "current
list of tags tables".  (Bug#54543)

2 years agoHandle invisible text in Eldoc when calculating size
Augusto Stoffel [Thu, 24 Mar 2022 15:05:39 +0000 (15:05 +0000)]
Handle invisible text in Eldoc when calculating size

Co-authored-by: João Távora <joaotavora@gmail.com>
* lisp/emacs-lisp/eldoc.el (eldoc--echo-area-substring,
eldoc-display-in-echo-area):  Take invisible text into consideration
when counting lines to crop an echo-area message.
(Version): Bump.

2 years ago; * etc/NEWS: Fix wording of a recently added entry.
Eli Zaretskii [Thu, 24 Mar 2022 14:55:28 +0000 (16:55 +0200)]
; * etc/NEWS: Fix wording of a recently added entry.

2 years agoAllow fetching events from other displays inside DND
Po Lu [Thu, 24 Mar 2022 13:23:58 +0000 (21:23 +0800)]
Allow fetching events from other displays inside DND

* src/xterm.c (x_dnd_begin_drag_and_drop): Get the next event
from the app connection instead on Xt.

2 years ago; Fix filename in undigest-tests.el header
Mauro Aranda [Thu, 24 Mar 2022 12:41:20 +0000 (09:41 -0300)]
; Fix filename in undigest-tests.el header

2 years agoAdapt Tramp to dired--insert-disk-space assumptions
Michael Albinus [Thu, 24 Mar 2022 11:50:34 +0000 (12:50 +0100)]
Adapt Tramp to dired--insert-disk-space assumptions

* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):
* lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory):
Do not modify disk space information when
`dired--insert-disk-space' is available.  (Bug#54512)

2 years agoFix autoinsert.el byte compilation warning
Lars Ingebrigtsen [Thu, 24 Mar 2022 10:39:13 +0000 (11:39 +0100)]
Fix autoinsert.el byte compilation warning

* lisp/autoinsert.el (sgml-tag): Fix a byte compilation warning.

2 years agoMerge 'completion-auto-select new value secont-tab'
Jimmy Aguilar Mena [Thu, 24 Mar 2022 10:23:32 +0000 (11:23 +0100)]
Merge 'completion-auto-select new value secont-tab'

This includes the second-tab value for completion-auto-select and
documentation related.

2 years agoAdd documentation entries for completion-auto-select user option.
Jimmy Aguilar Mena [Thu, 24 Mar 2022 10:05:26 +0000 (11:05 +0100)]
Add documentation entries for completion-auto-select user option.

2 years agoAdd completion-auto-select second-tab value.
Jimmy Aguilar Mena [Tue, 22 Mar 2022 20:24:13 +0000 (21:24 +0100)]
Add completion-auto-select second-tab value.

* lisp/minibuffer.el (completion--in-region-1) : Change if with cond and
check if completion-auto-select.
* lisp/simple.el (completion-auto-select) : Move before first use.
(completion-setup-function) : Make a more precise check for when
completion-auto-select is t.

2 years ago* lisp/select.el (xselect-convert-to-targets): Use `delete-dups` and `delq`
Stefan Monnier [Thu, 24 Mar 2022 09:32:10 +0000 (05:32 -0400)]
* lisp/select.el (xselect-convert-to-targets): Use `delete-dups` and `delq`

2 years ago* lisp/autoinsert.el (auto-insert-alist): Expose lambdas as code
Stefan Monnier [Thu, 24 Mar 2022 09:19:19 +0000 (05:19 -0400)]
* lisp/autoinsert.el (auto-insert-alist): Expose lambdas as code

2 years ago(archive-*-write-file-member): Fix relative file name
Stefan Monnier [Thu, 24 Mar 2022 09:12:45 +0000 (05:12 -0400)]
(archive-*-write-file-member): Fix relative file name

* lisp/arc-mode.el (archive-*-write-file-member): Set the pwd

2 years agoDo some NEWS tagging
Lars Ingebrigtsen [Thu, 24 Mar 2022 09:09:47 +0000 (10:09 +0100)]
Do some NEWS tagging

2 years agoAvoid crashes if async input arrives when setting properties for DND
Po Lu [Thu, 24 Mar 2022 08:59:03 +0000 (16:59 +0800)]
Avoid crashes if async input arrives when setting properties for DND

* src/xterm.c (x_dnd_begin_drag_and_drop): Block input around
non-async signal safe functions.

2 years agoMention frame-text-* function in frame-pixel-* doc strings
Lars Ingebrigtsen [Thu, 24 Mar 2022 08:59:40 +0000 (09:59 +0100)]
Mention frame-text-* function in frame-pixel-* doc strings

* src/frame.c (Fframe_native_width, Fframe_native_height): Link to
`frame-text-*' functions.

2 years agoFix image-mode-fit-frame some more
Lars Ingebrigtsen [Thu, 24 Mar 2022 08:54:38 +0000 (09:54 +0100)]
Fix image-mode-fit-frame some more

* lisp/image-mode.el (image-mode-fit-frame): Use frame-text-width
and fit-frame-to-buffer instead of computing things ourselves
(bug#37630).  This makes things work better across platforms.

2 years agoFix some bugs with drag and drop and Mozilla
Po Lu [Thu, 24 Mar 2022 08:36:47 +0000 (16:36 +0800)]
Fix some bugs with drag and drop and Mozilla

* src/xfns.c (Fx_begin_drag): Call maybe_quit when iterating
through potentially long lists.  Also allow specifying
XdndActionAsk manually again, since it's useful for debugging.
* src/xterm.c (x_dnd_begin_drag_and_drop): Delete XdndActionList
and XdndActionDescription if they were not specified.

2 years agoLoad desktop without prompting if process is dead
Stefan Kangas [Thu, 24 Mar 2022 08:23:31 +0000 (09:23 +0100)]
Load desktop without prompting if process is dead

* doc/emacs/misc.texi (Saving Emacs Sessions): Document the new
'check' value.
* etc/NEWS: Announce the change (bug#1474).
* lisp/desktop.el (desktop-load-locked-desktop): Add new value 'check'
to load desktop file without prompting if locking Emacs process does
not exist on the local machine.  (Bug#1474)
(desktop-read): Extract function from here...
(desktop--load-locked-desktop-p): ...to here.  New function handles
the semantics of 'desktop-load-locked-desktop', including above new
value 'check'.
(desktop--emacs-pid-running-p): New function.

* test/lisp/desktop-tests.el: New file with tests for the above.

2 years agoFix setter for hl-line-sticky-flag when hl-line is not loaded
Po Lu [Thu, 24 Mar 2022 05:50:55 +0000 (13:50 +0800)]
Fix setter for hl-line-sticky-flag when hl-line is not loaded

* lisp/hl-line.el (hl-line-sticky-flag): Wrap most of setter
around (featurep 'hl-line).  Reported by Michael Heerdegen
<michael_heerdegen@web.de>.

2 years agoAllow holding down scroll bar buttons on Haiku when overscrolling
Po Lu [Thu, 24 Mar 2022 05:32:34 +0000 (05:32 +0000)]
Allow holding down scroll bar buttons on Haiku when overscrolling

* src/haiku_support.cc (EmacsWindow): Set appropriate pulse
rate.
(class EmacsScrollBar, ValueChanged): Don't send any part events
here.
(MouseDown): Set dragging to a value larger than 1 if the scroll
bar is at the end.
(Pulse): New method.

2 years agoFix an infinite loop if the window manager pings Emacs during DND
Po Lu [Thu, 24 Mar 2022 03:41:29 +0000 (11:41 +0800)]
Fix an infinite loop if the window manager pings Emacs during DND

* src/xterm.c (handle_one_xevent): Work around _NET_WM_PING
infinite loop during drag and drop.

2 years agoFix copying font names around on Haiku
Po Lu [Thu, 24 Mar 2022 01:50:18 +0000 (01:50 +0000)]
Fix copying font names around on Haiku

* src/haiku_font_support.cc (font_style_to_flags)
(haiku_font_fill_pattern, BFont_open_pattern)
(BFont_populate_fixed_family, BFont_populate_plain_family):
* src/haiku_support.cc (be_get_version_string):
* src/haikufont.c (haikufont_spec_or_entity_to_pattern): Stop
assuming patterns were allocated by xzalloc.

2 years agoAllow dragging and dropping multiple actions
Po Lu [Thu, 24 Mar 2022 01:42:47 +0000 (09:42 +0800)]
Allow dragging and dropping multiple actions

* doc/lispref/frames.texi (Drag and Drop): Document new meaning
of `action'.
* lisp/term/haiku-win.el (x-begin-drag): Correct for new meaning
of `action'.
* src/xfns.c (Fx_begin_drag): Handle new alist meaning of
`action'.
* src/xterm.c (x_dnd_begin_drag_and_drop): New parameters
`ask_action_list', `ask_action_names' and `n_ask_actions'.
* src/xterm.h: Update prototypes.

2 years agoFix regression in isearch-yank-char-in-minibuffer
Augusto Stoffel [Wed, 23 Mar 2022 18:43:13 +0000 (19:43 +0100)]
Fix regression in isearch-yank-char-in-minibuffer

* lisp/isearch.el (isearch-yank-char-in-minibuffer): Select the
original window in order to restore point.  This is needed when
minibuffer lazy highlight is in effect.

2 years agoMake undigest work with multipart/mixed messages
Mauro Aranda [Wed, 23 Mar 2022 19:42:55 +0000 (20:42 +0100)]
Make undigest work with multipart/mixed messages

* test/lisp/mail/undigest.el: New test file (bug#12873).
* lisp/mail/undigest.el (rmail-digest-methods): Install
rmail-digest-parse-mixed-mime.
(rmail-content-type-boundary): New function, to get a specific
Content-type boundary.
(rmail-digest-parse-mixed-mime): New function, to search for a
multipart/digest message inside a multipart/mixed message.

2 years agoMake quoting of shell arguments in grep.el more robust
Michael Albinus [Wed, 23 Mar 2022 18:54:53 +0000 (19:54 +0100)]
Make quoting of shell arguments in grep.el more robust

* lisp/progmodes/grep.el (grep-apply-setting)
(grep-compute-defaults): Adapt docstring.
(grep-quoting-style): New variable.
(grep-compute-defaults, grep-default-command)
(grep-expand-keywords, lgrep, rgrep-default-command): Use it.

2 years ago* doc/misc/eudc.texi (Inline Query Expansion): Unbreak it.
Glenn Morris [Wed, 23 Mar 2022 15:44:18 +0000 (08:44 -0700)]
* doc/misc/eudc.texi (Inline Query Expansion): Unbreak it.

2 years agoSupport changing remoteness of DIR in rgrep and lgrep
Michael Albinus [Wed, 23 Mar 2022 15:04:57 +0000 (16:04 +0100)]
Support changing remoteness of DIR in rgrep and lgrep

* lisp/net/tramp-sh.el (tramp-get-remote-dev-tty): New defun.
(tramp-sh-handle-make-process): Use it.

* lisp/progmodes/grep.el: Prefer #' to quote named functions.
(lgrep, rgrep): Recompute grep defaults when the remoteness of DIR
changes.

2 years agoImprovements to Haiku selection handling
Po Lu [Wed, 23 Mar 2022 14:15:22 +0000 (14:15 +0000)]
Improvements to Haiku selection handling

* lisp/term/haiku-win.el (haiku-selection-targets): Implement in Lisp.
* src/haiku_select.cc (be_get_message_type):
(be_set_message_type):
(be_get_message_message):
(be_add_message_message): New functions.

* src/haiku_support.cc (MessageReceived): Fix typo.
* src/haikuselect.c (haiku_selection_data_1)
(Fhaiku_selection_targets): Delete functions.
(haiku_message_to_lisp, lisp_to_type_code)
(haiku_lisp_to_message): Correctly decode and encode nested
messages, and fix encoding specially decoded types via numeric
names.  Also store and decode message types inside Lisp
messages.
(Fhaiku_drag_message): Update doc string.
(syms_of_haikuselect): Update subrs.
* src/haikuselect.h: Update prototypes.

2 years agoReinstate `C-M-<delete>'
Lars Ingebrigtsen [Wed, 23 Mar 2022 13:29:03 +0000 (14:29 +0100)]
Reinstate `C-M-<delete>'

* lisp/bindings.el (global-map): Reinstate `C-M-<delete>' and
`C-M-<backspace>' (bug#29430).  These used to kill X, but that
hasn't been the case in any common GNU/Linux distributions for
decades.

2 years agoFix image-mode-fit-frame resizing
Lars Ingebrigtsen [Wed, 23 Mar 2022 13:17:58 +0000 (14:17 +0100)]
Fix image-mode-fit-frame resizing

* lisp/image-mode.el (image-mode-fit-frame): Use pixel sizes
instead of lines/columns to get more accurate resizing (bug#37630).

2 years ago* lisp/term/pgtk-win.el: Update header comment.
Andreas Schwab [Wed, 23 Mar 2022 13:13:06 +0000 (14:13 +0100)]
* lisp/term/pgtk-win.el: Update header comment.

2 years agoFix hl-line tests
Po Lu [Wed, 23 Mar 2022 12:25:33 +0000 (20:25 +0800)]
Fix hl-line tests

* lisp/hl-line.el (hl-line-mode): Restore old setter.
* test/lisp/hl-line-tests.el (hl-line-tests-verify): Don't rely
`cl-some' always returning t on success.
(hl-line-tests-sticky-across-frames): Use correct global variable.

2 years ago* lisp/calendar/todo-mode.el: Restore old code.
Po Lu [Wed, 23 Mar 2022 08:51:01 +0000 (16:51 +0800)]
* lisp/calendar/todo-mode.el: Restore old code.

2 years agoRestore old hl-line code
Po Lu [Wed, 23 Mar 2022 08:48:49 +0000 (16:48 +0800)]
Restore old hl-line code

* lisp/hl-line.el: Restore old code to remove obsoletions.
(hl-line-overlay-priority): Make defcustom.

2 years agoAllow retrieving some more kinds of clipboard data on Haiku
Po Lu [Wed, 23 Mar 2022 08:17:49 +0000 (08:17 +0000)]
Allow retrieving some more kinds of clipboard data on Haiku

* src/haiku_select.cc (BClipboard_find_data): Handle NULL
characters inside data correctly.
(be_lock_clipboard_message, be_unlock_clipboard): New functions.
* src/haikuselect.c (Fhaiku_selection_data): Return entire
clipboard contents as a message when clipboard is NULL.
(haiku_lisp_to_message): Allow quitting when iterating through
potentially large or circular lists.
* src/haikuselect.h (enum haiku_clipboard): New enum.

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

The following commit was skipped:

c69a617742 Add notes about command modes and nativecomp interaction

2 years agoFix crash in haiku_message_to_lisp
Po Lu [Wed, 23 Mar 2022 04:01:01 +0000 (04:01 +0000)]
Fix crash in haiku_message_to_lisp

* src/haikuselect.c (haiku_message_to_lisp): Block input around
`free'.

2 years agoHandle quitting correctly during interprogram drag-and-drop
Po Lu [Wed, 23 Mar 2022 03:30:13 +0000 (11:30 +0800)]
Handle quitting correctly during interprogram drag-and-drop

* lisp/mouse.el (mouse-drag-and-drop-region): Handle quit
correctly by exiting the cross program drag and drop.

2 years ago* src/xterm.c (x_dnd_begin_drag_and_drop): Fix test against DND frame.
Po Lu [Wed, 23 Mar 2022 03:14:13 +0000 (11:14 +0800)]
* src/xterm.c (x_dnd_begin_drag_and_drop): Fix test against DND frame.

2 years agoDon't allocate duplicate cursors for each frame on Haiku
Po Lu [Wed, 23 Mar 2022 02:27:21 +0000 (02:27 +0000)]
Don't allocate duplicate cursors for each frame on Haiku

* src/haikufns.c (haiku_create_frame)
(haiku_free_frame_resources): Stop creating cursors.
* src/haikuterm.c (haiku_delete_terminal, haiku_term_init):
Create and free cursors here instead.
* src/haikuterm.h (struct haiku_display_info): New fields for
cursors.

2 years agoImprove DND documentation
Po Lu [Wed, 23 Mar 2022 01:26:23 +0000 (09:26 +0800)]
Improve DND documentation

* doc/lispref/frames.texi (Drag and Drop):
* src/xfns.c (Fx_begin_drag): Document meaning of
`XdndActionPrivate'.

2 years ago; * src/xterm.c (x_free_frame_resources): Fix typo in last change.
Po Lu [Wed, 23 Mar 2022 01:21:19 +0000 (09:21 +0800)]
; * src/xterm.c (x_free_frame_resources): Fix typo in last change.

2 years agoReported taken action correctly when dragging to another frame on X
Po Lu [Wed, 23 Mar 2022 01:21:04 +0000 (09:21 +0800)]
Reported taken action correctly when dragging to another frame on X

* src/xterm.c (x_dnd_cleanup_drag_and_drop, x_dnd_update_state)
(x_free_frame_resources, handle_one_xevent): Set
`x_dnd_end_window'.
(x_dnd_begin_drag_and_drop): Return `XdndActionPrivate' if the
drop landed on one of our own frames.

2 years agoRefactor gnus/nnselect artlist saving and getting
Andrew G Cohen [Tue, 22 Mar 2022 04:11:14 +0000 (12:11 +0800)]
Refactor gnus/nnselect artlist saving and getting

* lisp/gnus/nnselect.el (nnselect-generate-run): New function that
replaces nnselect-run.
(nnselect-store-artlist): New function.
(nnselect-get-artlist): Update function.
(nnselect-request-group, nnselect-request-thread)
(nnselect-request-create-group, nnselect-request-group-scan): Use the
new functions.
* doc/misc/gnus.texi (Selection Groups): Document artlist storage and
retrieval.

2 years agoNEWS copy edits
Lars Ingebrigtsen [Tue, 22 Mar 2022 22:48:34 +0000 (23:48 +0100)]
NEWS copy edits

2 years agoMention highlight-confusing-reorderings in doc string
Lars Ingebrigtsen [Tue, 22 Mar 2022 22:44:16 +0000 (23:44 +0100)]
Mention highlight-confusing-reorderings in doc string

* src/xdisp.c (Fbidi_find_overridden_directionality): Mention
highlight-confusing-reorderings.

2 years agoMention the other-window-scroll-default user option
Lars Ingebrigtsen [Tue, 22 Mar 2022 22:40:08 +0000 (23:40 +0100)]
Mention the other-window-scroll-default user option

* src/window.c (Fscroll_other_window): Link to
other-window-scroll-default in the doc string.

2 years agoDocument outline-default-state
Lars Ingebrigtsen [Tue, 22 Mar 2022 22:36:24 +0000 (23:36 +0100)]
Document outline-default-state

* doc/emacs/text.texi (Outline Visibility): Mention
outline-default-state.

2 years agoDo some NEWS tagging
Lars Ingebrigtsen [Tue, 22 Mar 2022 22:31:05 +0000 (23:31 +0100)]
Do some NEWS tagging

2 years agoDocument sqlite-mode-open-file and do some NEWS tagging
Lars Ingebrigtsen [Tue, 22 Mar 2022 22:28:00 +0000 (23:28 +0100)]
Document sqlite-mode-open-file and do some NEWS tagging

* doc/lispref/text.texi (Database): Mention sqlite-mode-open-file.

2 years agoEnable Better Alignment of EUDC Inline Expansion With RFC5322
Alexander Adolf [Mon, 14 Mar 2022 20:23:18 +0000 (21:23 +0100)]
Enable Better Alignment of EUDC Inline Expansion With RFC5322

The format of EUDC inline expansion results is formatted according to
the variable eudc-inline-expansion-format, which previously defaulted
to '("%s %s <%s>" firstname name email).

Since email address specifications need to comply with RFC 5322 in
order to be useful in messages, there was little headroom for users to
change this format anyway. Plus, if an EUDC back-end returned an empty
first and last name, the result was the email address in angle
brackets. Whilst this was standard with RFC 822, it is marked as
obsolete syntax by its successor RFC 5322. Also, the first and last
name part was never enclosed in double quotes, potentially producing
invalid address specifications, which may be rejected by a receiving
MTA.

This commit updates the variable eudc-inline-expansion-format, so that
it can, in addition to the current ("format" attributes) list, now
alternatively be set to nil, or a formatting function. In both cases
the resulting email address is formatted using the new function
eudc-rfc5322-make-address, whose results fully comply with RFC 5322.

If the value is nil (the new default value), eudc-rfc5322-make-address
will be called to produce any of the default formats

                               ADDRESS
                           FIRST <ADDRESS>
                            LAST <ADDRESS>
                         FIRST LAST <ADDRESS>

depending on whether a first and/or last name are returned by the
query, or not.

If the value is a formatting function, that will be called to allow
the user to supply content for the phrase and comment parts of the
address (cf. RFC 5322). Thus one can produce any of the formats:

                               ADDRESS
                           PHRASE <ADDRESS>
                          ADDRESS (COMMENT)
                      PHRASE <ADDRESS> (COMMENT)

This can for example be used to get "last, first <address>" instead of
the default "first last <address>".

In any case when using nil, or the formatting function, the phrase
part of the result will be enclosed in double quotes if needed, and
the comment part will be omitted if it contains characters not allowed
by RFC 5322.

When eudc-inline-expansion-format remains set to a list as previously,
the old behaviour is fully retained.

2 years agoFix two no-X compilation warnings
Lars Ingebrigtsen [Tue, 22 Mar 2022 20:14:21 +0000 (21:14 +0100)]
Fix two no-X compilation warnings

* lisp/mouse.el (x-hide-tip, x-show-tip): Declare to avoid no-X
build compilation warnings (bug#54524).

* lisp/term/pgtk-win.el (window-system-initialization): Avoid no-X
compilation warning.

2 years agoFix a keyboard.c no-X compilation warning
Lars Ingebrigtsen [Tue, 22 Mar 2022 20:09:16 +0000 (21:09 +0100)]
Fix a keyboard.c no-X compilation warning

* src/keyboard.c (make_lispy_position): Fix compilation warning in
a --without-x build.

2 years agoMake mail-header-parse-addresses-lax more lax
Lars Ingebrigtsen [Tue, 22 Mar 2022 19:13:31 +0000 (20:13 +0100)]
Make mail-header-parse-addresses-lax more lax

* lisp/mail/mail-parse.el (mail-header-parse-addresses-lax): Be
more resilient (bug#54523).

2 years agoFix Completion Options typo
Lars Ingebrigtsen [Tue, 22 Mar 2022 18:18:13 +0000 (19:18 +0100)]
Fix Completion Options typo

* doc/emacs/mini.texi (Completion Options): Fix typo.

2 years agoAdd a shell-filter-ring-bell function
Lars Ingebrigtsen [Tue, 22 Mar 2022 18:15:33 +0000 (19:15 +0100)]
Add a shell-filter-ring-bell function

* lisp/shell.el (shell-mode): Mention it.
(shell-filter-ring-bell): New function (bug#21652).

2 years agoFix documentation of the new completion-related features
Eli Zaretskii [Tue, 22 Mar 2022 17:56:06 +0000 (19:56 +0200)]
Fix documentation of the new completion-related features

* etc/NEWS:
* lisp/minibuffer.el (completion-auto-help):
* doc/lispref/text.texi (Special Properties):
* doc/emacs/mini.texi (Completion Options): Fix wording of
recently added documentation and customization options.

2 years agoRevert "Set cursor-face-highlight-nonselected-window in completions."
Jimmy Aguilar Mena [Tue, 22 Mar 2022 17:29:05 +0000 (18:29 +0100)]
Revert "Set cursor-face-highlight-nonselected-window in completions."

This reverts commit 1641b5c04c383b5f53298d70776e3c18577b6f30.

This fixes incorrect highlight in Completions.

2 years agoAdd user option for controlling dired-do-shell-command prompt
Allen Li [Tue, 22 Mar 2022 16:48:13 +0000 (17:48 +0100)]
Add user option for controlling dired-do-shell-command prompt

* doc/emacs/dired.texi (Shell Commands in Dired): Document option
* lisp/dired-aux.el (dired-confirm-shell-command): Add option
(dired-do-shell-command): Check option before prompting
(bug#29465).

2 years agoMake eshell link faces more distinctive on 8-color displays
Lars Ingebrigtsen [Tue, 22 Mar 2022 15:33:43 +0000 (16:33 +0100)]
Make eshell link faces more distinctive on 8-color displays

* lisp/eshell/em-ls.el (eshell-ls-directory):
(eshell-ls-symlink): Make the faces be distinctive on 8-colour
displays (bug#43615).

2 years agoRestore hl-line--buffer tracking
dickmao [Tue, 22 Mar 2022 14:59:11 +0000 (15:59 +0100)]
Restore hl-line--buffer tracking

* lisp/hl-line.el (hl-line-overlay, hl-line-overlay-buffer):
Correct replacement variable.
(hl-line--overlay): Clearer doc.
(hl-line--buffer): Nee hl-line-overlay-buffer
(hl-line-sticky-flag): Custom initialization is unfathomable.
(hl-line-mode, hl-line-unhighlight): Orthogonalize sticky.
(hl-line-highlight): Remove highlight from previous buffer.
* test/lisp/hl-line-tests.el (hl-line-sticky, hl-line-tests-verify):
(hl-line-tests-sticky-across-frames, hl-line-tests-sticky):
Test (bug#54481).

2 years agoRevert "Fix dependency problem in hl-line-sticky-flag"
Lars Ingebrigtsen [Tue, 22 Mar 2022 14:56:14 +0000 (15:56 +0100)]
Revert "Fix dependency problem in hl-line-sticky-flag"

This reverts commit 46daf70c4a7ce208ab0b3a7893c042fed5f022c2.

This is fixed differently in a subsequent patch.