]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoEnlarge max-specpdl-size for generation of leim-list.el in bootstrap
Alan Mackenzie [Sun, 30 Jan 2022 16:32:21 +0000 (16:32 +0000)]
Enlarge max-specpdl-size for generation of leim-list.el in bootstrap

* leim/Makefile.in (${leimdir}/leim-list.el): Add a --eval clause to set
max-specpdl-size to 5000 (previously 2500) for this target.

3 years agoHandle correctly errors during frame creation on Haiku
Po Lu [Sun, 30 Jan 2022 13:23:52 +0000 (13:23 +0000)]
Handle correctly errors during frame creation on Haiku

* src/haikufns.c (haiku_create_frame): Only block input where
required.

* src/haiku_support.cc (BCursor_delete): Accept NULL values of
`cursor'.

3 years agoUse XRender to composite fringe bitmaps
Po Lu [Sun, 30 Jan 2022 08:02:58 +0000 (16:02 +0800)]
Use XRender to composite fringe bitmaps

This will allow us to apply transforms such as scaling in the
future.

* src/xterm.c (x_draw_fringe_bitmap): Composite fringe bitmaps
with XRender if available.

3 years agoFix some problems with inconsistent visuals on GDK
Po Lu [Sun, 30 Jan 2022 06:02:40 +0000 (14:02 +0800)]
Fix some problems with inconsistent visuals on GDK

* src/xterm.c (x_xr_ensure_picture): Use the visual GDK used
instead of our own.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Sun, 30 Jan 2022 05:31:11 +0000 (06:31 +0100)]
Merge from origin/emacs-28

e81e375539 ; Yet another minor fix of Malayalam composition rules.
94f38cbec4 Fix last change of Malayalam composition rules
ed3bbeb80d Fix rendering of Malayalam script
5ef3a52342 Improve documentation of Occur mode

3 years agoUse consistent font when displaying menu equivalent keys on Haiku
Po Lu [Sun, 30 Jan 2022 05:20:15 +0000 (05:20 +0000)]
Use consistent font when displaying menu equivalent keys on Haiku

* src/haiku_support.cc (DrawContent): Set plain font when
drawing key text.

3 years agoAdd support for ARGB visuals on non-Xt builds
Po Lu [Sun, 30 Jan 2022 01:23:40 +0000 (09:23 +0800)]
Add support for ARGB visuals on non-Xt builds

* src/gtkutil.c (xg_create_frame_widgets): Enable RGBA visual
on non-PGTK builds.
* src/xfns.c (select_visual): Select 32-bit visuals on non-Xt
builds.
* src/xterm.c (x_draw_fringe_bitmap):
(x_draw_image_glyph_string): Stop using DefaultDepthOfScreen.
(x_query_colors):
* src/xterm.h (x_make_truecolor_pixel): Make colors opaque on
32-bit visuals.

3 years agoSome adjustments to last change
Po Lu [Sun, 30 Jan 2022 00:51:13 +0000 (08:51 +0800)]
Some adjustments to last change

* src/gtkutil.c (xg_set_undecorated): Only set ARGB visual on
Cairo builds wtihout PGTK.
* src/xfns.c (select_visual): Likewise.

3 years agoAdd background transparency support for GTK+Cairo
Håkon Flatval [Sat, 29 Jan 2022 15:13:06 +0000 (16:13 +0100)]
Add background transparency support for GTK+Cairo

3 years agopackage.el: Fix bug#53529
Stefan Monnier [Sat, 29 Jan 2022 22:50:02 +0000 (17:50 -0500)]
package.el: Fix bug#53529

* lisp/emacs-lisp/package.el (package-autoload-ensure-default-file):
Enforce Unix EOLs.

3 years ago; Yet another minor fix of Malayalam composition rules.
Eli Zaretskii [Sat, 29 Jan 2022 20:14:30 +0000 (22:14 +0200)]
; Yet another minor fix of Malayalam composition rules.

3 years agoFix last change of Malayalam composition rules
Eli Zaretskii [Sat, 29 Jan 2022 19:56:53 +0000 (21:56 +0200)]
Fix last change of Malayalam composition rules

* lisp/language/indian.el (malayalam-composable-pattern):
Reinstate.  Instead of removing it, add any sequence of
Malayalam characters to the existing patterns, so as not
to lose the patterns that use ZWJ and ZWNJ.  (Bug#53625)

3 years agoFix rendering of Malayalam script
Eli Zaretskii [Sat, 29 Jan 2022 19:22:02 +0000 (21:22 +0200)]
Fix rendering of Malayalam script

* lisp/language/indian.el (malayalam-composable-pattern): Remove.
(script-regexp-alist): Remove 'malayalam-composable-pattern'.
Instead, pass any sequence of Malayalam codepoints to the shaping
engine.  (Bug#53625)

3 years ago* lisp/tab-bar.el (tab-bar-menu-bar-button): New variable (bug#51648).
Juri Linkov [Sat, 29 Jan 2022 19:05:55 +0000 (21:05 +0200)]
* lisp/tab-bar.el (tab-bar-menu-bar-button): New variable (bug#51648).

(tab-bar-format-menu-bar): Use it.

3 years ago* lisp/isearch.el: Put 'isearch-scroll' property on two new symbols.
Juri Linkov [Sat, 29 Jan 2022 18:55:17 +0000 (20:55 +0200)]
* lisp/isearch.el: Put 'isearch-scroll' property on two new symbols.

Put 'isearch-scroll' property on new commands 'recenter-other-window'
and 'context-menu-open'.

3 years ago; * lisp/subr.el (use-dialog-box-p): Fix typo.
Eli Zaretskii [Sat, 29 Jan 2022 17:18:26 +0000 (19:18 +0200)]
; * lisp/subr.el (use-dialog-box-p): Fix typo.

3 years agoModernise the security section in the efaq a bit
Lars Ingebrigtsen [Sat, 29 Jan 2022 16:49:52 +0000 (17:49 +0100)]
Modernise the security section in the efaq a bit

* doc/misc/efaq.texi (Security risks with Emacs): Remove the X
bit, and add a bit about browsing the web (bug#24489).

3 years agoAllow redirecting `message' output to a different buffer
Lars Ingebrigtsen [Sat, 29 Jan 2022 16:23:48 +0000 (17:23 +0100)]
Allow redirecting `message' output to a different buffer

* doc/lispref/display.texi (Logging Messages): Document it.
* src/xdisp.c (message_dolog): Add sanity checking.
(syms_of_xdisp): Make Vmessages_buffer_name into a defvar
(bug#27170).

3 years ago; Fix formatting of last change.
Eli Zaretskii [Sat, 29 Jan 2022 15:56:30 +0000 (17:56 +0200)]
; Fix formatting of last change.

3 years agoDon't require mouse for prompting via dialog boxes
Eli Zaretskii [Sat, 29 Jan 2022 15:54:43 +0000 (17:54 +0200)]
Don't require mouse for prompting via dialog boxes

* lisp/subr.el (use-dialog-box-p): Don't require mouse support,
and allow dialog boxes when invoked via the TTY menus without a
mouse.
(from--tty-menu-p): New internal variable.

* lisp/menu-bar.el (popup-menu): Bind 'from--tty-menu-p' when
invoking a command from the menu.

3 years agoMake revert-buffer ('g') keep point in VC diff buffers
Charles A. Roelli [Sat, 29 Jan 2022 15:47:52 +0000 (16:47 +0100)]
Make revert-buffer ('g') keep point in VC diff buffers

* lisp/vc/vc.el (vc-diff-restore-buffer): New function.
(vc-diff-finish): Update its calling convention to include an
optional 'oldbuf' parameter, and handle it.
(vc-diff-internal): Pass a clone of the incumbent vc-diff
buffer to 'vc-diff-finish' (bug#28852).

3 years agoClarify Fmatch_data doc string
Lars Ingebrigtsen [Sat, 29 Jan 2022 15:39:48 +0000 (16:39 +0100)]
Clarify Fmatch_data doc string

* src/search.c (Fmatch_data): Note quirk about non-matching
optional groups in the doc string (bug#29343).

3 years agoImprove documentation of Occur mode
Eli Zaretskii [Sat, 29 Jan 2022 14:51:30 +0000 (16:51 +0200)]
Improve documentation of Occur mode

* doc/emacs/search.texi (Other Repeating Search): Improve wording
and document Occur Edit mode better.

3 years agoMake gnus-icalendar-with-decoded-handle more DWIM
Jae-hyeon Park [Sat, 29 Jan 2022 14:44:44 +0000 (15:44 +0100)]
Make gnus-icalendar-with-decoded-handle more DWIM

* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-with-decoded-handle): Assume that calendars with
no charset is utf-8.

Copyright-paperwork-exempt: yes

3 years agoFix error after merge
Po Lu [Sat, 29 Jan 2022 12:38:13 +0000 (20:38 +0800)]
Fix error after merge

* src/filelock.c (lock_file): Fix test against I_OWN_IT.

3 years agoMerge from origin/emacs-28
Po Lu [Sat, 29 Jan 2022 12:37:24 +0000 (20:37 +0800)]
Merge from origin/emacs-28

611736f3bc Remove debug logging
ddba3c3dba Fix error in filelock.c

# Conflicts:
# src/filelock.c

3 years agoRemove debug logging
Alan Third [Thu, 28 Oct 2021 10:21:00 +0000 (11:21 +0100)]
Remove debug logging

* src/nsterm.m ([EmacsView copyRect:to:]): Remove logging as it's no
longer required.

3 years agoFix error at startup with recent change
Po Lu [Sat, 29 Jan 2022 11:08:52 +0000 (19:08 +0800)]
Fix error at startup with recent change

* lisp/startup.el (normal-top-level): Don't access
`native-comp-eln-load-path' if not (featurep 'native-compile).

