]> git.eshelyaron.com Git - emacs.git/log
emacs.git
23 months ago* doc/emacs/input.texi (On-Screen Keyboards): Fix typo.
Po Lu [Thu, 26 Jan 2023 14:14:39 +0000 (22:14 +0800)]
* doc/emacs/input.texi (On-Screen Keyboards): Fix typo.

23 months agoUpdate Android port
Po Lu [Thu, 26 Jan 2023 14:11:04 +0000 (22:11 +0800)]
Update Android port

* INSTALL.android: Describe that apksigner is also required.
* configure.ac: Correctly add cross/Makefile to
SUBDIR_MAKEFILES.
* cross/Makefile.in: (config.status): Depend on
$(top_srcdir)/config.status.
* doc/emacs/input.texi (On-Screen Keyboards): Document how to
quit without a physical keyboard.
* java/org/gnu/emacs/EmacsNative.java (EmacsNative): New
function `quit'.
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow): New field
`lastVolumeButtonPress'.
(onKeyDown): Quit if necessary.
* m4/ndk-build.m4 (ndk_where_cc): Fix search if CC is not a
single word.
* src/android.c (android_open): Remove unused variable.
(quit): New function.
* src/androidmenu.c (android_process_events_for_menu): Allow
quitting the menu.
* src/xterm.c (handle_one_xevent, x_term_init, syms_of_xterm):
Implement features described above, so they work on free
operating systems.
* src/xterm.h (struct x_display_info): New fields `quit_keysym',
`quit_keysym_time'.

23 months agoUpdate Android port
Po Lu [Thu, 26 Jan 2023 11:54:38 +0000 (19:54 +0800)]
Update Android port

* INSTALL.android: Document how to install sqlite3.
* build-aux/ndk-build-helper-1.mk (SYSTEM_LIBRARIES):
* build-aux/ndk-build-helper-2.mk (SYSTEM_LIBRARIES): Add liblog
and libandroid.
* configure.ac (SQLITE3_LIBS, HAVE_SQLITE3)
(HAVE_SQLITE3_LOAD_EXTENSION): Support on Android.
(APKSIGNER): Look for this new required binary.

* cross/ndk-build/ndk-build-shared-library.mk (objname):
* cross/ndk-build/ndk-build-static-library.mk (objname): Avoid
duplicate rules by prefixing objects with module type.

* cross/ndk-build/ndk-build.mk.in (NDK_BUILD_SHARED): Fix
definition.
* cross/ndk-build/ndk-resolve.mk:
(NDK_SO_EXTRA_FLAGS_$(LOCAL_MODULE)): Handle new system
libraries.

* doc/emacs/android.texi (Android File System): Document Android
10 system restriction.

* java/AndroidManifest.xml.in: Target Android 33, not 28.
* java/Makefile.in (SIGN_EMACS_V2, APKSIGNER): New variables.
($(APK_NAME)): Make sure to apply a ``version 2 signature'' to
the package as well.

* java/org/gnu/emacs/EmacsNative.java (EmacsNative): New
argument apiLevel.
* java/org/gnu/emacs/EmacsNoninteractive.java (main):
* java/org/gnu/emacs/EmacsThread.java (run): Pass API level.
* m4/ndk-build.m4 (ndk_package_mape): Add package mapping for
sqlite3.
* src/Makefile.in (SQLITE3_CFLAGS): New substition.
(EMACS_CFLAGS): Add that variable.

* src/android.c (android_api_level): New variable.
(initEmacs): Set it.
(android_file_access_p): Make static.
(android_hack_asset_fd): Adjust for restrictions in Android 29
and later.
(android_close_on_exec): New function.
(android_open): Adjust to not duplicate file descriptor even if
CLOEXEC.
(android_faccessat): Use fstatat at-func emulation.

* src/android.h: Update prototypes.
* src/dired.c (file_name_completion_dirp):
* src/fileio.c (file_access_p, Faccess_file): Now that
sys_faccessat takes care of everything, stop calling
android_file_access_p.

23 months agoUpdate Android port
Po Lu [Thu, 26 Jan 2023 07:37:04 +0000 (15:37 +0800)]
Update Android port

* .gitignore: Ignore lib/math.h.
* INSTALL.android: Update accordingly.
* build-aux/ndk-build-helper-1.mk:
* build-aux/ndk-build-helper-2.mk:
* build-aux/ndk-build-helper.mk:
* build-aux/ndk-module-extract.awk: Handle C++ modules.
* configure.ac: Enable libxml2 on Android.

* cross/ndk-build/Makefile.in:
* cross/ndk-build/ndk-build-shared-library.mk:
* cross/ndk-build/ndk-build-static-library.mk:
* cross/ndk-build/ndk-build.mk.in:
* cross/ndk-build/ndk-resolve.mk: Fix dependency resolution of
includes.

* java/org/gnu/emacs/EmacsView.java (popupMenu): Fix minimum SDK
version for actual popup menus.
* lib/math.h: Delete file.

* m4/ndk-build.m4 (ndk_SEARCH_MODULE, ndk_CHECK_MODULES): Look
for nasm and C++ libraries.

