Skip to content

Commit

Permalink
Merge remote-tracking branch 'gnu/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
declantsien committed Apr 22, 2024
2 parents a74fe0e + 931cd93 commit be84c40
Show file tree
Hide file tree
Showing 135 changed files with 5,093 additions and 1,486 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ java/org/gnu/emacs/*.class
# Built by `aapt'.
java/org/gnu/emacs/R.java

# Built by `make'.
java/org/gnu/emacs/EmacsConfig.java
java/org/gnu/emacs/cf-stamp

# Built by `config.status'.
java/AndroidManifest.xml

Expand Down
2 changes: 1 addition & 1 deletion cross/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ src/Makefile: $(top_builddir)/src/Makefile.android
-e 's/\.\.\/admin\/charsets/..\/..\/admin\/charsets/g' \
-e 's/^libsrc =.*$$/libsrc = \.\.\/\.\.\/lib-src/g' \
-e 's/libsrc =.*$$/libsrc = \.\.\/\.\.\/lib-src/g' \
-e 's/-I\$$(top_srcdir)\/lib/-I..\/$(subst /,\/,$(srcdir))\/lib/g' \
-e 's/-I\$$(top_srcdir)\/lib//g' \
< $(top_builddir)/src/Makefile.android > $@

src/epaths.h: $(top_builddir)/src/epaths.h
Expand Down
1 change: 1 addition & 0 deletions cross/ndk-build/ndk-build.mk.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ NDK_BUILD_CXX_LDFLAGS = @NDK_BUILD_CXX_LDFLAGS@
NDK_BUILD_ANY_CXX_MODULE = @NDK_BUILD_ANY_CXX_MODULE@
NDK_BUILD_SHARED =
NDK_BUILD_STATIC =
NDK_BUILD_READELF = @NDK_BUILD_READELF@

define uniqify
$(if $1,$(firstword $1) $(call uniqify,$(filter-out $(firstword $1),$1)))
Expand Down
120 changes: 62 additions & 58 deletions doc/emacs/android.texi
Original file line number Diff line number Diff line change
Expand Up @@ -823,69 +823,73 @@ example, the permission to access contacts may be useful for EUDC.
@node Android Windowing
@section The Android Window System

Android's window system is unusual, in that all windows are
maximized or full-screen, and only one window can be displayed at a
time. On larger devices, the system permits simultaneously tiling up
to four windows on the screen.

Windows on Android do not exist indefinitely after they are created.
Instead, the system may choose to close windows that are not on screen
in order to conserve memory, with the assumption that the program will
save its contents to disk and restore them later, when the user asks
for it to be opened again. As this is obviously not possible with
Emacs, Emacs separates the resources associated with a frame from its
system window.

Each system window created (including the initial window created
during Emacs startup) is appended to a list of windows that do not
have associated frames. When a frame is created, Emacs looks up any
window within that list, and displays the contents of the frame
within; if there is no window at all, then one is created. Likewise,
when a new window is created by the system, Emacs places the contents
of any frame that is not already displayed within a window inside.
When a frame is closed, the corresponding system window is also
closed. Upon startup, the system creates a window itself (within
which Emacs displays the first window system frame shortly
thereafter.) Emacs differentiates between that window and windows
created on behalf of other frames to determine what to do when the
system window associated with a frame is closed:
Android's window system is unusual in that all windows are reported to
applications as maximized or full-screen, and, in the general case, only
one window can be displayed at a time. On larger devices, the system
permits simultaneously tiling up to four windows on the screen, though
in emulators or installations configured for ``desktop'' system stacks
freely resizable windows as other desktop window managers do.

Windows, or, in system nomenclature, activities, do not exist
indefinitely after creation, as the system may choose to pause windows
that are not visible in order to conserve memory, on the assumption that
the program will save its contents to disk, to be restored when the user
selects those windows from the task switcher. Furthermore, a window is
created by the operating system at Emacs startup that is afforded
special treatment, which Emacs is expected to adopt.

Emacs approaches window management with the general objective of
minimizing differences in frame behavior exposed to Lisp from that of
frames on ordinary window systems, such as X Windows; the degree to
which this goal is actually attained varies by the availability of
facilities for window management in the version of Android where it is
installed, and operating system policy towards inactive windows. When
it is unavoidable that concessions should be made to such policy, Emacs
prefers destroying frames to retaining ones with no activities to
display them, unless such a frame is the initial frame and therefore
displayed in the activity created at startup, which it is possible to
open and identify so long as Emacs is yet executing.

@cindex frames and windows, Android 5.0
Android 5.0 and later support an accurate implementation of window
management where frames hold a one-to-one relation to the activities in
which they are displayed, enabling deletion of activities in the task
switcher to directly affect the frames concerned, and vice versa. There
are just two exceptions:

@itemize @bullet
@item
When the system closes the window created during application startup
in order to save memory, Emacs retains the frame for when that window
is created later.

@item
When the user closes the window created during application startup,
and the window was not previously closed by the system in order to
save resources, Emacs deletes any frame displayed within that window.

However, on Android 7.0 and later, such frames are not deleted if the
window is closed four or more hours after the window moves into the
background, as the system automatically removes open windows once a
certain period of inactivity elapses when the number of windows retained
by the window manager surpasses a specific threshold, and window
deletion by this mechanism is indistinguishable from window deletion by
the user. Emacs begins to ignore window deletion after two hours less
than the default value of this threshold both to err on the side of
caution, in case the system's record of inactivity and Emacs's disagree,
and for the reason that this threshold is open to customization by OS
distributors.

@item
When the user or the system closes any window created by Emacs on behalf
of a specific frame, Emacs deletes the frame displayed within that
window, unless the system is Android 5.0 or later, where such windows
are treated identically to the window created at startup, albeit with no
proviso regarding window inactivity.
After the system pauses an activity that remains in the task switcher in
response to inactivity, removing it from the task switcher while it
remains in its inactive state will not delete the frame inside, as Emacs
is not notified of the deletion of its activities in such circumstances.
The frame will be deleted upon the next window management operation that
prompts an examination of the list of live windows. Likewise, an
inactive activity displaying a frame will not be immediately deleted
with its frame, but will be if it is selected from the window list or
upon another examination of the window list.

@item
Any frame besides the initial frame might be deleted after 4 to 6 hours
of inactivity in the background, if it is removed by the system in
``trimming'' the task switcher of excess, and presumably unwanted,
tasks; the initial frame is exempt from this treatment because it can be
reopened otherwise than from the task switcher, but as deletion by this
mechanism is indistinguishable from legitimate user action to remove
activities from the task switcher, the latter will also be ignored by
the initial frame after a 4-hour interval elapses from the time of last
activity.
@end itemize

When the system predates Android 5.0, the window manager will not
accept more than one user-created Emacs window. If frame creation gives
rise to windows in excess of this limit, the window manager will
arbitrarily select one of their number to display, with the rest
remaining invisible until that window is destroyed with its frame.
@cindex frames and windows, Android 4.4
@cindex frames and windows, Android 2.2
Android 4.4 and earlier provide considerably inferior interfaces
inadequate for a complete implementation of window management. On such
systems, Emacs substitutes a fairly primitive mechanism where all but
the initial frame are deleted when their activities are paused, only a
single activity (not counting the activity created at startup) is
visible at a time, and unattached frames are displayed in the first
unoccupied activity available.

@cindex windowing limitations, android
@cindex frame parameters, android
Expand Down
7 changes: 4 additions & 3 deletions doc/emacs/files.texi
Original file line number Diff line number Diff line change
Expand Up @@ -569,9 +569,10 @@ Emacs carefully copies the old contents to another file, called the
@dfn{backup} file, before actually saving.

Emacs makes a backup for a file only the first time the file is
saved from a buffer. No matter how many times you subsequently save
the file, its backup remains unchanged. However, if you kill the
buffer and then visit the file again, a new backup file will be made.
saved from the buffer that visits it. No matter how many times you
subsequently save the file, its backup remains unchanged. However, if
you kill the buffer and then visit the file again, a new backup file
will be made.

For most files, the variable @code{make-backup-files} determines
whether to make backup files. On most operating systems, its default
Expand Down
162 changes: 162 additions & 0 deletions doc/emacs/kmacro.texi
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ intelligent or general. For such things, Lisp must be used.
* Edit Keyboard Macro:: Editing keyboard macros.
* Keyboard Macro Step-Edit:: Interactively executing and editing a keyboard
macro.
* Kmacro Menu:: An interface for listing and editing
keyboard macros and the keyboard macro ring.
@end menu

@node Basic Keyboard Macro
Expand Down Expand Up @@ -616,3 +618,163 @@ including the final @kbd{C-j}), and appends them at the end of the
keyboard macro; it then terminates the step-editing and replaces the
original keyboard macro with the edited macro.
@end itemize

@node Kmacro Menu
@section Listing and Editing Keyboard Macros
@cindex Kmacro Menu

@cindex listing current keyboard macros
@kindex M-x list-keyboard-macros @key{RET}
@findex kmacro-menu
@findex list-keyboard-macros
To display a list of existing keyboard macros, type @kbd{M-x
list-keyboard-macros @key{RET}}. This pops up the @dfn{Kmacro Menu} in
a buffer named @file{*Keyboard Macro List*}. Each line in the list
shows one macro's position, counter value, counter format, that counter
value using that format, and macro keys. Here is an example of a macro
list:

@smallexample
Position Counter Format Formatted Keys
0 8 %02d 08 N : SPC <F3> RET
1 0 %d 0 l o n g SPC p h r a s e
@end smallexample

@noindent
The macros are listed with the current macro at the top in position
number zero and the older macros in the order in which they are found in
the keyboard macro ring (@pxref{Keyboard Macro Ring}). Using the Kmacro
Menu, you can change the order of the macros and change their counters,
counter formats, and keys. The Kmacro Menu is a read-only buffer, and
can be changed only through the special commands described in this
section. After a command is run, the Kmacro Menu displays changes to
reflect the new values of the macro properties and the macro ring. You
can use the usual cursor motion commands in this buffer, as well as
special motion commands for navigating the table. To view a list of the
special commands, type @kbd{C-h m} or @kbd{?} (@code{describe-mode}) in
the Kmacro Menu.

You can use the following commands to change a macro's properties:

@table @kbd
@item #
@findex kmacro-menu-edit-position
@kindex # @r{(Kmacro Menu)}
Change the position of the macro on the current line
(@pxref{Keyboard Macro Ring}).

@item C-x C-t
@findex kmacro-menu-transpose
@kindex C-x C-t @r{(Kmacro Menu)}
Move the macro on the current line to the line above, like in
@code{transpose-lines}.

@item c
@findex kmacro-menu-edit-counter
@kindex c @r{(Kmacro Menu)}
Change the counter value of the macro on the current line
(@pxref{Keyboard Macro Counter}).

@item f
@findex kmacro-menu-edit-format
@kindex f @r{(Kmacro Menu)}
Change the counter format of the macro on the current line.

@item e
@findex kmacro-menu-edit-keys
@kindex e @r{(Kmacro Menu)}
Change the keys of the macro on the current line using
@code{edit-kbd-macro} (@pxref{Edit Keyboard Macro}).

@item @key{RET}
@findex kmacro-menu-edit-column
@kindex @key{RET} @r{(Kmacro Menu)}
Change the value in the current column of the macro on the current line
using commands above.
@end table

The following commands delete or duplicate macros in the list:

@table @kbd
@item d
@findex kmacro-menu-flag-for-deletion
@item d @r{(Kmacro Menu)}
Flag the macro on the current line for deletion, then move point to the
next line (@code{kmacro-menu-flag-for-deletion}). The deletion flag is
indicated by the character @samp{D} at the start of line. The deletion
occurs only when you type the @kbd{x} command (see below).

If the region is active, this command flags all of the macros in the
region.

@item x
@findex kmacro-menu-do-flagged-delete
@item x @r{(Kmacro Menu)}
Delete the macros in the list that have been flagged for deletion
(@code{kmacro-menu-do-flagged-delete}).

@item m
@findex kmacro-menu-mark
@item m @r{(Kmacro Menu)}
Mark the macro on the current line, then move point to the next line
(@code{kmacro-menu-mark}). Marked macros are indicated by the character
@samp{*} at the start of line. Marked macros can be operated on by the
@kbd{C} and @kbd{D} commands (see below).

If the region is active, this command marks all of the macros in the
region.

@item C
@findex kmacro-menu-do-copy
@item C @r{(Kmacro Menu)}
This command copies macros by duplicating them at their current
positions in the list (@code{kmacro-menu-do-copy}). For example,
running this command on the macro at position number zero will insert a
copy of that macro into position number one and move the remaining
macros down.

If the region is active, this command duplicates the macros in the
region. Otherwise, if there are marked macros, this command duplicates
the marked macros. If there is no region nor are there marked macros,
this command duplicates the macro on the current line. In the first two
cases, the command prompts for confirmation before duplication.

@item D
@findex kmacro-menu-do-delete
@item D @r{(Kmacro Menu)}
This command deletes macros, removing them from the ring
(@code{kmacro-menu-do-delete}). For example, running this command on
the macro at position number zero will delete the current macro and then
make the first macro in the macro ring (previously at position number
one) the new current macro, popping it from the ring.

If the region is active, this command deletes the macros in the
region. Otherwise, if there are marked macros, this command deletes the
marked macros. If there is no region nor are there marked macros, this
command deletes the macro on the current line. In all cases, the
command prompts for confirmation before deletion.

This command is an alternative to the @kbd{d} and @kbd{x} commands
(see above).

@item u
@findex kmacro-menu-unmark
@item u @r{(Kmacro Menu)}
Unmark and unflag the macro on the current line, then move point down
to the next line (@code{kmacro-menu-unmark}). If there is an active
region, this command unmarks and unflags all of the macros in the
region.

@item @key{DEL}
@findex kmacro-menu-unmark-backward
@item @key{DEL} @r{(Kmacro Menu)}
Like the @kbd{u} command (see above), but move point up to the previous
line when there is no active region
(@code{kmacro-menu-unmark-backward}).

@item U
@findex kmacro-menu-unmark-all
@item U @r{(Kmacro Menu)}
Unmark and unflag all macros in the list
(@code{kmacro-menu-unmark-all}).
@end table

0 comments on commit be84c40

Please sign in to comment.