3 years agoFix unrelated help text tooltips if a popup is shown during the delay
Po Lu [Sat, 29 Jan 2022 10:53:28 +0000 (18:53 +0800)]
Fix unrelated help text tooltips if a popup is shown during the delay

* doc/lispref/frames.texi (Pop-Up Menus): Document new hook.
* etc/NEWS: Announce `x-pre-popup-menu-hook'.
* lisp/tooltip.el (tooltip-mode): Make sure `tooltip-hide' is
run before any popup menu is displayed to prevent unrelated help
text from obscuring the popup menu if it pops up during the
tooltip delay.
* src/menu.c (x_popup_menu_1): Run said hook right before the
popup menu is displayed.
(syms_of_menu): New hook `x-pre-popup-menu-hook'.

3 years agoFix error in filelock.c
Michael Albinus [Sat, 29 Jan 2022 10:45:38 +0000 (11:45 +0100)]
Fix error in filelock.c

* src/filelock.c (lock_file): Move call of file name handler to
`Flock_file'.  Determine lock_filename only in case
create_lockfiles is non-nil.  Adapt the rest of the function accordingly.
(Flock_file): Do not check for create_lockfiles.  Call file name
handler if appropriate.  (Bug#53207)

3 years agoAllow <Delete> key to delete entire grapheme clusters
Eli Zaretskii [Sat, 29 Jan 2022 10:19:23 +0000 (12:19 +0200)]
Allow <Delete> key to delete entire grapheme clusters

* lisp/simple.el (delete-forward-char): If deleting forward,
delete complete grapheme clusters as single units.

* etc/NEWS: Announce the change.

3 years agoFix native-compilation at startup
Eli Zaretskii [Sat, 29 Jan 2022 09:55:02 +0000 (11:55 +0200)]
Fix native-compilation at startup

* lisp/startup.el (normal-top-level): Set up the initial value of
'native-comp-eln-load-path' early into startup, then amend it
after calling 'command-line'.  (Bug#53497)

3 years agoWrite a dummy event on each popup menu event
Po Lu [Sat, 29 Jan 2022 07:35:48 +0000 (07:35 +0000)]
Write a dummy event on each popup menu event

* src/haiku_io.c (haiku_len): Add new event.
* src/haiku_support.cc (be_popup_menu_thread_entry):
(Highlight): Write a dummy event to the event port.
* src/haiku_support.h (enum haiku_event_type): New `DUMMY_EVENT'
type.
(struct haiku_dummy_event): New structure.
* src/haikuterm.c (haiku_read_socket): Handle dummy events.

3 years agoFix compiler warning due to a recent change
Eli Zaretskii [Sat, 29 Jan 2022 07:12:30 +0000 (09:12 +0200)]
Fix compiler warning due to a recent change

* src/data.c (Ffset): Avoid compiler warning about 'function'.

3 years agoFix a default value of the `:underline' face attribute
Po Lu [Sat, 29 Jan 2022 06:05:49 +0000 (14:05 +0800)]
Fix a default value of the `:underline' face attribute

* lisp/cus-face.el (custom-face-attributes): Add `:position' t
default value of "On" for underlines.

3 years agoImprove menu drag tracking on Haiku
Po Lu [Sat, 29 Jan 2022 05:50:32 +0000 (05:50 +0000)]
Improve menu drag tracking on Haiku

* src/haikuterm.c (haiku_read_socket): Ignore all button events
when popup_activated_p.

3 years agoMake menus on Haiku work better
Po Lu [Sat, 29 Jan 2022 05:24:04 +0000 (05:24 +0000)]
Make menus on Haiku work better

* src/haikuterm.c (haiku_read_socket): Don't send up events for
ungrabbed buttons.

3 years agoImplement real menu help-echo text on Haiku
Po Lu [Sat, 29 Jan 2022 05:06:02 +0000 (05:06 +0000)]
Implement real menu help-echo text on Haiku

* lisp/tooltip.el (tooltip-show-help): Remove Haiku-specific
conditional since that's now taken care of by C code.

* src/haiku_io.c (haiku_read_size):
(haiku_read_with_timeout):
(haiku_write_without_signal): Add parameter `popup_p'.  All
callers changed.
(port_popup_menu_to_emacs): New variable.

* src/haiku_support.cc (struct be_popup_menu_data): New
structure.
(be_popup_menu_thread_entry): New function.
(class EmacsMenuItem): New field `menu_ptr'.
(Highlight): Send help text to the popup port if this item
isn't for a menu bar.
(BMenu_add_item): Set menu_ptr appropriately.
(BMenu_run): Complete rewrite that allows to read help text from
the menu bar port.

* src/haiku_support.h (struct haiku_menu_bar_help_event): New
fields for popup menus.

* src/haikumenu.c (digest_menu_items): Only set help tooltip on
popup menus when system tooltips are enabled.
(haiku_menu_show_help):
(haiku_process_pending_signals_for_menu): New functions.
(haiku_menu_show): Pass new callbacks.

3 years ago* src/data.c (Ffset, defalias): Complete last change
Stefan Monnier [Sat, 29 Jan 2022 04:39:31 +0000 (23:39 -0500)]
* src/data.c (Ffset, defalias): Complete last change

Somehow part of the autoload history handling was left behind in `Ffset`
when the rest was moved to `defalias`.  Finish the job.

* src/data.c (Ffset): Don't set the `autoload` property here...
(defalias): ... set it here instead.

3 years agoReduce code duplication in parts of (auto)load&defalias
Stefan Monnier [Fri, 28 Jan 2022 18:19:11 +0000 (13:19 -0500)]
Reduce code duplication in parts of (auto)load&defalias

* src/data.c (defalias): New function, extracted from `Fdefalias`.
(Fdefalias): Use it.
(Ffset): Don't handle `Vautoload_queue` here, handle it in
`defalias` instead.
* src/comp.c (comp--register-subr): Use `defalias` instead of
duplicating its code.

* src/eval.c (load_with_autoload_queue): New function, extracted from
`Fautoload_do_load`.
(Fautoload_do_load): Use it.
(un_autoload): Mark it as static.
* src/fns.c (Frequire): Use it as well.

* src/lisp.h (defalias, load_with_autoload_queue): New declarations.
(un_autoload): Remove declaration.

3 years agoMake where-is correctly identify aliases
Sebastian Urban [Fri, 28 Jan 2022 16:27:28 +0000 (17:27 +0100)]
Make where-is correctly identify aliases

* lisp/help.el (where-is): Make aliases correctly say which
function is an alias for what (bug#37325).

3 years agoFix manual points about tex-latex-block/latex-insert-block
Sebastian Urban [Fri, 28 Jan 2022 16:12:35 +0000 (17:12 +0100)]
Fix manual points about tex-latex-block/latex-insert-block

* doc/emacs/text.texi (LaTeX Editing):
(LaTeX Editing): Update documentation of
tex-latex-block/latex-insert-block to what they really point to
(bug#37325).

Copyright-paperwork-exempt: yes

3 years agoImprove the read-file-name doc string slightly
Lars Ingebrigtsen [Fri, 28 Jan 2022 16:03:14 +0000 (17:03 +0100)]
Improve the read-file-name doc string slightly

* lisp/minibuffer.el (read-file-name): Note that the semantics of
INITIAL are odd (bug#37883).

3 years agoClarify where the shell-command output goes
Michael Albinus [Fri, 28 Jan 2022 15:32:15 +0000 (16:32 +0100)]
Clarify where the shell-command output goes

* lisp/simple.el (shell-command):
* doc/emacs/misc.texi (Single Shell): Clarify where the output
goes if the specified buffer isn't the current one (bug#40896).

3 years agoAllow using dired-hide-details-mode in wdired buffers
Lars Ingebrigtsen [Fri, 28 Jan 2022 14:56:05 +0000 (15:56 +0100)]
Allow using dired-hide-details-mode in wdired buffers

* lisp/dired.el (dired-hide-details-mode): Also work in
wdired-mode buffers (bug#45127).

* lisp/wdired.el (wdired-mode-map): Add a key binding.

3 years agoMove native-comp-eln-load-path setting earlier again
Lars Ingebrigtsen [Fri, 28 Jan 2022 14:26:39 +0000 (15:26 +0100)]
Move native-comp-eln-load-path setting earlier again

* lisp/startup.el (normal-top-level): Move
`native-comp-eln-load-path' earlier because hooks called may need
the setting (bug#53596).

3 years agoFix copyright-fix-years, use a dash to separate years in a range
Lele Gaifax [Fri, 28 Jan 2022 07:41:51 +0000 (08:41 +0100)]
Fix copyright-fix-years, use a dash to separate years in a range

Commit 7a46fa9c751f7c3147cd9b27fe84c1ce25419d3b, allowing en-dash as
years separator, changed the way the years range is composed taking the
separator from the `sep' variable instead of always using an hardwired
hyphen. Since the code explicitly avoid to touch (that is, extend)
existing ranges, that `sep' variable is almost always a space, or
whatever character precedes the last parsed year, thus generating a
range like "2020 2022" instead of "2020-2022".

* lisp/emacs-lisp/copyright.el (copyright-fix-years): Always use an dash
to separate years in a range.

* test/lisp/emacs-lisp/copyright-tests.el (with-copyright-fix-years-test):
(copyright-fix-years-tests--data):
(text-copyright-fix-years): New test cases (bug#53597).

3 years agoFix merge error in doc-view-pdf/ps->png
Lars Ingebrigtsen [Fri, 28 Jan 2022 13:47:15 +0000 (14:47 +0100)]
Fix merge error in doc-view-pdf/ps->png

* lisp/doc-view.el (doc-view-pdf/ps->png): Fix merge error from
previous epub patch.

3 years agoPrevent duplicate grab setting with xwidgets
Po Lu [Fri, 28 Jan 2022 09:49:38 +0000 (17:49 +0800)]
Prevent duplicate grab setting with xwidgets

* src/xwidget.c (xwidget_show_view): Don't set passive grab if
already set.

3 years agoUse the real cursor beneath the pointer on xwidgets
Po Lu [Fri, 28 Jan 2022 08:38:02 +0000 (16:38 +0800)]
Use the real cursor beneath the pointer on xwidgets

* src/xwidget.c (define_cursors): Make manual cursor definition
code PGTK-only.
(xw_update_cursor_for_view):
(xw_last_crossing_cursor_cb): New functions.
(xw_maybe_synthesize_crossing): Attach and disconnect cursor
signal handler where appropriate.
(xwidget_init_view): Set the default cursor to the nontext
cursor.
(Fxwidget_delete_view): Disconnect last crossing signal if
appropriate.
* src/xwidget.h (struct xwidget_view): New field
`last_crossing_cursor_signal'.

3 years agoFix xwidget build on PGTK
Po Lu [Fri, 28 Jan 2022 08:08:10 +0000 (16:08 +0800)]
Fix xwidget build on PGTK

* src/xwidget.c (xw_forward_event_translate): Adjust calls to
`find_widget_at_pos' for recent changes.

3 years ago; Rename 'startup--require-comp-safetly'
Eli Zaretskii [Fri, 28 Jan 2022 07:37:28 +0000 (09:37 +0200)]
; Rename 'startup--require-comp-safetly'

* src/comp.c (maybe_defer_native_compilation):
* lisp/startup.el (startup--require-comp-safely): Rename from
'startup--require-comp-safetly'.  All callers changed.

3 years ago; Fix a typo in recent documentation changes
Eli Zaretskii [Fri, 28 Jan 2022 07:30:04 +0000 (09:30 +0200)]
; Fix a typo in recent documentation changes

* doc/lispref/os.texi (Startup Summary):
* doc/emacs/cmdargs.texi (Initial Options): Fix a typo.

3 years agoFix duplicate scroll events without XI2
Po Lu [Fri, 28 Jan 2022 06:06:38 +0000 (14:06 +0800)]
Fix duplicate scroll events without XI2

* src/xwidget.c (xwidget_button): Only generate scroll events
when the button was released.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Fri, 28 Jan 2022 05:32:22 +0000 (06:32 +0100)]
Merge from origin/emacs-28

3dd47bde7a * lisp/frame.el (clone-frame): Filter out 'parent-id' (bug...

3 years agoClear xwidget passive grab whenever a drag begins
Po Lu [Fri, 28 Jan 2022 03:08:20 +0000 (11:08 +0800)]
Clear xwidget passive grab whenever a drag begins

* src/xwidget.c (xv_drag_begin_cb): New function.
(xwidget_view_from_window): Attach said function to grab widget
when a grab starts.
* src/xwidget.h (struct xwidget_view): New field
`passive_grab_drag_signal'.

3 years ago* src/xterm.c (handle_one_xevent): Remove obsolete workaround.
Po Lu [Fri, 28 Jan 2022 02:51:33 +0000 (10:51 +0800)]
* src/xterm.c (handle_one_xevent): Remove obsolete workaround.

3 years agoFix inappropriate use of killed xwidgets
Po Lu [Fri, 28 Jan 2022 02:48:12 +0000 (10:48 +0800)]
Fix inappropriate use of killed xwidgets

* src/xwidget.c (x_draw_xwidget_webkit_view): Don't record
embedder or synthesize focus events if the widget is killed.

3 years agoImplement xwidget passive grabs
Po Lu [Fri, 28 Jan 2022 02:41:03 +0000 (10:41 +0800)]
Implement xwidget passive grabs

* src/xwidget.c (find_widget_at_pos): New parameters for
controlling whether to respect grabs.  All callers changed.
(window_coords_from_toplevel): Make work when the widget is
the toplevel.
(find_widget): Fix coding style.
(xwidget_button_1): Set and clear passive grabs if appropriate.
(xw_maybe_synthesize_crossing): Allow current_window to be NULL
if the mode is XW_CROSSING_LEFT.

3 years agoAdd new switch --init-directory
Lars Ingebrigtsen [Thu, 27 Jan 2022 22:38:13 +0000 (23:38 +0100)]
Add new switch --init-directory

* doc/emacs/cmdargs.texi (Initial Options): Mention it.
* lisp/startup.el (normal-top-level): Move the eln init to after
we've processed the command line arguments.
(command-line): Interpret the --init-directory switch.

* src/emacs.c (standard_args): Add.

3 years ago* lisp/doc-view.el (doc-view-epub-font-size): Fix type; add version.
Glenn Morris [Thu, 27 Jan 2022 22:21:15 +0000 (14:21 -0800)]
* lisp/doc-view.el (doc-view-epub-font-size): Fix type; add version.

Flagged by test-custom-opts.

3 years agoFix potential native compiler circular dependencies during load
Andrea Corallo [Thu, 27 Jan 2022 17:18:13 +0000 (18:18 +0100)]
Fix potential native compiler circular dependencies during load

* lisp/startup.el (startup--require-comp-safetly): New function.
(startup--honor-delayed-native-compilations): Make use of
`startup--require-comp-safetly'.
* src/comp.c (CALL0I): New define.
(maybe_defer_native_compilation): Make use of
`startup--require-comp-safetly'.

3 years agoFix up previous "Quit Emacs" from menu logic
Lars Ingebrigtsen [Thu, 27 Jan 2022 21:26:12 +0000 (22:26 +0100)]
Fix up previous "Quit Emacs" from menu logic

* lisp/files.el (files--buffers-needing-to-be-saved): Separated
out into its own function...
(save-some-buffers): ... from here.
(save-buffers-kill-emacs): Check that we have anything to save
before prompting the user.

3 years agoMake the save buffers prompt from Quit Emacs menu more understandable
Lars Ingebrigtsen [Thu, 27 Jan 2022 18:54:48 +0000 (19:54 +0100)]
Make the save buffers prompt from Quit Emacs menu more understandable

* lisp/files.el (save-buffers-kill-emacs): Use a much simpler (and
more understandable) prompt when exiting Emacs from the menu bar
(bug#4980).

* lisp/subr.el (use-dialog-box-p): Separate out into its own
function for reuse...
(y-or-n-p): ... from here.

3 years agoImprove detection of glyphless characters on TTY frames
Eli Zaretskii [Thu, 27 Jan 2022 18:35:22 +0000 (20:35 +0200)]
Improve detection of glyphless characters on TTY frames

* src/term.c (produce_glyphs): If the terminal can report for
which characters it has glyphs, use that to determine whether
a given character should be displayed as glyphless.

3 years ago* lisp/frame.el (clone-frame): Filter out 'parent-id' (bug#51883).
Juri Linkov [Thu, 27 Jan 2022 17:47:40 +0000 (19:47 +0200)]
* lisp/frame.el (clone-frame): Filter out 'parent-id' (bug#51883).

3 years agoAdd setx highlighting to bat-mode
Arni Magnusson [Thu, 27 Jan 2022 16:12:11 +0000 (17:12 +0100)]
Add setx highlighting to bat-mode

* lisp/progmodes/bat-mode.el (bat-font-lock-keywords):
(bat-font-lock-keywords): Highlight setx (bug#53568).

3 years agoMove some of the doc-view variables around to fix load errors
Lars Ingebrigtsen [Thu, 27 Jan 2022 16:10:13 +0000 (17:10 +0100)]
Move some of the doc-view variables around to fix load errors

3 years agoAdd support for EPUB, CBZ, FB2 and (O)XPS extension to doc view
Daniel Nicolai [Thu, 27 Jan 2022 16:03:38 +0000 (17:03 +0100)]
Add support for EPUB, CBZ, FB2 and (O)XPS extension to doc view

* doc/emacs/misc.texi (Document View): Add requirements for new
extensions (i.e. mutool).

* lisp/doc-view.el (doc-view): Additionally update preliminary comment
(doc-view-custom-set-epub-font-size): redraw image after setting
(doc-view-unoconv-program): Put code all on one line
(doc-view-doc-type): Update docstring.
(doc-view-kill-proc): Fix comment indentation
(doc-view-mode-p):
Add check for new extensions and alternative check for PDF
(doc-view-pdf/ps->png): Associate new extension with png converter
(doc-view-convert-current-doc): Handle new extensions like PDF's
(doc-view-set-doc-type): Set correct doc-type for new extensions.

* lisp/files.el (auto-mode-alist):
Associate new extension types with doc-view.

3 years agoTweak href/superscript fix in tex-mode
Lars Ingebrigtsen [Thu, 27 Jan 2022 15:30:12 +0000 (16:30 +0100)]
Tweak href/superscript fix in tex-mode

* lisp/textmodes/tex-mode.el (tex-font-lock-keywords-1): Fix
superscripts in href in a better way.

3 years agoRevert "Don't output spurious prefixes in read-char-exclusive"
Lars Ingebrigtsen [Thu, 27 Jan 2022 15:18:36 +0000 (16:18 +0100)]
Revert "Don't output spurious prefixes in read-char-exclusive"

This reverts commit 701ec0bda2b15fc97af6ca68fb842fb1ec9aac35.

This change broke display of `C-q-' when doing the `C-q' command,
so it has to be fixed a different way.

3 years agoImprove xwidget window ancestry calculations
Po Lu [Thu, 27 Jan 2022 13:36:52 +0000 (21:36 +0800)]
Improve xwidget window ancestry calculations

* src/xwidget.c (xw_find_common_ancestor):
(xw_notify_virtual_upwards_until)
(xw_notify_virtual_downwards_until): New functions.
(xw_maybe_synthesize_crossing): Synthesize virtual events like
GTK does for non-linear changes.

3 years ago* src/pdumper.c (dump_vectorlike): Handle PVEC_SYMBOL_WITH_POS.
Andreas Schwab [Thu, 27 Jan 2022 11:22:47 +0000 (12:22 +0100)]
* src/pdumper.c (dump_vectorlike): Handle PVEC_SYMBOL_WITH_POS.

3 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Thu, 27 Jan 2022 10:57:16 +0000 (12:57 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

3 years ago; Fix typo in doc/lispref/display.texi.
Zajcev Evgeny [Wed, 26 Jan 2022 13:29:13 +0000 (16:29 +0300)]
; Fix typo in doc/lispref/display.texi.

3 years ago* Fix `startup--honor-delayed-native-compilations' for (bug#53497)
Andrea Corallo [Thu, 27 Jan 2022 10:47:41 +0000 (11:47 +0100)]
* Fix `startup--honor-delayed-native-compilations' for (bug#53497)

* lisp/startup.el (startup--honor-delayed-native-compilations): Don't
forget to set `comp--loadable' when `comp--delayed-sources' is empty.

3 years ago* Have `benchmark-run-compiled' use the native compiler when available
Andrea Corallo [Thu, 27 Jan 2022 09:39:53 +0000 (10:39 +0100)]
* Have `benchmark-run-compiled' use the native compiler when available

* lisp/emacs-lisp/benchmark.el (benchmark-run-compiled): Use native
compiler when available.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Thu, 27 Jan 2022 08:45:49 +0000 (09:45 +0100)]
Merge from origin/emacs-28

c9524819ea Partially revert a fill-region-as-paragraph regression
6075ea0b79 Fix 'make_lispy_position' when there's an image at EOB

# Conflicts:
# test/lisp/textmodes/fill-tests.el

3 years ago; Merge from origin/emacs-28
Stefan Kangas [Thu, 27 Jan 2022 08:07:56 +0000 (09:07 +0100)]
; Merge from origin/emacs-28

The following commits were skipped:

c5b0019e10 Fix copyright-find-copyright when searching from the end
ed18d08f6f Fix copyright.el comment and add a test

3 years ago* lisp/xwidget.el (xwidget-webkit-edit-mode-map): Pass C-backspace.
Po Lu [Thu, 27 Jan 2022 06:07:08 +0000 (14:07 +0800)]
* lisp/xwidget.el (xwidget-webkit-edit-mode-map): Pass C-backspace.

3 years agoImplement crossing event generation between windows for xwidgets on X
Po Lu [Thu, 27 Jan 2022 05:56:32 +0000 (13:56 +0800)]
Implement crossing event generation between windows for xwidgets on X

* src/xwidget.c (enum xw_crossing_mode): New enum.
(xwidget_motion_notify):
(xwidget_motion_or_crossing): Synthesize crossing events if the
pointer moved between different windows.
(window_coords_from_toplevel):
(xw_maybe_synthesize_crossing): New functions.
(xwidget_init_view): Initialize new field to NULL.
(Fdelete_xwidget_view): Clear last crossing window.

* src/xwidget.h (struct xwidget_view): New field
`last_crossing_window'.

3 years agoSilence byte-compiler slightly in tests
Stefan Kangas [Thu, 27 Jan 2022 03:23:18 +0000 (04:23 +0100)]
Silence byte-compiler slightly in tests

* test/src/comp-resources/comp-test-45603.el
(comp-test-45603--call-marked):
* test/src/comp-resources/comp-test-funcs.el
(comp-tests-discardn-f, comp-test-42360-f, comp-test-46824-1-f)
(comp-test-silly-frame2): Silence byte-compiler.

3 years agoDon't use obsolete second argument to byte-compile-file
Stefan Kangas [Thu, 27 Jan 2022 03:15:13 +0000 (04:15 +0100)]
Don't use obsolete second argument to byte-compile-file

* test/src/comp-resources/comp-test-funcs.el
(comp-test-big-interactive): Don't use obsolete second argument to
byte-compile-file.

3 years agoDon't discourage auto-mode-alist entries in autoloads
Stefan Kangas [Thu, 27 Jan 2022 02:56:49 +0000 (03:56 +0100)]
Don't discourage auto-mode-alist entries in autoloads

* lisp/files.el (auto-mode-alist, interpreter-mode-alist): Delete
comment discouraging entries in autoload directives.  (Bug#8158)

3 years agoImprove XI2 valuator reset logic
Po Lu [Thu, 27 Jan 2022 02:03:56 +0000 (10:03 +0800)]
Improve XI2 valuator reset logic

* src/xterm.c (handle_one_xevent): Clear valuators on XI_Leave
instead of XI_Enter.

3 years ago* src/xterm.c (x_focus_frame): Set input focus on outer window.
Po Lu [Thu, 27 Jan 2022 01:33:11 +0000 (09:33 +0800)]
* src/xterm.c (x_focus_frame): Set input focus on outer window.

3 years agoGet rid of unnecessary draw locking in haikumenu.c
Po Lu [Thu, 27 Jan 2022 01:25:20 +0000 (01:25 +0000)]
Get rid of unnecessary draw locking in haikumenu.c

* src/haikumenu.c (Fhaiku_menu_bar_open): Stop holding the draw
lock.

3 years agoApply fix for bug#52761 to GTK native input as well
Po Lu [Thu, 27 Jan 2022 01:20:25 +0000 (09:20 +0800)]
Apply fix for bug#52761 to GTK native input as well

* src/xgselect.c (xg_select): Apply said fix on regular GTK
builds when native input is being used.

3 years ago* Makefile.in (install-etc): Remove unnecessary chown.
Glenn Morris [Wed, 26 Jan 2022 21:58:21 +0000 (16:58 -0500)]
* Makefile.in (install-etc): Remove unnecessary chown.

Not needed since this rule was changed to not use tar, 2012-05-11.

3 years agoMake smerge-refine-ignore-whitespace into defcustom
Lars Ingebrigtsen [Wed, 26 Jan 2022 17:54:58 +0000 (18:54 +0100)]
Make smerge-refine-ignore-whitespace into defcustom

* lisp/vc/smerge-mode.el (smerge-refine-ignore-whitespace): Make
into defcustom (bug#12585).

3 years agoAdd tests for concat, vconcat and append
Mattias Engdegård [Wed, 26 Jan 2022 15:47:31 +0000 (16:47 +0100)]
Add tests for concat, vconcat and append

* test/src/fns-tests.el (fns-tests-concat)
(fns-concat, fns-vconcat, fns-append): New.

3 years agoMinor `concat` tweaks
Mattias Engdegård [Wed, 26 Jan 2022 10:28:33 +0000 (11:28 +0100)]
Minor `concat` tweaks

* src/fns.c (concat): Do things in the right order for speed.
(concat_strings): Initialise variable.

3 years agoPartially revert a fill-region-as-paragraph regression
Lars Ingebrigtsen [Wed, 26 Jan 2022 15:17:49 +0000 (16:17 +0100)]
Partially revert a fill-region-as-paragraph regression

* lisp/textmodes/fill.el (fill-region-as-paragraph): Revert
e186af261 (bug#53537), because it leads to regressions.  (But
leave tests in place.)

3 years agoFix 'make_lispy_position' when there's an image at EOB
Eli Zaretskii [Wed, 26 Jan 2022 14:44:14 +0000 (16:44 +0200)]
Fix 'make_lispy_position' when there's an image at EOB

* src/xdisp.c (move_it_to): Don't compare IT_CHARPOS with an
invalid TO_CHARPOS.  (Bug#53546)

3 years agoFix copyright-find-copyright when searching from the end
Lars Ingebrigtsen [Wed, 26 Jan 2022 14:02:00 +0000 (15:02 +0100)]
Fix copyright-find-copyright when searching from the end

* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Make
the double check also work when searching from the end (bug#7179).

Do not merge to master.

3 years agoFix copyright.el comment and add a test
Lars Ingebrigtsen [Wed, 26 Jan 2022 13:53:07 +0000 (14:53 +0100)]
Fix copyright.el comment and add a test

* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Fix
comment (bug#7179).

Do not merge to master.

3 years agoFix copyright-find-copyright when searching from the end
Lars Ingebrigtsen [Wed, 26 Jan 2022 14:02:00 +0000 (15:02 +0100)]
Fix copyright-find-copyright when searching from the end

* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Make
the double check also work when searching from the end (bug#7179).

3 years agoFix copyright.el comment and add a test
Lars Ingebrigtsen [Wed, 26 Jan 2022 13:53:07 +0000 (14:53 +0100)]
Fix copyright.el comment and add a test

* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Fix
comment (bug#7179).

3 years agoFix input of sharp-quoted symbols in Eshell with em-extpipe
Sean Whitton [Wed, 26 Jan 2022 13:13:00 +0000 (14:13 +0100)]
Fix input of sharp-quoted symbols in Eshell with em-extpipe

* lisp/eshell/em-extpipe.el (eshell-parse-external-pipeline): Fix
misinterpreting sharp-quoted symbols as the beginning of single-quoted
strings (Bug#53518).  Add protection against a possible infinite loop.
* test/lisp/eshell/em-extpipe-tests.el (em-extpipe-test-17): New
test (bug#53518).

3 years agoAdapt tramp-tests
Michael Albinus [Wed, 26 Jan 2022 13:05:30 +0000 (14:05 +0100)]
Adapt tramp-tests

* test/lisp/net/tramp-tests.el (tramp--test-special-characters):
Adapt test candidates.