* src/android.c (faccessat): Rename to `android_faccessat'.
* src/android.h: Update prototypes.
* src/dired.c (file_name_completion_dirp):
* src/fileio.c (file_access_p, Faccess_file, file_directory_p):
* src/lisp.h:
* src/lread.c (openp):
* src/process.c (allocate_pty): Use sys_faccessat.
* src/sysdep.c (sys_faccessat): New function.

23 months agoRemove unused file
Po Lu [Thu, 26 Jan 2023 06:13:24 +0000 (14:13 +0800)]
Remove unused file

* cross/ndk-build/ndk-build.in: Delete unused file.

23 months agoUpdate Android port
Po Lu [Wed, 25 Jan 2023 14:07:51 +0000 (22:07 +0800)]
Update Android port

* java/org/gnu/emacs/EmacsDrawLine.java: Fix this again.  Gosh,
how does Android do this.
* java/org/gnu/emacs/EmacsNoninteractive.java (main): Port to
Android 2.3.3.

* java/org/gnu/emacs/EmacsSdk11Clipboard.java
(EmacsSdk11Clipboard): Port to Android 4.0.3.
* java/org/gnu/emacs/EmacsService.java (getClipboardManager):
New function.

* src/alloc.c (find_string_data_in_pure): Fix Android alignment
issue.

* src/android-emacs.c (main): Port to Android 4.4.
* src/android.c (initEmacs): Align stack to 32 bytes, so it ends
up aligned to 16 even though gcc thinks the stack is already
aligned to 16 bytes.

* src/callproc.c (init_callproc): Use /system/bin/sh instead of
/bin/sh by default.

23 months agoRemove extra header
Po Lu [Wed, 25 Jan 2023 14:05:15 +0000 (22:05 +0800)]
Remove extra header

* cross/lib/math.h: Delete header.

23 months agoMinor fixes to Android port
Po Lu [Wed, 25 Jan 2023 11:15:30 +0000 (19:15 +0800)]
Minor fixes to Android port

* java/Makefile.in: (emacs.apk-in): Don't call cp with empty
args.
* java/org/gnu/emacs/EmacsDrawLine.java (perform): Fix for
PostScript filling semantics.
* src/Makefile.in (android-emacs): Build android-emacs directly.

23 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Wed, 25 Jan 2023 10:45:09 +0000 (18:45 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

23 months agoUpdate Android port
Po Lu [Wed, 25 Jan 2023 10:44:47 +0000 (18:44 +0800)]
Update Android port

* doc/emacs/android.texi (Android Startup, Android Environment):
Document that restrictions on starting Emacs have been lifted.

* java/README: Document Java for Emacs developers and how the
Android port works.

* java/org/gnu/emacs/EmacsApplication.java (EmacsApplication)
(findDumpFile): New function.
(onCreate): Factor out dump file finding functions to there.

* java/org/gnu/emacs/EmacsNative.java (EmacsNative): Update
function declarations.
* java/org/gnu/emacs/EmacsNoninteractive.java
(EmacsNoninteractive): New class.

* java/org/gnu/emacs/EmacsService.java (EmacsService, getApkFile)
(onCreate): Pass classpath to setEmacsParams.
* java/org/gnu/emacs/EmacsThread.java (EmacsThread): Make run an
override.
* lisp/loadup.el: Don't dump on Android when noninteractive.
* lisp/shell.el (shell--command-completion-data): Handle
inaccessible directories.
* src/Makefile.in (android-emacs): Link with gnulib.
* src/android-emacs.c (main): Implement to launch app-process
and then EmacsNoninteractive.
* src/android.c (setEmacsParams): New argument `class_path'.
Don't set stuff up when running noninteractive.
* src/android.h (initEmacs): Likewise.
* src/androidfont.c (init_androidfont):
* src/androidselect.c (init_androidselect): Don't initialize
when running noninteractive.
* src/emacs.c (load_pdump): New argument `dump_file'.
(android_emacs_init): Give new argument `dump_file' to
`load_pdump'.
* src/sfntfont-android.c (init_sfntfont_android): Don't
initialize when running noninteractive.

23 months agoImport gnulib modules printf-posix and vasprintf-posix
Po Lu [Wed, 25 Jan 2023 10:39:36 +0000 (18:39 +0800)]
Import gnulib modules printf-posix and vasprintf-posix

These are neccessary because Android's printf is missing basic format
modifiers such as t.

* admin/merge-gnulib (GNULIB_MODULES): Add printf-posix and
vasprintf-posix.  Update from gnulib.
* configure.ac (CFLAGS): Add -DHAVE_CONFIG_H.

23 months agoPacify Apple clang version 13.0.0 (clang-1300.0.29.30):
Paul Eggert [Tue, 24 Jan 2023 23:18:55 +0000 (15:18 -0800)]
Pacify Apple clang version 13.0.0 (clang-1300.0.29.30):

* src/coding.c: When compiling with Apple clang, ignore
-Wunused-but-set-variable only in Clang 14 and greater.
Problem reported by Mattias Engdegård.

23 months agoMake binaries distributed with Emacs work on Android
Po Lu [Tue, 24 Jan 2023 13:37:22 +0000 (21:37 +0800)]
Make binaries distributed with Emacs work on Android

* doc/lispref/processes.texi (Subprocess Creation): Document
variables containing program names.
* etc/NEWS: Document new variables.
* java/Makefile.in (CROSS_BINS): Add missing etags binary.
* lisp/cedet/semantic/db-ebrowse.el
(semanticdb-create-ebrowse-database):
* lisp/gnus/mail-source.el (mail-source-movemail-program):
* lisp/hexl.el (hexl-program):
* lisp/htmlfontify.el (hfy-etags-bin):
* lisp/ielm.el (inferior-emacs-lisp-mode):
* lisp/mail/rmail.el (rmail-autodetect):
(rmail-insert-inbox-text):
* lisp/org/org-ctags.el (org-ctags-path-to-ctags):
* lisp/progmodes/cperl-mode.el (cperl-etags):
* lisp/speedbar.el (speedbar-fetch-etags-command):
* lisp/textmodes/reftex-global.el (reftex-create-tags-file): Use
new variables.
* src/callproc.c (syms_of_callproc): New variables naming
binaries redistributed with Emacs.

23 months agoEnable libjpeg on Android
Po Lu [Tue, 24 Jan 2023 11:10:58 +0000 (19:10 +0800)]
Enable libjpeg on Android

* INSTALL.android: Update documentation.
* build-aux/ndk-build-helper-1.mk: When building shared
libraries, do not link libemacs.so with dependent archive files.
* build-aux/ndk-build-helper-2.mk: Add whole archive
dependencies as well.

* configure.ac (HAVE_JPEG): Enable on Android.

* cross/ndk-build/ndk-build-shared-library.mk: Link the shared
object with archive file dependencies.
* cross/ndk-build/ndk-build-static-library.mk: Build all code
position-independently.
* cross/ndk-build/ndk-resolve.mk: Separately resolve a names of
archive and whole archive dependencies.

* src/Makefile.in (JPEG_CFLAGS): New variable.
(EMACS_CFLAGS): Add it.

23 months agoUpdate Android port
Po Lu [Tue, 24 Jan 2023 09:31:16 +0000 (17:31 +0800)]
Update Android port

* INSTALL.android: Update.
* build-aux/ndk-build-helper-1.mk: Fix typo.
* configure.ac: Enable --with-json on Android.
* cross/ndk-build/ndk-build-shared-library.mk:
(NDK_CFLAGS_$(LOCAL_MODULE)):
(LOCAL_MODULE_FILENAME):
* cross/ndk-build/ndk-build-static-library.mk:
(ALL_OBJECT_FILES$(LOCAL_MODULE)):
(LOCAL_MODULE_FILENAME): Recursively resolve dependencies.
* cross/ndk-build/ndk-resolve.mk: New function.

* doc/emacs/android.texi (Android Startup): Document how Emacs
is dumped during initial startup.

* java/Makefile.in (filename): Fix build with multiple shared
libraries.
* java/README: Improve commentary.
* java/org/gnu/emacs/EmacsApplication.java (onCreate): Look and
set dump file.
* java/org/gnu/emacs/EmacsNative.java (EmacsNative): New
function getFingerprint.
* java/org/gnu/emacs/EmacsPreferencesActivity.java (onCreate):
Add option to erase the dump file.
* java/org/gnu/emacs/EmacsService.java (browseUrl): New
function.
* java/org/gnu/emacs/EmacsThread.java (run): Specify dump file
if found.
* lisp/loadup.el: Always dump during loadup on Android.

* lisp/net/browse-url.el (browse-url--browser-defcustom-type):
(browse-url-default-browser):
(browse-url-default-android-browser): New browse url type.

* m4/ndk-build.m4 (ndk_package_map): Map jansson to libjansson.
* src/android.c (struct android_emacs_service): New method
`browse_url'.
(getFingerprint): New function.
(android_init_emacs_service): Initialize new method.
(android_browse_url): New function.

* src/android.h: Update prototypes.

* src/androidselect.c (Fandroid_browse_url): New function.
(syms_of_androidselect): Define it.

* src/emacs.c (load_pdump): Don't look in fancy places on
Android.
* src/pdumper.c (Fdump_emacs_portable): Allow dumping while
interactive on Android.
(syms_of_pdumper): New variable `pdumper-fingerprint'.

* src/sfntfont-android.c (sfntfont_android_composite_bitmap):
Fix unused variables.

23 months agoUpdate from gnulib
Po Lu [Tue, 24 Jan 2023 02:46:53 +0000 (10:46 +0800)]
Update from gnulib

Update from gnulib.  In addition,

* admin/merge-gnulib: Fix paths for rename.

23 months agoImprove lib-src/Makefile.in
Po Lu [Tue, 24 Jan 2023 02:40:44 +0000 (10:40 +0800)]
Improve lib-src/Makefile.in

* lib-src/Makefile.in (DONT_INSTALL):
(clean): Correctly define asset-directory-tool.

23 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Tue, 24 Jan 2023 02:38:07 +0000 (10:38 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

23 months agoFix distclean target
Po Lu [Tue, 24 Jan 2023 02:37:26 +0000 (10:37 +0800)]
Fix distclean target

* cross/Makefile.in (distclean bootstrap-clean): Remove Makefile.

23 months agoUpdate Android port
Po Lu [Tue, 24 Jan 2023 02:34:40 +0000 (10:34 +0800)]
Update Android port

* .gitignore: Update with new files.  Do not ignore std*.in.h.
* INSTALL.android: Explain how to build Emacs with external
dependencies.

* Makefile.in (xcompile, cross): Rename to `cross'.
(clean_dirs): Clean cross, not xcompile.

