]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoFix bug#55779
Po Lu [Sun, 5 Jun 2022 05:03:55 +0000 (13:03 +0800)]
Fix bug#55779

* src/xterm.c (x_update_opaque_region): Don't make GTK reset the
opaque region if F is a child frame.

2 years agoBetter respect window manager stacking order
Po Lu [Sun, 5 Jun 2022 05:02:58 +0000 (13:02 +0800)]
Better respect window manager stacking order

* src/xfns.c (x_frame_list_z_order, Fx_frame_list_z_order): Use
_NET_CLIENT_LIST_STACKING if supported.
* src/xterm.c (x_wm_supports_1): New function.  Accept dpyinfo
instead of frame.
(x_wm_supports): Use that function instead.

* src/xterm.h: Update prototypes.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sun, 5 Jun 2022 04:30:25 +0000 (06:30 +0200)]
Merge from origin/emacs-28

1b8719835a Update to Org 9.5.4
92c5faafd7 Clarify documentation of 'string-to-unibyte'
2848512654 ; * lisp/files.el (find-file): Avoid too short lines in do...
672f9f787f Improve keystrokes in doc strings in some find-file functions
ef5651cc77 Fix segfaults when starting on 80x26 TTY frames
bfa647972f ; Fix doc string of 'delete-selection-repeat-replace-region'
a95d46e00f Make it explicit that a couple of _s in lispref are unders...
5c74c25123 Remove from FAQ the MS-Windows info about BDF fonts
edb48646f2 Fix Display Property manual example

2 years agoFix positioning of non-system tooltips on GTK builds
Po Lu [Sun, 5 Jun 2022 02:02:55 +0000 (10:02 +0800)]
Fix positioning of non-system tooltips on GTK builds

* src/xfns.c (compute_tip_xy): Fix coding style.
* src/xterm.c (handle_one_xevent): Set tooltip size immediately
on GTK builds.

2 years agoAdjust last change for GTK+ 2.x
Po Lu [Sun, 5 Jun 2022 01:30:45 +0000 (09:30 +0800)]
Adjust last change for GTK+ 2.x

* src/xterm.c (x_tooltip_window_to_frame): Fix build on GTK 2.x.

2 years agoMake `mouse-position' work correctly with GTK tooltips
Po Lu [Sun, 5 Jun 2022 01:24:20 +0000 (09:24 +0800)]
Make `mouse-position' work correctly with GTK tooltips

* src/xterm.c (x_tooltip_window_to_frame): New parameter
`unrelated_tooltip_p'.
(XTmouse_position): Pass that, and if it turns out to be true,
look beneath the tooltip window.

2 years agoUpdate to Org 9.5.4
Kyle Meyer [Sat, 4 Jun 2022 20:21:06 +0000 (16:21 -0400)]
Update to Org 9.5.4

2 years agoMake loaddefs-generate--parse-file more robust
Lars Ingebrigtsen [Sat, 4 Jun 2022 16:41:10 +0000 (18:41 +0200)]
Make loaddefs-generate--parse-file more robust

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--parse-file):
Ensure that we don't have an autoload cookie on the first column
inside a string.

2 years agoMake skkdic-convert replacements literal
Lars Ingebrigtsen [Sat, 4 Jun 2022 13:07:01 +0000 (15:07 +0200)]
Make skkdic-convert replacements literal

* lisp/international/ja-dic-cnv.el (skkdic-convert): The
replacement is literal and fixed-case.  (The build on EMBA is
failing mysteriously with "Match data clobbered by buffer
modification hooks", so this is mainly a stab in the dark at
fixing that, but it's also generally correct.)

2 years agoMake vc-mtn obsolete
Lars Ingebrigtsen [Sat, 4 Jun 2022 12:16:26 +0000 (14:16 +0200)]
Make vc-mtn obsolete

* lisp/obsolete/vc-mtn.el: Make obsolete (bug#6513).

2 years agoFix failing shortdoc test
Lars Ingebrigtsen [Sat, 4 Jun 2022 12:04:41 +0000 (14:04 +0200)]
Fix failing shortdoc test

* lisp/emacs-lisp/shortdoc.el (string): Each example section is
supposed to contain only examples of using the function in
question (as policed by the FAILED  shortdoc-examples test).

2 years agoFix error during DND from both Emacs and GTK at the same time
Po Lu [Sat, 4 Jun 2022 12:00:40 +0000 (20:00 +0800)]
Fix error during DND from both Emacs and GTK at the same time

* src/xterm.c (x_dnd_get_target_window): Make mapping and
releasing the COW atomic.  This is to fix a rare bug when
MPX (multi-pointer X) is in use and the user tries to drag
from both GTK and Emacs at the same time using multiple seats.

2 years agoFurther raise-sexp doc string improvement
Lars Ingebrigtsen [Sat, 4 Jun 2022 12:00:10 +0000 (14:00 +0200)]
Further raise-sexp doc string improvement

* lisp/emacs-lisp/lisp.el (raise-sexp): Fix the key binding syntax
in the doc string.

2 years agoImprove the raise-sexp doc string
Lars Ingebrigtsen [Sat, 4 Jun 2022 11:57:08 +0000 (13:57 +0200)]
Improve the raise-sexp doc string

* lisp/emacs-lisp/lisp.el (raise-sexp): Try to explain what the
command does (bug#55788).

2 years agoFix warnings introduced by the lisp-mode-autoload-regexp change
Lars Ingebrigtsen [Sat, 4 Jun 2022 11:50:07 +0000 (13:50 +0200)]
Fix warnings introduced by the lisp-mode-autoload-regexp change

* lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): The package name bit
in ###;;;foo-autoload may be missing, so do a lax match (bug#55784).

2 years agoAdd a face to \\= doc string escapes
Lars Ingebrigtsen [Sat, 4 Jun 2022 11:43:58 +0000 (13:43 +0200)]
Add a face to \\= doc string escapes

* lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): Add a face to \\= doc
string escapes (bug#55783).

2 years agoFurther notes about quotation marks in the manual
Lars Ingebrigtsen [Sat, 4 Jun 2022 11:29:53 +0000 (13:29 +0200)]
Further notes about quotation marks in the manual

* doc/lispref/tips.texi (Documentation Tips): Note that we
previously recommended using single quotation marks (bug#55780).

2 years agoAllow keyboard modifiers to control the action taken during dired DND
Po Lu [Sat, 4 Jun 2022 10:07:20 +0000 (18:07 +0800)]
Allow keyboard modifiers to control the action taken during dired DND

* doc/emacs/dired.texi (Misc Dired Features): Update
documentation.
* lisp/dired.el (dired-mouse-drag-files): Update defcustom for
new values.
(dired-mouse-drag): Recognize more values of
`dired-mouse-drag-files' and keyboard modifiers.
(dired-mouse-drag-files-map): Add C-down-mouse-1, M-down-mouse-1
and S-down-mouse-1.

