1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-24 07:20:37 +00:00
Commit Graph

1554 Commits

Author SHA1 Message Date
Po Lu
b931a92ac4 ; * configure.ac: Fix typo. 2023-03-11 17:43:15 +08:00
Po Lu
c4b77b82de Update Android port
* configure.ac (HAVE_MAILUTILS, with_mailutils)
(ANDROID_SDK_8_OR_EARLIER, XCONFIGURE): Fix POP and mailutils
configuration on Android.
* java/Makefile.in:
* src/callproc.c (syms_of_callproc): Avoid using built-in
movemail when --with-mailutils.
2023-03-11 17:42:24 +08:00
Po Lu
248b345961 Don't use GCC extensions in src/emacs-module.c
* configure.ac: Default modules to on.  Remove check for
__attribute__((cleanup)).  However, keep the new `ifavailable'
value for systems without dlopen.

* src/emacs-module.c (MODULE_HANDLE_NONLOCAL_EXIT): Don't rely
on cleanup attribute and correctly reset handlerlist upon
longjmp.
(MODULE_INTERNAL_CLEANUP): New macro.
(module_make_global_ref, module_free_global_ref)
(module_make_function, module_get_function_finalizer)
(module_set_function_finalizer, module_make_interactive)
(module_funcall, module_intern, module_type_of)
(module_extract_integer, module_make_integer, module_extract_float)
(module_make_float, module_copy_string_contents)
(module_make_string, module_make_unibyte_string)
(module_make_user_ptr, module_get_user_ptr, module_set_user_ptr)
(module_get_user_finalizer, module_set_user_finalizer)
(module_vec_set, module_vec_get, module_vec_size)
(module_process_input, module_extract_time, module_make_time)
(module_extract_big_integer, module_make_big_integer)
(module_open_channel): Call MODULE_INTERNAL_CLEANUP prior to
returning.
2023-03-11 09:53:24 +08:00
Po Lu
745890de52 Fix webp test for Android
* configure.ac (HAVE_WEBP): Disable WebPGetInfo check when
REALLY_ANDROID.
2023-03-09 14:57:45 +08:00
Po Lu
c99354042a Merge remote-tracking branch 'origin/master' into feature/android 2023-03-09 14:53:37 +08:00
Stefan Kangas
5056b8e589 Merge from origin/emacs-29
7e1012765c Fix libwebp check for some webp installations
c2ca009da4 Avoid potential infloop
34c14430e9 Don't misindent 'else:' after 'if re.match:' in Python
8a2a554192 * Make sure `default-directory' exists before spawning pr...
1862e7eb7e Fix sed expression in install-etc make target
c8ec0017cb Avoid using bash in the emacsclient desktop file
a588937094 Fix documentation of the 'line-height' text property
971ded31c4 Add 'declare' specs to with- and without-restriction
2023-03-09 06:30:23 +01:00
Po Lu
7e1012765c Fix libwebp check for some webp installations
* configure.ac: Look for WebPGetInfo; if it is not there, look
for libwebpdecoder as well.  (bug#61988)
2023-03-09 08:53:24 +08:00
Eli Zaretskii
8a8a994cfa Revert "Fix configuration of webp libraries"
This reverts commit de4277af00.
It breaks WebP support at least on my system.
There's no reason to require libwebpdecoder library to be
installed, since we don't use the functions from it, at least
not in libwebp 1.2.1.
2023-03-06 17:31:57 +02:00
Po Lu
de4277af00 Fix configuration of webp libraries
* configure.ac: Link with libwebpdecoder along with
libwebpdemux.  (bug#61988)
2023-03-06 21:42:29 +08:00
Po Lu
7f288bf04a ; * configure.ac: Fix another typo. 2023-03-05 10:57:06 +08:00
Po Lu
3be448f429 Remove redundant second copy of gnulib
* .gitignore: Simplify cross/lib rule.
* admin/merge-gnulib (avoided_flags): Stop copying to cross/lib.
* configure.ac: Link gnulib source and header files to
cross/lib.
* cross/Makefile.in (LIB_SRCDIR): Make relative to builddir.
(maintainer-clean): Merge with distclean.  Remove links created
by configure.
2023-03-05 10:18:28 +08:00
Po Lu
39a7e6b79f Port to broken Android NDK version
* configure.ac: Check for __ctype_get_mb_cur_max.
Then see if MB_CUR_MAX is defined to it, and define
REPLACEMENT_MB_CUR_MAX if so and it does not link.
* java/INSTALL: Update documentation.
* src/conf_post.h (MB_CUR_MAX): Define replacement if
necessary.
2023-03-04 13:38:00 +08:00
Po Lu
0e995d06a8 Improve support for building Android C++ dependencies
* configure.ac: Call ndk_LATE after gl_EARLY.
* cross/ndk-build/Makefile.in (NDK_BUILD_CXX): New variable.
* cross/ndk-build/ndk-build-shared-library.mk:
* cross/ndk-build/ndk-build-static-library.mk: Use it.
* java/INSTALL: Describe how to build C++ dependencies.
* m4/ndk-build.m4 (ndk_LATE): New macro.
(ndk_INIT): Try to find a suitable C++ compiler.
(ndk_CHECK_MODULES): Make sure the C++ compiler works before
allowing C++ dependencies.
2023-03-04 11:19:25 +08:00
Po Lu
edfa0f8fa0 Minor fixes to configury
* configure.ac (ANDROID_SDK_8_OR_EARLIER): Pass through
`--with-ndk-cxx-shared'.
* m4/ndk-build.m4: Fix quoting of $CC.
2023-03-03 21:58:48 +08:00
Po Lu
960230d88d Summary: Update Android port
* INSTALL: Document where to find Android installation
instructions.
* configure.ac (CHECK_LISP_OBJECT_TYPE): Pacify
-Wsuggest-attribute=noreturn only on Android.
* cross/ndk-build/README: New file.
* doc/emacs/android.texi (Android):
* doc/emacs/emacs.texi (Top):
* doc/emacs/input.texi (Other Input Devices): Untabify menus.
* etc/NEWS: Move INSTALL.android to java/INSTALL.
* java/INSTALL: New file.
* java/README:
* src/coding.c (from_unicode_buffer): Make Android specific code
only build on Android.
2023-03-02 18:31:35 +08:00
Po Lu
cb233cb88a Fix Makefile race conditions
* configure.ac: Make cross/* and related directories.
* cross/Makefile.in (src/verbose.mk, lib/libgnu.a)
(src/config.h): Stop making directories here.
(lib-src/config.h): New config.h rule.
($(LIBSRC_BINARIES)): Add it.
(clean): Don't remove CLEAN_SUBDIRS, but clean inside.
2023-03-02 15:59:33 +08:00
Po Lu
daf9c62871 Fix out-of-tree Android builds
* configure.ac (JAVA_PUSH_LINT): Push to WARN_JAVAFLAGS instead
of JAVAFLAGS.
(cross/lib): Always AS_MKDIR_P.
* cross/Makefile.in (srcdir): New variable.
(LIB_SRCDIR): Take realpath relative to srcdir, not
.:(src/verbose.mk): Depend on verbose.mk.android in srcdir.
(lib/Makefile): Edit srcdir and VPATH to LIB_SRCDIR.
(src/Makefile): Edit -I$$(top_srcdir) to -I../$(srcdir)/lib,
instead of ommitting it.
(clean): Allow ndk-build clean to fail.

* java/Makefile.in (builddir): New variable.
(WARN_JAVAFLAGS): Likewise.
(JAVAFLAGS): Define in terms of WARN_JAVAFLAGS.
(SIGN_EMACS, SIGN_EMACS_V2): Use emacs.keystore relative to
srcdir.  Allow inclusion of ndk-build.mk to fail.
(install_temp, emacs.apk-in)
(../config.status): Depend relative to top_srcdir.
(AndroidManifest.xml, $(APK_NAME)): Likewise.
(RESOURCE_FILE, CLASS_FILES, classes.dex): Output class files
to $(srcdir); these are arch independents, so this is okay.
2023-03-01 19:35:19 +08:00
Po Lu
ea74f3c067 Improve Android configury
* configure.ac (JAVA_PUSH_LINT): New macro.
(JAVAFLAGS): New variable.  Check for various lint flags and
macros and enable them.
* java/Makefile.in (ANDROID_ABI):
* java/org/gnu/emacs/EmacsSdk7FontDriver.java: Remove compiler
warning.
2023-02-24 22:25:48 +08:00
Po Lu
767da53fa3 Update Android port
ImageMagick now builds but does not link yet some of the time.

* INSTALL.android: Document ImageMagick and caveats.
* build-aux/ndk-build-helper-1.mk (NDK_SO_NAMES):
* build-aux/ndk-build-helper-2.mk (NDK_A_NAMES):
* build-aux/ndk-build-helper.mk (TARGET_ARCH_ABI): Define architecture
and don't respect explicitly specified library names.
* configure.ac: Enable ImageMagick and lcms2 on Android.
* cross/ndk-build/ndk-build-shared-library.mk (objname)::($(call
objname,$(LOCAL_MODULE),$(basename
$(1))))::(ALL_OBJECT_FILES$(LOCAL_MODULE)):
* cross/ndk-build/ndk-build-static-library.mk (objname)::($(call
objname,$(LOCAL_MODULE),$(basename $(1)))):
(NDK_CFLAGS, ALL_SOURCE_FILES): Handle sources files which start with
$(LOCAL_PATH).
* cross/ndk-build/ndk-clear-vars.mk: Don't undefine; clear variables
instead.
* m4/ndk-build.m4 (ndk_SEARCH_MODULE): Redirect make stderr to
config.log.xf64
2023-02-22 21:20:30 +08:00
Po Lu
8356412d62 Merge remote-tracking branch 'origin/master' into feature/android 2023-02-22 11:31:39 +08:00
Po Lu
86f10534dc Add cross-compilation test for cleanup attribute
* configure.ac: Per title.
2023-02-22 11:19:57 +08:00
Po Lu
137bdaced6 Update Android port
* INSTALL.android: Port to MIPS.
* configure.ac (modules): Default to ifavailable.
Write actual test for __attribute__((cleanup)).
* m4/ndk-build.m4: Recognize mips and mips64.
* src/emacs-module.c: Remove broken HAS_ATTRIBUTE test.
2023-02-22 11:01:44 +08:00
Po Lu
c94011ed56 ; * configure.ac (EMACS_CONFIG_FEATURES): Improve configure message. 2023-02-22 10:51:27 +08:00
Robert Pluim
098add06eb Say whether we're using X11 double buffering
* configure.ac (EMACS_CONFIG_FEATURES): Output value of HAVE_XDBE.
2023-02-21 18:26:01 +01:00
Po Lu
57c19f477f Update Android port
* INSTALL.android: Explain where to get tree-sitter.

* configure.ac: Add support for dynamic modules and tree-sitter.

* doc/emacs/android.texi (Android Windowing):
* java/org/gnu/emacs/EmacsSdk11Clipboard.java
(EmacsSdk11Clipboard, ownsClipboard): Improve clipboard handling
and documentation.
2023-02-20 22:14:29 +08:00
Po Lu
3a0b3cd086 * configure.ac: Fix typo. 2023-02-18 13:05:03 +08:00
Po Lu
265435fdf8 Update Android port
* configure.ac: Check for madvise.
* lisp/international/fontset.el (script-representative-chars):
Improve detection of CJK fonts.
* src/pdumper.c (dump_discard_mem): Use madvise if possible.
* src/sfnt.c (sfnt_map_glyf_table, sfnt_unmap_glyf_table): New
functions.
* src/sfnt.h (struct sfnt_glyf_table): New field.
* src/sfntfont.c (struct sfnt_font_info, sfntfont_open)
(sfntfont_close, sfntfont_detect_sigbus): Allow mmapping fonts
if possible.
* src/sfntfont.h: Update prototypes.
* src/sysdep.c (handle_sigbus, init_sigbus, init_signals):
Initialize SIGBUS correctly.
2023-02-18 11:50:44 +08:00
Po Lu
88afd96e36 Fix build and running on Android 2.2
* INSTALL.android: Document that Android 2.2 is now supported,
with caveats.
* configure.ac (ANDROID_MIN_SDK, ANDROID_SDK_18_OR_EARLIER)
(SYSTEM_TYPE, ANDROID_STUBIFY, SIZEOF_LONG): Correctly detect
things missing on Android 2.2.
* java/Makefile.in (ANDROID_JAR, JARSIGNER_FLAGS):
* java/debug.sh (jdb, gdbserver, line):
* java/org/gnu/emacs/EmacsApplication.java (findDumpFile):
* java/org/gnu/emacs/EmacsService.java (onCreate):
* java/org/gnu/emacs/EmacsThread.java (EmacsThread, run): Run
parameter initialization on main thread.
* src/android-asset.h (struct android_asset_manager)
(struct android_asset, AAssetManager_fromJava, AAssetManager_open)
(AAsset_close, android_asset_create_stream)
(android_asset_read_internal, AAsset_openFileDescriptor)
(AAsset_getLength, AAsset_getBuffer, AAsset_read): New file.
* src/android.c (android_user_full_name, android_hack_asset_fd)
(android_check_compressed_file): Implement for Android 2.2.
* src/process.c (Fprocess_send_eof): Don't call tcdrain if
unavailable.
* src/sfntfont-android.c (system_font_directories): Fix compiler
warning.
* src/sfntfont.c (sfntfont_read_cmap): Correctly test rc of
emacs_open.
* src/textconv.c (handle_pending_conversion_events_1): Mark
buffer UNINIT.
2023-02-17 16:27:00 +08:00
Po Lu
a62fa69ec9 Merge remote-tracking branch 'origin/master' into feature/android 2023-02-15 12:24:22 +08:00
Po Lu
a158c1d5b9 Update Android port
* configure.ac (HAVE_TEXT_CONVERSION): Define on Android.
* doc/emacs/input.texi (On-Screen Keyboards): Document ``text
conversion'' slightly.
* doc/lispref/commands.texi (Misc Events): Document new
`text-conversion' event.
* java/org/gnu/emacs/EmacsContextMenu.java (display): Use
`syncRunnable'.
* java/org/gnu/emacs/EmacsDialog.java (display): Likewise.
* java/org/gnu/emacs/EmacsEditable.java: Delete file.
* java/org/gnu/emacs/EmacsInputConnection.java
(EmacsInputConnection): Reimplement from scratch.
* java/org/gnu/emacs/EmacsNative.java (EmacsNative): Add new
functions.
* java/org/gnu/emacs/EmacsService.java (EmacsService, getEmacsView)
(getLocationOnScreen, sync, getClipboardManager, restartEmacs):
Use syncRunnable.
(syncRunnable): New function.
(updateIC, resetIC): New functions.

* java/org/gnu/emacs/EmacsView.java (EmacsView): New field
`inputConnection' and `icMode'.
(onCreateInputConnection): Update accordingly.
(setICMode, getICMode): New functions.

* lisp/bindings.el (global-map): Ignore text conversion events.
* src/alloc.c (mark_frame): Mark text conversion data.
* src/android.c (struct android_emacs_service): New fields
`update_ic' and `reset_ic'.
(event_serial): Export.
(android_query_sem): New function.
(android_init_events): Initialize new semaphore.
(android_write_event): Export.
(android_select): Check for UI thread code.
(setEmacsParams, android_init_emacs_service): Initialize new
methods.
(android_check_query, android_begin_query, android_end_query)
(android_run_in_emacs_thread):
(android_update_ic, android_reset_ic): New functions for
managing synchronous queries from one thread to another.

* src/android.h: Export new functions.
* src/androidgui.h (enum android_event_type): Add input method
events.
(enum android_ime_operation, struct android_ime_event)
(union android_event, enum android_ic_mode): New structs and
enums.

* src/androidterm.c (android_window_to_frame): Allow DPYINFO to
be NULL.
(android_decode_utf16, android_handle_ime_event)
(handle_one_android_event, android_sync_edit)
(android_copy_java_string, beginBatchEdit, endBatchEdit)
(commitCompletion, deleteSurroundingText, finishComposingText)
(getSelectedtext, getTextAfterCursor, getTextBeforeCursor)
(setComposingText, setComposingRegion, setSelection, getSelection)
(performEditorAction, getExtractedText): New functions.
(struct android_conversion_query_context):
(android_perform_conversion_query):
(android_text_to_string):
(struct android_get_selection_context):
(android_get_selection):
(struct android_get_extracted_text_context):
(android_get_extracted_text):
(struct android_extracted_text_request_class):
(struct android_extracted_text_class):
(android_update_selection):
(android_reset_conversion):
(android_set_point):
(android_compose_region_changed):
(android_notify_conversion):
(text_conversion_interface): New functions and structures.
(android_term_init): Initialize text conversion.

* src/coding.c (syms_of_coding): Define Qutf_16le on Android.
* src/frame.c (make_frame): Clear conversion data.
(delete_frame): Reset conversion state.

* src/frame.h (enum text_conversion_operation)
(struct text_conversion_action, struct text_conversion_state)
(GCALIGNED_STRUCT): Update structures.
* src/keyboard.c (read_char, readable_events, kbd_buffer_get_event)
(syms_of_keyboard): Handle text conversion events.
* src/lisp.h:
* src/process.c: Fix includes.

* src/textconv.c (enum textconv_batch_edit_flags, textconv_query)
(reset_frame_state, detect_conversion_events)
(restore_selected_window, really_commit_text)
(really_finish_composing_text, really_set_composing_text)
(really_set_composing_region, really_delete_surrounding_text)
(really_set_point, complete_edit)
(handle_pending_conversion_events_1)
(handle_pending_conversion_events, start_batch_edit)
(end_batch_edit, commit_text, finish_composing_text)
(set_composing_text, set_composing_region, textconv_set_point)
(delete_surrounding_text, get_extracted_text)
(report_selected_window_change, report_point_change)
(register_texconv_interface): New functions.

* src/textconv.h (struct textconv_interface)
(TEXTCONV_SKIP_CONVERSION_REGION): Update prototype.
* src/xdisp.c (mark_window_display_accurate_1):
* src/xfns.c (xic_string_conversion_callback):
* src/xterm.c (init_xterm): Adjust accordingly.
2023-02-15 12:23:03 +08:00
Stefan Kangas
bf60b3bfe7 Merge from origin/emacs-29
eb2b0931cf Add lambda_expression to c-ts-common-indent-type-regexp-a...
2da05876ed ; Use the right name when specifying VC packages
d4fc701297 Tolerate missing elpa-packages.eld files
8bc1b7d0b2 Avoid warning about 'load-path' in non-interactive sessions
3d17aee13d ; Fix installation of dependencies for VC packages
86ca7df6a3 ; Mention Hunspell private-dictionary misfeature in doc s...
7287b7b53a Support webkit2gtk-4.1
048a2dabfc ; Fix typo
2023-02-13 06:30:12 +01:00
Po Lu
19eb27d477 Merge remote-tracking branch 'origin/master' into feature/android 2023-02-12 20:32:31 +08:00
Po Lu
ae4ff4f25f Support input method ``text conversion'' on X Windows
* configure.ac (HAVE_TEXT_CONVERSION): Define on X.
* etc/NEWS: Announce new change.
* src/emacs.c (main): Always call init_xterm.
* src/frame.c (do_switch_frame): Use `fset_selected_window'.
* src/insdel.c (struct safe_del_range_context): New structure.
(safe_del_range_1, safe_del_range_2, safe_del_range): New
functions.
* src/lisp.h: Export new functions.
* src/window.c (run_window_change_functions): Report selected
window and buffer changes so that the input method can be reset.
* src/xfns.c (XICCallback, Xxic_preedit_caret_callback)
(Xxic_preedit_done_callback, Xxic_preedit_start_callback)
(Xxic_preedit_draw_callback): Fix coding style.
(Xxic_string_conversion_callback): New callback.
(create_frame_xic): Register string conversion callback.
(struct x_xim_text_conversion_data): New field `size'.
(x_encode_xim_text_1, x_encode_xim_text): New functions.
(xic_string_conversion_callback): New function.
* src/xterm.c (x_reset_conversion): New function.
(text_conversion_interface): New variable.
(init_xterm): Initialize text conversion interface.
2023-02-12 19:56:36 +08:00
Ulrich Müller
7287b7b53a Support webkit2gtk-4.1
* configure.ac: Check for webkit2gtk API version 4.1 first, then
fall back to 4.0.
2023-02-12 10:20:04 +01:00
Po Lu
e1c7b8ad61 Adjust ndk-build implementation for old NDK versions
* configure.ac: Pass ANDROID_CFLAGS to ndk_INIT.
* cross/ndk-build/Makefile.in (NDK_BUILD_CFLAGS):
* cross/ndk-build/ndk-build-shared-library.mk
($(call objname,$(LOCAL_MODULE),$(basename $(1)))):
($$(error Unsupported suffix):
* cross/ndk-build/ndk-build-static-library.mk
($(call objname,$(LOCAL_MODULE),$(basename $(1)))):
($$(error Unsupported suffix): Use NDK_BUILD_CFLAGS.
* m4/ndk-build.m4 (ndk_INIT): Accept cflags.
(ndk_CONFIG_FILES): Export NDK_BUILD_CFLAGS.
2023-02-06 22:26:45 +08:00
Po Lu
98c90135fe Update Android port
* INSTALL.android: Explain how to build selinux.
* configure.ac: Enable selinux on Android.
* cross/ndk-build/ndk-build-shared-library.mk: ($(call
objname,$(LOCAL_MODULE),$(basename $(1))))::($$(error
Unsupported suffix)::(NDK_CFLAGS_$(LOCAL_MODULE)):
* cross/ndk-build/ndk-build-static-library.mk: ($(call
objname,$(LOCAL_MODULE),$(basename $(1))))::($$(error
Unsupported suffix)::(NDK_CFLAGS_$(LOCAL_MODULE)): Correctly
handle files with a .cc suffix, and clang-specific asflags.
* cross/ndk-build/ndk-clear-vars.mk: Handle AOSP extensions
LOCAL_ADDITIONAL_DEPENDENCIES,
LOCAL_CLANG_ASFLAGS_$(NDK_BUILD_ARCH) and LOCAL_IS_HOST_MODULE.

* doc/emacs/android.texi (Android Startup): Explain emacsclient
wrapper.

* java/org/gnu/emacs/EmacsView.java (EmacsView): New flag
`isCurrentlyTextEditor'.
(showOnScreenKeyboard, hideOnScreenKeyboard): Set as
appropriate.
(onCheckIsTextEditor): Return its value.

* lisp/touch-screen.el (touch-screen-handle-scroll): Don't ding
at buffer limits.
* m4/ndk-build.m4: Improve doc.

* src/Makefile.in (LIBSELINUX_CFLAGS): New variable.
(EMACS_CFLAGS): Add it.
2023-02-05 23:02:14 +08:00
Po Lu
22749d69e5 Add libtiff support to Android port
* INSTALL.android: Document how to build with libtiff.

* build-aux/ndk-build-helper-1.mk (NDK_SO_NAME):
* build-aux/ndk-build-helper-2.mk (NDK_A_NAME):
* build-aux/ndk-build-helper-4.mk: Decrease number of duplicate
dependencies found.
* configure.ac (ANDROID_SDK_18_OR_EARLIER, XCONFIGURE, PNG_CFLAGS)
(HAVE_TIFF): Allow using libtiff on Android.
* cross/ndk-build/ndk-clear-vars.mk: Undefine additional
variables.
* cross/ndk-build/ndk-resolve.mk: Split CFLAGS resolution from
a-name resolution, and do not recursively add archive or shared
object names for dependencies of shared libraries.

* src/Makefile.in (TIFF_CFLAGS): New variable.
(EMACS_CFLAGS): Use it.
2023-01-28 20:47:26 +08:00
Po Lu
e3b50ec8ec Update Android port
* INSTALL.android: Document support for gnutls and libgmp.
* build-aux/ndk-build-helper-1.mk (NDK_SO_NAMES, NDK_INCLUDES)
(SYSTEM_LIBRARIES):
* build-aux/ndk-build-helper-2.mk: Recursively resolve and add
shared library dependencies; even those of static libraries.
* build-aux/ndk-module-extract.awk: Fix makefile_imports code.
* configure.ac (ANDROID_SDK_18_OR_EARLIER, XCONFIGURE)
(LIBGMP_CFLAGS): Enable GMP and gnutls on Android.

* cross/ndk-build/Makefile.in (LOCAL_EXPORT_C_INCLUDES):
* cross/ndk-build/ndk-build-shared-library.mk: ($(call
objname,$(LOCAL_MODULE),$(basename $(1))))::($$(error
Unsupported suffix)::($(LOCAL_MODULE_FILENAME)):
* cross/ndk-build/ndk-build-static-library.mk: ($(call
objname,$(LOCAL_MODULE),$(basename $(1))))::($$(error
Unsupported suffix):
* cross/ndk-build/ndk-clear-vars.mk:
* cross/ndk-build/ndk-resolve.mk (NDK_SYSTEM_LIBRARIES):
(NDK_LOCAL_EXPORT_C_INCLUDES_$(LOCAL_MODULE)):
(NDK_SO_EXTRA_FLAGS_$(LOCAL_MODULE)):
Implement ``LOCAL_ASM_RULE'' and ``LOCAL_C_ADDITIONAL_FLAGS''
extensions for libgmp.

* doc/emacs/input.texi (Touchscreens): Document how to
horizontally scroll.
* java/org/gnu/emacs/EmacsActivity.java (attachWindow): Give the
view focus again if necessary.
(onPause): Call right super function.
* java/org/gnu/emacs/EmacsPreferencesActivity.java (onClick):
Clear dumpFileName lest Emacs try to load a nonexistent dump
file.
* java/org/gnu/emacs/EmacsView.java (onDetachedFromWindow)
(onAttachedToWindow): Call super functions.
(onCreateInputConnection): Make sure the IME never obscures
Emacs.
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow, onKeyDown)
(onKeyUp): Improve tracking of quit keys.

* lisp/isearch.el (isearch-mode): Bring up the onscreen
keyboard.
* lisp/touch-screen.el (touch-screen-current-tool): Add three
fields.
(touch-screen-handle-scroll): Allow hscrolling as well.
(touch-screen-handle-touch): Add additional fields to
`touch-screen-current-tool'.
* src/Makefile.in (LIBGMP_CFLAGS, EMACS_CFLAGS): Add new
variable.
* src/android.c (android_run_select_thread):
(android_write_event): Use pthread_cond_broadcast because
pthread_cond_signal does nothing on some Android
versions/devices?
2023-01-28 14:29:51 +08:00
Po Lu
b0e7ae6d5b 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'.
2023-01-26 22:11:04 +08:00
Po Lu
22f7ad1057 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.
2023-01-26 19:54:38 +08:00
Po Lu
4255d7f051 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.
2023-01-26 15:37:04 +08:00
Po Lu
6f9a2a8f29 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.
2023-01-25 18:39:36 +08:00
Po Lu
54836c47c7 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.
2023-01-24 19:10:58 +08:00
Po Lu
56e55a8008 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.
2023-01-24 17:31:16 +08:00
Po Lu
4de6b18793 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.
2023-01-24 10:34:40 +08:00
Po Lu
a03eeb0109 Merge remote-tracking branch 'origin/master' into feature/android 2023-01-20 22:17:48 +08:00
Paul Eggert
167bf3408e 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.
2023-01-19 19:07:33 -08:00
Po Lu
a496509ced Update Android port
* .gitignore: Add new files.
* INSTALL.android: Explain how to build Emacs for ancient
versions of Android.
* admin/merge-gnulib (GNULIB_MODULES): Add getdelim.
* build-aux/config.guess (timestamp, version):
* build-aux/config.sub (timestamp, version): Autoupdate.
* configure.ac (BUILD_DETAILS, ANDROID_MIN_SDK):
(ANDROID_STUBIFY): Allow specifying CFLAGS via ANDROID_CFLAGS.
Add new configure tests for Android API version when not
explicitly specified.

* doc/emacs/android.texi (Android): Add reference to ``Other
Input Devices''.
(Android File System): Remove restrictions on directory-files on
the assets directory.
* doc/emacs/emacs.texi (Top): Add Other Input Devices to menu.
* doc/emacs/input.texi (Other Input Devices): New node.
* doc/lispref/commands.texi (Touchscreen Events): Document
changes to touchscreen input events.
* doc/lispref/frames.texi (Pop-Up Menus): Likewise.
* etc/NEWS: Announce changes.
* java/Makefile.in: Use lib-src/asset-directory-tool to generate
an `directory-tree' file placed in /assets.
* java/debug.sh: Large adjustments to support Android 2.2 and
later.

* java/org/gnu/emacs/EmacsContextMenu.java (inflateMenuItems):
* java/org/gnu/emacs/EmacsCopyArea.java (perform):
* java/org/gnu/emacs/EmacsDialog.java (toAlertDialog):
* java/org/gnu/emacs/EmacsDrawLine.java (perform):
* java/org/gnu/emacs/EmacsDrawRectangle.java (perform):
* java/org/gnu/emacs/EmacsDrawable.java (EmacsDrawable):
* java/org/gnu/emacs/EmacsFillPolygon.java (perform):
* java/org/gnu/emacs/EmacsFillRectangle.java (perform):
* java/org/gnu/emacs/EmacsGC.java (EmacsGC):
* java/org/gnu/emacs/EmacsPixmap.java (EmacsPixmap):
(destroyHandle):
* java/org/gnu/emacs/EmacsSdk7FontDriver.java (draw): Avoid
redundant canvas saves and restores.
* java/org/gnu/emacs/EmacsService.java (run):
* java/org/gnu/emacs/EmacsView.java (EmacsView):
(handleDirtyBitmap):
* java/org/gnu/emacs/EmacsWindow.java (changeWindowBackground)
(EmacsWindow): Make compatible with Android 2.2 and later.

* lib-src/Makefile.in (DONT_INSTALL): Add asset-directory-tool
on Android.:(asset-directory-tool{EXEEXT}): New target.
* lib-src/asset-directory-tool.c (struct directory_tree, xmalloc)
(main_1, main_2, main): New file.

* lib, m4: Merge from gnulib.  This will be reverted before
merging to master.

* lisp/button.el (button-map):
(push-button):
* lisp/frame.el (display-popup-menus-p): Improve touchscreen
support.
* lisp/subr.el (event-start):
(event-end): Handle touchscreen events.
* lisp/touch-screen.el (touch-screen-handle-timeout):
(touch-screen-handle-point-update):
(touch-screen-handle-point-up):
(touch-screen-track-tap):
(touch-screen-track-drag):
(touch-screen-drag-mode-line-1):
(touch-screen-drag-mode-line): New functions.
([mode-line touchscreen-begin]):
([bottom-divider touchscreen-begin]): Bind new events.

* lisp/wid-edit.el (widget-event-point):
(widget-keymap):
(widget-event-start):
(widget-button--check-and-call-button):
(widget-button-click): Improve touchscreen support.

* src/alloc.c (make_lisp_symbol): Avoid ICE on Android NDK GCC.
(mark_pinned_symbols): Likewise.

* src/android.c (struct android_emacs_window): New struct.
(window_class): New variable.
(android_run_select_thread): Add workaround for Android platform
bug.
(android_extract_long, android_scan_directory_tree): New
functions.
(android_file_access_p): Use those functions instead.
(android_init_emacs_window): New function.
(android_init_emacs_gc_class): Update signature of `markDirty'.
(android_change_gc, android_set_clip_rectangles): Tell the GC
whether or not clip rects were dirtied.
(android_swap_buffers): Do not look up method every time.
(struct android_dir): Adjust for new directory tree lookup.
(android_opendir, android_readdir, android_closedir): Likewise.
(android_four_corners_bilinear): Fix coding style.
(android_ftruncate): New function.
* src/android.h: Update prototypes.  Replace ftruncate with
android_ftruncate when necessary.

* src/androidterm.c (handle_one_android_event): Pacify GCC.  Fix
touch screen tool bar bug.
* src/emacs.c (using_utf8): Fix compilation error.
* src/fileio.c (Ffile_system_info): Return Qnil when fsusage.o
is not built.
* src/filelock.c (BOOT_TIME_FILE): Fix definition for Android.
* src/frame.c (Fx_parse_geometry): Fix uninitialized variable
uses.
* src/keyboard.c (lispy_function_keys): Fix `back'.
* src/menu.c (x_popup_menu_1): Handle touch screen events.
(Fx_popup_menu): Document changes.

* src/sfnt.c (main): Improve tests.

* src/sfntfont-android.c (sfntfont_android_put_glyphs): Fix
minor problem.
(init_sfntfont_android): Check for
HAVE_DECL_ANDROID_GET_DEVICE_API_LEVEL.
* src/sfntfont.c (struct sfnt_font_desc): New fields `adstyle'
and `languages'.
(sfnt_parse_style): Append tokens to adstyle.
(sfnt_parse_languages): New function.
(sfnt_enum_font_1): Parse supported languages and adstyle.
(sfntfont_list_1): Handle new fields.
(sfntfont_text_extents): Fix uninitialized variable use.
(syms_of_sfntfont, mark_sfntfont): Adjust accordingly.
2023-01-19 22:19:06 +08:00
Po Lu
a336fd98a1 Merge remote-tracking branch 'origin/master' into feature/android 2023-01-15 11:57:20 +08:00
Paul Eggert
9912049173 Update from Gnulib by running admin/merge-gnulib
This adds a new file m4/xattr.m4 from Gnulib,
for NFS v4 attribute copying.
Also, do these changes by hand:
* configure.ac: Mention $LIB_XATTR" in ACL summary.
* src/Makefile.in (QCOPY_ACL_LIB): New macro.
(LIBES): Use it.
2023-01-13 20:03:54 -08:00
Po Lu
f9732131cf Update Android port
* configure.ac (ANDROID_MIN_SDK): New variable.
(DX): Remove and replace with D8.
(XCONFIGURE): Check for the minimum version of Android the cross
compiler compiles for.  Generate java/AndroidManifest.xml from
java/AndroidManifest.xml.in.  Allow using Zlib on Android.

* java/AndroidManifest.xml.in: New file.  Use the minimum SDK
detected by configure.

* java/Makefile.in (top_srcdir, version): New variables.
(DX, D8): Replace with D8.
(ANDROID_MIN_SDK, APK_NAME): New variables.
(.PHONY):
(.PRECIOUS):
(classes.dex):
(emacs.apk): Generate $(APK_NAME) instead of `emacs.apk'.

* java/debug.sh: New option --attach-existing.  Attach to an
existing Emacs instance when specified.

* java/org/gnu/emacs/EmacsActivity.java (EmacsActivity): New
field `isPaused'.
(invalidateFocus1): Fix infinite recursion.
(detachWindow): Deiconify window.
(attachWindow): Iconify the window if the activity is paused.
(onCreate): Use the ``no title bar'' theme.
(onPause, onResume): New functions.
* java/org/gnu/emacs/EmacsNative.java (sendTouchUp, sendTouchDown)
(sendTouchMove, sendWheel, sendIconified, sendDeiconified): New
functions.
* java/org/gnu/emacs/EmacsSdk7FontDriver.java (Sdk7Typeface):
(list): Remove logging for code that is mostly going to be unused.
* java/org/gnu/emacs/EmacsService.java (ringBell, queryTree)
(getScreenWidth, getScreenHeight, detectMouse): New functions.
* java/org/gnu/emacs/EmacsSurfaceView.java (EmacsSurfaceView)
(surfaceChanged, surfaceCreated, surfaceDestroyed): Add extra
debug logging.  Avoid deadlock in surfaceCreated.

* java/org/gnu/emacs/EmacsView.java (EmacsView): Try very hard
to make the SurfaceView respect Z order.  It didn't work.
(handleDirtyBitmap): Copy over the contents from the old bitmap.
(explicitlyDirtyBitmap): New function.
(onLayout): Don't dirty bitmap if unnecessary.
(damageRect, swapBuffers): Don't synchronize so hard.
(onTouchEvent): Call window.onTouchEvent instead.
(moveChildToBack, raise, lower): New functions.

* java/org/gnu/emacs/EmacsWindow.java (Coordinate): New
subclass.
(pointerMap, isMapped, isIconified, dontFocusOnMap)
(dontAcceptFocus): New fields.
(EmacsWindow): Don't immediately register unmapped window.
(viewLayout): Send configure event outside the lock.
(requestViewLayout): Explicitly dirty the bitmap.
(mapWindow): Register the window now.  Respect dontFocusOnMap.
(unmapWindow): Unregister the window now.
(figureChange, onTouchEvent): New functions.
(onSomeKindOfMotionEvent): Handle scroll wheel events.
(reparentTo, makeInputFocus, raise, lower, getWindowGeometry)
(noticeIconified, noticeDeiconified, setDontAcceptFocus)
(setDontFocusOnMap, getDontFocusOnMap): New functions.
* java/org/gnu/emacs/EmacsWindowAttachmentManager.java
(registerWindow, detachWindow): Synchronize.
(noticeIconified, noticeDeiconified): New functions.
(copyWindows): New function.

* lisp/frame.el (frame-geometry, frame-edges)
(mouse-absolute-pixel-position, set-mouse-absolute-pixel-position)
(frame-list-z-order, frame-restack, display-mouse-p)
(display-monitor-attributes-list): Implement on Android.

* lisp/mwheel.el (mouse-wheel-down-event):
(mouse-wheel-up-event):
(mouse-wheel-left-event):
(mouse-wheel-right-event): Define on Android.

* src/android.c (struct android_emacs_service): New methods
`ringBell', `queryTree', `getScreenWidth', `getScreenHeight',
and `detectMouse'.
(struct android_event_queue, android_init_events)
(android_next_event, android_write_event): Remove write limit.
(android_file_access_p): Handle directories correcty.
(android_close): Fix coding style.
(android_fclose): New function.
(android_init_emacs_service): Initialize new methods.
(android_reparent_window): Implement function.
(android_bell, android_set_input_focus, android_raise_window)
(android_lower_window, android_query_tree, android_get_geometry)
(android_get_screen_width, android_get_screen_height)
(android_get_mm_width, android_get_mm_height, android_detect_mouse)
(android_set_dont_focus_on_map, android_set_dont_accept_focus):
New functions.
(struct android_dir): New structure.
(android_opendir, android_readdir, android_closedir): New
functions.
(emacs_abort): Implement here on Android and poke debuggerd into
generating a tombstone.

* src/android.h: Update prototypes.

* src/androidfns.c (android_set_parent_frame): New function.
(android_default_font_parameter): Use sane font size by default.
(Fx_display_pixel_width, Fx_display_pixel_height)
(Fx_display_mm_width, Fx_display_mm_height)
(Fx_display_monitor_attributes_list): Rename to start with
`android-'.  Implement.  Fiddle with documentation to introduce
Android specific nuances.
(Fandroid_display_monitor_attributes_list): New function.
(Fx_frame_geometry, frame_geometry): New function.
(Fandroid_frame_geometry): Implement correctly.
(Fx_frame_list_z_order): Rename to start with `android-'.
(android_frame_list_z_order, Fandroid_frame_list_z_order):
Implement.
(Fx_frame_restack): Rename to start with `android-'.
(Fandroid_frame_restack): ``Implement''.
(Fx_mouse_absolute_pixel_position): Rename to start with
`android-'.
(Fandroid_mouse_absolute_pixel_position): ``Implement''.
(Fx_set_mouse_absolute_pixel_position): Rename to start with
`android-'.
(Fandroid_set_mouse_absolute_pixel_position): ``Implement''.
(Fandroid_detect_mouse): New function.
(android_set_menu_bar_lines): Use FRAME_ANDROID_DRAWABLE when
clearing area.
(android_set_no_focus_on_map, android_set_no_accept_focus): New
functions.
(android_frame_parm_handlers): Register new frame parameter
handlers.
(syms_of_androidfns): Update appropriately.

* src/androidfont.c (androidfont_draw): Use
FRAME_ANDROID_DRAWABLE instead of FRAME_ANDROID_WINDOW.

* src/androidgui.h (enum android_event_type): New events.
(struct android_touch_event, struct android_wheel_event)
(struct android_iconify_event): New structures.
(union android_event): Add new events.

* src/androidterm.c (android_clear_frame): Use
FRAME_ANDROID_DRAWABLE instead of FRAME_ANDROID_WINDOW.
(android_flash, android_ring_bell): Implement bell ringing.
(android_toggle_invisible_pointer): Don't TODO function that
can't be implemented.
(show_back_buffer, android_flush_dirty_back_buffer_on): Check if
a buffer flip is required before doing the flip.
(android_lower_frame, android_raise_frame): Implement functions.
(android_update_tools, android_find_tool): New functions.
(handle_one_android_event): Handle new iconification, wheel and
touch events.
(android_read_socket): Implement pending-autoraise-frames.
(android_frame_up_to_date): Implement bell ringing.
(android_buffer_flipping_unblocked_hook): Check if a buffer flip
is required before doing the flip.
(android_focus_frame, android_frame_highlight)
(android_frame_unhighlight): New function.
(android_frame_rehighlight): Implement functions.
(android_iconify_frame): Always display error.
(android_set_alpha): Update commentary.
(android_free_frame_resources): Free frame touch points.
(android_scroll_run, android_flip_and_flush)
(android_clear_rectangle, android_draw_fringe_bitmap)
(android_draw_glyph_string_background, android_fill_triangle)
(android_clear_point, android_draw_relief_rect)
(android_draw_box_rect, android_draw_glyph_string_bg_rect)
(android_draw_image_foreground, android_draw_stretch_glyph_string)
(android_draw_underwave, android_draw_glyph_string_foreground)
(android_draw_composite_glyph_string_foreground)
(android_draw_glyphless_glyph_string_foreground)
(android_draw_glyph_string, android_clear_frame_area)
(android_clear_under_internal_border, android_draw_hollow_cursor)
(android_draw_bar_cursor, android_draw_vertical_window_border)
(android_draw_window_divider): Use FRAME_ANDROID_DRAWABLE
instead of FRAME_ANDROID_WINDOW for drawing operations.

* src/androidterm.h (struct android_touch_point): New structure.
(struct android_output): New fields.
(FRAME_ANDROID_NEED_BUFFER_FLIP): New macro.

* src/dired.c (emacs_readdir, open_directory)
(directory_files_internal_unwind, read_dirent)
(directory_files_internal, file_name_completion): Add
indirection over readdir and opendir.  Use android variants on
Android.

* src/dispnew.c (Fopen_termscript):
* src/fileio.c (fclose_unwind): Use emacs_fclose.
(Faccess_file): Call android_file_access_p.
(file_accessible_directory_p): Append right suffix to Android
assets directory.
(do_auto_save_unwind): Use emacs_fclose.
* src/keyboard.c (lispy_function_keys): Use right function key
for page up and page down.
(Fopen_dribble_file): Use emacs_fclose.

* src/lisp.h: New prototype emacs_fclose.

* src/lread.c (close_infile_unwind): Use emacs_fclose.

* src/sfnt.c (sfnt_curve_is_flat): Fix area-squared computation.
(sfnt_prepare_raster): Compute raster width and height
consistently with outline building.
(sfnt_build_outline_edges): Use the same offsets used to set
offy and offx.
(main): Adjust debug code.

* src/sfntfont-android.c (sfntfont_android_saturate32): Delete
function.
(sfntfont_android_blend, sfntfont_android_blendrgb): Remove
unnecessary debug code.
(sfntfont_android_composite_bitmap): Prevent out of bounds
write.
(sfntfont_android_put_glyphs): Use FRAME_ANDROID_DRAWABLE.
(init_sfntfont_android): Initialize Monospace Serif font to
something sensible.
* src/sfntfont.c (sfntfont_text_extents): Clear glyph metrics
before summing up pcm.
(sfntfont_draw): Use s->font instead of s->face->font.

* src/sysdep.c (emacs_fclose): Wrap around android_fclose on
android.

* src/term.c (Fsuspend_tty):
(delete_tty): Use emacs_fclose.
* src/verbose.mk.in (AM_V_DX): Replace with D8 version.
2023-01-13 15:53:08 +08:00
Po Lu
494bedde32 Bring up the sfnt-android font driver
* configure.ac (ANDROID_CFLAGS): Add sfnt-related font objects
to ANDROID_OBJ when not building stubs.
* lisp/startup.el (android-fonts-enumerated): New variable.
(normal-top-level): Set it.  Also enumerate fonts as early as
possible upon startup.

* src/alloc.c (cleanup_vector): Only finalize Android font
entities.
(garbage_collect): Mark sfntfont.c.

* src/android.c (struct android_emacs_drawable): New field
`damage_rect'.
(android_init_emacs_drawable): Initialize
Lorg/gnu/emacs/EmacsDrawable;#damageRect(Landroid/graphics/rect;)V.
(android_create_gc): Initialize cached GC fields.
(android_free_gc): Free cached GC clip rectangles.
(android_change_gc): Cache fields as appropriate.
(android_set_clip_rectangles): Set cached clip rectangles for
easy access from C.
(android_get_gc_values): Use cached values.
(android_get_image): Remove obsolete comment.
(android_lock_bitmap, android_damage_window): New functions that
don't parallel anything on X.

* src/android.h: Update prototypes.

* src/androidfns.c (android_default_font_parameter): Set Droid
Sans Mono as the default monospace font.
(Fx_create_frame): Register the sfntfont driver.

* src/androidgui.h (struct android_gc): Add C side caches for
clip rectangles and the foreground and background colors.

* src/androidterm.h: Update prototypes.

* src/dispextern.h (struct gui_box): New struct.
(gui_union_rectangles): New function.

* src/emacs.c (android_emacs_init): Initialize Android font
stuff late.
* src/font.c (font_make_entity): Clear `is_android' field on
Android.
(font_make_entity_android): Set `is_android' field.
* src/font.h (struct font_entity): New field `is_android'.

* src/print.c (print_vectorlike): Don't print private data,
which could include Lisp_Misc.

* src/sfnt.c (sfnt_read_cmap_format_0, sfnt_read_cmap_format_2)
(sfnt_read_cmap_format_4, sfnt_read_cmap_format_6)
(sfnt_read_cmap_format_8, sfnt_read_cmap_format_12): Remove
buggy pragmas.
(sfnt_lookup_glyph_4_1): New function.
(sfnt_lookup_glyph_4): Handle malformed lookup tables found on
Android.
(sfnt_lookup_glyph): Fix overflow problems in glyph checks.
(sfnt_read_glyph): Handle empty glyphs.  This implements some
behavior which everyone else seems to as well, but I can't find
documented in the TrueType Reference Manual.
(sfnt_free_glyph): Export correctly.
(sfnt_transform_coordinates): Make faster.
(sfnt_lerp_half): Fix lerping in some cases.
(sfnt_decompose_glyph): Handle empty glyphs correctly.  Close
contours manually instead of waiting for the edge building
process to do that.  This lets curves be handled correctly.
(struct sfnt_build_glyph_outline_context): Move internal struct
back to sfnt.c.
(sfnt_build_append): Fix detection of initial entry.
(sfnt_curve_to_and_build_1): Fix De Casteljau implementation.
(sfnt_curve_to_and_build): Use fixed point arithmetic to scale
outlines.
(sfnt_build_glyph_outline): Clear reference counts.  Use fixed
point arithmetic.
(sfnt_prepare_raster): Align rasters to 4 bytes,
SFNT_POLY_ALIGNMENT.  Fix calculation of offx and offy.
(sfnt_step_edge_by): Step edge by previously computed step_x.
(sfnt_build_outline_edges): Adjust for already closed contours.
Ignore edges abandoned after grid fit.  Also precompute step_x
to avoid multiplication on each span rastered.
(sfnt_poly_edges): Improve alignment.
(sfnt_fill_span): Rewrite to avoid control flow in while loop.
(sfnt_poly_span): Remove unnecessary code.
(sfnt_raster_glyph_outline): Use raster stride instead of width.
(sfnt_test_edge, sfnt_test_raster, main): Improve debugging
code.

* src/sfnt.h (struct sfnt_glyph_outline): Add refcount field to
outline.
(struct sfnt_build_glyph_outline_context): Remove private
struct.
(struct sfnt_raster): Add refcount field to raster.
(struct sfnt_edge): Improve doc.  Add `source_x' field used when
built with TEST.
(SFNT_CEIL_FIXED): New macro.

* src/sfntfont-android.c (sfntfont_android_saturate32)
(sfntfont_android_scale32, sfntfont_android_mul8x2)
(sfntfont_android_blend, U255TO256)
(sfntfont_android_composite_bitmap, sfntfont_android_union_boxes)
(sfntfont_android_put_glyphs, sfntfont_android_get_cache): New
functions.
(android_sfntfont_driver): New font driver.
(Fandroid_enumerate_fonts): New function.
(syms_of_sfntfont_android_for_pdumper, init_sfntfont_android)
(syms_of_sfntfont_android): Initialize default fonts, special
family mapping and font driver.
* src/sfntfont.c (struct sfnt_font_desc): New fields
`char_cache', `cmap_invalid' and `subtable'.
(sfnt_setup_coding_system): Improve commentary.  Add default
branch.  Fix return value.
(sfnt_safe_encode_coding_object_1)
(sfnt_safe_encode_coding_object_2):
(sfnt_safe_encode_coding_object): Use decode_coding_object
instead of encode_coding_object.
(sfnt_decode_font_string): Adjust for rename.
(sfnt_decode_foundry_name): New function.
(sfnt_weight_descriptions, sfnt_slant_descriptions)
(sfnt_width_descriptions): Fix definitions.
(sfnt_parse_style): Make function work.
(sfnt_enum_font): Initialize designer, char-cache and subtable
platform ID.
(sfntfont_charset_for_name, mark_sfntfont)
(sfntfont_charset_for_cmap): New functions.
(syms_of_sfntfont): New variable `sfnt-default-family-alist'.

* src/sfntfont.h (_SFNTFONT_H_): Update prototypes.

* src/xdisp.c (gui_union_rectangles): New function.
2023-01-11 16:06:15 +08:00
Po Lu
4c09b9a5a6 Merge remote-tracking branch 'origin/master' into feature/android 2023-01-08 15:43:57 +08:00
Po Lu
8dbfb924b6 * configure.ac (ANDROID_OBJS): Add sfntfont files. 2023-01-08 15:43:34 +08:00
Paul Eggert
5d1e14bd8b Adjust to recent Gnulib macro renaming
Also, remove some references to unused Gnulib macros.
2023-01-07 15:32:56 -08:00
Po Lu
6d823d1077 Merge remote-tracking branch 'origin/master' into feature/android 2023-01-02 21:38:37 +08:00
Po Lu
a32963e11f Update Android port
* Makefile.in (java): Depend on info.
(MAKEFILE_NAME):
(config.status): Remove unneeded changes.
* configure.ac (BUILD_DETAILS, ANDROID_STUBIFY): Don't require a
C++ compiler on Android.
* java/AndroidManifest.xml: <EmacsActivity>: Set launchMode
appropriately.  <EmacsMultitaskActivity>: New activity.
* java/Makefile.in (CROSS_BINS): Add EmacsClient.
* java/org/gnu/emacs/EmacsActivity.java (EmacsActivity)
(onCreate): Use the window attachment manager.
* java/org/gnu/emacs/EmacsCopyArea.java (EmacsCopyArea)
(paintTo): Implement clip masks correctly.
* java/org/gnu/emacs/EmacsDrawRectangle.java (getRect, paintTo):
Fix damage tracking rectangles.
* java/org/gnu/emacs/EmacsFontDriver.java (FontSpec, toString):
New function.
(FontMetrics, EmacsFontDriver): Fix signature of textExtents.
* java/org/gnu/emacs/EmacsMultitaskActivity.java
(EmacsMultitaskActivity): New file.
* java/org/gnu/emacs/EmacsNative.java (EmacsNative): New
functions sendFocusIn, sendFocusOut, sendWindowAction.
* java/org/gnu/emacs/EmacsPaintQueue.java (run): Fix clipping
handling.
* java/org/gnu/emacs/EmacsPixmap.java (EmacsPixmap): Add
constructor for mutable pixmaps.
* java/org/gnu/emacs/EmacsSdk23FontDriver.java
(EmacsSdk23FontDriver): New file.
* java/org/gnu/emacs/EmacsSdk7FontDriver.java
(EmacsSdk7FontDriver, Sdk7Typeface, Sdk7FontEntity, Sdk7FontObject)
(checkMatch, hasChar, encodeChar): Implement text display and
fix font metrics semantics.

* java/org/gnu/emacs/EmacsService.java (EmacsService): Remove
availableChildren.
(getLibraryDirectory, onCreate): Pass pixel density to Emacs.
(clearArea): Fix arguments.  Switch to using the window
attachment manager.
* java/org/gnu/emacs/EmacsSurfaceView.java (surfaceChanged)
(surfaceCreated): Flip buffers on surface attachment.
* java/org/gnu/emacs/EmacsView.java (EmacsView, swapBuffers):
New argument FORCE.  Always swap if it is true.
(onKeyMultiple, onFocusChanged): New functions.

* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow, destroyHandle)
(run): Switch to using the window attachment manager.
* java/org/gnu/emacs/EmacsWindowAttachmentManager.java
(EmacsWindowAttachmentManager): New file.

* lisp/cus-edit.el (custom-button, custom-button-mouse)
(custom-button-pressed):
* lisp/faces.el (tool-bar): Define faces correctly on Android.
* src/android.c (struct android_emacs_pixmap): Add mutable
constructor.
(struct android_emacs_drawable): New structure.
(android_write_event): Check if event queue hasn't yet been
initialized.
(android_select): Set errno to EINTR if pselect fails.
(android_close): Remove unused debugging code.
(android_get_home_directory): New function.
(Java_org_gnu_emacs_EmacsNative_setEmacsParams): Set pixel
density and compute game path.
(android_init_emacs_drawable): New function.
(Java_org_gnu_emacs_EmacsNative_sendKeyPress): New argument
`unicode_char'.  Pass it in events.
(Java_org_gnu_emacs_EmacsNative_sendKeyRelease): Likewise.
(Java_org_gnu_emacs_EmacsNative_sendFocusIn)
(Java_org_gnu_emacs_EmacsNative_sendFocusOut)
(Java_org_gnu_emacs_EmacsNative_sendWindowAction): New
functions.
(android_resolve_handle): Export function.
(android_change_gc): Clear clip rects under the right
circumstances.  Set right clip mask field.
(android_create_pixmap_from_bitmap_data): Use correct alpha
channels.
(android_create_pixmap): Create mutable pixmap and avoid
redundant color array allocation.
(android_create_bitmap_from_data, android_create_image)
(android_destroy_image, android_put_pixel, android_get_pixel)
(android_get_image, android_put_image, faccessat): New
functions.

* src/android.h: Update prototypes.

* src/androidfns.c (android_default_font_parameter): Prefer
monospace to Droid Sans Mono.
* src/androidfont.c (struct android_emacs_font_driver): New
method `draw'.
(struct android_emacs_font_spec): New field `dpi'.
(struct androidfont_info): Add font metrics cache.
(android_init_font_driver, android_init_font_spec): Adjust
accordingly.
(androidfont_from_lisp, androidfont_from_java): Handle new
fields.
(androidfont_draw): Implement function.
(androidfont_open_font): Set pixel size correctly.
(androidfont_close_font): Free metrics cache.
(androidfont_cache_text_extents)
(androidfont_check_cached_extents): New functions.
(androidfont_text_extents): Cache glyph metrics somewhere for
future use.
(androidfont_list_family): Implement function.

* src/androidgui.h (enum android_event_type): New focus and
window action events.
(enum android_modifier_mask): New masks.
(struct android_key_event): New field `unicode_char'.
(ANDROID_IS_MODIFIER_KEY): Newmacro.
(struct android_focus_event, struct
android_window_action_event): New structs.
(union android_event): Add new fields.
(enum android_image_format, struct android_image): New enums and
structs.

* src/androidterm.c (android_android_to_emacs_modifiers)
(android_emacs_to_android_modifiers, android_lower_frame)
(android_raise_frame, android_new_focus_frame)
(android_focus_changed, android_detect_focus_change): New
functions.
(handle_one_android_event): Implement focus and key event
handling.
(android_frame_rehighlight): New function.
(android_frame_raise_lower): Implement accordingly.
(android_make_frame_invisible): Clear highlight_frame if
required.
(android_free_frame_resources): Clear x_focus_event_frame if
required.
(android_draw_fringe_bitmap, android_draw_image_foreground)
(android_draw_image_foreground_1)
(android_draw_image_glyph_string): Remove unnecessary code.
(android_create_terminal, android_term_init): Set the baud rate
to something sensible.
* src/androidterm.h (struct android_bitmap_record): Make
structure the same as on X.
(struct android_display_info): New focus tracking fields.
(struct android_output): Likewise.
* src/dispextern.h (struct image): Add ximg and mask_img on
Android.

* src/emacs.c (android_emacs_init): Fix argc sorting iteration.

* src/fileio.c (user_homedir):
(get_homedir): Implement correctly on Android.

* src/font.h (PT_PER_INCH): Define correctly on Android.

* src/fringe.c (X, swap_nibble, init_fringe_bitmap): Swap fringe
bitmaps correctly on Android.

* src/image.c (GET_PIXEL, image_create_bitmap_from_data)
(image_create_bitmap_from_file, free_bitmap_record)
(image_unget_x_image_or_dc, struct image_type)
(prepare_image_for_display, image_clear_image_1)
(image_size_in_bytes, x_check_image_size)
(x_create_x_image_and_pixmap, x_destroy_x_image)
(image_check_image_size, image_create_x_image_and_pixmap_1)
(image_destroy_x_image, gui_put_x_image, image_put_x_image)
(image_get_x_image, image_unget_x_image)
(Create_Pixmap_From_Bitmap_Data, image_pixmap_draw_cross)
(MaskForeground, image_types, syms_of_image): Implement all of
the above on Android in terms of an API very similar to X.

* src/keyboard.c (FUNCTION_KEY_OFFSET, lispy_function_keys):
Define on Android to something sensible.

* src/lread.c (build_load_history): Fix problem.
2023-01-02 21:38:19 +08:00
Eli Zaretskii
3c55fbd4ad Merge from origin/emacs-29
cae528457c ; Add 2023 to copyright years.
b394359261 Improve documentation of 'isearch-open-overlay-temporary'
ab3210e709 Document 'use-package' in the 2 main manuals

# Conflicts:
#	etc/refcards/ru-refcard.tex
#	lib/explicit_bzero.c
#	m4/explicit_bzero.m4
2023-01-01 05:47:47 -05:00
Eli Zaretskii
cae528457c ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
Po Lu
fd074f3133 Merge remote-tracking branch 'origin/master' into feature/android 2022-12-31 18:05:12 +08:00
Po Lu
cfbc8a5dbc Bring up the Android operating system and its window system
* .dir-locals.el (c-mode): Add ANDROID_EXPORT noise macro.
* .gitignore: Add new files to ignore.
* Makefile.in: Adjust for Android.
* admin/merge-gnulib: Add new warning.
* configure.ac: Detect Android.  Run cross-configuration for
Android when appropriate.

* etc/DEBUG: Document how to debug Emacs on Android.

* java/AndroidManifest.xml:
* java/Makefile.in:
* java/README:
* java/debug.sh:
* java/org/gnu/emacs/EmacsActivity.java (EmacsActivity):
* java/org/gnu/emacs/EmacsApplication.java (EmacsApplication):
* java/org/gnu/emacs/EmacsCopyArea.java (EmacsCopyArea):
* java/org/gnu/emacs/EmacsDrawLine.java (EmacsDrawLine):
* java/org/gnu/emacs/EmacsDrawPoint.java (EmacsDrawPoint):
* java/org/gnu/emacs/EmacsDrawRectangle.java
(EmacsDrawRectangle):
* java/org/gnu/emacs/EmacsDrawable.java (EmacsDrawable):
* java/org/gnu/emacs/EmacsFillPolygon.java (EmacsFillPolygon):
* java/org/gnu/emacs/EmacsFillRectangle.java
(EmacsFillRectangle):
* java/org/gnu/emacs/EmacsFontDriver.java (EmacsFontDriver):
* java/org/gnu/emacs/EmacsGC.java (EmacsGC):
* java/org/gnu/emacs/EmacsHandleObject.java (EmacsHandleObject):
* java/org/gnu/emacs/EmacsNative.java (EmacsNative):
* java/org/gnu/emacs/EmacsPaintQueue.java (EmacsPaintQueue):
* java/org/gnu/emacs/EmacsPaintReq.java (EmacsPaintReq):
* java/org/gnu/emacs/EmacsPixmap.java (EmacsPixmap):
* java/org/gnu/emacs/EmacsSdk7FontDriver.java
(EmacsSdk7FontDriver):
* java/org/gnu/emacs/EmacsService.java (class Holder<T>)
(EmacsService):
* java/org/gnu/emacs/EmacsSurfaceView.java (EmacsSurfaceView):
* java/org/gnu/emacs/EmacsThread.java (EmacsThread):
* java/org/gnu/emacs/EmacsView.java (EmacsView):
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow): New files
and classes.

* lib-src/Makefile.in (srcdir):
* lib/Makefile.in (VPATH):
(HAVE_NATIVE_COMP):
(libgnu_a_SOURCES):
(DEPFLAGS): Configure correctly for cross-compiling.

* lib/faccessat.c:
* lib/fpending.c (__fpending):
* lib/open.c:
* lib/unistd.c (_GL_UNISTD_INLINE): Temporary adjustments to
gnulib.

* lisp/frame.el (display-graphic-p):
(display-screens):
(display-pixel-height):
(display-pixel-width):
(display-mm-height):
(display-mm-width):
(display-backing-store):
(display-save-under):
(display-planes):
(display-color-cells):
(display-visual-class): Adjust for new window system `android'.

* lisp/image/wallpaper.el (x-open-connection): Add declaration.
* lisp/loadup.el (featurep): Load up files for Android.
* lisp/net/eww.el (eww-form-submit, eww-form-file)
(eww-form-checkbox, eww-form-select): Adjust faces for android.
* lisp/term/android-win.el: New file.
* src/Makefile.in: Add new targets emacs.so and android-emacs,
then adjust for cross compilation.
* src/alloc.c (cleanup_vector): Clean up Android font entities
as well.
(garbage_collect): Mark androidterm.
* src/android-emacs.c (main):
* src/android.c (ANDROID_THROW, enum android_fd_table_entry_flags)
(struct android_emacs_service, struct android_emacs_pixmap)
(struct android_graphics_point, struct android_event_container)
(struct android_event_queue, android_run_select_thread)
(android_handle_sigusr1, android_init_events, android_pending)
(android_next_event, android_write_event, android_select)
(android_run_debug_thread, android_user_full_name)
(android_get_asset_name, android_fstat, android_fstatat)
(android_file_access_p, android_hack_asset_fd, android_open)
(android_close, JNICALL, android_init_emacs_service)
(android_init_emacs_pixmap, android_init_graphics_point)
(MAX_HANDLE, struct android_handle_entry, android_alloc_id)
(android_destroy_handle, android_resolve_handle)
(android_resolve_handle2, android_change_window_attributes)
(android_create_window, android_set_window_background)
(android_destroy_window, android_init_android_rect_class)
(android_init_emacs_gc_class, android_create_gc, android_free_gc)
(android_change_gc, android_set_clip_rectangles)
(android_reparent_window, android_lookup_method)
(android_clear_window, android_map_window, android_unmap_window)
(android_resize_window, android_move_window, android_swap_buffers)
(android_get_gc_values, android_set_foreground)
(android_fill_rectangle, android_create_pixmap_from_bitmap_data)
(android_set_clip_mask, android_set_fill_style, android_copy_area)
(android_free_pixmap, android_set_background, android_fill_polygon)
(android_draw_rectangle, android_draw_point, android_draw_line)
(android_create_pixmap, android_set_ts_origin, android_clear_area):
* src/android.h (ANDROID_EXPORT):
* src/androidfns.c (android_display_info_for_name)
(check_android_display_info, check_x_display_info, gamma_correct)
(android_defined_color, android_decode_color)
(android_implicitly_set_name, android_explicitly_set_name)
(android_set_tool_bar_lines, android_change_tool_bar_height)
(android_set_tab_bar_lines, android_change_tab_bar_height)
(android_set_scroll_bar_default_height)
(android_set_scroll_bar_default_width, android_icon_verify)
(android_icon, android_make_gc, android_free_gcs)
(unwind_create_frame, do_unwind_create_frame)
(android_default_font_parameter, android_create_frame_window)
(Fx_create_frame, Fxw_color_defined_p, Fxw_color_values)
(Fxw_display_color_p, Fx_display_grayscale_p)
(Fx_display_pixel_width, Fx_display_pixel_height)
(Fx_display_planes, Fx_display_color_cells, Fx_display_screens)
(Fx_display_mm_width, Fx_display_mm_height)
(Fx_display_backing_store, Fx_display_visual_class)
(Fx_display_monitor_attributes_list, Fx_frame_geometry)
(Fx_frame_list_z_order, Fx_frame_restack)
(Fx_mouse_absolute_pixel_position)
(Fx_set_mouse_absolute_pixel_position, Fandroid_get_connection)
(Fx_display_list, Fx_show_tip, Fx_hide_tip)
(android_set_background_color, android_set_border_color)
(android_set_cursor_color, android_set_cursor_type)
(android_set_foreground_color)
(android_set_child_frame_border_width)
(android_set_internal_border_width, android_set_menu_bar_lines)
(android_set_mouse_color, android_set_title, android_set_alpha)
(android_frame_parm_handlers, syms_of_androidfns):
* src/androidfont.c (struct android_emacs_font_driver)
(struct android_emacs_font_spec, struct android_emacs_font_metrics)
(struct android_emacs_font_object, struct android_integer)
(struct androidfont_info, struct androidfont_entity)
(android_init_font_driver, android_init_font_spec)
(android_init_font_metrics, android_init_integer)
(android_init_font_object, androidfont_get_cache)
(androidfont_from_lisp, androidfont_from_java, androidfont_list)
(androidfont_match, androidfont_draw, androidfont_open_font)
(androidfont_close_font, androidfont_has_char)
(androidfont_encode_char, androidfont_text_extents)
(androidfont_list_family, androidfont_driver)
(syms_of_androidfont_for_pdumper, syms_of_androidfont)
(init_androidfont, android_finalize_font_entity):
* src/androidgui.h (_ANDROID_GUI_H_, struct android_rectangle)
(struct android_point, enum android_gc_function)
(enum android_gc_value_mask, enum android_fill_style)
(enum android_window_value_mask)
(struct android_set_window_attributes, struct android_gc_values)
(struct android_gc, enum android_swap_action, enum android_shape)
(enum android_coord_mode, struct android_swap_info)
(NativeRectangle, struct android_any_event)
(struct android_key_event, struct android_configure_event)
(union android_event):
* src/androidterm.c (android_window_to_frame, android_clear_frame)
(android_ring_bell, android_toggle_invisible_pointer)
(android_update_begin, android_update_end, show_back_buffer)
(android_flush_dirty_back_buffer_on, handle_one_android_event)
(android_read_socket, android_frame_up_to_date)
(android_buffer_flipping_unblocked_hook)
(android_query_frame_background_color, android_parse_color)
(android_alloc_nearest_color, android_query_colors)
(android_mouse_position, android_get_focus_frame)
(android_focus_frame, android_frame_rehighlight)
(android_frame_raise_lower, android_make_frame_visible)
(android_make_frame_invisible)
(android_make_frame_visible_invisible, android_fullscreen_hook)
(android_iconify_frame, android_set_window_size_1)
(android_set_window_size, android_set_offset, android_set_alpha)
(android_new_font, android_bitmap_icon, android_free_pixmap_hook)
(android_free_frame_resources, android_delete_frame)
(android_delete_terminal, android_scroll_run)
(android_after_update_window_line, android_flip_and_flush)
(android_clear_rectangle, android_reset_clip_rectangles)
(android_clip_to_row, android_draw_fringe_bitmap)
(android_set_cursor_gc, android_set_mouse_face_gc)
(android_set_mode_line_face_gc, android_set_glyph_string_gc)
(android_set_glyph_string_clipping)
(android_set_glyph_string_clipping_exactly)
(android_compute_glyph_string_overhangs)
(android_clear_glyph_string_rect)
(android_draw_glyph_string_background, android_fill_triangle)
(android_make_point, android_inside_rect_p, android_clear_point)
(android_draw_relief_rect, android_draw_box_rect)
(HIGHLIGHT_COLOR_DARK_BOOST_LIMIT, android_setup_relief_color)
(android_setup_relief_colors, android_draw_glyph_string_box)
(android_draw_glyph_string_bg_rect, android_draw_image_relief)
(android_draw_image_foreground, android_draw_image_foreground_1)
(android_draw_image_glyph_string)
(android_draw_stretch_glyph_string, android_draw_underwave)
(android_draw_glyph_string_foreground)
(android_draw_composite_glyph_string_foreground)
(android_draw_glyphless_glyph_string_foreground)
(android_draw_glyph_string, android_define_frame_cursor)
(android_clear_frame_area, android_clear_under_internal_border)
(android_draw_hollow_cursor, android_draw_bar_cursor)
(android_draw_window_cursor, android_draw_vertical_window_border)
(android_draw_window_divider, android_redisplay_interface)
(frame_set_mouse_pixel_position, get_keysym_name)
(android_create_terminal, android_term_init, syms_of_androidterm)
(mark_androidterm):
* src/androidterm.h (_ANDROID_TERM_H_, struct android_display_info)
(struct android_output, FRAME_ANDROID_OUTPUT, XSCROLL_BAR): New
files.
* src/dired.c (file_attributes): Do not use openat on Android.
* src/dispextern.h (No_Cursor): Define appropriately on Android.
(struct glyph_string, struct face): Make gc field of type struct
android_gc on Android.
* src/dispnew.c (clear_current_matrices, clear_desired_matrices)
(adjust_frame_glyphs_for_window_redisplay, free_glyphs)
(update_frame, scrolling, char_ins_del_cost, update_frame_line)
(init_display_interactive): Disable text terminal support
completely on Android.  Fix non-toolkit menus for non-X systems.
* src/editfns.c (Fuser_full_name): Call android_user_full_name.
* src/emacs.c (android_emacs_init): Make main this on Android.
Prohibit argv sorting from exceeding end of argv.
* src/epaths.in: Add path definitions for Android.

* src/fileio.c (file_access_p): Call android_file_access_p.
(file_name_directory): Avoid using openat on Android.
(Fcopy_file): Adjust to call sys_fstat instead.
(file_directory_p):
(Finsert_file_contents):
(write_region): Likewise.
* src/filelock.c:
* src/fns.c (Flocale_info): Pacify warning on Android.
* src/font.c (font_make_entity_android): New function.
* src/font.h:
* src/frame.c (Fframep):
(Fwindow_system): Handle new window system `android'.  Update doc strings.
(Fmake_terminal_frame): Disable on Android.
(gui_display_get_resource): Disable get_string_resource_hook on Android.
(syms_of_frame): New defsym `android'.

* src/frame.h (GCALIGNED_STRUCT): Add new output data for
Android.
(ENUM_BF): Expand enumerator size.
(FRAME_ANDROID_P, FRAME_WINDOW_P, MOUSE_HL_INFO): Add
definitions for Android.

* src/image.c (GET_PIXEL):
(image_create_bitmap_from_file):
(image_create_x_image_and_pixmap_1):
(image_get_x_image):
(slurp_file):
(lookup_rgb_color):
(image_to_emacs_colors):
(image_from_emacs_colors):
(image_pixmap_draw_cross):
(image_disable_image):
(MaskForeground):
(gif_load): Add stubs for Android.

* src/lisp.h:
* src/lread.c (safe_to_load_version, maybe_swap_for_eln1, openp):
* src/pdumper.c (pdumper_load): Call sys_fstat instead of fstat.
* src/process.c (wait_reading_process_output): Use
android_select instead of pselect.
* src/scroll.c: Disable on Android.
* src/sysdep.c (widen_foreground_group, reset_sys_modes)
(init_signals, emacs_fstatat, sys_fstat): New function.
(emacs_open, emacs_open_noquit, emacs_close): Implement
differently on Android.
(close_output_streams): Disable what is not required on Android.

* src/term.c (OUTPUT1_IF, encode_terminal_code, string_cost)
(string_cost_one_line, per_line_cost, calculate_costs)
(struct fkey_table, tty_append_glyph, produce_glyphs)
(tty_capable_p, Fsuspend_tty, Fresume_tty, device, init_tty)
(maybe_fatal, syms_of_term): Disable text terminal support on
Android.

* src/termhooks.h (enum output_method): Add android output
method.
(GCALIGNED_STRUCT, TERMINAL_FONT_CACHE): Define for Android.

* src/terminal.c (Fterminal_live_p): Implement for Android.

* src/verbose.mk.in (AM_V_GLOBALS): Add JAVAC and DX.
* src/xdisp.c (redisplay_internal): Disable text terminals on Android.
(display_menu_bar):
(display_tty_menu_item):
(draw_row_with_mouse_face):
(expose_frame): Make the non toolkit menu bar work on Android.

* src/xfaces.c (GCGraphicsExposures):
(x_create_gc):
(x_free_gc):
(Fx_load_color_file): Define for Android.

* xcompile/Makefile.in (top_srcdir):
(top_builddir):
* xcompile/README:
* xcompile/langinfo.h (nl_langinfo): New files.
2022-12-31 18:04:18 +08:00
Stefan Kangas
48db8b68a8 Merge from origin/emacs-29
c36fe3df17 Fix c-ts-mode imenu defun name (bug#60296)
a24e350170 Fix treesit--children-covering-range-recurse (bug#60301)
fbb4eb919b Support treesit-defun-name in tree-sitter major modes
6253184afc ; * lisp/treesit.el (treesit-defun-at-point): Guard again...
f8e219ebfa Add treesit-defun-name and friends
35c2ca2ca6 Make treesit-node-at/on guess language at point
7f7def2ae6 ; Add treesit-no-parser error
b6a2e1ddf6 * nt/INSTALL.W64: update instructions for setting up W64 ...
265b91d891 Revert "; Bump minimum supported Windows version for MinG...
75155e4586 ; Bump minimum supported Windows version for MinGW64 to W...
677f6c79eb ; Update minimum requirements of MinGW-w64
7723af5e4a ; * lisp/progmodes/c-ts-mode.el: quote literal string in ...
38866510c7 ; * src/xdisp.c (redisplay_internal): Reinstate the FRAME...
a825aa0b13 Fix definition of CNS 11643-15 charset
a42b20dd95 ; * lisp/progmodes/c-ts-mode.el: Add outline section head...
e4e3634539 Improve c-ts-mode block comment indent (bug#60270)
e30621caa2 ; Add treesit_recursion_limit
6a43af5880 Fix block comment indent and filling for c-ts-mode (bug#5...
e492c21e81 Fix treesit_cursor_helper (bug#60267)
4437dbedf7 Fix restart-emacs alarms (Bug#60220)
121a9ff9f6 Fix alternate stack test in configure
84888080ee Add more functions to "string" shortdoc
c90f97d4e5 Make the Contour terminal an alias of xterm-256color
c3fac9465f ; Fix punctuation in last change.
756bb422a4 Correct wrong info in (info)Go to node
a8c3424d28 Fix typo in TUTORIAL.fr (bug#60261)
24cd2f0daf Add some diff-fixup-modifs tests
d32091199a Fix quoted argument in emacsclient-mail.desktop Exec key
286c48137f ert-x: Move window selection logic to its own macro
823c49cea8 ; ert-x: Simplify `ert-with-test-buffer-selected'
38c6abe4d0 ; ert-x: Add test for buffer read-only state
0e39ad6fa5 Fix crash after X error
2022-12-25 06:30:21 +01:00
Florian Weimer
6c1413d5ef configure: Remove obsolete check for -b i486-linuxaout
If there are still a.out system arounds, they shouldn't need this
anymore because the toolchain has been fixed.

* configure.ac (emacs_cv_b_link): Remove obsolete check.
2022-12-24 10:08:45 +02:00
Florian Weimer
121a9ff9f6 Fix alternate stack test in configure
* configure.ac (emacs_cv_alternate_stack): Include <stdlib.h>
for 'malloc's prototype.
2022-12-24 10:03:23 +02:00
Stefan Kangas
08bb91c7df Merge from origin/emacs-29
e59216d3be * Invoke spawed Emacs processes with '-Q' when native com...
777b383dd0 Fix Eshell electric slash when used from the root directo...
c088cdad9e Fix the --without-all build with tree-sitter
ec9fbad908 Fix write-region to null device on MS-Windows
f35da11199 message: Do not default to eudc-capf-complete yet
98c16a8c88 ; * lisp/tab-bar.el: Remaining renaming of "fixed-width" ...
d76d7a3beb whitespace: Avoid mutating original buffer's markers in c...
2022-12-22 06:30:09 +01:00
Eli Zaretskii
c088cdad9e Fix the --without-all build with tree-sitter
* configure.ac (HAVE_TREE_SITTER): Set NEED_DYNLIB=yes, since
tree-sitter support requires dynlib.o.  (Bug#60061)
2022-12-21 21:53:03 +02:00
Vibhav Pant
cb242bf151
Add support for additional memory checks using AddressSanitizer.
When Emacs is compiled with AddressSanitizer support, enable
poisoning/unpoisoning freed/unused Lisp objects and other internal
memory management structures. If enabled, this will mark freed bytes
that have been put on free lists for future use and initially
allocated memory blocks/chunks as "poisoned", triggering an ASan error
if they are accessed improperly. Structures are unpoisoned when they
have been taken off their respective free lists. Additionally, add
optional macros for performing unaligned loads, which when enabled by
defining USE_SANITIZER_UNALIGNED_LOAD will use ASan provided functions
for loading from unaligned addresses, which may help catch bugs that
AddressSanitizer might otherwise miss.

* configure.ac: Check for the existence of address and common
sanitizer API headers.

* src/lisp.h (UNALIGNED_LOAD_SIZE): New macro. If enabled, and the
necessary sanitizer API is available, define it to
__sanitizer_unaligned_load(64|32) depending on the word size of the
architecture.

* src/fns.c [HAVE_FAST_UNALIGNED_ACCESS] (Fstring_lessp): Use
'UNALIGNED_LOAD_SIZE' to perform unaligned loads from the two strings.

* src/alloc.c (ASAN_POISON_ABLOCK, ASAN_UNPOISON_ABLOCK)
(ASAN_POISON_INTERVAL_BLOCK, ASAN_UNPOISON_INTERVAL_BLOCK)
(ASAN_POISON_INTERVAL, ASAN_UNPOISON_INTERVAL)
(ASAN_PREPARE_DEAD_SDATA, ASAN_PREPARE_LIVE_SDATA)
(ASAN_POISON_SBLOCK_DATA, ASAN_POISON_STRING_BLOCK)
(ASAN_UNPOISON_STRING_BLOCK, ASAN_POISON_STRING)
(ASAN_UNPOISON_STRING, ASAN_POISON_FLOAT_BLOCK)
(ASAN_UNPOISON_FLOAT_BLOCK, ASAN_POISON_FLOAT)
(ASAN_UNPOISON_FLOAT, ASAN_POISON_CONS_BLOCK)
(ASAN_POISON_CONS, ASAN_UNPOISON_CONS)
(ASAN_POISON_VECTOR_CONTENTS, ASAN_UNPOISON_VECTOR_CONTENTS)
(ASAN_UNPOISON_VECTOR_BLOCK, ASAN_POISON_SYMBOL_BLOCK)
(ASAN_UNPOISON_SYMBOL_BLOCK, ASAN_POISON_SYMBOL)
(ASAN_UNPOISON_SYMBOL) [ADDRESS_SANITIZER]: New macros. When
address sanitization is enabled, define them to poison/unpoison
objects.

(lisp_align_malloc): Poison newly allocated blocks on `free_ablock',
unpoison ablocks taken from it respectively.
(lisp_align_free): Poison individual ablocks when they are put on the
free list, unpoison them when an entire `ablocks' chunk is being
freed.

(make_interval): Poison interval blocks on initial allocation,
unpoison individual intervals on allocation and removal from
`interval_free_list'.
(sweep_intervals): Unpoison interval blocks before sweeping, poison
dead/unmarked intervals.

(allocate_string): Poison string blocks on initial allocation,
unpoison Lisp_Strings on removal from the free list.
(allocate_string_data): Poison `sblock' data on initial allocation,
unpoison individual `sdata' contents on allocation or removal from the
free list. Call `ASAN_PREPARE_LIVE_SDATA' on the new `sdata' struct.
(sweep_strings): Unpoison string blocks before sweeping them,
poisoning dead strings and their sdata afterwards.
(compact_small_strings): Call `ASAN_PREPARE_LIVE_DATA' on the `sdata'
to where compacted strings to moved to.
(pin_string): Call `ASAN_PREPARE_DEAD_SDATA' on `old_sdata'.

(make_float): Poison float blocks on allocation, unpoisoning
individual Lisp_Floats on allocation or removal from
`float_free_list'.
(sweep_floats): Unpoison float blocks before sweeping, poison
dead/unmarked floats.

(free_cons): Poison `ptr'.
(Fcons): Poison cons blocks on allocation, unpoisoning individual
Lisp_Cons on allocation or removal from `cons_free_list'.
(sweep_conses): Poison dead/unmarked conses.

(setup_free_list): Poison vectors put on `vector_free_lists'.
(allocate_vector_from_block): Unpoison vectors taken from the free
list, poison excess vector bytes when vectors allocated from the free
list are larger than requested.
(sweep_vectors): Unpoison vector blocks before sweeping them.

(Fmake_symbol): Poison symbol blocks on initial allocation,
unpoisoning individual Lisp_Symbols on allocation or removal from
`symbol_free_list'.
(sweep_symbols): Unpoison symbol blocks before sweeping, poisoning
dead/unmarked symbols.

(live_string_holding, live_cons_holding, live_symbol_holding)
(live_float_holding): When compiling with address sanitization and GC
poisoning enabled, return NULL if the passed address is poisoned, or
if the Lisp object it resides in is poisoned, avoiding a
use-after-poison trigger if these functions are called on a pointer
that might be referring to a now dead/swept object.

* etc/DEBUG: Add information about enabling ASan memory poisoning.
2022-12-19 18:04:05 +05:30
Paul Eggert
5a344d90c5 Port better to glibc 2.28+ renameat2
* configure.ac: Check for renameat2.
* src/sysdep.c (renameat_noreplace): Prefer renameat2 (supplied by
glibc 2.28 and later) to doing the syscall by hand.
2022-12-17 22:38:58 -08:00
Eli Zaretskii
6c06379c03 Merge from origin/emacs-29
e950f5a663 Merge branch 'feature/use-package' into emacs-29
5bcd0cee0f * etc/USE-PACKAGE-NEWS: Delete file.
6bb4267a54 * admin/git-bisect-start: Prune use-package merge commits.
b9fa81514f ; Minor doc fixes in bind-key.el
15fb115551 Update use-package defgroups
4be96c9dcb Drop key-chord.el support from use-package
9c21eae60c ; lisp/progmodes/java-ts-mode.el: Fix more typos.
2659311e06 ; * lisp/progmodes/java-ts-mode.el (java-ts-mode--keywords...
b4a3724d3b Remove unneeded (require 'edebug) from which-func.el
5899cac111 Change use-package custom :group to `initialization`
8fb2afe051 ; Fix typos
a37df90276 Treat escaped newlines in Eshell as the empty string
d3e9bd3b57 ; Document use-package-reset-statistics
c65e087068 ; use-package: Improve :ensure-system-package docstrings
141fe8b827 use-package: Improve :mode keyword documentation
888558ec42 Improve bind-keys* and override-global-mode docstrings
c774e83e36 ; * src/emacs.c (main): Improvements to last change.
537f11f8cd ; * doc/misc/use-package.texi: Improve indexing.
98e54f597e Add new use-package manual
01bfbd186a Fix use-package tests
97c8a58787 * doc/misc/Makefile.in (INFO_COMMON): Add use-package.
500c459eff ; * etc/NEWS: Mention use-package.
4a1e9d61b5 ; Merge from https://github.com/jwiegley/use-package
58cc931e92 Merge pull request from skangas/revert-for-copyright
c74b5c16f8 Merge pull request from skangas/revert-for-copyright2
ebbd98edb3 Revert "Add: 'local' keyword"
8296164eab Remove tests lacking a copyright assignment for now
a6cbfdd8f1 Merge pull request from skangas/package-requires
efae6048dd Add package keyword from finder-known-keywords
06f92d1cc0 Fix Package-Requires for bind-{chord,key}.el
e42c8479ec Merge pull request from skangas/dir-locals
7b689942f0 Merge pull request from skangas/fix-headers
30fa366737 Add .dir-locals.el
79c2c3a3ad Delete redundant headers
2399d0d5ce Normalize GPLv3 license statements
7087a97a24 Merge pull request from jwiegley/revert-1019-johnw/multi-k...
3e81af80a2 Revert "Allow multiple keymaps in :map argument"
f4ee1c3839 Merge pull request from jwiegley/johnw/multi-keymap
49fffe7cf4 Merge remote-tracking branch 'origin/master' into pr-830
cf8ab8b52e Merge pull request from skangas/texinfo-wip
2efc869866 Merge branch 'master' into texinfo-wip
9b476ae71c Merge pull request from skangas/gnu-elpa
8cf8631c69 Fix makeinfo warnings
a6b1b62763 Use two spaces to end sentences
6a26c55d70 Recommend GNU ELPA over MELPA
4e8b72efc8 manual: Regenerate texi file
ae301ad36d Merge pull request from skangas/checkdoc
5dad5ff0fe Merge pull request from skangas/ci
ff30d22909 Various checkdoc fixes
971634e3f9 Merge pull request from bhankas/master
43254ae62f Fix building on Emacs 24.3
45e6ee1371 Fix tests on Emacs 26 or older
7122ac5397 Bump version to 2.4.4
6b25a41bc6 Merge pull request from andreyorst/face-spec-set-third-arg...
76a5ce5d86 Allow passing the SPEC-TYPE argument via :custom-face
67d7d1fda0 Merge pull request from bhankas/master
370890e518 Bump version to 2.4.3
2ee9b31ca4 bind-key.el: Bump version for ELPA
407b1bf4f0 Merge pull request from andreyorst/face-spec-set
0be7f5dd53 Merge pull request from bhankas/master
abd655c99e Update version to 2.4.2
9188b3edf1 Merge pull request from bhankas/master
0fafd98513 Update copyright for submission to ELPA
6b344a9197 Use face-spec-set instead of custom-set-faces
c0338e06cd Merge pull request from conao3/add-commands-keyword
ec96b47664 bind-keys supports passing a list of keymaps as :map argument
daa124e1cc Fix bind-chords docs: :map argument may be a list of keymaps
4107bbfbdb Merge pull request from sdwolfz/native-compiler-warning
1494f65f61 Fix emacs native compilation warning for bind-key
c12deb31fe Merge pull request from CeleritasCelery/master
d4aeda77a9 Merge pull request from sdwolfz/native-compiler-warning
3feedce08d Fix emacs native compilation warning
6c2fdaffd9 Revert "Remove use-package-font-lock-keywords"
09e837dfae Merge pull request from belak/remove-extra-font-lock-keywords
89d6e7a5ec Merge pull request from realcomplex/override-global-mode-fix
a05b9e28ed Go back to making `override-global-mode` non-global
85c1287c26 Make sure that bind-key's `override-global-mode` is initia...
3dd5bee4aa Merge pull request from tarsiiformes/quote-quote
53c1889342 Quote single quotes in docstrings or use different quoting
e8626100f3 Merge pull request from tarsiiformes/cleanup-manual
835fdb16be manual: Regenerate texi file
0dc78ef4c8 Merge pull request from conao3/fix-declare-style
2967849846 Merge pull request from waymondo/ensure-system-packages-us...
28e7b96fcf Merge pull request from waymondo/use-package-hook-handler-...
b1fbfe66eb Merge pull request from waymondo/use-package-chords-autolo...
cf3bfecced Merge pull request from matzebond/master
a0ba027ee5 Merge pull request from wcy123/master
ca426a7732 Merge pull request from phst/lex
f270623768 Merge pull request from phst/flet
0503611b71 Merge pull request from conao3/add-custom-face-description
e9b297a9fa Merge pull request from iaeerfung/master
6484e5fdfe Merge pull request from wyuenho/set-default-use-package-en...
a7259411f6 Merge pull request from wyuenho/statistics-sorting
de0c8c36c7 Merge pull request from Hugo-Heagren/bind-keys-repeat-map
015c921a2e Merge pull request from danielpza/add-update-custom-package
b143663f12 Merge pull request from tarsiiformes/silencio
debab131f0 Merge pull request from DamienCassou/update-texi
22de8991c1 Merge pull request from skangas/fix-typo
620fe443c2 Add: 'local' keyword
4004dde6ea Avoid positional arguments to define-minor-mode
cb85f9c274 Fix typo in use-package docstring
30b35d6d62 Update use-package.texi
9be2580f5f optimization: constand folding for read-kbd-macro
1143f14d65 bind-keys-form: error for repeat sub-keywords without :rep...
c4bd2aa3b8 bind-key-form: allow :continue keyword inside repeat map
5ef327ce9f bind-key-form: allow :exit keyword inside repeat map
2203246454 bind-keys-form: new keyword :repeat-map, for defining repe...
ee292b80be Fix tests and documentation for hook
24c50da3b2 Auto detect mode suffix in hook keyword
1343783532 feat: add update custom packages command
f3ff593a84 Properly sort use-package-statistics-report
c09cb1301b Fix void-variable use-package-enable-imenu-support
11b2184c8d Remove uses of deprecated ‘flet’ macro
a35b924054 add testcase
dbfb3484cd add autoload keyword
40d2541331 fix docstring. was: invalid function name
ffa5f0397a Merge pull request from minad/improved-unbind
5ca7bc321d unbind-key: Ensure that keys are removed from the keymap
ec750952f4 bind-key: Use new symbols for kmapvar
a248658910 Merge pull request from tzz/tzz/use-package-use-theme
2b9536f242 Add use-package-use-theme and avoid missing theme errors
c425e67a19 Merge pull request from kljohann/custom-use-single-let
e3938e7b26 Use a single let binding when expanding consecutive :custo...
e4daf0cd42 Merge pull request from tzz/tzz/remove-use-package-from-cu...
6b7ab46e57 Remove use-package theme from global list of custom-enable...
3ffb662dcc Merge pull request from tzz/tzz/set-comment-and-synthetic-...
a3c310c11a Create new "use-package" themse and use it for :custom wit...
5ceb51ae19 set property theme-value to avoid saving variable
3e24a7363b Revert "use-package-core.el: use the Emacs set-default fun...
8ef7978028 set saved-variable-comment from :custom
99643f8873 Update version to 2.4.1
215dd35e49 add multiple and eval :custom-face usage
4938167bff Remove use-package-font-lock-keywords
10c6400d34 Merge pull request from wyuenho/patch-1
5bd7e0ca7d Migrate remaining files to lexical binding
1f54de9210 Merge branch 'master' into patch-1
c358eedcf9 Merge pull request from tzz/custom-set-default
13b1e202bf Update the documentation for :custom as per
d3f847eaee Fix broken test due to
2ca2212f73 better tests
de49954965 add test for
950068809b Support keymap symbol in bind-key
3e96664ffe Merge pull request from tzz/custom-set-default
8c31c57106 use-package-core.el: use the Emacs set-default function to...
4e72885f85 Merge pull request from jjlee/call-hooks-even-if-no-config
203d15e34e Merge branch 'master' into call-hooks-even-if-no-config
218687d897 Merge pull request from nahuel/patch-1
44c837879e typo, should be a vector, not a bytecode object
0ec4660f74 Add special value back again, in case needed for backwards...
f30d5761af Even when there's no :config, run any pre/post config hooks
91e5d275af Merge pull request from jwiegley/johnw/clarify
8b8522650e Clarify the documentation for :after
8e81459dad Merge pull request from DamienCassou/typos
3a58f53b14 Fix typos
0456f878fc Merge pull request from tarsiiformes/typos
8c7fa11a3f Fix typos
165f2dd968 Use `require', not `load', when byte-compiling ()
20415fb9be Update tests
4c8d5f0b21 Switch from `require' to `load' + `featurep'
27fd32c47b Use `require', not `load', when byte-compiling
0d720a0f61 update bind-chords to use of eval-after-load when maps dec...
8f1a345b5b rename function
8ec41be418 extract use-package-hook-handler-flatten-mode-symbols func...
4149ec6cfa use `use-package-as-one` for normalizing `:ensure-system-p...
97f0287e19 Make custom-face evaluate elisp. ()
c297dfdd20 Make custom-face evaluate elisp
8fe0ac2983 * use-package-core.el (use-package): fix declare style
3e36cbfb6d Merge pull request from stribb/master
95f24f9628 Add a line of documentation for (use-pacakage ... :hook)
7e40a9c424 Merge pull request from conao3/fix_default_value
77ad44639f Merge pull request from tarsiiformes/silencio
fc6fef6869 Silence byte-compiler on Emacs 25
3f96971feb Merge pull request from jwiegley/use-package-chords-suppre...
63886cb15f Merge pull request from lrochfort/ensure-system-package_us...
ca39ed155f [] Install system packages using system-packages-install
607879e647 prefix argument with _ to suppress Unused lexical argument...
4a34b41f96 Merge pull request from justbur/autoload-keymap
c169644637 Merge pull request from jwiegley/ensure-system-package-fil...
2a8c2ffea2 allow :ensure-system-package to check the presence of file...
0a4d082054 Merge pull request from killdash9/patch-1
38dcba6872 Place :chords at beginning of use-package-keywords
1fb4198933 Merge pull request from killdash9/patch-1
5fb369c968 Merge branch 'master' into patch-1
87e26db44f Merge pull request from jabranham/enable-lexical-binding
bdd7fd3565 Fix use-package-normalize-function
09b7e8e129 Fix use-package-normalize-function tests
e2e6f9a44b Enable lexical binding
cc9ec36f1a Merge pull request from taingra/master
b1d9ce08a6 Update use-package.texi
b84a77bcdc Added an Introduction taken from the README
c980371f6f Correct prefix keys after use-package-autoload-keymap
36f9a9b9b4 Merge pull request from akhramov/fix/ensure-system-package...
f38a100917 Ensure system package cleanup
db35639457 fix gethash default value for use-package-statistics-time
642417ac05 Merge pull request from andschwa/remap-command
d2fec5e5e3 Document that remapping commands is supported with bind-key
85e580a5e4 Merge pull request from akhramov/fix/ensure-system-package...
9f034a0bcf [] ensure-system-package: honor system-packages customizat...
dc83e2f035 Update use-package-chords.el
c9f6cae603 Update use-package-chords.el
e2a322d870 Merge pull request from waymondo/master
e5d3826b62 :ensure-system-package allow cdr of cons to be a package n...
ad601fb49a Merge pull request from valignatev/master
8a27cd3a8b Encourage installation via https instead of http
742cf27b0e Merge pull request from DamienCassou/fix-report-again
69a561b86b Fix compile-time warnings due to the statistics-reporting ...
2a47998844 Add missing require
dd8ef12112 Merge pull request from jwiegley/revert-645-fix-report
cba5a11368 Revert "Fix report"
b1429951b1 Merge pull request from DamienCassou/fix-report
b28efb4847 Fix compile-time warnings due to the statistics-reporting ...
bce655f616 Add missing require
4cc7f91270 Merge pull request from DamienCassou/tabulated-list
ae22d74a16 Use a tabulated-list to display package configuration stat...
76e6d3e8bc Merge pull request from matthewbauer/patch-1
2250f89ac0 Support ":package" in use-package
10b4dcb53a Merge pull request from justbur/normalize-fix
46503b194c Fix usage of plist argument in use-package-normalize-plist
e379221166 Merge pull request from justbur/ignore-keywords
09266283b9 Add use-package-ignore-unknown-keywords option
ab918196fa Revert "Merge pull request from jabranham/lexical-bindings"
566a2ea3a1 Revert "Move variable bindings to the bottom of each file"
c29193bf07 Move variable bindings to the bottom of each file
d21787f1d6 Merge pull request from jabranham/lexical-bindings
109167e8f5 Don't remove sharp quotes
2274130b40 Test still requires cl
4c3abcf4eb Fix byte compiler warnings
88bcb8b96d Use lexical bindings and remove cl package
fd8a3510fd Merge pull request from jabranham/system-packages-update
b7252f8e63 lexical binding
46ee100327 Prefer non-obsolete var names
567df21f26 Merge pull request from jabranham/fix-byte-compiler
8a6430835f Prefer org-table-align to orgtbl-ctrl-c-ctrl-c
13a9e339f2 Merge pull request from justbur/elisp-cap
44cb99fcc7 Merge pull request from nickmccurdy/render-report-table
1fdfd46fb2 Fix sanity check for correct :custom-face format
9638870f53 Handle automatic macro expansion by elisp-completion-at-point
13fb5f4f2e Guard a call to display-warning with ignore
cb15dffbd7 Render the use-package-report table using Org
2d226310f1 All the second argument in use-package-defaults lists to b...
51eceb4238 Add a test related to
31fa2f24a1 Add more tests related to issue
4aa9b0cd6a Minor simplification of a function
a4d2e77961 bind-keys fixes related to
3850281f88 Add a clarifying test for
ec84ed0dfb Fix a scoping issues with multiple occurrences of :bind
5a02d61ac6 Start building a use-package linter in use-package-lint.el
7e458c640c use-package-normalize/:disabled has the wrong number of ar...
0068501aa0 Remove several unnecessary calls to `ignore'
ae0d243681 Add another :bind test
e6c54b54ab Add further note to NEWS.md
4714380696 Add tests for two more issues
93231ecbab Fix the tests
8cf7b17dae Clarify a note in NEWS.md
8fefa49d39 Changes to the way auto-deferral is indicated
80e8a599b4 Introduce new customization variable `use-package-merge-ke...
96ecfab9e4 Use cl-gentemp in another place
7803571280 Correctly fix the problem of unreferenced symbols after co...
20694696b2 Revert "Pre-expand lexical-let, since otherwise it require...
7cc17cee8f Pre-expand lexical-let, since otherwise it requires cl to ...
71fc224961 Add documentation for `use-package-report'
beee6b8d4d use-package-defaults predicate must also receive the packa...
75428f870d Remove Package-Requires for diminish and delight, as these...
9a6d8a4cf2 Add a comment as to why max-lisp-eval-depth is set in -tes...
b001edf162 Add missing autoload cookie, and make lack of a normalizer...
ce36e68817 Don't compute the verbose debug text unless it's requested
e8a7ae1ea1 Add :bind test for a single cons cell
2a85d81c47 Add support for gathering statistics on use-package declar...
894e95aa4b Respect keyword ordering in use-package-deferring-keywords
0939993935 Clarify :config with setq versus :custom
c272c6b56b Update some GPL version references
2cd3ebd5d5 Allow the expansion of :after (:or foo bar) to be byte-com...
b2b91af2e5 Make the expanded text for :after cleaner
de12a5ae86 Several changes as suggested by flycheck
3343cca33b Don't auto-defer if the package itself was given to :load
2a9904b9e8 Enable all tests on Travis
0c110ebd67 Allow `:load t' to mean the same as :load of the package name
4882df8285 Whitespace change
7b8e94a61a Default running-on-travis to t
5f13924885 Enable 4 tests that work when not run on Travis
cdb250e766 For now, stub out test that breaks Travis
7c3a6cd70b Stub some referenced variables, for Travis
b5a0cd4f30 Add note in NEWS.md about :requires vs. :if
b25a305c58 Lower the priority of :if/:when/:unless in use-package-key...
64ffdb6863 Enhance fix-expansion to take surrounding let bindings int...
65caa3b423 Rewrite normalization of :bind and :bind*
725d749b7c Normalize errors should be errors, that are then caught by...
0a628a2767 Avoid using pcase and many other macros in macro-expanded ...
a090961f10 Fix bad interaction between bind-keys* and the :package ke...
10fd4577d0 Add missing autoload cookies
f037c2daeb Fix function accidentally made interactive
43f1be12b7 Use cl-gensym
ee07e709ea Fix the case where :ensure is given no arguments
afdf1c3638 Some Emacsen don't have gensym
2892c026f4 Add note in NEWS.md about :after and autoloaded keybindings
277384d151 Add a note to `bind-key` on the usage of the KEYMAP argument
2790bfc006 Add a bind-key test
62d33b2143 Support :ensure (pkg :pin archive)
e34fdb580a Add several missing comments
6c836985b1 Swap the order of two definitions
6470eaf3d5 Fix an argument process problem with bind-key
a2ddc18065 Comment out two tests that break on Travis
4b83f9525c Rename up-* files to use-package-* for consistency
f869036115 Merge branch 'split-bind-key'
1e42c867b6 Commit .texi file, as it requires several dependencies to ...
08e5406cc3 Merge branch 'master' into next
5382941ac3 Add a test-in-progress for issue 506
057814ae24 Add new customization variables `use-package-hook-name-suf...
d5feff862a Split key binding functionality out into its own file
d771e8d719 Please the byte-compiler
9245d08ebc Require cl for the use-package tests
e36d208c69 Expand use-package-core as a macro, to avoid load time dep...
01c3d75606 :ensure can be a list; correct handling of multiple :ensur...
101dc9793b Ensure that :commands always declare-function at compile time
fe85f246b0 Add a new :catch keyword, and move :preface before such ha...
8489206db4 Fix duplication in an error message
4042b87c72 Add expand-maximally macro to up-tests.el
026433a8a0 Revert "Reduce some code duplication"
fb9d159632 Move :preface handling within the code
4efd355108 Add two new tests
1e560c5140 Reduce some code duplication
ac906479a7 Normalize some whitespace and ordering in new code
0239ee227a Move :init back to happening after all autoloads have occu...
5d973a0188 Move :init back to happening after all autoloads have occu...
5d9c854a6c Add `use-package-chords` and `use-package-ensure-system-pa...
05dfea96e5 Change order of :defines and :functions within `use-packag...
20ea11b71a Add further notes to NEWS.md, in light of recent breakages
0be575766c Add new customization variable `use-package-deferring-keyw...
6d51e52342 Minor comment change
49752db41b up-ensure's customization variables are now in their own g...
f4f3e01044 Remove code from up-core.el that is now in up-diminish.el
bd2589e4be Add notes to NEWS.md
8bf5de28c3 Correction to a macro expansion
62f866caf7 Delete an unneeded blank line
a1bdd958d3 Reduce some code duplication
28084551ac Normalize the code emitted by :mode, :interpreter, :magic,...
36cf799853 Add 'errors as another option to `use-package-verbose'
f08f8a7ba9 Only emit the debugging context text once
35b975563c Correction to error detection at both :init and :config times
8428dafcfa Report errors during deferred :config as intelligent warni...
8dd0f274d0 Drop some unnecessary detail from a warning message
f356c838c1 Minor simplification
99200a1642 Fix a byte-compiler warning in up-ensure.el
7c95d0a0e0 Move optional jumping functionality to its own module
fff47a1331 Break out ensure/diminish/delight into their own support f...
cdbb2cbe97 Move the use-package-keywords defcustom to the top of the ...
22fb8f8c4b Disable a test that is not working on Travis
0c148eb777 Move functions around for better logical grouping
3625b3f712 More variable renaming needed in the tests
149c4878fc Change most use-package-- prefixes to just use-package-
d5c1fdf4e8 Remove a local variable binding
223c321a1d Always catch errors during configuration
e5aa510d48 Separate out all tests, the better to identify which one f...
4c1b82aed5 Define macroexpand-1 for older Emacsen
9ab797cccd A great deal of internal reorganization and simplification
a9429350d5 Fix `use-package-ensure-function' docstring typo
dee6b36286 If use-package-verbose is t, show loading times when :afte...
af3b34b022 Remove the :defer-install keyword
09be976c18 :demand should not override an explicit use of :after
9e8e9aa4ee Remove some debug code that crept in
cb846d188a Add tests for the last two keywords
cd4790b3df Add many more tests
f5b034154f Always wrap the expanded body from use-package in (progn)
21b9b6551d Comment out :no-require test for now
6954c3f582 Don't factor out a volatile variable
7f2eec9e65 Add many new tests
88f8c1bb8f Generate :defines and :functions correctly
b5b432d0fe Correct the ordering of :preface, :load-path, :defines and...
07ab280741 Whitespace fix
f674a75b61 Move :hook before :defer
2c618e17c6 Don't macroexpand bind-keys, leave that to the evaluator
5f1e8b6b72 Always use `load' when loading for the sake of compilation
669e8527fb Sort keywords at the appropriate time
af8b961716 Change the :config default, if none has been set in vars
1a09f8fef2 :no-require t should never require
0791e3fefe Code reformatting
dfd3194d80 Allow match-expansion to take multiple cases
7a562f10cb Add test for use-package-test-normalize/:ensure
9465b915a8 Add the missing plist-delete
98ee89a752 Remove an unneeded defvar
0be868d39b A final fix to :ensure + :load-path
ca94036dce Add a test case for :ensure, following up from
1fc543a212 Don't check for an :ensure that use-package-always-ensure ...
2ff8af6495 Add a use-package-version variable
c3b9cc2403 Add two new tests
3ea2d34219 Add stubs for future tests of all keywords
3847ec28ca Allow :ensure to take a nil value again
3cb64648fc Only add :ensure nil on :load-path if use-package-always-e...
35f46f7b42 Restructure some code
5e1a656e06 Using :load-path without also using :ensure now implies :e...
fab33fef3a Correction to use-package--recognize-function
5f2b0cbe8f Allow keys to be bound to nil
1167e7d063 Fix a missing `and'
6a62122e9c Use backquote rather than quote
0887e1f9d0 Correct use-package-normalize-mode
d8c1f02bf4 Whitespace fix
8051c9f5cd Update version and copyright
bff472ea80 Allow :bind ("C-c C-c" . (lambda () (ding))) and #'(lambda...
f256943f9b Reorder some items in NEWS.md
7499c8812a Add NEWS.md file
c0a884dfa2 Merge pull request from basil-conto/version
3db39c0573 Require Emacs version >= 24.3
2aea700500 Merge pull request from basil-conto/520
9870843e1c Merge branch 'master' into 520
9ea305beb6 Add a missing (require 'seq)
4303a2faf6 Require cl-lib and do not use seq functions
b7041c0f29 When use-package-inject-hooks is non-nil, always fire init...
2825987619 Print map keys in describe-personal-keybindings
606284e374 Repeating a bind no longer causes duplicates in personal-k...
a392f6da55 When byte-compiling, correctly output declare-function dir...
2c32857d57 Make diminish a soft dependency, as delight already was
7531c374bf Allow :diminish to take no argument, once again
c811637b30 Fix for single :custom (foo bar)
2ebf076733 Allow :custom (foo1 bar1) (foo2 bar2) etc
4ad4a59685 Add support for `:hook`
700c92c5de Append to *use-package* when debugging, don't clear it
6f9d4342ca Make unrecognized keywords a warning
9b523d7c4e Upgrade license to GPL 3
18b9bf18ad Don't allow :commands, :bind, etc., to be given an empty list
4ddf42185a Explicit :defer t should override use-package-always-demand
5ac5f8bc63 Merge pull request from drrlvn/patch-1
c72d8567d2 Corrections to the normalization of :custom
903ff82219 Merge pull request from joewreschnig/implicit-diminish
eda2db4f18 Merge pull request from waymondo/master
57ec21a013 allow customized values to be nil
9bf8264523 Merge pull request from canatella/add-customization-keywords
d8bbc3a95d Add support for face customization
fcf219701b Add support for variable customization
3c763f3169 Merge pull request from carldotac/master
5396491aec Fix typos in docstring
426a319e1b Merge pull request from emacsjanitors/demote-manually
85643eaf18 Cosmetic changes to use-package-ensure-elpa
68c9ee4bff Don't use with-demoted-errors in use-package-ensure-elpa
3f58555ed8 Merge pull request from raxod502/feat/fix-install-deferred
c3455b2a67 Remove duplicate documentation of :mode
c845776677 Merge pull request from joewreschnig/481-delight-docs
d0dcd95d80 Document :delight in the doc string and README
ca83649a32 Allow `:diminish` with no arguments
463e38b188 Merge pull request from joewreschnig/477-delight-wrappers
7eec86f5cd Allow :major as the third argument in :delight calls
4b8b850cf0 Allow multiple :delight arguments, or omitting the mode. ()
6e6b533aaf Fix bug in use-package-install-deferred-package
99e4045122 Merge pull request from joewreschnig/magic-469
ac4a3a4aa8 Add `:magic` and `:magic-fallback` keywords (issue)
ec088b747a Protect against errors during package install
c38c33e6fa Merge pull request from raxod502/feat/failed-autoload-msg
3823a9059e Fix quoting error in failed autoload message
0a12111d2f Merge pull request from raxod502/normalize-nil
a9ffffcee5 Make use-package-normalize-value handle nil better
2db2b56b17 Merge pull request from raxod502/fix-bind-key-filter
e5e335424c Add comment explaining keyword-argument patch
d5d320e607 Don't mutilate keyword arguments in :bind
9f90129b95 Merge pull request from raxod502/fix-after
0f547bc807 Merge pull request from raxod502/always-defer-install
bca84ee71a Add use-package-always-defer-install
9ad6f2ef1a Fix :after keyword
bd2afa53c7 Merge pull request from raxod502/defer-install
249de4b44d Merge remote-tracking branch 'origin/master' into defer-in...
b2e674de0a Update docstring, installation prompt message
ecc5fddda4 Various improvements for deferred installation
57e38152e1 Get :defer-install completely working, in theory
855a2afbe3 Improve deferred installation mechanism
89a8f94672 Merge branch 'generalized-ensure' into defer-install
a233f01ff6 Update docstring for use-package-ensure-function
f6224b2956 First cut at :defer-install keyword
4e6115214b Extend capabilities of use-package-ensure-function
45442561d3 Revert "Return `t' after calling `eval-after-load'"
0517689cf3 Support multiple symbols passed to :after
f1fa65d773 :mode and :interpreter can now accept (rx ...) forms
87a8ff6d69 Return `t' after calling `eval-after-load'
61d6a8e449 Add autoload cookie for use-package-autoload-keymap
a4c3244f30 Merge remote-tracking branch 'origin/pr/349'
0905a7b1c7 Merge pull request from justbur/find-form
c287aa3085 Merge pull request from justbur/imenu3
f95d487d03 Merge pull request from raxod502/fix-use-package-defaults
482c8e5728 Fix use-package-defaults
8fa6e8823b Unrevert "Add use-package-defaults"
013425edeb Revert "Add use-package-defaults"
a1550a7746 Merge pull request from raxod502/use-package-defaults
3dec23c086 Add use-package-defaults
c637f2be43 Merge pull request from raxod502/use-package-ensure-function
e853355714 Add use-package-ensure-function
ad8094c22d Add new customization option `use-package-always-demand`
dbf46d97be Merge pull request from basil-conto/preface
6c35742992 Merge pull request from tarsius/outline
ba3064ed80 Merge pull request from tarsius/bind-later
75e0cd93c5 Delay decision whether to use eval-after-load until run-time
134ecb3c88 Support outline-minor-mode
aad07daa8d Increase :preface priority
42b7a774cf Merge pull request from phst/bug398
baa9e25a6b Declare package-read-all-archive-contents
c15c616eb1 Remove tests, which don’t work
9688d2f64b Don't allow implicit package name arg for binders
65c7b42a14 Don't allow nil as a mode function
fc57b34299 Refactor pair normalizers; add tests for them
5ed9a6b5a5 Remove obsolete mplist tests
fc7fc42f13 Bump version to 2.3
bcfb149517 Merge pull request from appleby/master
ef0cbfdc73 Ensure package-pinned-packages is bound before referencing it
4629e86240 Remove the use of a tab
72452b5548 Merge pull request from ketbra/master
5053f75e00 Make pin and ensure compatible
811c99da52 Merge pull request from npostavs/state-noconst
79c38c5184 Fix declare-function call: FILE must be a string
71057bc20f use-package-as-string: use noerror parameter
be7a0e4649 Don't pass a constant as the state
758739e6db Version 2.2
1f03bec96b Merge pull request from justbur/bump-init
59d34cf9ce Move :init forms before :after and :demand
c13ca927c2 Add function use-package-jump-to-package-form
75bdb87833 Improve imenu support
ff0a5e281d Merge pull request from justbur/imenu2
da08a04652 Fix imenu support for older versions
1d6b3174f5 Merge pull request from justbur/imenu
2b5668df20 Merge pull request from robario/patch-1
d34fb2bdc9 Add imenu support for use-package forms
858a7f9b7c Fix to ignore load error caused via :after
153b542421 Merge pull request from xuchunyang/fix-package-install
3aa6aecb7f Mark package as selected with package-install
af65fbea63 :map no longer accepts lists; only eval-after-load if nece...
a1c4e6d0ab Normalize some error text
f150691c78 Only printing debug messages if use-package-verbose is `de...
8e128b29f5 Merge pull request from ljos/master
6ca19531bb Repair :map handling in bind-key.el
b0b5cfbfb2 Quote variable in `bind-keys*'
6a90a9f16d Add configuration variable `use-package-check-before-init'
ce51ea2055 Use `add-to-list' defensively instead of `push'
6da4e0ce9d Add variable `use-package-always-defer'
eeba14ef07 Restore :bind-keymap, it does something special still
828563a756 Remove :bind-keymaps, and only apply :map bindings after load
856e8ee245 Support multiples uses of :map with :bind
23a61c8f6b Add some variable settings to use-package-tests.el, thanks...
4593f178e3 Merge pull request from alezost/keymap-doc-fix
947345028e Add another `declare'
c65a334276 Handle :unless correctly
543935482f Add a comment about a recent change
416096bfdc Merge pull request from waymondo/master
57af7dd571 Merge pull request from dudebout/patch-1
ee8ac83641 Add an autoload cookie for `use-package'
32748d0657 Upper casing Cs corresponding to Ctrl
2b967a3c18 Merge pull request from thierryvolpiatto/fix_package_install
c5e98d87da Ensure package-install support a second argument
5cbfd926c5 When :ensure is used install package as a selected package
9e2dcf8655 Merge pull request from kovrik/fix-pin-performance
cc4333a1be Merge pull request from phillord/fix/always-pin-typo
ba4aeb600d Fix errant variable name
3f48ff4648 Merge pull request from phillord/feature/always-pin
f4a01f3e00 Add new option `-always-pin'
c42e3f5669 Change condition that checks if package has been initialized
19474a1711 Do not package-initialize on each :pin
38c170e17b Merge pull request from kovrik/issue-299
3ce3b3a98c Add a missing comma
b4ec5abad2 Add a PREDICATE option to bind-key, and :filter to `bind-k...
cd867dfe2f allow string values in cons for :bind keywords
95038f96f1 Guard against a case where :load-paths is nil
d1c78a646c Move :pin out of macro expansion phase fixes
308e4e3f2c Move :pin out of macro expansion phase
ed2e85e4a7 Use cl-mapcan rather than apply 'nconc; thanks wasamasa
189c8b5422 Merge pull request from kovrik/byte-compile-ensure-fix
d9f37b4f0c Install packages when byte-compiling (fix by @npostavs)
b1f442c15b Apply a fix from npostavs relating to
734c5e7119 Merge pull request from kovrik/master
96add4d4c0 Merge pull request from phillord/feature/after
564f9bb74b Support for after keyword
ac47f783da Move :ensure option from macro expansion phase to runtime ...
ff8bdfcdca Bump version to 2.1
5dffc8c7cf Merge pull request from waymondo/extend-bind-handler
6298e7e477 pass in symbol of bind macro, for more extensible re-use o...
3e2747f174 Revert "Merge pull request from edvorg/master"
9c1156dbf8 error handling for use-package
2276ed7607 Merge pull request from matklad/master
d514592746 fix quotation error
fa36aa682c Merge pull request from npostavs/string-packages
3cdc6c39bf Re-add support for string package names
282241cf7d Merge pull request from nickalcock/master
1cbcd66ebe Support :bind (:map '(...))
269b1080ae Merge pull request from thomasf/master
d81390f6de Handle the case when keymap has a broken documentation
d3f47a7401 Merge pull request from killdash9/keymap
4502a5ecb1 Merge pull request from syl20bnr/fix_hook_injection
90e3f48111 Fix calls to run-hooks for :init and :config injected hooks
6f0586ef52 Refresh package.el archives if package is missing
a53b5062c4 bind-keymap fixes
f1a00054b1 Keymap bindings must be interactive
c850481d06 Failed to require a package is just a message
d1e91745b3 Minor fix to :diminish
c3a4b03b5f Fix a bug in the :delight support
800669d9da Add :delight support, thanks to darkfeline on GitHub
80aad34a39 Add new customization use-package-always-ensure
348bc57141 unbind-key now removes key from personal-keybindings
47586c714e Fix file headers
53bb14cfb7 Add autoload stanzas to bind-key
d70d70843a Correction to an eval-after-load expansion
8c00f108bf Change use-package to use bind-keys and bind-keys*
012c37d722 Change bind-key* behavior to mimic bind-keys*
029e46a874 Whitespace cleanups
eb6b81dfec Allow :map in bind-keys to accept multiple maps
2abf565af2 :pin should return `t'
e7f3f97a71 Modular support appears to be working
f1ab3291f6 Began work on modular handling of keywords
94ad68330d Rename use-package-with-elapsed-timer at an internal name
b30b279a99 Remove code I did not intend to commit
f45c4f0edd Merge pull request from npostavs/macroexp-progn
c2f5b2479d Fix some docstrings
3467e4eaa6 use-package-progn: replace with macroexp-progn
23ec1ca719 Merge pull request from npostavs/name-keymap
f5f4102ca1 get-binding-description: return keymap symbol
1b6605652c Use push instead of add-to-list
38f907cc5d Remove a hack that is not needed anymore
2778e85a39 macroexpand nested uses of use-package in :init and :config
19ab94cf39 Wrap the :preface in an eval-and-compile block
8769309fbf Remove a use of macroexpand
658d103b70 Make a warning more specific
5787ff074c More work to silence the byte-compiler
46435d7b84 Other minor improvements for byte-compiling
d2679595fa Several minor improvements and fixes
eda8246fc6 Change some code for consistency's sake
c819beebf0 Merge pull request from killdash9/keymap
8d7a0c2185 minor fixes to get bind-keymap working in 2.0
771f2edc83 Always return t on a successful init-time load
db69a3f81c Add to the load-path before the :preface
9e35dd95d9 More fixes related to byte-compilation
34bc31e1d4 A few changes for byte-compilation
1fe2c1c056 :defer now accepts an optional number of seconds
302c008b45 Permit minimal expansion of macro bodies, and other fixes
21a091f17a Collapse some whitespace
05c02aee86 Allow vectors to be passed to :bind again
55d6bb00ca Add code to workaround an inefficiency with eval-after-load
4029030eb5 Output Compiling message only if verbose is enabled
b75c1cb47e Allow :pin to accept a symbol
5c85433fac Relax a path normalization check
a203028871 Correct an erroneous symbol reference
a66d1952e3 Update docstring for :disabled
1c5f9247aa Merge pull request from npostavs/eval-after-name
98b642b794 Undo an erroneous change
199399e552 Add -hook to the injected hooks
03ea5d6dbf Restore an earlier fix to
9385ab417a BREAKING CHANGE: Remove :idle and :idle-priority
1f20acfd57 use--package: eval-after-load name
81f5e48d32 Support optional injection of hooks, for Spacemacs
f637380fed Add :preface, occurring before everything except :disabled
b4a00d2eb5 Some minor code reformatting
71f894fe78 Fix to :ensure normalization
a6edb08122 Merge pull request from thomasf/master
9748de389c Merge pull request from npostavs/warning
e68d00d525 Fix :ensure value interpretation
27cba067ee use-package-expand: use display-warning
4ae584f3ff Begin refactoring for 2.0; NOTE: BREAKING CHANGES
0f76d766d9 Many stylistics cleanups and simplifications
a4a696572d Revert "Don't add autoload for existing commands"
30da0769bf Stylistic changes
f8bf1b0986 Minor style edits
f334f230eb Minor changes
aa6e3f47c7 Show more informative errors when they occur
24ace89e5a Merge pull request from tarsius/master
719115cf47 Allow using expanded macro without loading feature
89a957efa9 Merge pull request from killdash9/keymap
b8f0799ce8 Passing t into keymap function
60029cb0ab Merge pull request from killdash9/keymap
7252e29ec4 Merge pull request from thiagowfx/patch-1
7db9b920df fix small typo (key > keymap)
1ae2236854 :bind-keymap - bind a key prefix to an autoloaded package ...
647950fd16 Merge pull request from vermiculus/master
5a5aeca797 Do not quote lambda expressions
f8db1f1740 Merge pull request from YoungFrog/fixautoloads
99642725c1 Merge pull request from peterhoeg/master
b3bf1b2587 Check if package-archives are valid when pinning
a2b23f8326 Don't add autoload for existing commands
435d4b4078 pure cleanup
18f04bfb99 Merge pull request from peterhoeg/master
fe7fe61528 support for pinning package to archive
6570447a05 Merge pull request from Silex/master
0bfa356148 Merge pull request from waymondo/master
e8ce1b20ca add :bind* keyword for `bind-key*`
f07ecde5a1 Fix "compiling" typo
4c927efbd5 Merge pull request from thomasf/master
351c102010 Display which package that has compile errors
4cf50ffbca Merge pull request from tarsius/master
31bb0cde56 assume the declare-function macro exists
91953b08e0 Merge pull request from BernardHurley/master
471869269a bind-keys macro changed to allow prefix map to have a menu...
3cbf510468 Merge pull request from npostavs/desc-vector
b3e96443ad bind-key: cleanup
de9f6814e7 bind-key: no vector keys in personal-keybindings
91b439c8e7 personal-keybindings: add docstring
0d0e8db731 Merge pull request from alezost/bind-keys
c4ebcaa953 Add bind-keys* macro
2d67e1dca1 Merge pull request from thomasf/master
1c82b2377f Don't abort compiling if package loading fails
a4939e7ef3 Revert "Merge pull request from alexko/master"
8c04377608 Merge pull request from alexko/master
a9ba368fa7 Merge pull request from YoungFrog/fix-mult-mode
6d02a320f6 if package can't be located, treat it the same way as disa...
4e80d29daf Eval backquote earlier and support non-`progn' lists
d63972eb29 Merge pull request from YoungFrog/keynameeval
9ca3690b59 * bind-key.el (bind-key): don't eval key-name at macro exp...
978094589e Merge pull request from npostavs/bind-vectors
01196c81ac bind-keys: bind directly to prefix-map
869ff53ab9 bind-keys: ,@(when map (list map)) => map
053a1514a1 fix typo
efe2419a22 Merge pull request from YoungFrog/idle-interval
0ab0d77691 Add new option use-package-idle-interval
db9cba9a31 Merge pull request from ffevotte/idle-priority
6b30c15823 :idle-priority keyword to change the running order of idle...
c7ff480095 Merge pull request from tarsius/master
f32d24350c use-package-font-lock-keywords: add use-package-with-elaps...
2d7ecd867a use-package-with-elapsed-timer: add declare indent rule
ea3a475d0b use-package-with-elapsed-timer: respect option at runtime
11195fa213 Merge pull request from npostavs/bind-vector
f0776c2aeb let bind-key accept vectors, add docstring
0f7d54d1db Merge pull request from Fuco1/variable-col-width
e23bce4c2f Merge pull request from Fuco1/special-form-desc
38d4d2e2da Add variable column width
f90d65e149 Add better descriptions for lambdas, closures, keymaps
aec1268960 Merge pull request from Fuco1/bind-keys
7d0779114e Add `bind-keys` macro
dd937c4e36 Move tests to separate file
2676ff5d95 Allow multiple forms after keywords
58ca076647 stop describe-personal-keybindings adding trailing space
6ca942d780 Merge pull request from aspiers/best-practices
21cabfd334 fix bind-key URL (fixes)
8f7e878caf add 'use-package-' prefix to 'with-elapsed-timer'
283653ff4b Merge pull request from aspiers/hyperlink-all-bindings
ebe59c7da1 Merge pull request from aspiers/docs
2dbee4cd75 fix DRY violation by only having documentation in one place
984850be80 hyperlink functions in Comments column
25ea8ea840 Merge pull request from aspiers/short-mode
75206228dd allow :mode and :interpreter to accept a string
7de292c0e9 Merge pull request from tarsius/defun
d588d0b382 use-package: use defun as lisp-indent-function
c3704ac36e Add a :demand directive, to override deferred loading ()
9d395a4019 fboundp is a function, not a variable
d4bf41eb82 Merge pull request from dabrahams/patch-1
f3e9e871a6 Backward compatibility with emacs-22.1
90ca8adc41 Default use-package-verbose to nil
ee0060c3a7 Merge pull request from Silex/master
c7560f7be7 Remove el-get support
f3ed771481 Merge pull request from aethanyc/add-missing-keyword
36cf13ef47 Add :pre-load to use-package-keywords
c3cbe3a69a Merge pull request from PhilHudson/master
a116fc2136 Properly enable runtime dependency for :idle stanza (issue)
e8b5ea3b70 Merge pull request from npostavs/comma
94072fba77 remove extra comma (added by 026c46c)
e367788005 Merge pull request from npostavs/cleanup
026c46c057 let with-elapsed-timer return last form
3d871c7994 make `with-elapsed-timer' hygienic
61fd933807 with-elapsed-timer: only check verbosity once
9921a76e86 remove after-init-hook for override-global-mode
29abf59bad macroexpand not needed
119a30f2ba cl not needed since flet was removed in 82903da
901272a8c7 Merge pull request from phillord/first-keyword
d6a5c43915 Merge pull request from npostavs/quasiquote
8c1c572857 use plist-get-value for all non-sexp args
dd20db220d plist-get-value treats arg as backquoted
9c9329f522 Merge pull request from dudebout/fixes-
818c78f466 Removes `plist-get-sexp`
ff03bef1d1 Merge pull request from dudebout/variable-and-function-sup...
fd8af80f08 Enables using variables and functions as arguments
6fdeb0c044 Merge pull request from npostavs/eval-after-name
c6d79d2cb4 pass name (not name-string) to eval-after-load
6efc084cdf Merge pull request from aethanyc/fix-highlight
bbf2b5034b Fix highlight use-package for Emacs snapshot
749295c052 Merge pull request from npostavs/hilite-redux
71150a79c5 Merge pull request from aethanyc/improve-output-buffer
8de5c29ed5 Improve (describe-personal-keybindings) output
57f80d4ff1 highlight use-package before typing package name
a56244378f Merge pull request from npostavs/master
48975f791b also check `byte-compile-current-file' for compile time lo...
aa357bc96a Changed :first to :pre-load
3d0b14eac2 Merge pull request from npostavs/master
a76d16730d use lambda around deferred :config forms to compile them, ...
ac0c9633bc use `eval-when-compile' for loading package at compile tim...
e7a343828a Add a ":first" keyword for those occasions that it's neces...
e481d97891 Merge pull request from npostavs/master
2a1e7e418a refine use-package highlighting regexp
3a4556a906 Merge pull request from purcell/patch-2
a5859a7c8d Fix initial line to satisfy package.el
f98b9d08fe Validate keywords. Error if any keyword is unrecognized
ed2b339783 Merge pull request from phillord/ensure-doc
01cfa0358f Added documentation to use-package macro
7161c09b30 Documentation added for :ensure keyword
e38cfff8b6 Merge pull request from milkypostman/master
19c65ea3ab package header should, hold, sold be the full filename + ext
2da6318930 Merge pull request from tarsius/font-lock
9741bdb189 Merge pull request from tarsius/master
5b696d1918 fontify use-package form
d2460b9276 add dots; cleanup whitespace
a5e4a6d938 quiet byte-compiler; ensure package.el is loaded
82903da9d8 don't use obsolete flet
17a1a4659a enforce use of spaces for indentation
5a799db5a1 Merge pull request from purcell/patch-1
b901618607 Add Package-Requires header for ELPA installations
ef6b97c29f Merge pull request from npostavs/easy-diminish
0df0e18c4b needed extra layer of nesting for diminish calls
984e0f1044 Merge pull request from npostavs/easy-diminish
094830716d Merge pull request from npostavs/bind-override
2abe5f9480 let :diminish "string" guess correct mode symbol
09b9ef3ae3 let bind-key* override minor modes with emulation-mode-map...
26bfd9ce2f Merge pull request from PhilHudson/master
34d3f115dd Runtime client code independence redux
1758c5faea Corrected a typo
d718c0cefa Merge pull request from phillord/master
52a48a77c3 Merge branch 'master' of https://github.com/jwiegley/use-p...
35685f120b idle initiation of packages
49d25ce022 Merge pull request from phillord/master
aa8d5fab19 Added minimum load time display option
447004740c Merge pull request from bdd/master
c680b57ebf Cleanup trailing whitespace
1a65b11731 Merge pull request from PhilHudson/macroexpand
593f18aff5 Macroexpand quoted eval-after-load block early
c4cf68f6e4 Merge pull request from phillord/master
eaf9677409 Support packages where autoload and elpa name are different
445d0245fc Merge pull request from phillord/master
8d72a6c1d6 Documentation for the use-package macro
b8406ce9f0 Reverting "Documentation for the use-package macro."
abc0ebc92d Documentation for the use-package macro
75b30bfd9b Merge pull request from phillord/master
c28874e956 ELPA package support
2a63e3f2ef Merge pull request from PhilHudson/master
fbead83731 Support diminishing to a replacement string as well as to ...
8b93cee99b Use-package now accepts function as argument
fe7997d2b7 Only use user-site-lisp-directory if defined
89a844fd9c Correct return value from with-elapsed-timer
28c6509148 More updates to support el-get
ece5f93919 Byte-compilation related fix
d9f6c0f370 Added :pre-init
82a8d10a46 Establish autoloads after :init
bdf1505f44 Added :mode and :interpreter keywords
0736be8e67 Add a note about how to use :load-path
f6d65ce876 If :load-path is absolute, don't expand it
0bde0b4c02 Die typos, die
debf2c23f3 Fixed a typo
aea35b2370 Minor reformatting
80b010a748 Minor grammatical nit
334f6e085e Integrated support for working with el-get
01c8245b29 Make use-package-verbose customizable
4bd492f606 Have loading timer include time to require
bf6c23044b Fixed a typo in bind-key.el
31ea42e15e README and other updates

# Conflicts:
#	etc/NEWS
#	lisp/external-completion.el
2022-12-08 12:52:37 -05:00
Stefan Kangas
8fb2afe051 ; Fix typos 2022-12-08 07:17:47 +01:00
Po Lu
2a907bcd4b Don't excessively sync in some other code
* configure.ac (USE_XCB): Remove xcb-util dependency.
* src/frame.h: Remove x_sync.
* src/gtkutil.c (xg_frame_restack, xg_update_scrollbar_pos)
(xg_update_horizontal_scrollbar_pos): Call XSync manually
instead of x_sync.
* src/xfns.c (x_sync): Delete unused function.
* src/xterm.c (x_send_hourglass_message): New function.
(x_show_hourglass, x_hide_hourglass): Avoid XSync in these two
pieces of frequently used code.
(handle_one_xevent): Handle hourglass messages.
(x_make_frame_invisible): Stop using x_sync.
2022-12-05 19:58:05 +08:00
Po Lu
f96a9e10b1 Make Emacs build with Xfixes support on old versions of the library
* src/xterm.c (xfixes_toggle_visible_pointer):
(x_toggle_visible_pointer):
(XTtoggle_invisible_pointer, x_term_init): Disable code
requiring fixes 4.0 or later when the fixes library is older.
* src/xterm.h: Define missing types needed by other extensions
when the fixes library is too old.
* configure.ac: Allow building with any version of the Xfixes
extension library.
2022-12-04 20:02:32 +08:00
Eli Zaretskii
34fc42e502 ; * configure.ac (module_env_snippet_30): Fix a typo. 2022-11-28 20:10:17 +02:00
Eli Zaretskii
65456668ab Bump master Emacs version to 30.0.50
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp:
* etc/refcards/ru-refcard.tex: Bump Emacs version to 30.0.50.

* etc/NEWS.29: New file.
* etc/NEWS: Empty for Emacs 30.

* configure.ac: Add boilerplate for module-env-XX.h.

* src/emacs-module.h.in (struct emacs_env_30): Add.
* src/module-env-29.h: Remove header comment.
* src/module-env-30.h: New file.

* lisp/cus-edit.el (customize-changed-options-previous-release):
Set last version to 29.1.
2022-11-28 20:03:07 +02:00
Eli Zaretskii
c6cb6d8506 Cut the emacs-29 release branch
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp: Bump Emacs version to 29.0.60.

* admin/admin.el (set-version): Fix regexp for configure.ac.

* lisp/cus-edit.el (customize-changed-options-previous-release):
Bump last version to 28.2.
2022-11-28 19:47:35 +02:00
Sam James
110769d039 Fix tree-sitter build using non-bash /bin/sh (bug#59460)
* configure.ac: Don't use '==' in comparisons.

Copyright-paperwork-exempt: yes.
2022-11-22 14:45:09 +02:00
Yuan Fu
aaeaa310f0
Merge remote-tracking branch 'savannah/master' into feature/tree-sitter 2022-11-21 12:54:35 -08:00
Yuan Fu
c5e3b99467
Accept older versions of tree-sitter library
* configure.ac: Accept a tree-sitter library as long as it provides
ts_set_allocator.
2022-11-10 10:25:29 -08:00
Yuan Fu
77cb95c851
; Revert back to requiring tree-sitter v0.0 for now 2022-11-10 00:31:10 -08:00
Yuan Fu
663d768d44
* configure.ac: Change required tree-sitter version to 0.20.2. 2022-11-09 15:51:13 -08:00
Paul Eggert
39f5696921 Improve suppression of bogus macOS warnings
* configure.ac: On macOS, always use -Wno-deprecated-declarations,
as the false alarms appear even if --disable-gcc-warnings is given
(Bug#58966).
2022-11-03 11:10:32 -07:00
Gerd Möllmann
d16494cffb Suppress deprecation warnings on macOS (bug#58966)
* configure.ac (CHECK_LISP_OBJECT_TYPE): Add
-Wno-deprecated-declarations for darwin.
2022-11-03 10:42:35 +01:00
Yuan Fu
25cb49ad56
* configure.ac (emacs_config_features): Change to TREE_SITTER
Last commit on this line has a wrong changelog, the subject should be
emacs_config_features, not WINDOW_SYSTEM_OBJ.
2022-10-28 16:46:10 -07:00
Stefan Monnier
71589b101c Merge remote-tracking branch 'origin/feature/noverlay' 2022-10-28 17:44:44 -04:00
Yuan Fu
bb0a427e9d
* configure.ac (WINDOW_SYSTEM_OBJ): Move tree-sitter placement. 2022-10-28 01:15:45 -07:00
Eli Zaretskii
9d3f8912b4 Support MinGW build on MS-Windows
* src/treesit.c [WINDOWSNT]: Add MS-Windows boilerplate for
dynamically-loaded optional libraries.
(init_treesit_functions) [WINDOWSNT]: New function.
(load_tree_sitter_if_necessary): New function.
(ts_initialize): Call 'load_tree_sitter_if_necessary'.
(ts_delete_parser, ts_delete_query, ts_named_node_p): Wrapper
functions for TS calls from outside treesit.c.
(Ftreesit_parser_root_node, Ftreesit_parser_set_included_ranges)
(Ftreesit_parser_included_ranges, Ftreesit_node_type)
(Ftreesit_node_start, Ftreesit_node_end, Ftreesit_node_string)
(Ftreesit_node_parent, Ftreesit_node_child, Ftreesit_node_check)
(Ftreesit_node_field_name_for_child, Ftreesit_node_child_count)
(Ftreesit_node_next_sibling, Ftreesit_node_prev_sibling)
(Ftreesit_node_first_child_for_pos)
(Ftreesit_node_descendant_for_range, Ftreesit_node_eq)
(Ftreesit_query_compile, Ftreesit_query_capture)
(Ftreesit_search_subtree, Ftreesit_search_forward)
(Ftreesit_induce_sparse_tree): Call 'ts_initialize' before any
other TS functions.
(Ftreesit_available_p): 'treesit-available-p' implemented in C, so
that on WINDOWSNT the library could be loaded dynamically.
* src/treesit.h (ts_delete_parser, ts_delete_query)
(ts_named_node_p): Add prototypes.
* src/print.c (print_vectorlike):
* src/alloc.c (cleanup_vector): Call tree-sitter function via
wrappers defined in treesit.c, not directly, because WINDOWSNT
redefines the TS functions to be called via function pointers.
* src/Makefile.in (base_obj): Add treesit.o
(TREE_SITTER_OBJ): Remove.

* lisp/treesit.el (treesit-available-p): Remove: now implemented
in C.
* lisp/term/w32-win.el (dynamic-library-alist): Add libtree-sitter
DLLs.

* configure.ac (TREE_SITTER): Support the MinGW build.
(TREE_SITTER_OBJ): Remove.
2022-10-16 16:22:09 +03:00
Yuan Fu
7ebbd4efc3
Merge branch 'master' into feature/tree-sitter 2022-10-05 14:22:03 -07:00
Lars Ingebrigtsen
e245c4f226 Add --with-native-compilation=aot configuration option
* configure.ac: Allow --with-native-compilation=aot to switch full
ahead-of-time on.

* lisp/Makefile.in: Use the setting from configure.
2022-10-03 12:45:21 +02:00
Stefan Monnier
650c20f1ca Merge 'master' into noverlay 2022-09-25 16:15:16 -04:00
Yuan Fu
77d5a0cf9f Merge remote-tracking branch 'origin/master' into feature/tree-sitter 2022-08-29 11:41:10 -07:00
Daniel Martín
716441a069 Fix webp detection on some Macos systems
* configure.ac (HAVE_RSVG): Make webp detection work with Macos
10.3/Homebrew (bug#57420).
2022-08-27 15:29:11 +02:00
Andreas Schwab
ce82300221 * configure.ac: Move AC_LANG_PUSH/POP out of AC_CACHE_CHECK. (Bug#57380) 2022-08-25 09:56:44 +02:00
Stefan Kangas
d0bb333efc Merge from origin/emacs-28
f2c0fb2615 Resurrect obsoletion warning for two functions
9c0eec4ed8 * src/window.c (select_window): Fix assert for buffer = no...
16dfe04be2 Find libgccjit on macOS with Homebrew differently

# Conflicts:
#	etc/NEWS
2022-08-19 17:30:18 +02:00
Gerd Möllmann
16dfe04be2 Find libgccjit on macOS with Homebrew differently
* configure.ac (MAC_LIBS): Find libgccjit's directory slightly
differently for brew installations.
2022-08-19 11:02:20 +02:00
Po Lu
78129dcf53 Correctly implement refresh synchronization fences
* configure.ac (HAVE_XSYNC): Also check for XSyncTriggerFence.

* src/xfns.c (Fx_create_frame): Create fences.
* src/xterm.c (x_atom_refs): New atom.
(x_sync_trigger_fence, x_sync_init_fences, x_sync_free_fences):
New functions.
(x_sync_update_finish): Trigger the appropriate fence.
(x_free_frame_resources): Free fences.
* src/xterm.h (struct x_display_info): New atom
`_NET_WM_SYNC_FENCES'.
(struct x_output): New field `sync_fences'.
2022-08-04 15:38:23 +08:00
Stefan Kangas
1c8e90649e Bump Emacs version to 28.1.91
* README:
* configure.ac:
* msdos/sed2v2.inp:
* nt/README.W32: Bump Emacs version to 28.1.91.
2022-07-28 11:20:47 +02:00
Eugene Ha
f7fd7bf477 Find libgccjit.dylib on Homebrew Macos
* configure.ac: Also find libggcjit on Homebrew (bug#55173).

Copyright-paperwork-exempt: yes
(cherry picked from commit faa29fa2c9)
2022-07-24 15:48:18 +03:00
Stefan Kangas
9699eaf8af Merge from origin/emacs-28
db259d8fd3 Build Seccomp filter only if we have a 64-bit userspace (B...
2022-07-16 06:30:39 +02:00
Philipp Stephani
db259d8fd3 Build Seccomp filter only if we have a 64-bit userspace (Bug#56549)
* configure.ac (SIZEOF_LONG): New variable.
* lib-src/Makefile.in (SIZEOF_LONG): New variable; added conditional.
2022-07-15 17:56:02 +02:00
Paul Eggert
59206529a1 Quote configure.ac arguments more consistently
This should help avoid further Autoconf portability gotchas such as
the one recently fixed in 2022-06-27T04:26:01Z!meyering@fb.com.
* autogen.sh (autoconf_min): Adjust pattern to match
updated configure.ac.
* configure.ac: Quote arguments more consistently,
as per the Autoconf manual.
2022-07-05 00:06:09 -05:00
Paul Eggert
e93d9e0f5d Don’t mishandle preset emacs_cv_lesstif
* configure.ac: Restore CFLAGS etc. correctly even when
emacs_cv_lesstif is already set on the command line.
2022-07-05 00:06:08 -05:00
Florian Rommel
bbca04fd9d Add support for fullscreen values fullheight and fullwidth on PGTK
* src/pgtkterm.c (window_state_event): Support values fullheight and
fullwidth for the fullscreen frame-parameter
* doc/lispref/frames.texi (Size Parameters): Document inability to
actively set hullheight/fullwidth for PGTK frames
* configure.ac: Bump GTK version for PGTK
* etc/NEWS: Change GTK version in PGTK announcement
2022-07-04 10:21:14 +08:00
Lele Gaifax
9dc0fdfdc1 Fix repeated "the"
* configure.ac (EMACS_CONFIG_FEATURES):
* etc/NEWS:
* lisp/dnd.el (dnd-begin-text-drag):
* src/pgtkfns.c (Fx_display_mm_height, Fx_display_mm_width):
(Fx_display_backing_store, Fx_display_visual_class):
* src/xterm.c: Fix repeated "the".  (Bug#56341)

Copyright-paperwork-exempt: yes
2022-07-02 10:04:32 +03:00
Stefan Kangas
f1de6c0e28 Bump Emacs version to 28.1.90
* README:
* configure.ac:
* msdos/sed2v2.inp:
* nt/README.W32: Bump Emacs version to 28.1.90.
2022-06-29 15:21:26 +02:00
Jim Meyering
0b62ad2f3a Fix configure.ac quoting of AC_CHECK_LIB's 2nd arg
Running an autoconf-head-generated configure, would fail like this:
  /emacs/configure: line 18002: syntax error near unexpected token `;;'
  /emacs/configure: line 18002: `  ;;'
That is due to under-quoting of AC_CHECK_LIB's second argument, which led to
the comma in an embedded string being interpreted as paramater-delimiting.
* configure.ac: Quote the second arg of each AC_CHECK_LIB invocation.
(Bug#56272)

Copyright-paperwork-exempt: yes
2022-06-28 14:27:55 +03:00
Robert Pluim
1054d38bc7 Fix check for window system with toolkit scrollbars
* configure.ac (USE_TOOLKIT_SCROLL_BARS): Add missing 'test' to
condition.  (Bug#55970)
2022-06-16 09:36:30 +02:00
Yuan Fu
98bfb24081
Merge remote-tracking branch 'savannah/master' into feature/tree-sitter 2022-06-14 15:59:46 -07:00
Yuan Fu
c5b172ec58
* configure.ac (HAVE_TREE_SITTER): Not set TREE_SITTER_LIBS. 2022-06-11 20:42:26 -07:00
Eli Zaretskii
5551ef2c00 ; Minor copyedits of --with-small-ja-dic option
* etc/NEWS: Document the new configuration option.

* lisp/international/ja-dic-cnv.el (skkdic-convert-okuri-nasi):
Fix whitespace.
(skkdic-convert): Doc fix.
(batch-skkdic-convert): Fix Help message.

* configure.ac: Tweak the description of --with-small-ja-dic.
2022-06-10 16:12:00 +03:00
Taiju HIGASHI
afbe7585c4 Don't reduce vocabulary in ja-dic.el by default
* configure.ac: Add the "--with-small-ja-dic" configure option.
* leim/Makefile.in (${leimdir}/ja-dic/ja-dic.el): Change the build
method depending on whether or not the --with-small-ja-dic option
is specified.
* lisp/international/ja-dic-cnv.el (skkdic-convert-okuri-nasi): Add
the "no-reduction" optional argument.  When it is specified, then
generate a Japanese dictionary without reduced vocabulary.
(skkdic-convert): Add the "no-reduction" optional argument.
(batch-skkdic-convert): Add the "--no-reduction" command line argument.
2022-06-10 15:46:32 +03:00
Eli Zaretskii
3287d4e32e Another attempt to void compiler warnings on macOS (bug#55595)
* configure.ac (WERROR_CFLAGS): Use "-Wno-unknown-pragmas" with
Clang.
2022-06-04 09:05:35 +03:00
Eli Zaretskii
8c4498e62e Avoid compiler warnings on macOS (bug#55595)
* configure.ac: Don't use -Wunknown-pragmas with Clang.

* src/comp.c (load_comp_unit): Avoid Clang compilation warning.
2022-05-23 19:26:18 +03:00
Po Lu
e5e474baae Fix compiler warnings on Mac OS X 10.12
* configure.ac: Check for Mac OS X 12 and link with
UniformTypeIdentifiers.framework.

* src/nsfns.m (IOMasterPort): Define to `IOMainPort' on Mac OS X
12.
(ns_implicitly_set_icon_type, Fns_read_file_name):
* src/nsxwidget.m: ([XwWebView
initWithFrame:configuration:xwidget:]): Fix uses of obsolete
things.
2022-05-22 11:02:24 +08:00
Eli Zaretskii
875da1dc3a ; * configure.ac (-Wbidi-chars): Disable use of these warnings. 2022-05-13 10:19:56 +03:00
Paul Eggert
203ffc6846 Port libm configure-time test to Solaris 11.4
* configure.ac (LIB_MATH): Check all the math.h functions
that Emacs uses, not just sqrt (Bug#55294).
2022-05-10 14:45:28 -07:00
Yuan Fu
82d5e902af
; Merge from master. 2022-05-07 01:57:39 -07:00
Yuan Fu
84847cad82
Add tree-sitter intergration
* configure.ac (HAVE_TREE_SITTER, TREE_SITTER_OBJ): New variables.
(DYNAMIC_LIB_SUFFIX): new variable, I copied code from MODULES_SUFFIX
so the diff looks this way.
* doc/lispref/elisp.texi (Top): Add tree-sitter manual.
* doc/lispref/modes.texi (Font Lock Mode): mention tree-sitter.
(Parser-based Font Lock): New section.
(Auto-Indentation): Mention tree-sitter.
(Parser-based Indentation): New section.
* doc/lispref/parsing.texi (Parsing Program Source): New chapter.
* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types): Add
treesit-parser and treesit-node type.
* lisp/treesit.el: New file.
* src/Makefile.in (TREE_SITTER_LIBS, TREE_SITTER_FLAGS,
TREE_SITTER_OBJ): New variables.
* src/alloc.c:
(cleanup_vector): Add cleanup code for treesit-parser and
treesit-node.
* src/casefiddle.c (casify_region): Notify tree-sitter parser of
buffer change.
* src/data.c (Ftype_of): Add treesit-parser and treesit-node type
(Qtreesit_parser, Qtreesit_node): New symbol.
* src/emacs.c (main): Add symbols in treesit.c.
* src/eval.c (define_error): Move the function to here.
* src/insdel.c (insert_1_both, insert_from_string_1, insert_from_gap,
insert_from_buffer_1, replace_range, del_range_2): Notify tree-sitter
parser of buffer change.
* src/json.c (define_error): Move this function out.
* src/lisp.h (DEFINE_GDB_SYMBOL_BEGIN): Add treesit-parser and
treesit-node.
* src/lread.c (Vdynamic_library_suffixes): New variable.
* src/print.c (print_vectorlike): Add code for printing
treesit-parser and treesit-node.
* src/treesit.c: New file.
* src/treesit.h: New file.
* test/src/treesit-tests.el: New file.
2022-05-07 01:11:39 -07:00
Po Lu
0105a4ddb8 Turn on XInput 2 support by default
The support doesn't interfere with compatibility, since Emacs
built with XInput 2 support transparently falls back to Core
Input when a suitable version of the input extension is not
available.  It also matured much sooner than expected, so
enabling this by default will lead to new features being
available to more users.

* INSTALL:
* configure.ac:
* etc/NEWS: Enable XInput 2 support by default.
2022-05-04 16:51:48 +08:00
Lars Ingebrigtsen
29f3d4d2c6 Add new function `malloc-trim'
* configure.ac (PGTK_LIBS): Check for malloc_trim.

* src/alloc.c (Fmalloc_trim): Add new function (bug#45200).
2022-05-01 11:51:43 +02:00
Eugene Ha
faa29fa2c9 Find libgccjit.dylib on Homebrew Macos
* configure.ac: Also find libggcjit on Homebrew (bug#55173).

Copyright-paperwork-exempt: yes
2022-04-28 23:48:38 +02:00
Mattias Engdegård
de306d3e5d Disable annoying Clang warnings
* configure.ac (CHECK_LISP_OBJECT_TYPE): Disable
-Wimplicit-const-int-float-conversion and -Wint-in-bool-context, which
currently only have false positives.
2022-04-16 11:32:20 +02:00
Po Lu
1996064996 Fix last change in configure.ac
* configure.ac: Test window system against "x11", not "x".
2022-04-13 11:18:00 +08:00
Po Lu
e91cbdfaee Bump minimum GTK for PGTK builds
* configure.ac: Require GTK 3.20 or later if building with PGTK.
It has already been required for some time now, but the
requirement was not reflected in the configure script.

* src/pgtkterm.c (pgtk_any_window_to_frame): Remove version
check.
2022-04-13 11:15:05 +08:00
Lars Ingebrigtsen
d82e1a873d Add support for animated webp images
* configure.ac (HAVE_RSVG): Also include the webpdemux library.
It was new in version 0.4.4, and we require 0.6.0, so it should be
safe.
* src/image.c: Include demux.h.
(enum webp_keyword_index, webp_format): Include :index for
animations.
(init_webp_functions): Add Windows LOAD_DLLs.
(struct webp_cache, webp_create_cache)
(webp_prune_animation_cache, webp_get_animation_cache): New
functions.
(webp_load): Support animated webp images (bug#54242).
2022-04-10 13:12:41 +02:00
Mattias Engdegård
13c8cc58bb Enable warnings when building as a developer with Clang
The configure-script logic that automatically enables warnings when
building in a development tree didn't work for Clang because it was
identified as an old GCC version.

* configure.ac: Don't test Clang version as if it were GCC.
2022-04-08 15:00:38 +02:00
Po Lu
c51d7c9e43 * configure.ac (HAVE_GIF): Respect --with-gif on PGTK. (bug#54633) 2022-04-05 09:07:36 +08:00
Eli Zaretskii
dd3863d8bc ; Prepare the release branch for Emacs-28.2 development
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp: Bump Emacs version to 28.1.50.

* etc/NEWS: Add Emacs-28.2 sections.
2022-04-03 16:09:11 +03:00
Eli Zaretskii
de7901abbc Bump Emacs version to 28.1
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp: Bump Emacs version to 28.1
2022-04-03 07:38:15 -04:00
Eli Zaretskii
c5af19cba5 Fix a bug in configure.ac that failed the --without-x build
* configure.ac (USE_TOOLKIT_SCROLL_BARS): Fix test for unsupported
scroll-bars configuration.  (Bug#54629)
2022-03-31 19:15:45 +03:00
Po Lu
62c779cbde Disallow building with non-toolkit scroll bars on non-X systems
* configure.ac: Prevent building without toolkit scroll bars on
non-X systems, where they're not implemented.  (bug#54629)
2022-03-30 11:25:50 +08:00
Po Lu
dc0ee78d93 Improve portability of XCB configure checks
* configure.ac: Look for xcb_aux_sync in -lxcb-aux if it's not
in -lxcb-util.
2022-03-28 18:41:56 +08:00
Po Lu
a4d45f1efd Also fetch shapes via XCB for drag and drop
* configure.ac: Also look for xcb-shape.
* src/xterm.c (HAVE_XCB_SHAPE_INPUT_RECTS): New define.
(x_dnd_compute_toplevels): Use XCB for input shapes if possible.
2022-03-26 17:14:38 +08:00
Po Lu
f38bdb0327 Take window shapes into account when processing drag and drop
* configure.ac: Test for the Nonrectangular Window Shape
extension.
* msdos/sed1v2.inp: Update.
* src/xterm.c (struct x_client_list_window): New fields for
shapes.
(x_dnd_free_toplevels): Free shapes.
(x_dnd_compute_toplevels): Populate window shapes.
(x_dnd_get_target_window_2): New function.
(x_dnd_get_target_window_1): Test WM state of window before
taking it into account.
(x_dnd_begin_drag_and_drop): Use outer window as the initial
last seen window.
(x_dnd_update_state): Small fixes to frame tracking.
(handle_one_xevent): Handle ShapeNotify events correctly.
(x_term_init): Test for the Nonrectangular Window Shape
extension.
* src/xterm.h (struct x_display_info): New atom `WM_STATE'.
2022-03-25 16:22:45 +08:00
Po Lu
1467b04f5c Handle composite overlay window during drag and drop sessions
* configure.ac: Test for the composite extension and use it if
available.
* msdos/sed1v2.inp: Update.
* src/Makefile.in (XCOMPOSITE_LIBS, XCOMPOSITE_CFLAGS): New
variables.
(EMACS_CFLAGS, LIBES): Add new libs and cflags.
* src/xterm.c (x_dnd_get_target_window): Look for proxy on
composite overlay window if mapped.
(x_term_init): Test if the composite extension is available.
* src/xterm.h (struct x_display_info): New fields for composite
extension presence.
2022-03-19 09:29:08 +08:00
Robert Pluim
679b9cc9ff Link with libdl when using pgtk
* configure.ac: Define LIBMODULES on GNU/Linux when using pgtk, even
when not using modules, since pgtkterm.c uses dlsym.  (Bug#54378)
2022-03-16 15:31:27 +01:00
Eli Zaretskii
5ba9c8c364 Emacs pretest 28.0.92
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp: Bump Emacs version to 28.0.92.

* etc/AUTHORS:
* lisp/ldefs-boot.el: Update for pretest 28.0.92.

* ChangeLog.3: Regenerate.
2022-03-12 04:44:46 -05:00
Paul Eggert
995aed477d Port to current Gnulib
* configure.ac (AM_COND_IF): New macro, needed because Gnulib
normally assumes Automake and now uses this Automake macro.
Problem reported by Lars Ingebrigtsen (Bug#32452#47).
2022-02-23 11:41:01 -08:00
Po Lu
c914572a46 Improve XInput2 version checking
* configure.ac: Check for various important structures from all
versions of libXi.

* src/xfns.c (setup_xi_event_mask):
* src/xwidget.c (x_draw_xwidget_glyph_string):
* src/xterm.c (x_init_master_valuators, handle_one_xevent)
(x_term_init): Replace XI version checks based on protocol
headers with new constants.

* src/xterm.h (HAVE_XINPUT2_1, HAVE_XINPUT2_2, HAVE_XINPUT2_3)
(HAVE_XINPUT2_4): New definitions.
2022-02-22 18:41:28 +08:00
Po Lu
5b0b9bafc0 Improve the help message for the pgtk configure option
* configure.ac: Describe the purpose of PGTK better.
2022-02-15 12:52:59 +08:00
Po Lu
9e420cd893 Add support for basic syncing with the window manager on resize
This is handled by GTK 3, so the code is disabled on that
specific build.  On other builds, this eliminates any unexposed
part of a frame from showing up after a resize when
`frame-resize-pixelwise' is t.

* configure.ac: Check for the X Synchronization Extension if
present.
* src/Makefile.in (EMACS_CFLAGS):
(LIBES): Add XSYNC_LIBS and XSYNC_CFLAGS.

* src/xfns.c (append_wm_protocols): Declare
`_NET_WM_SYNC_REQUEST' support if appropriate.
(x_window): Adjust location of call to `append_wm_protocols' on
Xt version to prevent it from being overwritten.
(Fx_create_frame): Create basic counter.
* src/xterm.c (XTframe_up_to_date): Set counter value to the one
asked for by the window manager.
(handle_one_xevent): Handle _NET_WM_SYNC_REQUEST.
(x_free_frame_resources): Free frame counter if present.
(x_term_init): Test for XSync and set fields accordingly.
* src/xterm.h (struct x_display_info): New fields for XSync
support and new atoms.
(struct x_output): New fields for counter status.
(FRAME_X_BASIC_COUNTER): New macro.
2022-02-05 21:43:00 +08:00
Po Lu
a654985bca Make Emacs build with some other XLib implementations
* configure.ac (HAVE_XKB): Check for functions that aren't
always implemented by various XLib implementations.

* src/xfns.c (select_visual): Handle NULL values of vinfo.
(XkbRefreshKeyboardMapping):
(XkbFreeNames):
(XDisplayCells):
(XDestroySubwindows): Define replacement functions where they
aren't available.

* src/xterm.c (x_find_modifier_meanings): Handle NULL values of
various fields.
2022-02-04 03:28:05 +00:00
Stefan Kangas
ff63787ea1 Merge from origin/emacs-28
c34d06e3d7 * configure.ac (LIBSECCOMP): Bump minimum version for facc...
335a5a9e0f Make the `f' command work in image-mode again
2022-01-25 06:31:03 +01:00
Po Lu
ec403abc60 Improve portability of X11 IM code
* configure.ac: Test for XICCallback.callback if X11R6 or later.
* src/xfns.c (Xxic_preedit_start_callback): Use XICCallback if
present.
2022-01-25 11:49:39 +08:00
Yuuki Harano
d0b9e269ee * configure.ac: Remove forgotten GLIB_GSETTINGS call 2022-01-24 21:26:17 +09:00
Philipp Stephani
c34d06e3d7 * configure.ac (LIBSECCOMP): Bump minimum version for faccessat2. 2022-01-24 11:38:43 +01:00
Po Lu
16c785b621 Make xwidgets work on builds that don't use Cairo drawing
* configure.ac: Check for the parts of Cairo that are needed for
xwidgets when they are enabled without cairo drawing.

* src/xterm.c:
* src/xwidget.c: Always include cairo-xlib headers when xwidgets
are enabled.
2022-01-21 19:10:05 +08:00
Po Lu
9693eb4aef Port some X11 tooltip code to XCB
* configure.ac: Require `xcb-aux' to be present before using
XCB.
* src/xfns.c (x_sync):
(x_create_tip_frame):
(Fx_show_tip): Port window related code to XCB.
2022-01-19 19:08:09 +08:00
Po Lu
de614ec950 Use Cairo XCB surfaces when XCB is available
This lets us get at goodies such as shm support, which aren't
available with the xlib surface.  (bug#52120)

* configure.ac: Test for cairo-xcb if cairo is available on X.
* src/xterm.c (USE_CAIRO_XCB_SURFACE): New define.
(x_begin_cr_clip): Create XCB surfaces if available.
(x_try_cr_xlib_drawable):
(x_scroll_run): Handle XCB surfaces.
(x_term_init): Find XCB visualtype structure.
* src/xterm.h (struct x_display_info): New field `xcb_visual'.
* src/xwidget.c (x_draw_xwidget_glyph_string): Fix integer
overflow.
2022-01-19 17:41:22 +08:00
Po Lu
1f5f3b7e89 Remove non-functional configure test
It cannot work anymore, leading to compiler warnings when
building xterm.c.

* configure.ac: Remove test for whether
XRegisterIMInstantiateCallback wants XPointer or XPointer * as
the client_data.

* src/xterm.c (xim_initialize):
(xim_close_dpy): Just cast client data to void * and hope that
the compiler keeps quiet.
2022-01-15 09:11:11 +08:00
Stefan Kangas
d193801f59 Bump Emacs version to 28.0.91
* README:
* configure.ac:
* msdos/sed2v2.inp:
* nt/README.W32: Bump Emacs version to 28.0.91.
2022-01-08 13:09:29 +01:00
Po Lu
3e247bd34c ; * configure.ac: Move some AC_SUBSTs to the correct location. 2022-01-04 17:51:05 +08:00
Yuuki Harano
183936ee8e Remove gsettings.m4 and write directly into Makefile.in
* configure.ac (HAVE_PGTK): Declare substitution
(HAVE_GSETTINGS): Declare substitution
* Makefile.in (HAVE_PGTK): New variable
(HAVE_GSETTINGS): New variable
(gsettingsschemadir): Don't use value from gsettings.m4
(distclean): Add clean-gsettings-schemas
(install-gsettings-schemas): Implement instead of gsettings.m4
(uninstall-gsettings-schemas): Implement instead of gsettings.m4
(clean-gsettings-schemas): Implement instead of gsettings.m4
($(gsettings_SCHEMAS:.xml=.valid)): Implement instead of gsettings.m4
* m4/gsettings.m4: Remove
2022-01-04 17:29:17 +09:00
Stefan Kangas
ad125a9927 Merge from origin/emacs-28
efb1c7ec37 ; * admin/notes/years: More known problems.
f475c5823a ; Copyright year fixes
2684def348 ; Run set-copyright from admin.el
2558b37b5e ; * admin/notes/years: Mention known problems with 'update...
2022-01-02 06:31:44 +01:00
Po Lu
96212e1a27 Fix XRegisterIMInstantiateCallback function argument configure test
* configure.ac: Use XIDProc where XIMProc was mistakenly used.
2022-01-02 11:02:49 +08:00
Glenn Morris
2684def348 ; Run set-copyright from admin.el 2022-01-01 09:52:06 -08:00
Eli Zaretskii
dcd76bd48d Merge from origin/emacs-28
836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year.
86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year
ebe8772f65 ; Minor fixes related to copyright years
23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye...
8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t.
19dcb237b5 ; Add 2022 to copyright years.

# Conflicts:
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
#	lib/cdefs.h
#	lisp/erc/erc-dcc.el
#	lisp/erc/erc-imenu.el
#	lisp/erc/erc-replace.el
#	lisp/image-dired.el
#	lisp/progmodes/xref.el
#	m4/alloca.m4
#	m4/byteswap.m4
#	m4/errno_h.m4
#	m4/getopt.m4
#	m4/gnulib-common.m4
#	m4/inttypes.m4
#	m4/stddef_h.m4
#	m4/stdint.m4
#	m4/sys_socket_h.m4
2022-01-01 07:03:03 -05:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Po Lu
62339e62d8 Add configure tests for faulty XI2 installations
* configure.ac: Detect cases where XI 2.4 headers are installed
without the correct event structures.
* src/xterm.c (handle_one_xevent): Don't use structures that
might not exist unless configure found them.
2021-12-26 14:48:13 +08:00
Stefan Kangas
be38405b1f Merge from origin/emacs-28
29fffbdd87 Revert field-related thingatpt changes
9bcb732686 * lisp/window.el (quit-restore-window): Select previously ...
b7d31d6192 Revert "Remove Motif support"

# Conflicts:
#	etc/NEWS
2021-12-23 06:31:26 +01:00
Robert Pluim
b7d31d6192 Revert "Remove Motif support"
This reverts commit db237850ab.
2021-12-21 18:39:39 +01:00
Kévin Le Gouguec
8535861430 Enable webp support in PGTK builds, too
* configure.ac (HAVE_WEBP): Enable webp in PGTK builds, too.
2021-12-19 14:58:41 +01:00
Paul Eggert
f05a93e823 Update from gnulib
Make the following changes by hand, and run ‘admin/merge-gnulib’.
* configure.ac (AM_CONDITIONAL): Adjust to new Gnulib convention.
2021-12-18 16:15:49 -08:00
Po Lu
120de8f9cb ; * configure.ac: Add missing object to Haiku cairo build 2021-12-18 13:59:49 +00:00
Po Lu
a1eb71413d Fix cairo build on haiku
* configure.ac: Move pgtk cairo detection to the correct
location.
2021-12-18 13:49:09 +00:00
Po Lu
0e69753ac1 Merge remote-tracking branch 'origin/master' into feature/pgtk 2021-12-12 11:15:00 +08:00
Eli Zaretskii
8c50016b10 Improve documentation of sqlite3 support
* lisp/sqlite-mode.el (sqlite-mode-list-data):
* configure.ac (HAVE_SQLITE3): Fix typos.

* doc/lispref/text.texi (Database): Improve and clarify wording,
add index entries, mention all the function arguments.

* etc/NEWS: Minor wording changes of the sqlite entries.
2021-12-11 13:04:55 +02:00
Po Lu
25084b1e95 Merge remote-tracking branch 'origin/master' into feature/pgtk 2021-12-11 18:34:05 +08:00
Lars Ingebrigtsen
ebf59d1a28 Check whether the sqlite supports sqlite3_load_extension
* configure.ac: Check for sqlite3_load_extension, which is
apparently missing in some versions.
* src/sqlite.c: Add guards.
(Fsqlite_load_extension): Ifdef out on systems that doesn't have it.
2021-12-11 06:40:01 +01:00
Lars Ingebrigtsen
3d38d1d134 Add sqlite3 support to Emacs
* configure.ac: Add check for the sqlite library.
* doc/lispref/text.texi (Database): Document it.

* lisp/sqlite.el: New file.

* lisp/term/w32-win.el (dynamic-library-alist): Add a mapping.

* src/Makefile.in (SQLITE3_LIBS): Add the libraries.

* src/alloc.c (union emacs_align_type): Add a Lisp_Sqlite struct.

* src/data.c (Ftype_of): Add sqlite.

* src/emacs.c (main): Load the syms.

* src/lisp.h (DEFINE_GDB_SYMBOL_BEGIN): Add PVEC_SQLITE.
(GCALIGNED_STRUCT): New struct to keep data for sqlite database
objects and statement objects.
(SQLITEP, SQLITE, CHECK_SQLITE, XSQLITE): New macros for accessing
the objects.

* src/pdumper.c (dump_vectorlike): Update hash.
(dump_vectorlike): Don't dump it.

* src/print.c (print_vectorlike): Add a printer for the sqlite
object.

* src/sqlite.c: New file.

* test/src/sqlite-tests.el: Add tests.
2021-12-11 04:55:57 +01:00
Yuuki Harano
d44d6ae016 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk 2021-12-04 16:06:16 +09:00
Paul Eggert
1e2bc1bbf4 Port to Tiny C on x86-64
This allows Emacs to build on Ubuntu 21.10 x86-64 with
‘./configure --without-modules CC=tcc’.
* configure.ac (GC_SETJMP_WORKS):
Accept __x86_64__ as an alias for __amd64__.
* src/lisp.h (alignas): Provide a no-op substitute.
2021-12-03 13:09:34 -08:00
Stefan Kangas
740ae2818f Bump Emacs version to 28.0.90
* README:
* configure.ac:
* msdos/sed2v2.inp:
* nt/README.W32: Bump Emacs version to 28.0.90.
2021-12-01 17:49:32 +01:00
Po Lu
8f5d2a3181 Merge remote-tracking branch 'origin/master' into feature/pgtk 2021-11-30 08:16:50 +08:00
Po Lu
08d1c40507 Fix typos in configure.ac
* configure.ac: Fix typos in wording of XInput 2 options.
2021-11-28 10:11:53 +08:00
Michael Albinus
75d294cd4a Reorganize emba control files
Using dynamic job generation in GitLab does not work sufficiently.  So
we generate the jobs in the Emacs sources.

* configure.ac (SUBDIR_MAKEFILES): Add test/infra/Makefile.

* test/Makefile.in (subdirs, generate-test-jobs): New targets.

* test/infra/Makefile.in:
* test/infra/test-jobs.yml: New files.

* test/infra/default-gitlab-ci.yml:
* test/infra/test-jobs-generator.sh: Remove.

* test/infra/gitlab-ci.yml: Insert contents of default-gitlab-ci.yml.
(stages): Remove generator and trigger.  Add normal.
(test-jobs-generator, test-jobs-pipeline): Remove jobs.
(top): Include test-jobs.yml.
2021-11-21 14:39:29 +01:00
Po Lu
85a078e785 Add support for the Haiku operating system and its window system
* .gitignore: Add binaries specific to Haiku.

* Makefie.in (HAVE_BE_APP): New variable.
(install-arch-dep): Install Emacs and Emacs.pdmp when
using Haiku.

* configure.ac: Detect and configure for Haiku and
various related configurations.
(be-app, be-freetype, be-cairo): New options.
(HAVE_BE_APP, HAIKU_OBJ, HAIKU_CXX_OBJ)
(HAIKU_LIBS, HAIKU_CFLAGS): New variables.
(HAIKU, HAVE_TINY_SPEED_T): New define.
(emacs_config_features): Add BE_APP.

* doc/emacs/Makefile.in (EMACSSOURCES): Add Haiku
appendix.

* doc/emacs/emacs.texi: Add Haiku appendix to menus and
include it.

* doc/emacs/haiku.texi: New Haiku appendix.

* doc/lispref/display.texi (Defining Faces, Window Systems):
Explain meaning of `haiku' as a window system identifier.
(haiku-use-system-tooltips): Explain meaning of system
tooltips on
Haiku.

* doc/lispref/frames.texi (Multiple Terminals): Explain
meaning of haiku as a display type.
(Frame Layout): Clarify section for Haiku frames.
(Size Parameters): Explain limitations of fullwidth and
fullheight on Haiku.
(Management Parameters): Explain limitations of
inhibiting double buffering on builds with Cairo,
and the inability of frames with no-accept-focus to
receive keyboard input on Haiku.
(Font and Color Parameters): Explain the different font
backends available on Haiku.
(Raising and Lowering): Explain that lowering and
restacking frames doesn't work on Haiku.
(Child Frames): Explain oddities of child frame
visibility on Haiku.

* doc/lispref/os.texi (System Environment): Explain
meaning of haiku.
* etc/MACHINES: Add appropriate notices for Haiku.
* etc/NEWS: Document changes.
* etc/PROBLEMS: Document font spacing bug on Haiku.

* lib-src/Makefile.in: Build be-resources binary on
Haiku.
(CXX, CXXFLAGS, NON_CXX_FLAGS, ALL_CXXFLAGS)
(HAVE_BE_APP, HAIKU_LIBS, HAIKU_CFLAGS): New variables.
(DONT_INSTALL): Add be-resources binary if on Haiku.
(be-resources): New target.

* lib-src/be_resources: Add helper binary for setting
resources on the Emacs application.

* lib-src/emacsclient.c (decode_options): Set
alt_display to "be" on Haiku.

* lisp/cus-edit.el (custom-button, custom-button-mouse)
(custom-button-unraised, custom-button-pressed): Update
face definitions for Haiku.

* lisp/cus-start.el: Add haiku-debug-on-fatal-error and
haiku-use-system-tooltips.

* lisp/faces.el (face-valid-attribute-values): Clarify
attribute comment for Haiku.
(tool-bar): Add appropriate toolbar color for Haiku.

* lisp/frame.el (haiku-frame-geometry)
(haiku-mouse-absolute-pixel-position)
(haiku-set-mouse-absolute-pixel-position)
(haiku-frame-edges)
(haiku-frame-list-z-order): New function declarations.

(frame-geometry, frame-edges)
(mouse-absolute-pixel-position)
(set-mouse-absolute-pixel-position)
(frame-list-z-order): Call appropriate window system
functions on Haiku.

(display-mouse-p, display-graphic-p)
(display-images-p, display-pixel-height)
(display-pixel-width, display-mm-height)
(display-mm-width, display-backing-store)
(display-save-under, display-planes)
(display-color-cells, display-visual-class): Update type
tests for Haiku.

* lisp/international/mule-cmds.el
(set-coding-system-map): Also
prevent set-terminal-coding-system from appearing in the menu
bar on Haiku.

* lisp/loadup.el: Load Haiku-specific files when built
with Haiku, and don't rename newly built Emacs on Haiku as BFS
doesn't support hard links.

* lisp/menu-bar.el (menu-bar-open): Add for Haiku.

* lisp/mwheel.el (mouse-wheel-down-event): Expect
wheel-up on Haiku.
(mouse-wheel-up-event): Expect wheel-down on Haiku.
(mouse-wheel-left-event): Expect wheel-left on Haiku.
(mouse-wheel-right-event): Expect wheel-right on Haiku.

* lisp/net/browse-url.el
(browse-url--browser-defcustom-type):
Add option for WebPositive.
(browse-url-webpositive-program): New variable.
(browse-url-default-program): Search for WebPositive.
(browse-url-webpositive): New function.

* lisp/net/eww.el (eww-form-submit, eww-form-file)
(eww-form-checkbox, eww-form-select): Define faces
appropriately for Haiku.

* lisp/term/haiku-win.el: New file.

* lisp/tooltip.el (menu-or-popup-active-p): New function
declaration.
(tooltip-show-help): Don't use tooltips on Haiku when a
menu is active.

* lisp/version.el (haiku-get-version-string): New
function declaration.
(emacs-version): Add Haiku version string if
appropriate.

* src/Makefile.in: Also produce binary named "Emacs"
with Haiku resources set.

(CXX, HAIKU_OBJ, HAIKU_CXX_OBJ, HAIKU_LIBS)
(HAIKU_CFLAGS, HAVE_BE_APP, NON_CXX_FLAGS)
(ALL_CXX_FLAGS): New variables.

(.SUFFIXES): Add .cc.
(.cc.o): New target.
(base_obj): Add Haiku C objects.
(doc_obj, obj): Split objects that should scanned for
documentation into doc_obj.
(SOME_MACHINE_OBJECTS): Add appropriate Haiku C objects.
(all): Depend on Emacs and Emacs.pdmp on Haiku.
(LIBES): Add Haiku libraries.
(gl-stamp)
($(etc)/DOC): Scan doc_obj instead of obj
(temacs$(EXEEXT): Use C++ linker on Haiku.
(ctagsfiles3): New variable.
(TAGS): Scan C++ files.

* src/alloc.c (garbage_collect): Mark Haiku display.

* src/dispextern.h (HAVE_NATIVE_TRANSFORMS): Also enable
on Haiku.
(struct image): Add fields for Haiku transforms.
(RGB_PIXEL_COLOR): Define to unsigned long on Haiku as
well.
(sit_for): Also check USABLE_SIGPOLL.
(init_display_interactive): Set initial window system to
Haiku on Haiku builds.

* src/emacs.c (main): Define Haiku syms and init haiku
clipboard.
(shut_down_emacs): Quit BApplication on Haiku and
trigger debug
on aborts if haiku_debug_on_fatal_error.
(Vsystem_type): Update docstring.

* src/fileio.c (next-read-file-uses-dialog-p): Enable on
Haiku.

* src/filelock.c (WTMP_FILE): Only define if BOOT_TIME
is also defined.

* src/floatfns.c (double_integer_scale): Work around
Haiku libroot brain damage.

* src/font.c (syms_of_font): Define appropriate font
driver symbols for Haiku builds with various options.

* src/font.h: Also enable ftcrfont on Haiku builds with
Cairo.
(font_data_structures_may_be_ill_formed): Also enable on
Haiku builds that have Cairo.

* src/frame.c (Fframep): Update doc-string for Haiku
builds and return haiku if appropriate.
(syms_of_frame): New symbol `haiku'.

* src/frame.h (struct frame): Add output data for Haiku.
(FRAME_HAIKU_P): New macro.
(FRAME_WINDOW_P): Test for Haiku frames as well.

* src/ftcrfont.c (RED_FROM_ULONG, GREEN_FROM_ULONG)
(BLUE_FROM_ULONG): New macros.
(ftcrfont_draw): Add haiku specific code for Haiku
builds with Cairo.

* src/ftfont.c (ftfont_open): Set face.
(ftfont_has_char, ftfont_text_extents): Work around
crash.
(syms_of_ftfont): New symbol `mono'.

* src/ftfont.h (struct font_info): Enable Cairo-specific
fields for Cairo builds on Haiku.

* src/haiku_draw_support.cc:
* src/haiku_font_support.cc:
* src/haiku_io.c:
* src/haiku_select.cc:
* src/haiku_support.cc:
* src/haiku_support.h:
* src/haikufns.c:
* src/haikufont.c:
* src/haikugui.h:
* src/haikuimage.c:
* src/haikumenu.c:
* src/haikuselect.c:
* src/haikuselect.h:
* src/haikuterm.c:
* src/haikuterm.h: Add new files for Haiku windowing
support.

* src/haiku.c: Add new files for Haiku operating system
support.

* src/image.c: Implement image transforms and native XPM
support
on Haiku.

(GET_PIXEL, PUT_PIXEL, NO_PIXMAP)
(PIX_MASK_RETAIN, PIX_MASK_DRAW)
(RGB_TO_ULONG, RED_FROM_ULONG, GREEN_FROM_ULONG)
(BLUE_FROM_ULONG, RED16_FROM_ULONG, GREEN16_FROM_ULONG)
(BLUE16_FROM_ULONG): Define to appropriate values on
Haiku.

(image_create_bitmap_from_data): Add Haiku support.
(image_create_bitmap_from_file): Add TODO on Haiku.
(free_bitmap_record): Free bitmap on Haiku.
(image_size_in_bytes): Implement for Haiku bitmaps.
(image_set_transform): Implement on Haiku.
(image_create_x_image_and_pixmap_1): Implement on Haiku,
24-bit or 1-bit only.
(image_destroy_x_image, image_get_x_image): Use correct
img and pixmap values on Haiku.
(lookup_rgb_color): Use correct macro on Haiku.
(image_to_emacs_colors): Implement on Haiku.
(image_disable_image): Disable on Haiku.
(image_can_use_native_api): Test for translator presence
on Haiku.
(native_image_load): Use translator on Haiku.
(imagemagick_load_image): Add Haiku-specific quirks.
(Fimage_transforms_p): Allow rotate90 on Haiku.
(image_types): Enable native XPM support on Haiku.
(syms_of_image): Enable XPM images on Haiku.

* src/keyboard.c (kbd_buffer_get_event)
(handle_async_input, handle_input_available_signal)
(handle_user_signal, Fset_input_interrupt_mode)
(init_keyboard): Check for USABLE_SIGPOLL along with
USABLE_SIGIO.

* src/lisp.h (pD): Work around broken Haiku headers.
(HAVE_EXT_MENU_BAR): Define on Haiku.
(handle_input_available_signal): Enable if we just have
SIGPOLL as well.

* src/menu.c (have_boxes): Return true on Haiku.
(single_menu_item): Enable toolkit menus on Haiku.
(find_and_call_menu_selection): Also enable on Haiku.

* src/process.c (keyboard_bit_set): Enable with only
usable SIGPOLL.
(wait_reading_process_output): Test for SIGPOLL as well
as SIGIO availability.

* src/sound.c (sound_perror, vox_open)
(vox_configure, vox_close): Enable for usable SIGPOLL as
well.

* src/sysdep.c (sys_subshell): Enable for usable SIGPOLL.
(reset_sigio): Make conditional on F_SETOWN.
(request_sigio, unrequest_sigio)
(emacs_sigaction_init): Also handle SIGPOLLs.
(init_sys_modes): Disable TCXONC usage on Haiku, as it
doesn't have any ttys other than pseudo ttys, which don't
support C-s/C-q flow control, and causes compiler warnings.
(speeds): Disable high speeds if HAVE_TINY_SPEED_T.

* src/termhooks.h (enum output_method): Add output_haiku.
(struct terminal): Add Haiku display info.
(TERMINAL_FONT_CACHE): Enable for Haiku.

* src/terminal.c (Fterminal_live_p): Return `haiku' if
appropriate.
* src/verbose.mk.in (AM_V_CXX, AM_V_CXXLD): New logging
variables.

* src/xdisp.c (redisplay_internal)
(note_mouse_highlight): Return on Haiku if a popup is activated.
(display_menu_bar): Return on Haiku if frame is a Haiku
frame.

* src/xfaces.c (GCGraphicsExposures): Enable correctly on Haiku.
(x_create_gc): Enable dummy GC code on Haiku.

* src/xfns.c (x-server-version, x-file-dialog): Add
Haiku specifics to doc strings.

* src/xterm.c (syms_of_xterm): Add Haiku information to
doc string.
2021-11-20 21:46:07 +08:00
Eli Zaretskii
9ccfdd54fa ; * configure.ac (emacs_config_features): Add XINPUT2. 2021-11-20 12:44:13 +02:00
Po Lu
487ec3cf2a Add support for event processing via XInput 2
* configure.ac: Add an option to use XInput 2 if available.
* src/Makefile.in (XINPUT_LIBS, XINPUT_CFLAGS): New variables.
(EMACS_CFLAGS): Add Xinput CFLAGS.
(LIBES): Add XInput libs.
* src/xmenu.c (popup_activated_flag): Expose flag if
XInput 2 is available.
* src/xfns.c (x_window): Set XInput 2 event mask.
(setup_xi_event_mask): New function.
(syms_of_xfns): Provide XInput 2 feature.
* src/xterm.c (x_detect_focus_change): Handle XInput 2
GenericEvents.
(handle_one_xevent): Handle XInput 2 events.
(x_term_init): Ask the server for XInput 2 support and set
xkb_desc if available.
(x_delete_terminal): Free XKB kb desc if it exists, and free
XI2 devices if they exist.
(xi_grab_or_ungrab_device)
(xi_reset_scroll_valuators_for_device_id)
(x_free_xi_devices, x_init_master_valuators): New functions.
(x_get_scroll_valuator_delta): New function.
(init_xterm): Don't tell GTK to only use Core Input when built
with XInput 2 support.
* src/xterm.h (struct x_display_info): Add fields for XKB
and XI2 support.
* src/gtkutil.c (xg_event_is_for_menubar): Handle
XIDeviceEvents.
(xg_is_menu_window): New function.
(xg_event_is_for_scrollbar): Handle XIDeviceEvents.
* etc/NEWS: Document changes.

* lisp/mwheel.el (mouse-wheel-down-alternate-event)
(mouse-wheel-up-alternate-event)
(mouse-wheel-left-alternate-event)
(mouse-wheel-right-alternate-event): New user options.

(mouse-wheel-text-scale)
(mwheel-scroll): Test for alternate events.
(mouse-wheel--setup-bindings): Set up bindings for alternate
buttons.
2021-11-20 18:25:09 +08:00
Jeff Walsh
8b98aafe35 configure.ac (PGTK_LIBS): remove pgtk dl dependency (Bug#50494) 2021-11-14 22:31:31 +09:00
Philipp Stephani
cc4edea872 Use posix_spawn if possible.
posix_spawn is less error-prone than vfork + execve, and can make
better use of system-specific enhancements like 'clone' on Linux.  Use
it if we don't need to configure a pseudoterminal.

Backported from commit a60053f836.
Unlike that commit, only define USABLE_POSIX_SPAWN on macOS, because
there posix_spawn is much faster than vfork.

Don't merge to master.

* configure.ac (HAVE_SPAWN_H, HAVE_POSIX_SPAWN)
(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR)
(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP)
(HAVE_POSIX_SPAWNATTR_SETFLAGS, HAVE_DECL_POSIX_SPAWN_SETSID): New
configuration variables.
* src/callproc.c (USABLE_POSIX_SPAWN): New configuration macro.
(emacs_posix_spawn_init_actions)
(emacs_posix_spawn_init_attributes, emacs_posix_spawn_init): New
helper functions.
(emacs_spawn): Use posix_spawn if possible.

(cherry picked from commit a60053f836)
2021-11-13 16:45:19 +01:00
Yuuki Harano
c31d3dacf7 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk 2021-11-13 16:25:48 +09:00
Philipp Stephani
a60053f836 Use posix_spawn if possible.
posix_spawn is less error-prone than vfork + execve, and can make
better use of system-specific enhancements like 'clone' on Linux.  Use
it if we don't need to configure a pseudoterminal.

* configure.ac (HAVE_SPAWN_H, HAVE_POSIX_SPAWN)
(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR)
(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP)
(HAVE_POSIX_SPAWNATTR_SETFLAGS, HAVE_DECL_POSIX_SPAWN_SETSID): New
configuration variables.
* src/callproc.c (USABLE_POSIX_SPAWN): New configuration macro.
(emacs_posix_spawn_init_actions)
(emacs_posix_spawn_init_attributes, emacs_posix_spawn_init): New
helper functions.
(emacs_spawn): Use posix_spawn if possible.
2021-11-11 22:00:03 +01:00
Yuuki Harano
4dd1f56f29 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into feature/pgtk 2021-11-11 00:39:53 +09:00
Po Lu
b21f1cabd8 Revert "Add support for event processing via XInput 2"
This reverts commit 346cfc8124.
2021-11-10 14:04:24 +08:00
oldosfan
346cfc8124 Add support for event processing via XInput 2
* configure.ac: Add an option to use XInput 2 if available
* src/Makefile.in (XINPUT_LIBS, XINPUT_CFLAGS): New variables
(EMACS_CFLAGS): Add Xinput CFLAGS
(LIBES): Add XInput libs
* src/xmenu.c (popup_activated_flag): Expose flag if XInput 2 is
available
* src/xfns.c (x_window): Set XInput 2 event mask
* src/xterm.c (x_detect_focus_change): Handle XInput 2 GenericEvents
(handle_one_xevent): Handle XInput 2 events
(x_term_init): Ask the server for XInput 2 support and set xkb_desc if
available
(x_delete_terminal): Free XKB kb desc if it exists, and free XI2
devices if they exist
(x_free_xi_devices, x_init_master_valuators): New functions
(x_get_scroll_valuator_delta): New function
(init_xterm): Don't tell GTK to only use Core Input when built with
XInput 2 support
* src/xterm.h (struct x_display_info): Add fields for XKB and XI2
support
* src/gtkutil.c (xg_event_is_for_menubar): Handle XIDeviceEvents
(xg_is_menu_window): New function
(xg_event_is_for_scrollbar): Handle XIDeviceEvents
2021-11-10 13:27:01 +08:00
Ken Brown
c86a3029ec Merge from origin/emacs-28
6ba4e3b78c Drop support for native compilation on 32-bit Cygwin
7e15ee5bc9 ; * doc/emacs/help.texi (Help Mode): Improve indexing.
2021-10-31 19:36:04 -04:00
Ken Brown
6ba4e3b78c Drop support for native compilation on 32-bit Cygwin
* configure.ac (cygwin32-native-compilation): New option.
[i686-pc-cygwin]: Don't allow native compilation unless that
option is specified.  (Bug#50666)
2021-10-31 19:30:25 -04:00
Eli Zaretskii
2bffa0189d Fix WebP support on MS-Windows
* src/image.c (WebPDecodeRGBA, WebPDecodeRGB, WebPFree): Use
correct names and argument lists in DEF_DLL_FN; fix typos.
(WebPGetFeaturesInternal): Load this instead of WebPGetFeatures,
which is a static inline function in webp/decode.h.
(WebPGetFeatures): Redirect to call WebPGetFeaturesInternal.

* lisp/term/w32-win.el (dynamic-library-alist): Fix the name of
the WebP symbol.

* configure.ac (HAVE_WEBP): Fix detection of libwebp on MinGW.

* nt/INSTALL.W64:
* nt/INSTALL: Update information about libwebp availability.
2021-10-22 15:41:00 +03:00
Stefan Kangas
bc2a5c1127 Add WebP image format support (Bug#51296)
* configure.ac (--with-webp): New option.
(HAVE_WEBP): New variable.
(emacs_config_features): Add webp.
* src/image.c (enum webp_keyword_index) [HAVE_WEBP]: New enum.
(webp_format) [HAVE_WEBP]: New variable.
(webp_image_p, init_webp_functions, webp_load) [HAVE_WEBP]: New
functions for WebP support.
(image_types) [HAVE_WEBP]: Define WebP format.
(syms_of_image) <Qwebp> [HAVE_WEBP]: New DEFSYM.  Add image type Qwebp.
* src/Makefile.in (LIBIMAGE): Add WEBP_LIBS.

* lisp/files.el (auto-mode-alist):
* lisp/image-file.el (image-file-name-extensions):
* lisp/image.el (image-type-header-regexps)
(image-type-file-name-regexps, image-type-auto-detectable): Add WebP
support.
* lisp/term/w32-win.el (dynamic-library-alist): Add the libwebp DLL.

* INSTALL:
* admin/CPP-DEFINES:
* doc/lispref/display.texi (Image Formats, Other Image Types):
* nt/INSTALL: Document WebP support.

* test/lisp/image-tests.el (image-find-image)
(image-type-from-file-name): Expand tests.
* test/src/image-tests.el (image-tests--files): Add WebP.
(image-tests-image-size/webp, image-tests-image-mask-p/webp)
(image-tests-image-metadata/webp): New tests.
* test/data/image/black.webp: New file.
2021-10-22 10:59:01 +02:00
Paul Eggert
33525102e7 Pacify GCC -Wanalyzer-possible-null-dereference
This fixes the only remaining GCC diagnostics when emacs-28 is
configured with --enable-gcc-warnings.  It does so by adding
ATTRIBUTE_RETURNS_NONNULL so that GCC knows certain functions
return nonnull.  It also arranges for three of those functions to
always return nonnull; I thought these functions already were
doing so, but apparently not, and it is conceivable (though I
haven’t checked this) that changing these functions to always
return nonnull even on non-GNU platforms may fix unlikely
portability bugs elsewhere in Emacs.  I used GCC 11.2.1 20210728
(Red Hat 11.2.1-1) on x86-64 when checking the diagnostics.
* configure.ac: Invoke gl_EEMALLOC before gl_INIT, in case
the regex code doesn't invoke gl_EEMALLOC; needed for src/alloc.c’s
use of MALLOC_0_IS_NONNULL.
* src/alloc.c (xmalloc, xzalloc, xrealloc): Don’t worry about the
special case where SIZE == 0, since lmalloc and lrealloc now
return null only on allocation failure.
(lmalloc, lrealloc): Return null only on allocation failure,
instead of having special cases that treat malloc (0) and
realloc (X, 0) as successes even when they return null.
* src/lisp.h: Add ATTRIBUTE_RETURNS_NONNULL to a few functions
that always return nonnull pointers, so that gcc -fanalyzer
does not issue diagnostics like “alloc.c: In function
‘allocate_vector_block’: alloc.c:2985:15: warning: dereference of
possibly-NULL ‘block’ [CWE-690] [-Wanalyzer-possible-null-dereference]”
as per <https://cwe.mitre.org/data/definitions/690.html>.
2021-10-13 11:47:20 -07:00
Glenn Morris
1b11fcae92 Merge from origin/emacs-28
1ccd3eb721 (origin/emacs-28) ; Fix typo in etc/NEWS
0f28ee94ac * NEWS: Mention rcirc connects to #emacs by default
aacafbe267 Refactor mh-utils-tests macro 'with-mh-test-env'
ead5c5cc51 Avoid using variable before it has been initialized
b2c50d7cf3 Clarify docstring of blink-matching-paren
d2a34cabcf ; Very minor touch-up to a recent change
36a7ce4393 ; * doc/emacs/trouble.texi (After a Crash): Fix typo.
1cd1b2835b * doc/misc/gnus.texi (Loose Threads): Use regexp-opt in ex...
9f041cdfac Bump project.el version
ad2287e659 Retain compatibility with older project.el projects
d86b2e59c7 native-comp-available-p is the definitive test
1b383ac424 Minor fix of a recently installed documentation change
4d76765b6c Fix md5 issue in recent Gnulib merge
18308b739a Tweak recent 'configure' fix

# Conflicts:
#	etc/NEWS
2021-10-06 07:50:33 -07:00
Paul Eggert
18308b739a Tweak recent 'configure' fix
* configure.ac (gt_TYPE_WINT_T): Omit obsolete and
now-overridden definition.
2021-10-05 09:09:22 -07:00
Glenn Morris
2dc88a27a4 Merge from origin/emacs-28
63abe976ce (origin/emacs-28) Document minibuffer-default-prompt-forma...
b5afbedc90 Backward compatibility option for 'nobreak-char-display'
ea1b728a06 ; * lisp/dired.el: Fix typo.
984eafeb98 Unbreak the build after Gnulib update
5946370cd1 Check, whether an FUSE mount has been broken in Tramp
90575a6c0c Disable 'nobreak-char-display' in Eldoc buffers
570e2c9a17 Fix small error in comint-send-input
fd7bb31412 Update documentation of search-whitespace-regexp
1f4ced47a1 Fix cc-compat.el syntax error
b431f54c1b Mention `seq-uniq' in `delete-dups' documentation
0a7bab689c ; Minor stylistic fixes found by checkdoc
e2861e2d08 ; * etc/NEWS: Fix typo.
1a65d49931 Port recent Gnulib changes to MS-Windows
68a256c892 Update from Gnulib
63cb65dcce * Fix mh tests for native comp builds (bug#50975)
e606cc6f40 * Fix `batch-native-compile' not to spawn a subprocess
894dfe70da Fix native-compilation build from tarball on Cygwin
2ce5e08058 Remove U+FE0F from script-representative-chars

# Conflicts:
#	etc/NEWS
2021-10-05 07:50:22 -07:00
Eli Zaretskii
984eafeb98 Unbreak the build after Gnulib update
* lib/gnulib.mk.in (GNULIBHEADERS_OVERRIDE_WINT_T): Rename from
GNULIB_OVERRIDES_WINT_T.
* configure.ac (GNULIBHEADERS_OVERRIDE_WINT_T): Define.
(Bug#50985)
2021-10-05 15:55:18 +03:00
Eli Zaretskii
44c13eefe8 Update emacs-module sources for Emacs 29
* configure.ac (module_env_snippet_29): New.

* src/module-env-28.h: Remove the comment with instructions for
the next release.
* src/module-env-29.h: New file.
2021-09-30 20:26:00 +03:00
Eli Zaretskii
3478e64c88 Bump Emacs version to 29.0.50
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp:
* src/msdos.c (internal_terminal_init):
* etc/refcards/ru-refcard.tex:
* etc/NEWS: Bump Emacs version to 29.0.50.
* etc/NEWS.28: New file.

* lisp/cus-edit.el (customize-changed-options-previous-release):
Update the reference version of Emacs.
2021-09-30 20:11:43 +03:00
Eli Zaretskii
2750d97543 Cut the emacs-28 release branch
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp: Bump Emacs version to 28.0.60.

* lisp/cus-edit.el (customize-changed-options-previous-release):
Update the last released version of Emacs.
2021-09-30 20:05:09 +03:00
Dan Ports
5444f607a6 Use the newest gcc installed by Macports
* configure.ac: There may be more than one gcc version installed
in Macports (bug#50649).  Use the newest.

Copyright-paperwork-exempt: yes
2021-09-18 16:04:38 +02:00
Alan Third
443d37ff21 Fix libgccjit detection on macOS
* configure.ac: Combine the Homebrew and MacPorts detection so they
will not create nonsense flags if both are installed.
2021-09-14 10:08:11 +01:00
Stefan Kangas
0cabf8bc36 ; Fix typos 2021-09-03 13:05:32 +02:00