* README: Document new directories.

* build-aux/ndk-build-helper-1.mk (build_kind, NDK_SO_NAMES):
* build-aux/ndk-build-helper-2.mk (build_kind, NDK_SO_NAMES):
* build-aux/ndk-build-helper-3.mk (build_kind):
* build-aux/ndk-build-helper-4.mk:
* build-aux/ndk-build-helper.mk (NDK_BUILD_DIR, my-dir):
* build-aux/ndk-module-extract.awk: New files.
* configure.ac: Set up libgif, libwebp, and libpng for
ndk-build.
* cross/ndk-build/Makefile.in (srcdir, NDK_BUILD_ANDROID_MK):
* cross/ndk-build/ndk-build-executable.mk:
* cross/ndk-build/ndk-build-shared-library.mk (eq, objname):
* cross/ndk-build/ndk-build-static-library.mk (eq, objname):
* cross/ndk-build/ndk-build.in (NDK_BUILD_MODULES):
* cross/ndk-build/ndk-build.mk.in (NDK_BUILD_MODULES)
(NDK_BUILD_SHARED):
* cross/ndk-build/ndk-clear-vars.mk:
* cross/ndk-build/ndk-prebuilt-shared-library.mk:
* cross/ndk-build/ndk-prebuilt-static-library.mk: New files.
* doc/emacs/android.texi (Android, Android Environment):
Document clipboard support on Android.
* doc/emacs/emacs.texi (Top): Update menus.
* etc/MACHINES: Document Android.
* java/AndroidManifest.xml.in: Respect new
`--with-android-debug' option.
* java/Makefile.in (CROSS_BINS, CROSS_LIBS): Adjust for rename.
Include ndk-build.mk.:(emacs.apk-in): Depend on shared
libraries.  Then, package shared libraries.
* java/org/gnu/emacs/EmacsClipboard.java (EmacsClipboard): New
class.
* java/org/gnu/emacs/EmacsFontDriver.java: Update comment to say
this is unused.
* java/org/gnu/emacs/EmacsNative.java (EmacsNative): New
function `sendExpose'.
* java/org/gnu/emacs/EmacsSdk11Clipboard.java
(EmacsSdk11Clipboard):
* java/org/gnu/emacs/EmacsSdk8Clipboard.java
(EmacsSdk8Clipboard): New classes.
* java/org/gnu/emacs/EmacsView.java (EmacsView, handleDirtyBitmap)
(onDetachedFromWindow): When window is reattached, expose the
frame.

* lib/Makefile.in (VPATH):
(ALL_CFLAGS): Adjust for rename.

* lisp/term/android-win.el (android-clipboard-exists-p)
(android-get-clipboard, android-set-clipboard)
(android-clipboard-owner-p, android-primary-selection)
(android-get-clipboard-1, android-get-primary)
(android-selection-bounds, android-encode-select-string)
(gui-backend-get-selection, gui-backend-selection-exists-p)
(gui-backend-selection-owner-p, gui-backend-set-selection): New
functions.

* m4/ndk-build.m4: New file.
* src/Makefile.in (GIF_CFLAGS, ANDROID_LDFLAGS): New variables.
(EMACS_CFLAGS): Add GIF_CFLAGS.  Include
ndk-build.mk.
(libemacs.so): Depend on and link with required
libraries.

* src/android.c (android_check_compressed_file): New function.
(android_open): Work around Android platform bug.
(sendExpose): New function.
(android_readdir): Set d_type if this is a directory.

* src/androidgui.h (enum android_event_type)
(struct android_expose_event, union android_event): Add expose
events.

* src/androidselect.c (struct android_emacs_clipboard)
(android_init_emacs_clipboard, Fandroid_clipboard_owner_p)
(Fandroid_set_clipboard, Fandroid_get_clipboard)
(Fandroid_clipboard_exists_p, init_androidselect)
(syms_of_androidselect): New file.

* src/androidterm.c (handle_one_android_event): Handle
exposures.
* src/androidterm.h: Update prototypes.
* src/emacs.c (android_emacs_init): Initialize androidselect.

23 months agoUpdate android port
Po Lu [Tue, 24 Jan 2023 02:24:13 +0000 (10:24 +0800)]
Update android port

* xcompile: Move to cross.
* cross: New directory.

23 months agoUpdate android port
Po Lu [Tue, 24 Jan 2023 02:23:52 +0000 (10:23 +0800)]
Update android port

* xcompile: Move to cross.
* cross: New directory.

23 months agoCC Mode: Don't do c-backward-syntactic-ws following a forward movement
Alan Mackenzie [Mon, 23 Jan 2023 20:25:53 +0000 (20:25 +0000)]
CC Mode: Don't do c-backward-syntactic-ws following a forward movement

This was happening in, e.g., c-forward-type, which moves over whitespace at
the end of the scanned type.  This WS movement can exit a comment or a macro,
such that a c-backward-syntactic-ws does not return to the desired point, but
to before the entire comment/macro.

* lisp/progmodes/cc-engine.el (c-forward-keyword-prefixed-id)
(c-forward-id-comma-list, c-forward-noise-clause, c-forward-keyword-clause)
(c-forward-name, c-forward-type): Add a new &optional parameter `stop-at-end'
which when non-nil means "do not move over syntactic WS after performing the
main job", and adapt the internals of these macros and functions accordingly.
(c-forward-declarator, c-forward-decl-or-cast-1): In the calls to
c-forward-type and c-forward-name, set the stop-at-end argument to t, and call
c-forward-sytactic-ws later.

23 months ago; * lisp/calendar/appt.el (appt-check): Fix byte-compile warning
Robert Pluim [Mon, 23 Jan 2023 13:42:11 +0000 (14:42 +0100)]
; * lisp/calendar/appt.el (appt-check): Fix byte-compile warning

23 months agoSwap tag and element in html-ts-mode (bug#60972)
Theodor Thornhill [Sun, 22 Jan 2023 18:17:41 +0000 (19:17 +0100)]
Swap tag and element in html-ts-mode (bug#60972)

* lisp/textmodes/html-ts-mode.el: New values for
'treesit-sentence-type-regexp' and 'treesit-sexp-type-regexp'.

23 months ago; * lisp/eshell/esh-arg.el (eshell-prepare-splice): Fix quoting.
Robert Pluim [Mon, 23 Jan 2023 10:33:23 +0000 (11:33 +0100)]
; * lisp/eshell/esh-arg.el (eshell-prepare-splice): Fix quoting.

23 months agoFactor out some Tramp code
Michael Albinus [Mon, 23 Jan 2023 10:02:56 +0000 (11:02 +0100)]
Factor out some Tramp code

* lisp/net/tramp-compat.el (tramp-file-name-handler): Don't declare.

* lisp/net/tramp.el (tramp-skeleton-file-truename)
(tramp-skeleton-handle-make-symbolic-link): New defmacros.
(tramp-handle-file-truename):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
(tramp-sh-handle-file-truename):
* lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-truename)
(tramp-sudoedit-handle-make-symbolic-link): Use them.

* lisp/net/tramp.el (tramp-call-process, tramp-call-process-region):
Let-bind `temporary-file-directory'.