2 years ago* lisp/emacs-lisp/shortdoc.el (string): Add `string-collate-lessp'.
Michael Albinus [Sat, 4 Jun 2022 09:23:53 +0000 (11:23 +0200)]
* lisp/emacs-lisp/shortdoc.el (string): Add `string-collate-lessp'.

2 years agoAdd support for the Grantha script (bug#55782)
समीर सिंह Sameer Singh [Wed, 1 Jun 2022 16:59:24 +0000 (22:29 +0530)]
Add support for the Grantha script (bug#55782)

* lisp/language/indian.el ("Grantha"): New language environment.
Add composition rules for Grantha. Add sample text and input method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Grantha.
* lisp/leim/quail/indian.el ("grantha"): New input method.

* etc/HELLO: Add two Grantha greetings.
* etc/NEWS: Announce the new language environment.

2 years agoFix file drag-and-drop on GNUstep
Po Lu [Sat, 4 Jun 2022 08:19:01 +0000 (16:19 +0800)]
Fix file drag-and-drop on GNUstep

* src/nsselect.m (ns_decode_data_to_pasteboard): Convert URL to
path names when we're using NSFilenamesPboardType.
* src/nsterm.m: ([EmacsView performDragOperation:]): Handle
cases where plist is a string.

2 years agoSupport dragging multiple files on NS
Po Lu [Sat, 4 Jun 2022 07:45:41 +0000 (15:45 +0800)]
Support dragging multiple files on NS

This has to use a deprecated pasteboard type, since Emacs uses
the "old" (but not deprecated) dragImage: method for
drag-and-drop, which can't drop file URLs.

* lisp/term/ns-win.el (x-begin-drag): Update accordingly.
* src/nsselect.m (ns_decode_data_to_pasteboard):
(Fns_begin_drag): Allow files to be a list of filenames as well.

2 years agoFix splurious drag-mouse-1 events after NS drag-and-drop
Po Lu [Sat, 4 Jun 2022 07:41:39 +0000 (15:41 +0800)]
Fix splurious drag-mouse-1 events after NS drag-and-drop

* src/nsterm.m ([EmacsWindow beginDrag:...]): Clear
dpyinfo->grabbed.

2 years agoClear mouse face during drag-and-drop
Po Lu [Sat, 4 Jun 2022 07:17:50 +0000 (15:17 +0800)]
Clear mouse face during drag-and-drop

* src/xterm.c (handle_one_xevent): Clear mouse face during drag
and drop, since note_mouse_highlight isn't called.

2 years agoClarify documentation of 'string-to-unibyte'
Eli Zaretskii [Sat, 4 Jun 2022 07:06:43 +0000 (10:06 +0300)]
Clarify documentation of 'string-to-unibyte'

* doc/lispref/nonascii.texi (Converting Representations): Clarify
what 'string-to-unibyte' does.  Reported by Richard Hansen
<rhansen@rhansen.org>.  (Bug#55777)

2 years agoAnother attempt to void compiler warnings on macOS (bug#55595)
Eli Zaretskii [Sat, 4 Jun 2022 06:05:35 +0000 (09:05 +0300)]
Another attempt to void compiler warnings on macOS (bug#55595)

* configure.ac (WERROR_CFLAGS): Use "-Wno-unknown-pragmas" with
Clang.

2 years agoImprove doc of `mouse-drag-mode-line-buffer'
Po Lu [Sat, 4 Jun 2022 05:27:03 +0000 (13:27 +0800)]
Improve doc of `mouse-drag-mode-line-buffer'

* doc/emacs/frames.texi (Mouse Commands): Document
`mouse-drag-mode-line-buffer'.
* etc/NEWS: Explain where that option is supported.
* lisp/mouse.el (mouse-drag-mode-line-buffer): Likewise.

2 years agoMake XTmouse_position faster during dragging with lots of frames
Po Lu [Sat, 4 Jun 2022 04:27:11 +0000 (12:27 +0800)]
Make XTmouse_position faster during dragging with lots of frames

* src/xterm.c (x_tooltip_window_to_frame): New function.
(XTmouse_position): Use that to find tooltip frames underneath
the pointer instead.

2 years agoFix leak of toplevel data
Po Lu [Sat, 4 Jun 2022 02:05:44 +0000 (10:05 +0800)]
Fix leak of toplevel data

* src/xterm.c (x_dnd_compute_toplevels): Make sure to free
`data'.

2 years agoFix leak of DND toplevels when return-frame is non-nil
Po Lu [Sat, 4 Jun 2022 01:51:33 +0000 (09:51 +0800)]
Fix leak of DND toplevels when return-frame is non-nil

* src/xterm.c (x_dnd_free_toplevels): Don't leak DND toplevels
if returning a frame.
(x_dnd_begin_drag_and_drop): Make this function reentrant from
the IO error handler.

2 years agoPost-review additions
Dmitry Gutov [Sat, 4 Jun 2022 00:42:00 +0000 (03:42 +0300)]
Post-review additions

* lisp/progmodes/project.el (project-vc-include-untracked):
Add :version.
(project--vc-list-files): Use 'and' instead of 'when'.

2 years agoAdd new user option project-vc-include-untracked
Jan Synáček [Thu, 2 Jun 2022 18:59:53 +0000 (20:59 +0200)]
Add new user option project-vc-include-untracked

* doc/emacs/maintaining.texi (Projects): Document it.
* lisp/progmodes/project.el (project--vc-list-files): Use it.

2 years agoproject-query-replace-regexp: Filter out non-regular files
Dmitry Gutov [Sat, 4 Jun 2022 00:13:42 +0000 (03:13 +0300)]
project-query-replace-regexp: Filter out non-regular files

* lisp/progmodes/project.el (project-query-replace-regexp):
Filter out non-regular files (bug#55382).

2 years agoFix Tramp test
Michael Albinus [Fri, 3 Jun 2022 17:55:30 +0000 (19:55 +0200)]
Fix Tramp test

* test/lisp/net/tramp-tests.el (tramp-test31-signal-process):
Skip on MS Windows.

2 years agoAdd remote file functions to shortdoc
Michael Albinus [Fri, 3 Jun 2022 17:54:31 +0000 (19:54 +0200)]
Add remote file functions to shortdoc

* lisp/net/tramp-integration.el (shortdoc-add-function)
(shortdoc--groups): Declare.
(shortdoc): Configure shortdoc.el to recognize file name functions
for remote access.

2 years agoFix dired drag and drop actions
Po Lu [Fri, 3 Jun 2022 12:36:24 +0000 (20:36 +0800)]
Fix dired drag and drop actions

* lisp/dired.el (dired-mouse-drag): Make `link' values work
again.

2 years agoHandle dragging multiple files on Haiku
Po Lu [Fri, 3 Jun 2022 12:13:27 +0000 (12:13 +0000)]
Handle dragging multiple files on Haiku

* lisp/term/haiku-win.el (haiku-dnd-selection-converters)
(haiku-dnd-convert-file-name, x-begin-drag): Handle vector
values of selection data.

2 years ago; Improve documentation of 'battery-update-functions'
Eli Zaretskii [Fri, 3 Jun 2022 12:04:42 +0000 (15:04 +0300)]
; Improve documentation of 'battery-update-functions'

* lisp/battery.el (battery-update-functions)
(display-battery-mode): Improve wording of doc strings.
(Bug#55770)

2 years ago; Improve documentation of new drag-and-drop APIs
Eli Zaretskii [Fri, 3 Jun 2022 11:50:11 +0000 (14:50 +0300)]
; Improve documentation of new drag-and-drop APIs

* lisp/dnd.el (dnd-begin-text-drag, dnd-begin-file-drag):
* doc/lispref/frames.texi (Drag and Drop): Improve wording of
documentation of 'dnd-begin-text-drag' and 'dnd-begin-file-drag'.

2 years agoAllow dragging multiple files from a Dired buffer
Po Lu [Fri, 3 Jun 2022 11:43:06 +0000 (19:43 +0800)]
Allow dragging multiple files from a Dired buffer

* doc/lispref/frames.texi (Drag and Drop): Document new function
`dnd-begin-drag-files'.
* lisp/dired.el (dired-mouse-drag-files): Update doc string.
(dired-map-over-marks): Accept a new value of ARG `marked',
meaning to not fall back to the current file if no marks were
found.
(dired-mouse-drag): Handle marked files in an intuitive way.

* lisp/dnd.el (dnd-last-dragged-remote-file): Allow list values
as well.
(dnd-remove-last-dragged-remote-file): Handle list values.
(dnd-begin-file-drag): Fix file name expansion.
(dnd-begin-drag-files): New function.
* lisp/select.el (xselect-convert-to-filename): Handle mutiple
files
(a vector of file names):.

2 years agoDon't issue warnings for Unicode quotes for now
Lars Ingebrigtsen [Fri, 3 Jun 2022 11:09:25 +0000 (13:09 +0200)]
Don't issue warnings for Unicode quotes for now

* lisp/emacs-lisp/bytecomp.el (byte-compile-docstring-style-warn):
Remove warning for "Unicode quotes" for now (bug#55780).

2 years agoRevert the `...' documentation back to actual usage
Lars Ingebrigtsen [Fri, 3 Jun 2022 11:04:13 +0000 (13:04 +0200)]
Revert the `...' documentation back to actual usage

* doc/lispref/tips.texi (Documentation Tips): Document how `...'
is really used now (bug#55780).  ‘...’ is not really used in the
Emacs sources.

2 years agoLet ?\LF signal an error (bug#55738)
Mattias Engdegård [Fri, 3 Jun 2022 08:12:24 +0000 (10:12 +0200)]
Let ?\LF signal an error (bug#55738)

As suggested by Stefan Monnier.

* src/lread.c (read_escape):
Signal an error for ?\LF since it cannot reasonably be intended.
* test/src/lread-tests.el (lread-escaped-lf): Update test.
* etc/NEWS: Announce.

2 years agoFix wrong value in idlwave-comment-indent-char
Mattias Engdegård [Fri, 3 Jun 2022 09:05:18 +0000 (11:05 +0200)]
Fix wrong value in idlwave-comment-indent-char

* lisp/progmodes/idlwave.el (idlwave-comment-indent-char):
Use a space since that is clearly what was meant.
?\ at the end of a line (ie, ?\LF) never was well-defined and produced
-1 most of the time, but will soon raise an error (bug#55738).
This doesn't matter much becaue this variable is unused.

2 years agoAdd new user option `mouse-drag-mode-line-buffer'
Po Lu [Fri, 3 Jun 2022 07:20:23 +0000 (15:20 +0800)]
Add new user option `mouse-drag-mode-line-buffer'

* etc/NEWS: Announce new option.  Also add missing entries for
an earlier change.
* lisp/mouse.el (mouse-drag-mode-line-buffer): New user option.
(mouse-drag-mode-line): Implement that option.

2 years agoAdd easier-to-use interfaces for initiating drag-and-drop
Po Lu [Fri, 3 Jun 2022 04:32:17 +0000 (12:32 +0800)]
Add easier-to-use interfaces for initiating drag-and-drop

The previous interface required that users know intricacies of
the data types used to transfer data on each platform Emacs
supports.

* doc/lispref/frames.texi (Drag and Drop): Document new
functions.
* lisp/dired.el (dired-last-dragged-remote-file)
(dired-remove-last-dragged-local-file): Delete functions.
(dired-mouse-drag): Use `dnd-begin-file-drag'.
* lisp/dnd.el (dnd-last-dragged-remote-file)
(dnd-remove-last-dragged-remote-file): New variables and
functions.
(dnd-begin-text-drag, dnd-begin-file-drag): New functions.
* src/xterm.c (x_dnd_begin_drag_and_drop): Add porting note.

2 years agoAdd a new user option battery-update-functions
Lars Ingebrigtsen [Fri, 3 Jun 2022 03:56:44 +0000 (05:56 +0200)]
Add a new user option battery-update-functions

* doc/emacs/display.texi (Optional Mode Line): Document it.
* lisp/battery.el (battery-update-functions): New user option
(bug#55770).
(battery-update): Use it.

2 years agoRemove window-max-characters-per-line
Lars Ingebrigtsen [Fri, 3 Jun 2022 03:20:16 +0000 (05:20 +0200)]
Remove window-max-characters-per-line

* doc/lispref/windows.texi (Window Sizes):
* doc/lispref/display.texi (Size of Displayed Text): Remove
documentation.
* lisp/fringe.el (fringe-mode): Point to the right function.

* lisp/window.el (window-char-pixel-width)
(window-char-pixel-height, window-max-characters-per-line): Remove
functions -- this was already added as window-max-chars-per-line.

* src/window.c (Fwindow_body_width): Adjust doc string.

2 years agoFix GTK build
Po Lu [Fri, 3 Jun 2022 01:43:42 +0000 (09:43 +0800)]
Fix GTK build

* src/xterm.c (x_dnd_begin_drag_and_drop) [USE_GTK]: Adjust call
to x_dnd_free_toplevels as well.

2 years agoDon't call XSelectInput on a dying display when cancelling drag-and-drop
Po Lu [Fri, 3 Jun 2022 00:51:49 +0000 (08:51 +0800)]
Don't call XSelectInput on a dying display when cancelling drag-and-drop

* src/xterm.c (x_dnd_free_toplevels): New argument
`display_alive'.
(x_dnd_cleanup_drag_and_drop, x_dnd_begin_drag_and_drop)
(handle_one_xevent): Change calls to `x_dnd_free_toplevels'.
(x_connection_closed, x_delete_terminal): Set it to false.

2 years agoMake checkdoc-file-comments-engine match more ;;;### forms
Lars Ingebrigtsen [Thu, 2 Jun 2022 17:14:00 +0000 (19:14 +0200)]
Make checkdoc-file-comments-engine match more ;;;### forms

* lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine): Use
the more general lisp-mode-autoload-regexp instead of
generate-autoload-cookie (i.e., also match ;;;###tramp-autoload).

2 years agoMake `M-x grep' work better with "git grep"
Lars Ingebrigtsen [Thu, 2 Jun 2022 13:06:27 +0000 (15:06 +0200)]
Make `M-x grep' work better with "git grep"

* lisp/progmodes/compile.el (compilation-start): Bind PAGER to ""
to avoid errors in output from "git grep" and similar commands
(bug#4359).

2 years agoMake ?\LF generate 10, not -1 (bug#55738)
Mattias Engdegård [Thu, 2 Jun 2022 09:46:18 +0000 (11:46 +0200)]
Make ?\LF generate 10, not -1 (bug#55738)

The old -1 value was an artefact of the reader implementation.

* src/lread.c (read_escape): Remove the `stringp` argument; assume
character literal syntax.  Never return -1.
(read_string_literal): Handle string-specific escape semantics here
and simplify.
* test/src/lread-tests.el (lread-escaped-lf): New test.

2 years ago* src/lread.c (skip_lazy_string): Fix uninitialised variable.
Mattias Engdegård [Thu, 2 Jun 2022 13:42:40 +0000 (15:42 +0200)]
* src/lread.c (skip_lazy_string): Fix uninitialised variable.

2 years ago; * lisp/files.el (find-file): Avoid too short lines in doc string.
Eli Zaretskii [Thu, 2 Jun 2022 13:04:38 +0000 (16:04 +0300)]
; * lisp/files.el (find-file): Avoid too short lines in doc string.

2 years ago* lisp/play/morse.el: Doc fixes.
Stefan Kangas [Thu, 2 Jun 2022 12:55:35 +0000 (14:55 +0200)]
* lisp/play/morse.el: Doc fixes.

2 years agoImprove keystrokes in doc strings in some find-file functions
Ikumi Keita [Thu, 2 Jun 2022 12:29:38 +0000 (14:29 +0200)]
Improve keystrokes in doc strings in some find-file functions

* lisp/files.el (find-file):
(find-file-other-window):
(find-file-other-frame): Include the correct keymap so that
keystrokes are displayed better (bug#55761).

Copyright-paperwork-exempt: yes

2 years agoMore gracefully handle errors during Motif drag window creation
Po Lu [Thu, 2 Jun 2022 11:54:09 +0000 (19:54 +0800)]
More gracefully handle errors during Motif drag window creation

* src/xterm.c (xm_drag_window_error_handler): Store whether or
not an error happened.
(xm_get_drag_window): Handle errors during XCreateWindow and
XChangeProperty without leaking anything.
(x_error_handler): Fix coding style.

2 years agoFix out-of-tree build problems with loaddefs.el
Lars Ingebrigtsen [Thu, 2 Jun 2022 11:52:58 +0000 (13:52 +0200)]
Fix out-of-tree build problems with loaddefs.el

* lisp/Makefile.in ($(lisp)/loaddefs.el): Use the new function.

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Pass in
whether to inhibit a partial build (to make the code more general).
(loaddefs-generate--emacs-batch): Add a new function specially for
the Emacs build that has the special rules needed.  (This also
fixes out-of-tree builds.)
loaddefs-generate-batch can be used in general for packages etc.
(loaddefs-generate-batch): Remove the special code for Emacs builds.

2 years agoFix segfaults when starting on 80x26 TTY frames
Eli Zaretskii [Thu, 2 Jun 2022 10:41:59 +0000 (13:41 +0300)]
Fix segfaults when starting on 80x26 TTY frames

* src/dispnew.c (adjust_frame_glyphs_for_frame_redisplay): Make
sure we have valid frame glyph matrices for the interactive
session.  (Bug#55760)
(adjust_frame_glyphs): Add assertions for when we fail to allocate
valid frame glyph matrices for a TTY frame.

2 years agoReinstate the Qload file name handler
Lars Ingebrigtsen [Thu, 2 Jun 2022 09:51:09 +0000 (11:51 +0200)]
Reinstate the Qload file name handler

* src/lread.c (Fload): Reinstate the Qload file name handler
(bug#12598).  This makes loading non-ASCII elc.gz files work.

2 years agoUse `read-process-output-max' when creating pipes on GNU/Linux
Frédéric Giquel [Thu, 2 Jun 2022 09:38:56 +0000 (11:38 +0200)]
Use `read-process-output-max' when creating pipes on GNU/Linux

* src/process.c (syms_of_process): Note max size.
(create_process): Set the pipe size from `read-process-output-max'
(bug#55737).

Copyright-paperwork-exempt: yes

2 years agoFix usage of absolute :height in manoj-dark-theme
yilkalargaw [Thu, 2 Jun 2022 09:30:23 +0000 (11:30 +0200)]
Fix usage of absolute :height in manoj-dark-theme

* etc/themes/manoj-dark-theme.el (manoj-dark): Avoid using
absolute heights (bug#55759).

2 years agoSpeed up loaddefs-generate on slow disks
Lars Ingebrigtsen [Thu, 2 Jun 2022 09:13:08 +0000 (11:13 +0200)]
Speed up loaddefs-generate on slow disks

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Make file
update comparisons faster.

2 years agoFix rare crash when async input happens while creating xm drag window
Po Lu [Thu, 2 Jun 2022 08:36:03 +0000 (16:36 +0800)]
Fix rare crash when async input happens while creating xm drag window

* src/xterm.c (xm_get_drag_window): Work around XCloseDisplay
freezing upon being interrupted by a signal.

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Thu, 2 Jun 2022 07:52:19 +0000 (10:52 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years ago; * src/emacs.c (main): Move -version output after initialization.
Eli Zaretskii [Thu, 2 Jun 2022 07:51:37 +0000 (10:51 +0300)]
; * src/emacs.c (main): Move -version output after initialization.

2 years agoFix macOS build
Po Lu [Thu, 2 Jun 2022 07:49:50 +0000 (15:49 +0800)]
Fix macOS build

* src/nsterm.m (ns_mouse_position): Fix typos.

2 years agoFix potential NULL pointer dereference on NS
Po Lu [Thu, 2 Jun 2022 07:48:12 +0000 (15:48 +0800)]
Fix potential NULL pointer dereference on NS

* src/nsterm.m (ns_mouse_position): Don't test f's tooltip-ness
if it's NULL.

2 years agoFix flickering tooltips with mouse DND without interprogram drag
Po Lu [Thu, 2 Jun 2022 07:46:42 +0000 (15:46 +0800)]
Fix flickering tooltips with mouse DND without interprogram drag

* src/haikuterm.c (haiku_read_socket):
* src/nsterm.m (ns_mouse_position):
* src/xterm.c (XTmouse_position, handle_one_xevent): Apply
special tooltip treatment to `dropping' as well as
`drag-source'.

2 years agoFix tooltip frames leaking into mouse position on NS
Po Lu [Thu, 2 Jun 2022 07:21:35 +0000 (15:21 +0800)]
Fix tooltip frames leaking into mouse position on NS

* src/nsterm.m (ns_mouse_position): Avoid tooltip frames and
look underneath them when `drag-source'.

([EmacsView mouseDown:]):
([EmacsView mouseMoved:]): Ignore events from tip frames.

2 years agoHandle dropping text/uri-list on Haiku
Po Lu [Thu, 2 Jun 2022 07:05:21 +0000 (07:05 +0000)]
Handle dropping text/uri-list on Haiku

* lisp/term/haiku-win.el (window-system-initialization): Remove
extra whitespace.
(haiku-drag-and-drop): Handle "text/uri-list".

2 years agoFix help-echo tooltips interfering with mouse drag-and-drop
Po Lu [Thu, 2 Jun 2022 06:27:38 +0000 (14:27 +0800)]
Fix help-echo tooltips interfering with mouse drag-and-drop

* lisp/mouse.el (mouse-drag-and-drop-region): Disable
tooltip-mode while mouse drag-and-drop is in progress.  Also
restore state correctly in some more cases.

2 years agoFix flicker during mouse DND on Haiku as well
Po Lu [Thu, 2 Jun 2022 05:44:46 +0000 (05:44 +0000)]
Fix flicker during mouse DND on Haiku as well

* src/haikuterm.c (haiku_read_socket): Don't clear tooltips on
crossing if track-mouse is drag-source and the display is
grabbed.

2 years agoFix typos in last change
Po Lu [Thu, 2 Jun 2022 05:37:52 +0000 (13:37 +0800)]
Fix typos in last change

* src/xterm.c (handle_one_xevent): Fix typos.

2 years agoFix tooltips flickering on X during `mouse-drag-and-drop-region'
Po Lu [Thu, 2 Jun 2022 05:33:17 +0000 (13:33 +0800)]
Fix tooltips flickering on X during `mouse-drag-and-drop-region'

* src/xterm.c (x_get_window_below): New function.
(XTmouse_position): If track-mouse is drag-source and a window
is a tooltip, look below it.
(handle_one_xevent): Don't generate a nil help-echo event on
LeaveNotify if the display is grabbed and track-mouse is
drag-source.

2 years agoMerge remote-tracking branch 'refs/remotes/origin/master'
Stefan Monnier [Thu, 2 Jun 2022 02:32:03 +0000 (22:32 -0400)]
Merge remote-tracking branch 'refs/remotes/origin/master'

2 years agobindat (strz): Fix wrong-type-argument error when unpacking
Richard Hansen [Sun, 29 May 2022 22:09:08 +0000 (18:09 -0400)]
bindat (strz): Fix wrong-type-argument error when unpacking

* lisp/emacs-lisp/bindat.el (strz): Fix (wrong-type-argument
number-or-marker-p nil) error when unpacking a strz with
unspecified (variable) length.
* test/lisp/emacs-lisp/bindat-tests.el (strz): Mark test as passing.

2 years ago; bindat (strz): Consistent length type check
Richard Hansen [Sun, 29 May 2022 03:53:51 +0000 (23:53 -0400)]
; bindat (strz): Consistent length type check

The strz length computation uses `numberp' to switch between
fixed-length and variable-length modes, so packing should too.

2 years agobindat (strz): Fix off-by-one bug in computed length
Richard Hansen [Sun, 29 May 2022 03:10:44 +0000 (23:10 -0400)]
bindat (strz): Fix off-by-one bug in computed length

* lisp/emacs-lisp/bindat.el (strz): Include null terminator when
computing packed string length.
* test/lisp/emacs-lisp/bindat-tests.el (strz): Mark tests as passing.

2 years ago; bindat-tests (strz): Add more tests
Richard Hansen [Sun, 29 May 2022 21:15:04 +0000 (17:15 -0400)]
; bindat-tests (strz): Add more tests

2 years agoClean up Motif drag-and-drop code
Po Lu [Thu, 2 Jun 2022 01:02:55 +0000 (09:02 +0800)]
Clean up Motif drag-and-drop code

* src/xterm.c (enum xm_drag_operation, enum xm_drag_action)
(enum xm_drag_reason, enum xm_drag_originator, enum xm_drag_style)
(enum xm_drop_site_status): Turn macros into enums.
(x_next_event_from_any_display): Fix initial value of rc.

2 years agoFix decoding of XdndStatus rectangles on 64-bit systems
Po Lu [Thu, 2 Jun 2022 00:32:23 +0000 (08:32 +0800)]
Fix decoding of XdndStatus rectangles on 64-bit systems

* src/xterm.c (handle_one_xevent): Make data.l[2] and data.l[3]
unsigned.

2 years agoRevert "Fix reader char escape bugs (bug#55738)"
Mattias Engdegård [Wed, 1 Jun 2022 20:49:34 +0000 (22:49 +0200)]
Revert "Fix reader char escape bugs (bug#55738)"

This reverts commit c50718dcfa54293b695f8a3fa5cd4d77848ee084.

It may have caused bootstrap problems. Sorry about that.

2 years ago; Fix doc string of 'delete-selection-repeat-replace-region'
Eli Zaretskii [Wed, 1 Jun 2022 19:30:59 +0000 (22:30 +0300)]
; Fix doc string of 'delete-selection-repeat-replace-region'

* lisp/delsel.el (delete-selection-repeat-replace-region): Doc
fix.  (Bug#55755)

2 years ago* lisp/simple.el (completion-setup-function): Use file-name-directory.
Juri Linkov [Wed, 1 Jun 2022 19:12:12 +0000 (22:12 +0300)]
* lisp/simple.el (completion-setup-function): Use file-name-directory.

Replace file-name-as-directory with file-name-directory,
because file-name-as-directory returns a nonexistent dir
e.g. "/dir/prefix/" when completing "/dir/prefix".
OTOH, file-name-directory returns "/dir/" in such cases (bug#55743).

2 years agoAvoid segfaults on MS-Windows when invoked with --version
Eli Zaretskii [Wed, 1 Jun 2022 18:57:07 +0000 (21:57 +0300)]
Avoid segfaults on MS-Windows when invoked with --version

* src/emacs.c (main): If invoked with --version, call
'init_bignum' before calling 'format-time-string', as that is
needed for safe manipulation of bignums in timefns.c.

2 years agoFix reader char escape bugs (bug#55738)
Mattias Engdegård [Wed, 1 Jun 2022 09:39:44 +0000 (11:39 +0200)]
Fix reader char escape bugs (bug#55738)

Make the character literal ?\LF (linefeed) generate 10, not -1.

Ensure that Control escape sequences in character literals are
idempotent: ?\C-\C-a and ?\^\^a mean the same thing as ?\C-a and ?\^a,
generating the control character with value 1.  "\C-\C-a" no longer
signals an error.

* src/lread.c (read_escape): Make nonrecursive and only combine
the base char with modifiers at the end, creating control chars
if applicable.  Remove the `stringp` argument; assume character
literal syntax.  Never return -1.
(read_string_literal): Handle string-specific escape semantics here
and simplify.
* test/src/lread-tests.el (lread-misc-2): New test.

2 years agoMake files-tests.el more robust
Michael Albinus [Wed, 1 Jun 2022 16:36:35 +0000 (18:36 +0200)]
Make files-tests.el more robust

* test/lisp/files-tests.el (files-tests--with-temp-non-special)
(files-tests--with-temp-non-special-and-file-name-handler): Make
it more robust wrt parallel test jobs.  (Bug#55706)

2 years agodelete-selection-mode: Add user option to delete temporary regions only
Visuwesh [Sun, 29 May 2022 06:15:19 +0000 (11:45 +0530)]
delete-selection-mode: Add user option to delete temporary regions only

* lisp/delsel.el (delete-selection-temporary-region): Add new
user option.
(delete-selection-pre-hook): Respect it.
* doc/emacs/mark.texi (Using Region): Document the new user option.
* etc/NEWS: Announce the new user option. (bug#55692)

2 years agoMake it explicit that a couple of _s in lispref are underscores
Lars Ingebrigtsen [Wed, 1 Jun 2022 15:56:45 +0000 (17:56 +0200)]
Make it explicit that a couple of _s in lispref are underscores

* doc/lispref/strings.texi (Custom Format Strings):
* doc/lispref/control.texi (pcase Macro): Make it explicit that
it's an underscore (bug#55742).

2 years agoAdd a comment to lisp/Makefile.in
Lars Ingebrigtsen [Wed, 1 Jun 2022 15:53:29 +0000 (17:53 +0200)]
Add a comment to lisp/Makefile.in

* lisp/Makefile.in: Add FIXME comment.

2 years agoPlace bookmarks without last-modified at the end
Manuel Giraud [Wed, 1 Jun 2022 15:32:28 +0000 (17:32 +0200)]
Place bookmarks without last-modified at the end

* lisp/bookmark.el (bookmark-sort-flag): Typo fix in doc string.
(bookmark-maybe-sort-alist): Fix sorting when there's no last
modified.

2 years agoImprove documentation of Lisp-level drag-and-drop features
Po Lu [Wed, 1 Jun 2022 14:00:44 +0000 (22:00 +0800)]
Improve documentation of Lisp-level drag-and-drop features

* doc/lispref/frames.texi (Drag and Drop): Don't conflate X
Windows specific implementation details with general
drag-and-drop functionality, document what `dnd-protocol-alist'
actually means, and improve documentation on DND data types.

2 years agoMake XEmacs compat code in gamegrid.el obsolete
Stefan Kangas [Tue, 31 May 2022 13:20:44 +0000 (15:20 +0200)]
Make XEmacs compat code in gamegrid.el obsolete

* lisp/play/gamegrid.el (gamegrid-make-glyph): Warn on using obsolete
XEmacs style glyph.  (This is currently unused in the Emacs tree.)
(gamegrid-make-image-from-vector): Make obsolete.

2 years ago; * src/xterm.c (x_wait_for_cell_change): Don't call ConnectionNumber twice.
Po Lu [Wed, 1 Jun 2022 13:28:26 +0000 (21:28 +0800)]
; * src/xterm.c (x_wait_for_cell_change): Don't call ConnectionNumber twice.

2 years agoEnsure that loaddefs-gen.elc is build before loaddefs.el is generated
Lars Ingebrigtsen [Wed, 1 Jun 2022 12:55:31 +0000 (14:55 +0200)]
Ensure that loaddefs-gen.elc is build before loaddefs.el is generated

* lisp/Makefile.in ($(lisp)/loaddefs.el): Make loaddefs.el depend
on loaddefs-gen.elc to ensure that it's built.

2 years agoMinor fixes to x_next_event_from_any_display
Po Lu [Wed, 1 Jun 2022 12:52:00 +0000 (20:52 +0800)]
Minor fixes to x_next_event_from_any_display

* src/xterm.c (x_next_event_from_any_display): Don't call
XPending unless there is input to be read on the connection, and
don't call ConnectionNumber twice.

2 years agoFix up the loaddefs-gen updating logic
Lars Ingebrigtsen [Wed, 1 Jun 2022 12:50:16 +0000 (14:50 +0200)]
Fix up the loaddefs-gen updating logic

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Only do the
updating logic if we're really updating.

2 years agoRevert "Fix loaddefs generation"
Lars Ingebrigtsen [Wed, 1 Jun 2022 12:14:02 +0000 (14:14 +0200)]
Revert "Fix loaddefs generation"

This reverts commit 28358db93007456a1e0a6d9118823d4ddea4ba39.

This has been fixed in a different way.