]> git.eshelyaron.com Git - emacs.git/log
emacs.git
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.

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

* lisp/hl-line.el (hl-line-sticky-flag): Open-code
hl-line-unhighlight to avoid recursive dependencies (bug#54481).

2 years agoFix color-lighten-hsl logic
Lars Ingebrigtsen [Tue, 22 Mar 2022 14:28:02 +0000 (15:28 +0100)]
Fix color-lighten-hsl logic

* lisp/color.el (color-lighten-hsl): Lighten by percentage,
instead of just adding the specified number to the luminance
element (bug#54514).

2 years agoRevert todo-mode tests failing after todo-mode reversion
Lars Ingebrigtsen [Tue, 22 Mar 2022 14:04:37 +0000 (15:04 +0100)]
Revert todo-mode tests failing after todo-mode reversion

2 years agoAdd new function image-supported-file-p
Lars Ingebrigtsen [Tue, 22 Mar 2022 14:02:08 +0000 (15:02 +0100)]
Add new function image-supported-file-p

* lisp/image.el (image-type-from-file-name): Make obsolete.
(image-supported-file-p): New function that has a more sensible
value.
(image-type): Adjust caller.

* lisp/thumbs.el (thumbs-file-size, thumbs-show-image-num): Adjust
callers.

* lisp/mail/rmailmm.el (rmail-mime-set-bulk-data): Adjust caller
and logic.

2 years agoRevert "Allow using image-convert to view .bmp images"
Lars Ingebrigtsen [Tue, 22 Mar 2022 13:45:19 +0000 (14:45 +0100)]
Revert "Allow using image-convert to view .bmp images"

This reverts commit ede8ad507d06a336ce8202927f214aecbaf15d6b.

This leads to failures for usages of the function where
Emacs doesn't have support for the formats.

2 years agoSimplify fullscreen management on Haiku
Po Lu [Tue, 22 Mar 2022 11:26:46 +0000 (11:26 +0000)]
Simplify fullscreen management on Haiku

* src/haiku_support.cc (class EmacsWindow, Zoom, UnZoom): Track
zoom state manually instead of guessing what the system
currently thinks it is.
(MakeFullscreen): Always unzoom first.
* src/haiku_support.h (struct haiku_zoom_event): Remove all
fields and add a single field `zoomed'.
* src/haikufns.c (haiku_create_frame, haiku_create_tip_frame):
Remove use of pending_zoom fields.
* src/haikuterm.c (haiku_read_socket): Simplify handling of zoom
events.
(haiku_fullscreen): Simplify handling of different zoom states.
* src/haikuterm.h (struct haiku_output): Remove all pending_zoom
fields since they are no longer required.

2 years agoFix grep-like functions when running on a remote host
Michael Albinus [Tue, 22 Mar 2022 09:29:16 +0000 (10:29 +0100)]
Fix grep-like functions when running on a remote host

* doc/lispref/processes.texi (Shell Arguments):
* etc/NEWS: Describe change in 'shell-quote-argument'.  Fix typos.

* lisp/subr.el (shell-quote-argument): New optional argument POSIX.

* lisp/progmodes/grep.el (grep-compute-defaults)
(grep-default-command, grep-expand-keywords, lgrep)
(rgrep-default-command): Use POSIX argument in
`shell-quote-argument'.  (Bug#54487)

2 years ago* src/comp.c: Few improvements following 71b8f1fc635.
Andrea Corallo [Tue, 22 Mar 2022 08:32:57 +0000 (09:32 +0100)]
* src/comp.c: Few improvements following 71b8f1fc635.

* src/comp.c (ABI_VERSION): Update.
(Fcomp__register_lambda, Fcomp__register_subr): Remove unnecessary
check.
* src/comp.c (Fcomp__register_lambda, Fcomp__register_subr):
Remove unnecessary change.

2 years ago* src/xterm.c (x_dnd_get_window_proto): Don't return huge protocols.
Po Lu [Tue, 22 Mar 2022 08:26:11 +0000 (16:26 +0800)]
* src/xterm.c (x_dnd_get_window_proto): Don't return huge protocols.

2 years agoMerge branch 'feature/completions-customs'
Juri Linkov [Tue, 22 Mar 2022 08:22:46 +0000 (10:22 +0200)]
Merge branch 'feature/completions-customs'

2 years agoFix starting Emacs with -mm or -fs on Haiku
Po Lu [Tue, 22 Mar 2022 02:46:35 +0000 (02:46 +0000)]
Fix starting Emacs with -mm or -fs on Haiku

* src/haikuterm.c (haiku_set_window_size): Disallow setting the
window size if the frame is fullscreen, like most X window
managers.

2 years agoFix leak of saved menu event and output data
Po Lu [Tue, 22 Mar 2022 00:39:55 +0000 (08:39 +0800)]
Fix leak of saved menu event and output data

* src/xterm.c (x_destroy_window, x_free_frame_resources): Free
output data and saved menu event even if display is closed.

2 years agoFix unloading the hl-line library
Po Lu [Tue, 22 Mar 2022 00:22:41 +0000 (08:22 +0800)]
Fix unloading the hl-line library

* lisp/hl-line.el (hl-line-unload-function): Restore function.

2 years agoFix incompatible changes in hl-line
Po Lu [Tue, 22 Mar 2022 00:19:32 +0000 (08:19 +0800)]
Fix incompatible changes in hl-line

* lisp/hl-line.el (hl-line-face): Rename back to hl-line.
(hl-line-face): Restore defcustom.

2 years agoSmall fixes for new completions features
Juri Linkov [Mon, 21 Mar 2022 19:27:41 +0000 (21:27 +0200)]
Small fixes for new completions features

* lisp/minibuffer.el (completions-header-format):
Rename from completion-header-format.
(completions-highlight, completions-highlight-face):
Move up before first use.

2 years agoAdd new user option `diff-entire-buffers'
Lars Ingebrigtsen [Mon, 21 Mar 2022 18:28:14 +0000 (19:28 +0100)]
Add new user option `diff-entire-buffers'

* lisp/vc/diff.el (diff-entire-buffers): New user option (bug#54060).
(diff-file-local-copy): Use it.
(diff-buffers): Mention it in the doc string.

2 years agoDon't break autoload generation of `left-margin' isn't zero
Lars Ingebrigtsen [Mon, 21 Mar 2022 18:15:55 +0000 (19:15 +0100)]
Don't break autoload generation of `left-margin' isn't zero

* lisp/emacs-lisp/autoload.el (make-directory-autoloads): Fix
autoload generation breakage is left-margin isn't zero (bug#54491).

2 years agoMake `n' in image-mode work more reliably with external formats
Lars Ingebrigtsen [Mon, 21 Mar 2022 17:05:18 +0000 (18:05 +0100)]
Make `n' in image-mode work more reliably with external formats

* lisp/image-mode.el (image-mode): Init the external machinery so
that commands like `n' work for those files.
* lisp/image/image-converter.el (image-converter-initialize):
Factored out into own function.
(image-convert-p): Use it.
(image-convert): Ditto.

2 years agoAllow specifying the intermediate format
Lars Ingebrigtsen [Mon, 21 Mar 2022 16:51:21 +0000 (17:51 +0100)]
Allow specifying the intermediate format

* lisp/image/image-converter.el (image-convert-to-format): New
user format (bug#54494).
(image-convert, image-converter--convert-magick)
(image-converter--convert): Use it.

2 years agoAllow using image-convert to view .bmp images
Lars Ingebrigtsen [Mon, 21 Mar 2022 16:19:03 +0000 (17:19 +0100)]
Allow using image-convert to view .bmp images

* lisp/image.el (image-type-from-file-name): Allow Emacs to fall
back on image-convert to display .bmp images (bug#54492).

2 years agoRegenerated ldefs-boot.el
Lars Ingebrigtsen [Mon, 21 Mar 2022 15:14:40 +0000 (16:14 +0100)]
Regenerated ldefs-boot.el

2 years agoRewrite hl-line-mode
dickmao [Sun, 20 Mar 2022 15:34:56 +0000 (11:34 -0400)]
Rewrite hl-line-mode

The fashion of dual global and minor modes, each managing a replica of
state, has long been outmoded by globalized minor modes (nee
easy-mmode-define-global-mode) around the turn of the century.

* lisp/calendar/todo-mode.el (todo-toggle-item-highlighting,
todo-hl-line-range, todo-modes-set-2): Adapt to new
hl-line-highlight-hook.
* lisp/hl-line.el (hl-line-overlay): Rename hl-line--overlay.
(global-hl-line-overlay, global-hl-line-overlays,
global-hl-line-sticky-flag, hl-line-overlay-buffer,
hl-line-range-function): Obsolesce.
(hl-line--overlay): Erstwhile hl-line-overlay.
(hl-line, hl-line-face): Consolidate.
(hl-line-sticky-flag): Say less (Gen Z Hospital).
(hl-line-overlay-priority): Make this a custom.
(hl-line-highlight-hook): Prefer hook over specialized
hl-line-range-function.
(hl-line-mode): Say less (Gen Z Hospital).
(hl-line-make-overlay): Remove
(hl-line-highlight, hl-line-unhighlight): Rewrite.
(hl-line-maybe-unhighlight): Remove.
(hl-line-turn-on): Necessary for globalized minor mode.
(global-hl-line-mode, global-hl-line-highlight,
global-hl-line-highlight-all, global-hl-line-unhighlight,
global-hl-line-maybe-unhighlight, global-hl-line-unhighlight-all):
Prefer globalized minor mode.
(hl-line-move, hl-line-unload-function): Remove.
* test/lisp/calendar/todo-mode-tests.el (todo-test-item-highlighting,
todo-test-done-items-separator06-bol,
todo-test-done-items-separator06-eol,
todo-test-done-items-separator07): Adapt to consolidated face.

2 years agoAdd a new face shr-code
Lars Ingebrigtsen [Mon, 21 Mar 2022 15:01:33 +0000 (16:01 +0100)]
Add a new face shr-code

* lisp/net/shr.el (shr-code): New face (bug#54480).
(shr-tag-code): Use it.

2 years agoAdd notes about command modes and nativecomp interaction
Lars Ingebrigtsen [Mon, 21 Mar 2022 14:53:25 +0000 (15:53 +0100)]
Add notes about command modes and nativecomp interaction

* doc/lispref/commands.texi (Command Modes): Note interaction with
native-compile (bug#54437).

* src/data.c: Add comment about not being supported.

Do not merge to master.

2 years ago; * src/comp.c: Update a comment.
Andrea Corallo [Mon, 21 Mar 2022 14:04:49 +0000 (15:04 +0100)]
; * src/comp.c: Update a comment.

2 years agoMinor fixes to Haiku DND support
Po Lu [Mon, 21 Mar 2022 09:00:38 +0000 (09:00 +0000)]
Minor fixes to Haiku DND support

* src/haiku_support.cc (MessageReceived): If source is remote,
don't test window ID.
(MouseMoved): Don't send mouse motion if dragging.
(be_drag_message): Return true if quit-flag.
* src/haiku_support.h: Update prototypes.
* src/haikuselect.c (haiku_should_quit_drag): New function.
(Fhaiku_drag_message): If rc is true, quit.

2 years agoSet cursor-face-highlight-nonselected-window in completions.
Jimmy Aguilar Mena [Mon, 21 Mar 2022 06:55:03 +0000 (07:55 +0100)]
Set cursor-face-highlight-nonselected-window in completions.

* lisp/simple.el (completion-setup-function) : Sets
cursor-face-highlight-nonselected-window to t in Completions.

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

f15922a57c Update to Org 9.5.2-25-gaf6f12
9fcdd5b63f Improve doc strings of read-char-from-minibuffer-insert-* ...

2 years agoImprove handling of input methods during drag-and-drop
Po Lu [Mon, 21 Mar 2022 03:48:36 +0000 (11:48 +0800)]
Improve handling of input methods during drag-and-drop

* src/xterm.c (x_dnd_cleanup_drag_and_drop)
(x_dnd_begin_drag_and_drop): Stop removing IC and filter events
before dispatching them.
(x_filter_event): Actually filter events during DND.
(XTread_socket): Verify GenericEvents are actually input
extension events before ignoring them.

2 years agoMake quitting work while DND is waitng for finish
Po Lu [Mon, 21 Mar 2022 01:32:54 +0000 (09:32 +0800)]
Make quitting work while DND is waitng for finish

* src/xterm.c (x_dnd_cleanup_drag_and_drop):
(x_dnd_begin_drag_and_drop, handle_one_xevent)
(x_free_frame_resources): Clear waiting for finish flag.
(x_filter_event): Don't filter if waiting for DND finish as
well.

2 years agoUpdate to Org 9.5.2-25-gaf6f12
Kyle Meyer [Mon, 21 Mar 2022 01:31:32 +0000 (21:31 -0400)]
Update to Org 9.5.2-25-gaf6f12

2 years agoSupport indentation of Ruby pattern matching expressions
Dmitry Gutov [Mon, 21 Mar 2022 01:18:36 +0000 (03:18 +0200)]
Support indentation of Ruby pattern matching expressions

* lisp/progmodes/ruby-mode.el (ruby-smie-grammar, ruby-smie-rules)
(ruby-block-mid-keywords): Treat 'in' token similarly to 'when'.

* test/lisp/progmodes/ruby-mode-resources/ruby.rb:
Add indentation example.

2 years agoFix imap fetching multiple mailboxes (bug#54158)
Andrew G Cohen [Sun, 20 Mar 2022 05:49:37 +0000 (13:49 +0800)]
Fix imap fetching multiple mailboxes (bug#54158)

* lisp/gnus/mail-source.el (mail-source-fetch-imap): Variables
mailbox-source-string and remove should be reset for each mailbox.

2 years ago* etc/NEWS: Mention new hook 'minibuffer-lazy-highlight-setup'.
Juri Linkov [Sun, 20 Mar 2022 20:27:17 +0000 (22:27 +0200)]
* etc/NEWS: Mention new hook 'minibuffer-lazy-highlight-setup'.

2 years agoAdd lazy highlight to 'isearch-edit-string'
Augusto Stoffel [Sun, 20 Mar 2022 19:49:32 +0000 (20:49 +0100)]
Add lazy highlight to 'isearch-edit-string'

* lisp/isearch.el (isearch-edit-string): Activate lazy highlight and
lazy count, provided 'isearch-lazy-highlight' respectively
'isearch-lazy-count' are non-nil.

2 years agoAllow lazy highlight and match count while reading from minibuffer
Augusto Stoffel [Sun, 20 Mar 2022 19:46:31 +0000 (20:46 +0100)]
Allow lazy highlight and match count while reading from minibuffer

* lisp/isearch.el (minibuffer-lazy-highlight-setup): New function, can
be added to 'minibuffer-setup-hook' to enable lazy highlight and count
while reading from minibuffer.
(minibuffer-lazy-count-format, minibuffer-lazy-highlight-transform,
minibuffer-lazy-highlight--overlay, minibuffer-lazy-highlight--count,
minibuffer-lazy-highlight--after-change,
minibuffer-lazy-highlight--exit): Auxiliary variables and functions
implementing the lazy highlight functionality while reading from
minibuffer.

2 years agoNew hook, lazy-count-update-hook
Augusto Stoffel [Sun, 20 Mar 2022 19:43:10 +0000 (20:43 +0100)]
New hook, lazy-count-update-hook

* lisp/isearch.el (lazy-count-update-hook): New hook allowing to
display the lazy count in special ways.
(isearch-lazy-highlight-new-loop,
isearch-lazy-highlight-buffer-update): Run `lazy-count-update-hook' at
appropriate times.
* lisp/comint.el (comint-history-isearch-setup,
comint-history-isearch-end): Make sure no lazy count is displayed.
* lisp/simple.el (minibuffer-history-isearch-setup): Make sure no lazy
count is displayed.

2 years ago* lisp/tab-bar.el (tab-bar-new-tab-to): Don't funcall const values.
Juri Linkov [Sun, 20 Mar 2022 18:59:04 +0000 (20:59 +0200)]
* 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.

2 years agoExtend connection-local variables example in Elisp manual
Michael Albinus [Sun, 20 Mar 2022 18:15:53 +0000 (19:15 +0100)]
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.

2 years agoRemove duplicate INLINE_HEADER_BEGIN
Paul Eggert [Sun, 20 Mar 2022 17:46:06 +0000 (10:46 -0700)]
Remove duplicate INLINE_HEADER_BEGIN

* src/thread.h: Remove duplicate INLINE_HEADER_BEGIN.
Problem reportd by Mattias EngdegĂ„rd.

2 years agoImprove doc strings of read-char-from-minibuffer-insert-* commands
Eli Zaretskii [Sun, 20 Mar 2022 16:21:44 +0000 (18:21 +0200)]
Improve doc strings of read-char-from-minibuffer-insert-* commands

* lisp/subr.el (read-char-from-minibuffer-insert-char)
(read-char-from-minibuffer-insert-other): Clarify the doc strings.
(Bug#54479)

2 years agoFix confusion of wanted action with actual action on X
Po Lu [Sun, 20 Mar 2022 13:19:31 +0000 (21:19 +0800)]
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.

2 years agoFix wrong password stored in Tramp
Manuel Giraud [Sun, 20 Mar 2022 10:08:31 +0000 (11:08 +0100)]
Fix wrong password stored in Tramp

* lisp/net/tramp.el (tramp-process-actions):
Unset `tramp-password-save-function'.

2 years agoMake DND between frames work properly
Po Lu [Sun, 20 Mar 2022 08:21:45 +0000 (16:21 +0800)]
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.

2 years agoImprove compliance with version 5 of the XDND specification
Po Lu [Sun, 20 Mar 2022 07:00:36 +0000 (15:00 +0800)]
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.

2 years agoFix some crashes in shut_down_emacs on Haiku
Po Lu [Sun, 20 Mar 2022 05:53:30 +0000 (05:53 +0000)]
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.

2 years agoImplement `haiku_delete_terminal'
Po Lu [Sun, 20 Mar 2022 05:51:19 +0000 (05:51 +0000)]
Implement `haiku_delete_terminal'

* src/haikuterm.c (haiku_delete_terminal): Actually delete the
terminal instead of aborting.

2 years agoCheck list tail properly in x-begin-drag
Po Lu [Sun, 20 Mar 2022 04:51:46 +0000 (12:51 +0800)]
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.

2 years agoFix crash on some compositing managers
Po Lu [Sun, 20 Mar 2022 03:23:11 +0000 (11:23 +0800)]
Fix crash on some compositing managers

* src/xterm.c (x_dnd_get_target_window): Catch errors around
CompositeReleaseOverlayWindow.

2 years agoImprove behaviour of drag-n-drop during window manager operations
Po Lu [Sun, 20 Mar 2022 01:53:52 +0000 (09:53 +0800)]
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'.

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 19 Mar 2022 20:18:47 +0000 (22:18 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years agoPort to gcc -D EMACS_EXTERN_INLINE
Paul Eggert [Sat, 19 Mar 2022 19:35:04 +0000 (12:35 -0700)]
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.