* test/lisp/net/tramp-tests.el (tramp-action-yesno):
Suppress run in tests.
(tramp-test21-file-links, tramp-test29-start-file-process)
(tramp-test30-make-process, tramp-test42-utf8): Adapt tests.

23 months agoAdd `yes-or-no-prompt' user option
Robert Pluim [Tue, 3 Jan 2023 16:09:53 +0000 (17:09 +0100)]
Add `yes-or-no-prompt' user option

This implements Bug#60312

* src/fns.c (syms_of_fns): Define `yes-or-no-prompt' Lisp variable.
(Fyes_or_no_p): Use `yes-or-no-prompt' instead of a hard-coded string.
* lisp/cus-start.el (standard): Add custom specification for it.

* doc/emacs/mini.texi (Yes or No Prompts): Document `yes-or-no-prompt'
* doc/lispref/minibuf.texi (Yes-or-No Queries): And here.

* etc/NEWS: Announce the new option.

23 months agoMerge from origin/emacs-29
Stefan Kangas [Mon, 23 Jan 2023 05:30:18 +0000 (06:30 +0100)]
Merge from origin/emacs-29

647cc9c65e7 Update to Org 9.6.1-16-ge37e9b

23 months agoUpdate to Org 9.6.1-16-ge37e9b
Kyle Meyer [Mon, 23 Jan 2023 02:53:39 +0000 (21:53 -0500)]
Update to Org 9.6.1-16-ge37e9b

23 months agoMerge from origin/emacs-29
Stefan Kangas [Mon, 23 Jan 2023 01:09:15 +0000 (02:09 +0100)]
Merge from origin/emacs-29

b3814b43f60 (ruby-ts--predefined-variables): Fix the $` and $' entries
db02cbdfe02 * lisp/find-dired.el (find-dired-with-command): Quote fin...
2343a067c3d Generalize vc-pull-and-push to support more backends (bug...
846838dbab8 Add test suite for sgml-html-meta-auto-coding-function
0fb90f524db Fix decoding HTML files from archives
c854ef7a187 ; Fix last change (bug#60556).
8e83604dfe0 Avoid crashes in batch Emacs sub-processes on MS-Windows
808e101fabe Tweak BSD style indentation (bug#60984)
204519a2e73 Fix typo of exposed symbol name
9296e0c6495 Fix typo after move to common lib (bug#61001)
e74ba72a6a3 ruby-ts-mode: Fix two additional cases with ruby-method-c...
ae7e28a4372 ruby-mode.el: Expand some docstrings with examples
89cb3c3f157 Minor fixes for Haiku
6adc193ad66 Move c-like common utils into own library (bug#60961)

# Conflicts:
# lisp/progmodes/typescript-ts-mode.el

23 months ago; Merge from origin/emacs-29
Stefan Kangas [Mon, 23 Jan 2023 00:34:43 +0000 (01:34 +0100)]
; Merge from origin/emacs-29

The following commit was skipped:

161706ec331 ; Actually use dummy package descriptor

23 months agoMerge from origin/emacs-29
Stefan Kangas [Mon, 23 Jan 2023 00:34:43 +0000 (01:34 +0100)]
Merge from origin/emacs-29

b875c9bf67e Fix file-regular-p in Tramp
63fa225d443 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
9f5d6c541e5 ; * doc/emacs/custom.texi (Init Rebinding): Fix wording i...
a91b435d0d5 ; Reword user documentation on binding keys in Lisp
0400de6a7de Fix typo in c-ts-mode (bug#60932)

23 months ago; Merge from origin/emacs-29
Stefan Kangas [Mon, 23 Jan 2023 00:34:43 +0000 (01:34 +0100)]
; Merge from origin/emacs-29

The following commit was skipped:

0400de6a7de Fix typo in c-ts-mode (bug#60932)

23 months agoMerge from origin/emacs-29
Stefan Kangas [Mon, 23 Jan 2023 00:34:39 +0000 (01:34 +0100)]
Merge from origin/emacs-29

b3de81a6ee3 MH-E: handle removal of mhparam libdir from nmh 1.8
d63e1a89518 Use point-min to anchor top-level constructs (bug#60602)
34793337783 * lisp/org/ob-ruby.el: Fix outdated comments.
472f1425985 ; ruby-ts-mode: Add a Version tag
0cf053648a4 ; ruby-ts-mode: Update font-lock features list in Commentary
67ee627c38d (project-try-vc): Add string-start and string-end anchors...
06953fc8e1d Make `keymap-set-after' work for menus
dcd59457b48 Use `key-parse' in `keymap-lookup'
8904a26a9d2 Improve `keymap-set-after' documentation
c7e02eaa3d9 Handle after arg correctly in `keymap-set-after'
628b6241763 Don't load erc-goodies atop erc.el
40cf494b7ce ; * etc/NEWS: Fix typos.
6b2f85caa6c Make tree-sitter based modes optional
b56cf28b325 ; (ruby-ts--predefined-variables): Make it a little shorter
d94dc606a09 ruby-ts-mode: Claw back half of the performance drop from...
d0d34514097 (ruby-ts-mode): Rename 'builtin-functions' to 'builtin-fu...
d66ac5285f7 ruby-ts-mode: Highlight builtin methods
370b1ac99ec ; ruby-ts-mode.el: Add customize-group mention to commentary
7b7b2b95138 Fix c-ts-mode indent (bug#60873)
7ca71d66dc7 Fix various problems in treesit-explore-mode (bug#60800)
b7d6bb47ee5 ; * lisp/treesit.el (treesit-font-lock-fontify-region): M...
0c6bfeddb21 ; Update tree-sitter major mode manual
c289786886b ; Add commentary and dostring in c-ts-mode

# Conflicts:
# etc/NEWS
# lisp/progmodes/c-ts-mode.el
# lisp/progmodes/go-ts-mode.el

23 months ago(ruby-ts--predefined-variables): Fix the $` and $' entries
Dmitry Gutov [Sun, 22 Jan 2023 18:50:54 +0000 (20:50 +0200)]
(ruby-ts--predefined-variables): Fix the $` and $' entries

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--predefined-variables):
Fix the $` and $' entries, somehow replaced by curly quote.

Reported by Mattias Engdegård.

23 months ago* lisp/find-dired.el (find-dired-with-command): Quote find-command-history.
Juri Linkov [Sun, 22 Jan 2023 17:51:51 +0000 (19:51 +0200)]
* lisp/find-dired.el (find-dired-with-command): Quote find-command-history.

23 months agoGeneralize vc-pull-and-push to support more backends (bug#60569)
Juri Linkov [Sun, 22 Jan 2023 17:27:10 +0000 (19:27 +0200)]
Generalize vc-pull-and-push to support more backends (bug#60569)

* lisp/vc/vc-git.el (vc-git-pull-and-push): Remove and move its logic to
vc-pull-and-push.

* lisp/vc/vc.el (vc-pull-and-push): Add code from vc-git-pull-and-push.

23 months agoAdd test suite for sgml-html-meta-auto-coding-function
Benjamin Riefenstahl [Tue, 17 Jan 2023 18:13:39 +0000 (20:13 +0200)]
Add test suite for sgml-html-meta-auto-coding-function

* test/lisp/international/mule-tests.el (sgml-html-meta-pre)
(sgml-html-meta-post, sgml-html-meta-run, sgml-html-meta-utf-8)
(sgml-html-meta-windows-hebrew, sgml-html-meta-none)
(sgml-html-meta-unknown-coding, sgml-html-meta-no-pre)
(sgml-html-meta-no-post-less-than-10lines)
(sgml-html-meta-no-post-10lines, sgml-html-meta-utf-8-with-bom): Add.

23 months agoFix decoding HTML files from archives
Benjamin Riefenstahl [Tue, 17 Jan 2023 18:08:15 +0000 (20:08 +0200)]
Fix decoding HTML files from archives

* lisp/international/mule.el (sgml-xml-auto-coding-function): Avoid
signaling an error from coding-system-equal when the XML encoding tag
specifies an encoding whose type is 'charset'.  (Bug#61005)

This is the same fix as in #df7ed10e for
sgml-xml-auto-coding-function.

23 months ago; Fix last change (bug#60556).
Eli Zaretskii [Sun, 22 Jan 2023 13:12:05 +0000 (15:12 +0200)]
; Fix last change (bug#60556).

23 months agoAvoid crashes in batch Emacs sub-processes on MS-Windows
Eli Zaretskii [Sun, 22 Jan 2023 13:07:55 +0000 (15:07 +0200)]
Avoid crashes in batch Emacs sub-processes on MS-Windows

* src/w32.c (shutdown_handler): When run in a separate thread,
don't call functions that only the main (a.k.a. "Lisp") thread can
call; instead, arrange for maybe_quit to kill Emacs.
* src/w32fns.c (emacs_abort): Don't show GUI Abort dialogs in
non-interactive sessions.  (Bug#60556)

23 months agoUse element as a sentence in html-ts-mode
Theodor Thornhill [Sat, 21 Jan 2023 19:05:52 +0000 (20:05 +0100)]
Use element as a sentence in html-ts-mode

* lisp/textmodes/html-ts-mode.el (html-ts-mode): Tweak the regexp.

23 months agoTweak BSD style indentation (bug#60984)
Theodor Thornhill [Sun, 22 Jan 2023 10:14:00 +0000 (11:14 +0100)]
Tweak BSD style indentation (bug#60984)

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Simplify
rules.
* test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts: New
testfile with bsd style indentation examples.
* test/lisp/progmodes/c-ts-mode-tests.el
(c-ts-mode-test-indentation-bsd): Add a test for the new style.

23 months agoFix typo of exposed symbol name
Theodor Thornhill [Sun, 22 Jan 2023 09:58:31 +0000 (10:58 +0100)]
Fix typo of exposed symbol name

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Remove
double hyphen.

23 months agoFix typo after move to common lib (bug#61001)
Theodor Thornhill [Sun, 22 Jan 2023 09:46:08 +0000 (10:46 +0100)]
Fix typo after move to common lib (bug#61001)

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Use correct
preset.

23 months agoruby-ts-mode: Fix two additional cases with ruby-method-call-indent=nil
Dmitry Gutov [Sun, 22 Jan 2023 02:55:13 +0000 (04:55 +0200)]
ruby-ts-mode: Fix two additional cases with ruby-method-call-indent=nil

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules):
Fix two additional cases with ruby-method-call-indent=nil.

* test/lisp/progmodes/ruby-mode-resources/ruby-method-call-indent.rb:
Add examples.

23 months agoruby-mode.el: Expand some docstrings with examples
Dmitry Gutov [Sun, 22 Jan 2023 02:40:40 +0000 (04:40 +0200)]
ruby-mode.el: Expand some docstrings with examples

* lisp/progmodes/ruby-mode.el (ruby-align-chained-calls)
(ruby-method-params-indent): Expand docstrings with examples.

23 months agoMinor fixes for Haiku
Po Lu [Sun, 22 Jan 2023 00:37:06 +0000 (08:37 +0800)]
Minor fixes for Haiku

* lisp/frame.el (display-symbol-keys-p):
* lisp/simple.el (normal-erase-is-backspace-setup-frame): Add
support for Haiku.

23 months agoMove c-like common utils into own library (bug#60961)
Theodor Thornhill [Sat, 21 Jan 2023 11:24:55 +0000 (12:24 +0100)]
Move c-like common utils into own library (bug#60961)

* lisp/progmodes/c-ts-common.el: New file.
* lisp/progmodes/c-ts-mode.el (treesit-induce-sparse-tree): Remove
unused declaration.
(c-ts-mode--indent-styles): Refer to the new library.
(c-ts-mode--looking-at-star,
c-ts-mode--comment-start-after-first-star,
c-ts-mode--comment-2nd-line-matcher,
c-ts-mode--comment-2nd-line-anchor, c-ts-mode--comment-regexp,
c-ts-mode--fill-paragraph, c-ts-mode--fill-block-comment): Move to
c-ts-common and expose as public.
(c-ts-mode-comment-setup): Move to c-ts-common.
* lisp/progmodes/csharp-mode.el (c-ts-common): Require new library.
(csharp-ts-mode--indent-rules): Refer to the new symbols.
(csharp-ts-mode): Use new function.
* lisp/progmodes/java-ts-mode.el (c-ts-common): Require new library.
(java-ts-mode--indent-rules): Refer to the new symbols.
(java-ts-mode): Use new function.
* lisp/progmodes/js.el (c-ts-common): Require new library.
(js--treesit-indent-rules): Refer to the new symbols.
(js-ts-mode): Use new function.
* lisp/progmodes/rust-ts-mode.el (c-ts-common): Require new library.
(rust-ts-mode--indent-rules): Refer to the new symbols.
(rust-ts-mode): Use new function.
* lisp/progmodes/typescript-ts-mode.el (c-ts-common): Require new
library.
(typescript-ts-mode--indent-rules): Refer to the new symbols.
(typescript-ts-base-mode): Use new function.

23 months agoExtend go-ts-mode with command to add docstring to function
Evgeni Kolev [Sat, 14 Jan 2023 06:28:06 +0000 (08:28 +0200)]
Extend go-ts-mode with command to add docstring to function

go-ts-mode is extended with command go-ts-mode-docstring which adds
docstring comment to the defun at point. If a comment already exists,
the point is instead moved to the top-most comment line. The command
is bound to "C-c C-d".

* lisp/progmodes/go-ts-mode.el (go-ts-mode): Extend docstring.
(go-ts-mode-docstring): New function.
(go-ts-mode--comment-on-previous-line-p): New function.
(go-ts-mode-map): New map variable.
* etc/NEWS: Mention the change.

(bug#60805)

23 months ago; Actually use dummy package descriptor
Philip Kaludercic [Sat, 21 Jan 2023 17:56:47 +0000 (18:56 +0100)]
; Actually use dummy package descriptor

* lisp/emacs-lisp/package-vc.el (package-vc--unpack): Set pkg-desc if
nil.

This revises the changes from 70947da708c8e06e31a2930520b38bafe43dba39.

23 months ago; Actually use dummy package descriptor
Philip Kaludercic [Sat, 21 Jan 2023 17:56:47 +0000 (18:56 +0100)]
; Actually use dummy package descriptor

* lisp/emacs-lisp/package-vc.el (package-vc--unpack): Set pkg-desc if
nil.

This revises the changes from 70947da708c8e06e31a2930520b38bafe43dba39.

23 months agoAdd sexp navigation to js/typescript/tsx-ts-mode
Theodor Thornhill [Sat, 21 Jan 2023 13:47:34 +0000 (14:47 +0100)]
Add sexp navigation to js/typescript/tsx-ts-mode

* lisp/progmodes/js.el (js--treesit-sexp-nodes): Add node types.
(js-ts-mode): Set 'treesit-sexp-type-regexp'.
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--sexp-nodes): Add node types.
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-base-mode): Set
'treesit-sexp-type-regexp'.
(tsx-ts-mode): Add in jsx nodes.

23 months agoImprove touch-screen support
Po Lu [Sat, 21 Jan 2023 13:46:32 +0000 (21:46 +0800)]
Improve touch-screen support

* doc/lispref/commands.texi (Touchscreen Events): Document
changes.
* lisp/touch-screen.el (touch-screen-current-tool): Update doc
string.
(touch-screen-precision-scroll): New user option.
(touch-screen-handle-scroll): Use traditional scrolling by
default.
(touch-screen-handle-touch): Adust format of
touch-screen-current-tool.
(touch-screen-track-tap): Don't print waiting for events.
(touch-screen-track-drag): Likewise.  Also, don't call UPDATE
until threshold is reached.
(touch-screen-drag-mode-line-1, touch-screen-drag-mode-line):
Improve window dragging.

23 months ago; * src/fileio.c (Fverify_visited_file_modtime): Fix fs check.
Po Lu [Sat, 21 Jan 2023 13:18:44 +0000 (21:18 +0800)]
; * src/fileio.c (Fverify_visited_file_modtime): Fix fs check.

23 months agoAdd sentence and sexp movement to c-ts-mode
Theodor Thornhill [Sat, 21 Jan 2023 12:35:10 +0000 (13:35 +0100)]
Add sentence and sexp movement to c-ts-mode

* lisp/progmodes/c-ts-mode.el (c-ts-base-mode): Add
'treesit-sentence-type-regexp' and 'treesit-sexp-type-regexp' node
types.

23 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Sat, 21 Jan 2023 12:04:52 +0000 (20:04 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

23 months agoUpdate Android port
Po Lu [Sat, 21 Jan 2023 12:03:37 +0000 (20:03 +0800)]
Update Android port

* doc/emacs/android.texi (Android File System): Document that
ls-lisp is now used by default.
* java/org/gnu/emacs/EmacsThread.java (EmacsThread): Name the
thread something meaningful.
* lisp/loadup.el (featurep): Load ls-lisp on Android.
* lisp/ls-lisp.el (ls-lisp-use-insert-directory-program):
Default to off on Android.
* src/android.c (android_is_directory): New fucntion.
(android_fstatat): Handle directories created by
`android_opendir'.
(android_open): Return meaningful file mode.
(struct android_dir): New fields `next', `asset_file' and `fd'.
(android_opendir): Populate those fields.
(android_dirfd): New function.
(android_closedir): Close file descriptor if set.
(android_lookup_asset_directory_fd): New function.

* src/android.h: Update prototypes.
* src/androidfont.c (androidfont_check_init): New function.
(androidfont_list, androidfont_match, androidfont_draw)
(androidfont_open_font, androidfont_close_font)
(androidfont_has_char, androidfont_encode_char)
(androidfont_text_extents, androidfont_list_family): Initialize
font driver if necessary.
(init_androidfont): Don't initialize Java font if necessary.

* src/dired.c (open_directory): Return android_dirfd if
appropriate.
(directory_files_internal, file_name_completion_dirp): Implement
correctly for Android.

* src/fileio.c (check_mutable_filename): New function.
(Fcopy_file, Fdelete_directory_internal, Fdelete_file)
(Frename_file, Fadd_name_to_file, Fmake_symbolic_link)
(Fset_file_modes, Fset_file_times, Ffile_newer_than_file_p)
(Fverify_visited_file_modtime, Fset_visited_file_modtime): Check
that files being written to do not lie in /assets.

* src/sfntfont-android.c (GET_SCANLINE_BUFFER)
(sfntfont_android_u255to256, sfntfont_android_over_8888_1)
(sfntfont_android_over_8888, sfntfont_android_composite_bitmap):
Optimize on 64-bit ARM devices.
(sfntfont_android_put_glyphs): Optimize away memset if
background need not be filled.

23 months agoFix file-regular-p in Tramp
Michael Albinus [Sat, 21 Jan 2023 11:04:50 +0000 (12:04 +0100)]
Fix file-regular-p in Tramp

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test18-file-attributes)
(tramp-archive-test21-file-links):
* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes)
(tramp-test21-file-links): Adapt tests.

* lisp/net/tramp.el (tramp-handle-file-regular-p): Fix symlink
case.  (Bug#60943)

23 months agoMerge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
Eli Zaretskii [Sat, 21 Jan 2023 07:51:34 +0000 (09:51 +0200)]
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29

23 months ago; * doc/emacs/custom.texi (Init Rebinding): Fix wording in last change.
Eli Zaretskii [Sat, 21 Jan 2023 07:50:59 +0000 (09:50 +0200)]
; * doc/emacs/custom.texi (Init Rebinding): Fix wording in last change.

23 months ago; Reword user documentation on binding keys in Lisp
Panagiotis Koutsourakis [Tue, 17 Jan 2023 18:57:41 +0000 (20:57 +0200)]
; Reword user documentation on binding keys in Lisp

* doc/emacs/custom.texi (Init Rebinding): Move the description of
'kbd' farther down.  (Bug#60859)

23 months agoFix typo in c-ts-mode (bug#60932)
Theodor Thornhill [Fri, 20 Jan 2023 21:16:25 +0000 (22:16 +0100)]
Fix typo in c-ts-mode (bug#60932)

* lisp/progmodes/c-ts-mode.el (c-ts-mode-indent-block-type-regexp):
enumerator, not enumeratior.

23 months ago; * etc/NEWS: Mark 2 entries as documented.
Eli Zaretskii [Sat, 21 Jan 2023 06:48:13 +0000 (08:48 +0200)]
; * etc/NEWS: Mark 2 entries as documented.

23 months ago; * test/lisp/eshell/esh-var-tests.el: Fix punctuation in doc strings.
Eli Zaretskii [Sat, 21 Jan 2023 06:46:32 +0000 (08:46 +0200)]
; * test/lisp/eshell/esh-var-tests.el: Fix punctuation in doc strings.

23 months ago; Fix documentation of 'kill-matching-buffers-no-ask'
Eli Zaretskii [Sat, 21 Jan 2023 06:35:53 +0000 (08:35 +0200)]
; Fix documentation of 'kill-matching-buffers-no-ask'

* etc/NEWS: Fix wording of 'kill-matching-buffers-no-ask's entry.

* lisp/files.el (kill-matching-buffers)
(kill-matching-buffers-no-ask): Doc fix.

23 months ago; * etc/NEWS: Fix wording of 'html-ts-mode's entry.
Eli Zaretskii [Sat, 21 Jan 2023 06:25:51 +0000 (08:25 +0200)]
; * etc/NEWS: Fix wording of 'html-ts-mode's entry.

23 months agoMH-E: handle removal of mhparam libdir from nmh 1.8
Mike Kupfer [Mon, 16 Jan 2023 21:50:49 +0000 (13:50 -0800)]
MH-E: handle removal of mhparam libdir from nmh 1.8

* lisp/mh-e/mh-e.el (mh-variant-nmh-info): If "libdir" doesn't
work, try "libexecdir" (Bug#60952) (SF#491).

23 months agoChange top-level anchor to point-min
Theodor Thornhill [Fri, 20 Jan 2023 21:59:51 +0000 (22:59 +0100)]
Change top-level anchor to point-min

* lisp/textmodes/html-ts-mode.el (html-ts-mode--indent-rules): Anchor
to point-min.

23 months agoUse point-min to anchor top-level constructs (bug#60602)
Theodor Thornhill [Fri, 20 Jan 2023 21:37:47 +0000 (22:37 +0100)]
Use point-min to anchor top-level constructs (bug#60602)

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): New anchor.
* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): New
anchor.
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules): New anchor.
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): New anchor.

23 months ago* lisp/org/ob-ruby.el: Fix outdated comments.
Dmitry Gutov [Fri, 20 Jan 2023 21:32:21 +0000 (23:32 +0200)]
* lisp/org/ob-ruby.el: Fix outdated comments.

23 months agoFix typo in c-ts-mode (bug#60932)
Theodor Thornhill [Fri, 20 Jan 2023 21:16:25 +0000 (22:16 +0100)]
Fix typo in c-ts-mode (bug#60932)

* lisp/progmodes/c-ts-mode.el (c-ts-mode-indent-block-type-regexp):
enumerator, not enumeratior.

23 months agoAdd html-ts-mode (bug#60972)
Theodor Thornhill [Fri, 20 Jan 2023 20:05:41 +0000 (21:05 +0100)]
Add html-ts-mode (bug#60972)

* lisp/textmodes/html-ts-mode.el: New major mode for HTML support
powered by Tree-sitter.
* etc/NEWS: Mention it in NEWS.

23 months ago; ruby-ts-mode: Add a Version tag
Dmitry Gutov [Fri, 20 Jan 2023 17:25:12 +0000 (19:25 +0200)]
; ruby-ts-mode: Add a Version tag

23 months ago; ruby-ts-mode: Update font-lock features list in Commentary
Dmitry Gutov [Fri, 20 Jan 2023 17:08:22 +0000 (19:08 +0200)]
; ruby-ts-mode: Update font-lock features list in Commentary

23 months ago(project-try-vc): Add string-start and string-end anchors to marker-re
Dmitry Gutov [Fri, 20 Jan 2023 16:43:56 +0000 (18:43 +0200)]
(project-try-vc): Add string-start and string-end anchors to marker-re

* lisp/progmodes/project.el (project-try-vc):
Add string-start and string-end anchors to marker-re (bug#60956).

23 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Fri, 20 Jan 2023 14:17:48 +0000 (22:17 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

23 months agoUpdate Android port
Po Lu [Fri, 20 Jan 2023 14:15:53 +0000 (22:15 +0800)]
Update Android port

* src/android.c (android_run_select_thread, android_select)
(android_ftruncate):
* src/android.h (ftruncate): Fix compilation on Android 16 and
up.

23 months agoMake `keymap-set-after' work for menus
Robert Pluim [Thu, 19 Jan 2023 15:05:45 +0000 (16:05 +0100)]
Make `keymap-set-after' work for menus

It still doesn't work for an AFTER that's a key, though, since
`key-parse' produces vectors, and keymaps contain integers.

* lisp/keymap.el (keymap-set-after): Only parse AFTER as a key if it's
a string.  For consistency, use `key-parse' on the definition if it's
a string, just like `keymap-set'.
* test/src/keymap-tests.el (keymap-tests--command-3): New dummy command.
(keymap-set-after-menus): New test.  Check that we can insert a menu
item after a specific entry.

23 months agoUse `key-parse' in `keymap-lookup'
Robert Pluim [Thu, 19 Jan 2023 14:58:51 +0000 (15:58 +0100)]
Use `key-parse' in `keymap-lookup'

It's stricter than `kbd', and doesn't try to do anything with key
sequences that look like macros.

* lisp/keymap.el (keymap-lookup): Use `key-parse' instead of `kbd'.
* test/src/keymap-tests.el (keymap-set-after-menus): Test the
`keymap-set-after' API.

23 months agoImprove `keymap-set-after' documentation
Robert Pluim [Thu, 19 Jan 2023 14:56:21 +0000 (15:56 +0100)]
Improve `keymap-set-after' documentation

* doc/lispref/keymaps.texi (Changing Key Bindings): Mention `key-valid-p'
(Modifying Menus): Correct description of KEY arg.

23 months agoHandle after arg correctly in `keymap-set-after'
Robert Pluim [Thu, 19 Jan 2023 13:34:10 +0000 (14:34 +0100)]
Handle after arg correctly in `keymap-set-after'

* lisp/keymap.el (keymap-set-after): AFTER: t means the same as nil,
so just change it to nil.  (Bug#60867)

23 months agoUpdate Android port
Po Lu [Fri, 20 Jan 2023 13:21:15 +0000 (21:21 +0800)]
Update Android port

* src/android.c (android_run_select_thread, android_init_events)
(android_select): Add alternative android_select implementation
for API 16 and lower.
* src/androidterm.c (handle_one_android_event): Fix
use-after-frees.

23 months agoDon't load erc-goodies atop erc.el
F. Jason Park [Fri, 20 Jan 2023 04:19:40 +0000 (20:19 -0800)]
Don't load erc-goodies atop erc.el

* lisp/erc/erc.el: Commit c2d657e7c4fd9685591f2120007eabf78745919d
"Move ERC's core dependencies to a separate file" ironed out ERC's
interwoven dependencies for the better but didn't cleanly sidestep the
goodies interdependency, specifically with regard to custom options.
This reverts the tiny portion impacting this aspect by once again
requiring `erc-goodies' at the very end of ERC's main library. Special
thanks to Libera.Chat user jrm for reporting this bug.

23 months ago; * etc/NEWS: Fix typos.
Michael Albinus [Fri, 20 Jan 2023 11:27:07 +0000 (12:27 +0100)]
; * etc/NEWS: Fix typos.

23 months ago; * etc/NEWS: Fix typos.
Michael Albinus [Fri, 20 Jan 2023 11:20:08 +0000 (12:20 +0100)]
; * etc/NEWS: Fix typos.

23 months agoRemove unused file
Po Lu [Fri, 20 Jan 2023 11:19:16 +0000 (19:19 +0800)]
Remove unused file

* xcompile/lib/gnulib.mk.in: Delete.

23 months agoUpdate Android port
Po Lu [Fri, 20 Jan 2023 11:06:32 +0000 (19:06 +0800)]
Update Android port

* .gitignore: Don't ignore verbose.mk.android.
* doc/emacs/Makefile.in (EMACSSOURCES): Add android.texi and
input.texi.
* doc/emacs/android.texi (Android): Document support for the
on-screen keyboard.
(Android Startup): Document how to start Emacs with -Q on
Android.
(Android Environment): Document how Emacs works around the
system ``task killer''.  Document changes to frame deletion
behavior.
* doc/emacs/emacs.texi (Top):
* doc/emacs/input.texi (Other Input Devices, On-Screen
Keyboards): Document how to use Emacs with virtual keyboards.
* doc/lispref/commands.texi (Touchscreen Events): Document
changes to `touch-screen-track-drag'.
* doc/lispref/frames.texi (Frames, On-Screen Keyboards): New
node.
* java/AndroidManifest.xml.in: Add settings activity and
appropriate OSK adjustment mode.
* java/org/gnu/emacs/EmacsActivity.java (onCreate): Allow
creating Emacs with -Q.
(onDestroy): Don't remove if killed by the system.
* java/org/gnu/emacs/EmacsContextMenu.java (inflateMenuItems):
Fix context menus again.
* java/org/gnu/emacs/EmacsNative.java (EmacsNative): Make all
event sending functions return long.
* java/org/gnu/emacs/EmacsPreferencesActivity.java
(EmacsPreferencesActivity): New class.
* java/org/gnu/emacs/EmacsService.java (EmacsService)
(onStartCommand, onCreate, startEmacsService): Start as a
foreground service if necessary to bypass system restrictions.
* java/org/gnu/emacs/EmacsSurfaceView.java (EmacsSurfaceView):
* java/org/gnu/emacs/EmacsThread.java (EmacsThread, run):
* java/org/gnu/emacs/EmacsView.java (EmacsView, onLayout)
(onDetachedFromWindow):
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow, viewLayout):
Implement frame resize synchronization..
* java/org/gnu/emacs/EmacsWindowAttachmentManager.java
(EmacsWindowAttachmentManager, removeWindowConsumer): Adjust
accordingly for changes to frame deletion behavior.
* lisp/frame.el (android-toggle-on-screen-keyboard)
(frame-toggle-on-screen-keyboard): New function.
* lisp/minibuffer.el (minibuffer-setup-on-screen-keyboard)
(minibuffer-exit-on-screen-keyboard): New functions.
(minibuffer-setup-hook, minibuffer-exit-hook): Add new functions
to hooks.

* lisp/touch-screen.el (touch-screen-relative-xy): Accept new
value of window `frame'.  Return frame coordinates in that case.
(touch-screen-set-point-commands): New variable.
(touch-screen-handle-point-up): Respect that variable.
(touch-screen-track-drag): Return `no-drag' where appropriate.
(touch-screen-drag-mode-line-1, touch-screen-drag-mode-line):
Refactor to use `no-drag'.

* src/android.c (struct android_emacs_window): New methods.
Make all event sending functions return the event serial.
(android_toggle_on_screen_keyboard, android_window_updated): New
functions.
* src/android.h: Update prototypes.
* src/androidfns.c (Fandroid_toggle_on_screen_keyboard)
(syms_of_androidfns): New function.
* src/androidgui.h (struct android_any_event)
(struct android_key_event, struct android_configure_event)
(struct android_focus_event, struct android_window_action_event)
(struct android_crossing_event, struct android_motion_event)
(struct android_button_event, struct android_touch_event)
(struct android_wheel_event, struct android_iconify_event)
(struct android_menu_event): Add `serial' fields.

* src/androidterm.c (handle_one_android_event)
(android_frame_up_to_date):
* src/androidterm.h (struct android_output): Implement frame
resize synchronization.

23 months ago; Merge from origin/emacs-29
Stefan Kangas [Fri, 20 Jan 2023 10:30:22 +0000 (11:30 +0100)]
; Merge from origin/emacs-29

The following commit was skipped:

4fb7b0b0b88 Fix an oversight in advice.el

23 months agoMerge from origin/emacs-29
Stefan Kangas [Fri, 20 Jan 2023 10:30:22 +0000 (11:30 +0100)]
Merge from origin/emacs-29

78b83a744fa ; * etc/NEWS: Rearrange instructions for building tree-si...
fb82d4e3286 (treesit-simple-indent-presets): Have n-p-gp check for gr...
25ddb3f7d99 ; ruby-ts--indent-rules: Minor cleanup
a0ce569d3b7 ruby-toggle-block: Fix in ruby-ts-mode
0d3b6518e39 (ruby-ts--indent-rules): Indent inside empty parens properly
7fb69ce233b ; * doc/emacs/modes.texi (Choosing Modes): Add index entr...

# Conflicts:
# etc/NEWS

23 months ago; Merge from origin/emacs-29
Stefan Kangas [Fri, 20 Jan 2023 10:30:22 +0000 (11:30 +0100)]
; Merge from origin/emacs-29

The following commit was skipped:

12d7670b90f Fix bug in 'sieve-manage--append-to-log'

23 months agoMerge from origin/emacs-29
Stefan Kangas [Fri, 20 Jan 2023 10:30:22 +0000 (11:30 +0100)]
Merge from origin/emacs-29

21be03cccb6 CC Mode: Prevent two classes of "type" prematurely enteri...

23 months agoAdd new command `kill-matching-buffers-no-ask' (bug#60714)
Andrea Corallo [Wed, 18 Jan 2023 14:15:51 +0000 (15:15 +0100)]
Add new command `kill-matching-buffers-no-ask' (bug#60714)

* lisp/files.el (kill-matching-buffers-no-ask): New function.
* etc/NEWS: Announce `kill-matching-buffers-no-ask'.

23 months agoMake tree-sitter based modes optional
Eli Zaretskii [Fri, 20 Jan 2023 08:28:26 +0000 (10:28 +0200)]
Make tree-sitter based modes optional

* lisp/progmodes/c-ts-mode.el: Update Commentary.  Make
'auto-mode-alist' update conditional on the tree-sitter and
grammar libraries being available.
* lisp/progmodes/cmake-ts-mode.el:
* lisp/progmodes/csharp-mode.el:
* lisp/progmodes/dockerfile-ts-mode.el:
* lisp/progmodes/go-ts-mode.el:
* lisp/progmodes/java-ts-mode.el:
* lisp/progmodes/js.el:
* lisp/progmodes/json-ts-mode.el:
* lisp/progmodes/python.el:
* lisp/progmodes/ruby-ts-mode.el:
* lisp/progmodes/typescript-ts-mode.el:
* lisp/textmodes/css-mode.el:
* lisp/textmodes/toml-ts-mode.el:
* lisp/textmodes/yaml-ts-mode.el: Make 'auto-mode-alist' update
for tree-sitter based modes be conditional on the tree-sitter and
grammar libraries being available.  (Bug#60559)

23 months ago; (ruby-ts--predefined-variables): Make it a little shorter
Dmitry Gutov [Fri, 20 Jan 2023 03:41:39 +0000 (05:41 +0200)]
; (ruby-ts--predefined-variables): Make it a little shorter

23 months agoruby-ts-mode: Claw back half of the performance drop from last change
Dmitry Gutov [Fri, 20 Jan 2023 03:35:12 +0000 (05:35 +0200)]
ruby-ts-mode: Claw back half of the performance drop from last change

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--builtin-method-p):
New function.
(ruby-ts--font-lock-settings): Use it instead of :match.

23 months agoPacify clang 15.0.6 on Fedora 37
Paul Eggert [Thu, 19 Jan 2023 23:15:52 +0000 (15:15 -0800)]
Pacify clang 15.0.6 on Fedora 37

* configure.ac: Suppress clang -Wbitwise-instead-of-logical,
as there’s nothing wrong with using & and | on bool.
* src/coding.c: Suppress -Wunused-but-set-variable in this file,
as it’s too much trouble to recode to pacify clang.

23 months ago(ruby-ts-mode): Rename 'builtin-functions' to 'builtin-function'
Dmitry Gutov [Fri, 20 Jan 2023 02:14:38 +0000 (04:14 +0200)]
(ruby-ts-mode): Rename 'builtin-functions' to 'builtin-function'

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings)
(ruby-ts-mode): Rename 'builtin-functions' to 'builtin-function',
for consistency with similar features.

23 months agoruby-ts-mode: Highlight builtin methods
Dmitry Gutov [Fri, 20 Jan 2023 01:56:44 +0000 (03:56 +0200)]
ruby-ts-mode: Highlight builtin methods

* lisp/progmodes/ruby-mode.el (ruby-builtin-methods-with-reqs)
(ruby-builtin-methods-no-reqs): New constants, extracted.
(ruby-font-lock-keywords): Replace values with references.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--builtin-methods): New
variable.  Construct regexp from aforementioned constants' values.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Use it.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Add new font-lock feature: builtin-functions.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--predefined-constants)
(ruby-ts--predefined-variables): Unrelated to the rest of the
patch, add string-start and string-end anchors.