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

2 years agoAdd support for the Hanifi Rohingya script (bug#55745)
समीर सिंह Sameer Singh [Tue, 31 May 2022 14:07:34 +0000 (19:37 +0530)]
Add support for the Hanifi Rohingya script (bug#55745)

* lisp/language/misc-lang.el ("Hanifi Rohingya"):
New language environment.
Add composition rules for Hanifi Rohingya.
Add sample text and input method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Hanifi Rohingya.
* lisp/leim/quail/misc-lang.el ("hanifi-rohingya"):
New input method.

* etc/HELLO: Add a Hanifi Rohingya greeting.
* etc/NEWS: Announce the new language environment.

2 years agoStart the org -> texi conversion while doing byte compilation
Lars Ingebrigtsen [Wed, 1 Jun 2022 11:10:30 +0000 (13:10 +0200)]
Start the org -> texi conversion while doing byte compilation

* lisp/Makefile.in (MAIN_FIRST): Compile stuff needed for org ->
texi generation.
(all): Add org-manuals.
(org-manuals): Start org -> texi conversion while we're doing byte
compilation to make things more parallel.  This shaves off about
ten seconds of a "make -j8" build.

2 years agoUpdate modus-themes to their latest version
Protesilaos Stavrou [Wed, 1 Jun 2022 11:05:49 +0000 (14:05 +0300)]
Update modus-themes to their latest version

* admin/MAINTAINERS: Update link to the Git repository of the
modus-themes; point to the new mailing list; include command for
sending a bug report.

* doc/misc/modus-themes.org (Install from the archives): Minor
rewording.
(Dealing with byte compilation errors): Clarify that occasional bugs
are not always a fault of the themes.
(Custom hl-todo colors): Add note about package.:(Full support for
packages or face groups, Indirectly covered packages): Update lists of
supported packages.
(Note on avy hints): Remove obsolete node.
(Note on git-gutter in Doom Emacs): Note problem with custom bitmaps,
which is not the fault of the themes.
(Note on display-fill-column-indicator-mode): Show how to use a
thicker indicator.:(Why are colors mostly variants of blue, magenta,
cyan?): Minor rewording.
(Sources of the themes): Update official theme sources.
(Issues you can help with)
(Patches require copyright assignment to the FSF): Update the
information on potential contributions.
(Acknowledgements): Update list of contributors in the form of code or
ideas/feedback.
(Meta, Other notes about the project): Rename section and include more
links to development-related blog posts.

* etc/themes/modus-themes.el (seq): Stop requiring 'seq'.
(modus-themes--version): Use internal variable for the themes'
version.
(modus-themes-operandi-colors, modus-themes-vivendi-colors): Make
minor tweaks to the color palettes.
(modus-themes-variable-pitch): Remove obsolete symbol from doc string.
(modus-themes--alist-or-seq): Update function to not rely on 'seq'.
(modus-themes--current-theme): Make stylistic tweaks.
(modus-themes--markup): Use correct order of inheritance for faces.
(modus-themes--paren, modus-themes--heading)
(modus-themes--agenda-structure, modus-themes--agenda-date)
(modus-themes--agenda-habit, modus-themes--mode-line-attrs)
(modus-themes--mode-line-padded-box, modus-themes--button): Update to
use 'modus-themes--property-lookup' instead of the previous function
that depended on 'seq'.
(modus-themes--diff): Make it combine as expected with the user option
'modus-themes-deuteranopia'.
(modus-themes-faces): Update list of faces.
(modus-themes-custom-variables): Expand support for face rotation in
'highlight-changes'.

* etc/themes/modus-operandi-theme.el:
* etc/themes/modus-vivendi-theme.el: Bump version number to 2.4.1.

Release notes: <https://protesilaos.com/codelog/2022-06-01-modus-themes-2-4-0/>.

2 years agoTweak how loaddefs-gen decides whether to do a full update
Lars Ingebrigtsen [Wed, 1 Jun 2022 10:55:06 +0000 (12:55 +0200)]
Tweak how loaddefs-gen decides whether to do a full update

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Do a
complete build more often to avoid problems with going from old
loaddefs.el files to new ones.

2 years agoFix Motif DND return value upon transfer failure
Po Lu [Wed, 1 Jun 2022 10:24:05 +0000 (18:24 +0800)]
Fix Motif DND return value upon transfer failure

* src/xterm.c (handle_one_xevent): Make XmTRANSFER_FAILURE clear
DND action.

2 years agoFix loaddefs generation
Po Lu [Wed, 1 Jun 2022 10:21:36 +0000 (18:21 +0800)]
Fix loaddefs generation

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Prevent
one kind of string match error.

2 years agoAdjust last change to Haiku as well
Po Lu [Wed, 1 Jun 2022 08:39:26 +0000 (08:39 +0000)]
Adjust last change to Haiku as well

* lisp/term/haiku-win.el (haiku-dnd-selection-converters): Add
text/uri-list.
(haiku-dnd-convert-text-uri-list): New function.
(x-begin-drag): Handle alternative data specified in selection
local values.

2 years agoClean up text/uri-list mess inside the Dired drag-and-drop code
Po Lu [Wed, 1 Jun 2022 08:25:53 +0000 (16:25 +0800)]
Clean up text/uri-list mess inside the Dired drag-and-drop code

* doc/lispref/frames.texi (Window System Selections):
* etc/NEWS: Document new changes to `gui-get-selection'.
* lisp/dired.el (dired-mouse-drag): Specify text/uri-list value
explicitly.
* lisp/select.el (gui-set-selection): Update doc string.
(xselect-convert-to-text-uri-list): Update to handle either a
single URL (as a string) or a vector of URLs, instead of file
names.
(xselect-uri-list-available-p): Likewise.
* src/xselect.c (x_get_local_selection): Look in tem's text
properties (if it is a string) for a local value before using
tem itself.

2 years agoFix hangs when explicitly moving frames with input blocked
Po Lu [Wed, 1 Jun 2022 06:13:57 +0000 (14:13 +0800)]
Fix hangs when explicitly moving frames with input blocked

* src/xterm.c (x_check_expected_move): Fix indent.
(x_sync_with_move): Use pselect to wait the 0.5 seconds instead
of wait_reading_process_output if input is blocked.

2 years agoImplement `allow-same-frame' for NS drag-and-drop
Po Lu [Wed, 1 Jun 2022 05:50:40 +0000 (13:50 +0800)]
Implement `allow-same-frame' for NS drag-and-drop

* lisp/term/ns-win.el (x-begin-drag): Implement
`allow-same-frame'.
* src/nsselect.m (Fns_begin_drag): New parameter
`allow-same-frame'.
* src/nsterm.h (@interface EmacsWindow): Update prototypes.
* src/nsterm.m ([EmacsView draggingEntered:]):
([EmacsView prepareForDragOperation:]):
([EmacsView performDragOperation:]): Respect new parameter.
([EmacsWindow beginDrag:forPasteboard:withMode:returnFrameTo:]):
Likewise.

2 years agoFix creation of menu items without help text on Haiku
Po Lu [Wed, 1 Jun 2022 05:05:42 +0000 (05:05 +0000)]
Fix creation of menu items without help text on Haiku

* src/haiku_support.cc (EmacsMenuItem): Don't mistakenly assume
help is non-NULL.

2 years agoTweak MAIN_FIRST/ja-dic compilation
Lars Ingebrigtsen [Wed, 1 Jun 2022 04:55:18 +0000 (06:55 +0200)]
Tweak MAIN_FIRST/ja-dic compilation

* lisp/Makefile.in (MAIN_FIRST): ja-dic-utl isn't used in the
conversion process, to don't compile it early.

2 years agoFix pselect usage mistakes
Po Lu [Wed, 1 Jun 2022 04:50:16 +0000 (12:50 +0800)]
Fix pselect usage mistakes

* src/xterm.c (x_next_event_from_any_display):
(x_wait_for_cell_change): Fix calls to pselect and tests against
return value.

2 years agoDon't do OKURI-NASI until the conversion files have been compiled
Lars Ingebrigtsen [Wed, 1 Jun 2022 04:33:07 +0000 (06:33 +0200)]
Don't do OKURI-NASI until the conversion files have been compiled

* lisp/Makefile.in (generate-ja-dic): Byte-compile the ja-dic.el
file, too.

2 years agoCompile ja-dic files to speed OKURI-NASI up
Lars Ingebrigtsen [Wed, 1 Jun 2022 04:22:29 +0000 (06:22 +0200)]
Compile ja-dic files to speed OKURI-NASI up

* lisp/Makefile.in (MAIN_FIRST): Also compile ja-dic utils to
speed generation up.

2 years agoUpdate publicsuffix.txt from upstream
Stefan Kangas [Wed, 1 Jun 2022 04:01:33 +0000 (06:01 +0200)]
Update publicsuffix.txt from upstream

* etc/publicsuffix.txt: Update from
https://publicsuffix.org/list/public_suffix_list.dat
dated 2022-05-18 19:45:52 UTC.

2 years agoEnsure byte compilation of the ja-dic.el file
Lars Ingebrigtsen [Wed, 1 Jun 2022 03:29:33 +0000 (05:29 +0200)]
Ensure byte compilation of the ja-dic.el file

* lisp/Makefile.in (generate-ja-dic): Byte-compile the ja-dic.el
file, too.

2 years agoReshuffle the generation of the OKURO-NASI entries to speed up build
Lars Ingebrigtsen [Wed, 1 Jun 2022 02:49:57 +0000 (04:49 +0200)]
Reshuffle the generation of the OKURO-NASI entries to speed up build

* leim/Makefile.in (all): Remove the ja-dic target from all -- we
don't need this file generated before we generate the .elc files.
(generate-ja-dic): Add new target.

* lisp/Makefile.in (.PHONY, generate-ja-dic): Add new target.
(all): Make all depend on the new generate-ja-dic target so that
the OKURO-NASI entries are computed while the .elc files are
compiled.  On a AMD Ryzen 9 5950X 16-Core Processor this brings
compilation time on a "make -j32 bootstrap" down from 1m52s to 1m34s.

2 years agoFix the GTK build
Po Lu [Wed, 1 Jun 2022 00:57:52 +0000 (08:57 +0800)]
Fix the GTK build

* src/xterm.c (x_wait_for_cell_change): Don't initialize rfds
on GTK.

2 years agoImprove x_wait_for_cell_change
Po Lu [Wed, 1 Jun 2022 00:57:08 +0000 (08:57 +0800)]
Improve x_wait_for_cell_change

* src/xterm.c (x_wait_for_cell_change): Keep processing events
while still XPending.

2 years agoNote changes in ;;;### parsing
Lars Ingebrigtsen [Tue, 31 May 2022 20:56:21 +0000 (22:56 +0200)]
Note changes in ;;;### parsing

2 years agoFix the loaddefs updating logic
Lars Ingebrigtsen [Tue, 31 May 2022 20:49:12 +0000 (22:49 +0200)]
Fix the loaddefs updating logic

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Fix the
logic of updating -- we update per loaddefs file.

2 years agoFix yank-in-context--transform after recent reversion
Lars Ingebrigtsen [Tue, 31 May 2022 19:04:59 +0000 (21:04 +0200)]
Fix yank-in-context--transform after recent reversion

* lisp/simple.el (yank-in-context--transform): Fix call to
comment-region-default-1 after recent reverted patch.

2 years agoAdd a last-modified field when a bookmark is set
Manuel Giraud [Tue, 31 May 2022 18:35:39 +0000 (20:35 +0200)]
Add a last-modified field when a bookmark is set

* test/lisp/bookmark-tests.el (bookmark-tests-make-record)
(bookmark-tests-make-record-list, bookmark-tests-set): fix tests
to not consider last-modified in bookmark equality.
* lisp/bookmark.el (bookmark-make-record-default): add a
last-modified field.
(bookmark-sort-flag): add the 'last-modified choice.
(bookmark-get-last-modified): new function to get last-modified
bookmark field.
(bookmark-maybe-sort-alist): sort in last-modified first order.
(bookmark-completing-read): use `bookmark-maybe-sort-alist'.

2 years agoRevert "Allow commenting out white space lines in latex-mode"
Lars Ingebrigtsen [Tue, 31 May 2022 18:20:23 +0000 (20:20 +0200)]
Revert "Allow commenting out white space lines in latex-mode"

This reverts commit 0870ebb3cbfcb097d85eea5eacaf992dd88ed204.

This was the wrong way to try to fix this -- see bug#55716.

2 years agoMake partial loaddefs updates work again
Lars Ingebrigtsen [Tue, 31 May 2022 18:08:18 +0000 (20:08 +0200)]
Make partial loaddefs updates work again

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Only update
the loaddefs section for the files that have changed.  This makes
"git pull" (when few/no Lisp files have changed much faster).

2 years agoFix handling of windows/buffers for non-nil completion-auto-select (bug#55712)
Juri Linkov [Tue, 31 May 2022 17:52:37 +0000 (20:52 +0300)]
Fix handling of windows/buffers for non-nil completion-auto-select (bug#55712)

* lisp/minibuffer.el (completion--in-region-1): When completion-auto-select
is `second-tab', call switch-to-completions outside of `with-current-buffer'.
For the case of completion-auto-select customized to t,
move switch-to-completions from completion-setup-function
where it was called inside of with-current-buffer-window.

* lisp/simple.el (completion-setup-function): Move switch-to-completions
for completion-auto-select=t to completion--in-region-1 where it's
handled together with the case of `second-tab'.
(next-completion): Add check for the minibuffer to support in-buffer
inline completions.

2 years agoRemove unused w32-* variables
Eli Zaretskii [Tue, 31 May 2022 17:28:50 +0000 (20:28 +0300)]
Remove unused w32-* variables

* src/w32fns.c (syms_of_w32fns) <w32-bdf-filename-alist>
<w32-strict-fontnames>: Remove unused variables.

2 years ago; * etc/NEWS: Fix a typo.
Eli Zaretskii [Tue, 31 May 2022 16:19:23 +0000 (19:19 +0300)]
; * etc/NEWS: Fix a typo.

2 years agoSpeed up generation of loaddefs files
Lars Ingebrigtsen [Tue, 31 May 2022 16:08:33 +0000 (18:08 +0200)]
Speed up generation of loaddefs files

* doc/lispref/loading.texi (Autoload, Autoload by Prefix): Refer
to loaddefs-generate instead of update-file-autoloads.

* lisp/Makefile.in (LOADDEFS): Remove, because all the loaddefs
files are created in one go now.
(COMPILE_FIRST): Add loaddefs-gen/radix-tree, and drop autoload.
($(lisp)/loaddefs.el): Use loaddefs-gen.
(MH_E_DIR, $(TRAMP_DIR)/tramp-loaddefs.el)
($(MH_E_DIR)/mh-loaddefs.el, $(CAL_DIR)/cal-loaddefs.el)
($(CAL_DIR)/diary-loaddefs.el, $(CAL_DIR)/hol-loaddefs.el): Remove.

* lisp/generic-x.el: Inhibit computing prefixes, because the
namespace here is all wonky.

* lisp/w32-fns.el (w32-batch-update-autoloads): Removed -- unused
function.

* lisp/calendar/holidays.el ("holiday-loaddefs"): Renamed from
hol-loaddefs to have a more regular name.

* lisp/cedet/ede/proj-elisp.el (ede-emacs-cedet-autogen-compiler):
Refer to loaddefs-gen instead of autoload.

* lisp/emacs-lisp/autoload.el (make-autoload, autoload-rubric)
(autoload-insert-section-header): Made into aliases of
loaddefs-gen functions.
(autoload--make-defs-autoload): Ditto.
(autoload-ignored-definitions, autoload-compute-prefixes): Moved
to loaddefs-gen.

* lisp/emacs-lisp/lisp-mode.el (lisp-mode-autoload-regexp): New
constant.
(lisp-fdefs, lisp-mode-variables, lisp-outline-level): Use it to
recognize all ;;;###autoload forms.

* lisp/emacs-lisp/loaddefs-gen.el: New file.

* lisp/emacs-lisp/package.el: Use loaddefs-generate instead of
make-directory-autoloads.

* test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-faulty-bzr-autoloads):
Use loaddefs instead of autoloads.

2 years agoConvert FILE_NAME to refs on Haiku instead of text/uri-list
Po Lu [Tue, 31 May 2022 13:31:18 +0000 (13:31 +0000)]
Convert FILE_NAME to refs on Haiku instead of text/uri-list

* lisp/term/haiku-win.el (haiku-dnd-selection-converters): Use
more appropriate target for file names.
(haiku-dnd-convert-uri-list): Delete function.
(haiku-dnd-convert-file-name): New function.  Also handle remote
file names.

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Tue, 31 May 2022 13:19:44 +0000 (16:19 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years agoAdd missing part of recent changes to NS DND support
Po Lu [Tue, 31 May 2022 13:14:16 +0000 (21:14 +0800)]
Add missing part of recent changes to NS DND support

* lisp/term/ns-win.el (x-begin-drag): Implement `return-frame'
argument.

2 years agoAdd support for the Makasar and Lontara scripts (bug#55734)
समीर सिंह Sameer Singh [Mon, 30 May 2022 12:16:14 +0000 (17:46 +0530)]
Add support for the Makasar and Lontara scripts (bug#55734)

* lisp/language/indonesian.el ("Makasar") ("Buginese"):
New language environment. Add composition rules for Makasar
and Lontara. Add sample texts and input methods.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Makasar and Buginese.
* lisp/leim/quail/indonesian.el ("makasar") ("lontara"):
New input methods.

* etc/HELLO: Add Makasar and Buginese greetings.
* etc/NEWS: Announce the new language environments.

2 years agoSlightly optimize x_check_errors as well
Po Lu [Tue, 31 May 2022 12:56:43 +0000 (20:56 +0800)]
Slightly optimize x_check_errors as well

* src/xterm.c (x_check_errors): Don't sync if no requests were
made since the error trap was installed.

2 years ago* lisp/play/handwrite.el: Minor doc fixes.
Stefan Kangas [Tue, 31 May 2022 12:30:38 +0000 (14:30 +0200)]
* lisp/play/handwrite.el: Minor doc fixes.

2 years agoMake handwrite.el printing use more of the ps-print setup
Antonio Ruiz [Tue, 31 May 2022 11:27:28 +0000 (13:27 +0200)]
Make handwrite.el printing use more of the ps-print setup

* lisp/play/handwrite.el (handwrite): Allow ps-lpr-printer to be
computed at runtime (bug#55733).

Copyright-paperwork-exempt: yes

2 years agoFix replying to _NET_WM_PING during drag-and-drop
Po Lu [Tue, 31 May 2022 10:18:52 +0000 (18:18 +0800)]
Fix replying to _NET_WM_PING during drag-and-drop

* src/xterm.c (handle_one_xevent): Test client window against
root window instead of using nonstandard event mask.

2 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Po Lu [Tue, 31 May 2022 10:06:15 +0000 (18:06 +0800)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

2 years agoImplement `return-frame' for DND on NS
Po Lu [Tue, 31 May 2022 10:05:41 +0000 (18:05 +0800)]
Implement `return-frame' for DND on NS

* src/nsselect.m (Fns_begin_drag): New argument `return-frame'.
(syms_of_nsselect): New defsym.
* src/nsterm.h (EmacsWindow): New fields.
* src/nsterm.m (ns_read_socket): Split parts off to
ns_read_socket_1.
(ns_read_socket_1): New function.
(ns_flush_display): Use that function instead.

([EmacsWindow beginDrag:forPasteboard:]): Update for
return-frame.

2 years agoFix autorelease pool "straddling" during DND on NS
Po Lu [Tue, 31 May 2022 08:40:57 +0000 (16:40 +0800)]
Fix autorelease pool "straddling" during DND on NS

* src/nsterm.m (ns_mouse_position): Implement `drag-source'
on NS.
([EmacsView draggingUpdated:]): Add autorelease pool around
callbacks.
([EmacsWindow beginDrag:forPasteboard:]): Block input around
dragImage.

2 years agoPacify GCC 12 in x_get_current_wm_state
Paul Eggert [Tue, 31 May 2022 08:19:32 +0000 (01:19 -0700)]
Pacify GCC 12 in x_get_current_wm_state

* src/xterm.c (x_get_current_wm_state): When lint checking,
initialize reply_data to a non-null dummy value instead of to a
null one.  This pacifies GCC 12 -Wanalyzer-null-dereference.

2 years agoPacify GCC 12 in dump_queue_enqueue
Paul Eggert [Tue, 31 May 2022 08:19:32 +0000 (01:19 -0700)]
Pacify GCC 12 in dump_queue_enqueue

* src/pdumper.c (dump_queue_enqueue): Use BASE_EQ, not EQ.
This pacifies GCC 12 -Wanalyzer-null-dereference.

2 years agoBe more robust if doc file is corrupted
Paul Eggert [Tue, 31 May 2022 08:19:32 +0000 (01:19 -0700)]
Be more robust if doc file is corrupted

* src/doc.c (Fsnarf_documentation): Don’t dump core on a corrupted
doc file.  Problem found by GCC 12 -Wanalyzer-null-argument.

2 years agoPacify GCC 12 in Fmove_overlay
Paul Eggert [Tue, 31 May 2022 08:19:32 +0000 (01:19 -0700)]
Pacify GCC 12 in Fmove_overlay

* src/buffer.c (Fmove_overlay): Use BASE_EQ, not EQ.
This pacifies GCC 12 -Wanalyzer-null-dereference.

2 years agoPacify GCC 12 in Fx_show_tip
Paul Eggert [Tue, 31 May 2022 08:19:32 +0000 (01:19 -0700)]
Pacify GCC 12 in Fx_show_tip

* src/xfns.c (Fx_show_tip): Use BASE_EQ, not EQ.
This pacifies GCC 12 -Wanalyzer-null-dereference.