commit 80ceb246326d1d0ddff4af9273305bc67e946b95 (HEAD, refs/remotes/origin/master) Merge: 6684d3af3b0 eba0f091d9c Author: Po Lu Date: Tue Aug 15 14:21:42 2023 +0800 Merge remote-tracking branch 'savannah/master' into master-android-1 commit 6684d3af3b03e4d30d83510e43b85004adb874d2 Author: Po Lu Date: Tue Aug 15 14:19:56 2023 +0800 Don't use // substitution in `ndk_resolve_import_module' * m4/ndk-build.m4 (ndk_resolve_import_module): Stop testing if ndk_commands is empty; just eval it. (bug#65292) diff --git a/m4/ndk-build.m4 b/m4/ndk-build.m4 index 8769e294452..ab4e88ca168 100644 --- a/m4/ndk-build.m4 +++ b/m4/ndk-build.m4 @@ -152,8 +152,7 @@ AC_DEFUN # tree build system sets it to a meaning value, but build files # just use it to test whether or not the NDK is being used. ndk_commands=`ndk_run_test` - - AS_IF([test -n "${ndk_commands//\n }"], [eval "$ndk_commands"]) + eval "$ndk_commands" if test -n "$module_name"; then break; commit eba0f091d9c1a2cffc45d11c6b3f0814901e4d0b Author: Stefan Monnier Date: Mon Aug 14 23:01:12 2023 -0400 * lisp/emacs-lisp/pp.el (pp-fill): Fix bug#65159 diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index 550fab2f4b3..95ad222cc4d 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -226,8 +226,10 @@ pp-fill (if (eq lif 'defun) (setq lif 2)) (when (natnump lif) (goto-char (match-end 0)) - (forward-sexp lif) - (funcall newline))))) + ;; Do nothing if there aren't enough args. + (ignore-error scan-error + (forward-sexp lif) + (funcall newline)))))) (save-excursion (pp-fill (1+ paired) (1- (point))))) ;; Now the sexp either ends beyond `fill-column' or is commit 046b5eb90d2a55a4751e0a2f9be9e2e02b55b4a9 Author: Jim Porter Date: Mon Aug 14 19:58:40 2023 -0700 ; * admin/MAINTAINERS: Add myself as Eshell maintainer. diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS index 1273e9a976b..cea1aa56cde 100644 --- a/admin/MAINTAINERS +++ b/admin/MAINTAINERS @@ -160,6 +160,12 @@ Po Lu Haiku battery support in lisp/battery.el +Jim Porter + Eshell + lisp/eshell/* + test/lisp/eshell/* + doc/misc/eshell.texi + ============================================================================== 2. Areas that someone is willing to maintain, although he would not necessarily mind if someone else was the official maintainer. commit 70c8f8004642355c281288b30bafb624ef94a5ce Author: Stefan Monnier Date: Mon Aug 14 22:48:57 2023 -0400 * doc/lispref/commands.texi (Adjusting Point): Document the adjustment diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 2991799e668..741d98655d0 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi @@ -1255,12 +1255,19 @@ Adjusting Point @cindex @code{display} property, and point display @cindex @code{composition} property, and point display - Emacs cannot display the cursor when point is in the middle of a -sequence of text that has the @code{display} or @code{composition} -property, or is invisible. Therefore, after a command finishes and -returns to the command loop, if point is within such a sequence, the -command loop normally moves point to the edge of the sequence, making this -sequence effectively intangible. + When a sequence of text has the @code{display} or @code{composition} +property, or is invisible, there can be several buffer positions that +result in the cursor being displayed at same place on the screen. +Therefore, after a command finishes and returns to the command loop, +if point is in such a sequence, the command loop normally moves point +to try and make this sequence effectively intangible. + +This @emph{point adjustment} follows the following general rules: first, the +adjustment should not change the overall direction of the command; +second if the command moved point, the adjustment tries to ensure the +cursor is also moved; third, Emacs prefers the edges of an intangible +sequence and among those edges it prefers the non sticky ones, such +that newly inserted text is visible. A command can inhibit this feature by setting the variable @code{disable-point-adjustment}: commit be5917c2ea46982763462bacf3997cce83f1967b Author: Stefan Monnier Date: Mon Aug 14 22:37:51 2023 -0400 cl-generic.el: Fix docstring for methods with `cl-call-next-method` * lisp/emacs-lisp/cl-generic.el (cl--generic-method-info): Fix docstring extraction for "curried" methods (bug#65270). diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index b062c280a41..dec14bd5df6 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -1101,10 +1101,10 @@ cl--generic-method-info (qualifiers (cl--generic-method-qualifiers method)) (call-con (cl--generic-method-call-con method)) (function (cl--generic-method-function method)) - (args (help-function-arglist (if (not (eq call-con 'curried)) - function - (funcall function #'ignore)) - 'names)) + (function (if (not (eq call-con 'curried)) + function + (funcall function #'ignore))) + (args (help-function-arglist function 'names)) (docstring (documentation function)) (qual-string (if (null qualifiers) "" commit a8365aa841d9ca6bafedccae0970e4a269c1e933 Author: Po Lu Date: Tue Aug 15 08:59:03 2023 +0800 Micro-optimize GXAXIS * src/sfnt.c (GXAXIS): Check for the availability of naxis slot elements in a single operation. diff --git a/src/sfnt.c b/src/sfnt.c index 57aa4e3c28e..71e7ecfde47 100644 --- a/src/sfnt.c +++ b/src/sfnt.c @@ -6635,16 +6635,19 @@ #define INSTCTRL() \ #define GXAXIS() \ { \ uint32_t v; \ - int i; \ + int i, naxis; \ + \ + naxis = interpreter->n_axis; \ + CHECK_STACK_AVAILABLE (naxis); \ \ - for (i = 0; i < interpreter->n_axis; ++i) \ + for (i = 0; i < naxis; ++i) \ { \ if (interpreter->norm_coords) \ v = interpreter->norm_coords[i] / 4; \ else \ v = 0; \ \ - PUSH (v); \ + PUSH_UNCHECKED (v); \ } \ } commit b1ee03a64776349edbcc89bc29a3da8aa6260ce7 Author: Po Lu Date: Tue Aug 15 08:50:43 2023 +0800 ; * lib/readutmp.h: Merge from Gnulib. diff --git a/lib/readutmp.h b/lib/readutmp.h index f7cad36d445..3ddecf37272 100644 --- a/lib/readutmp.h +++ b/lib/readutmp.h @@ -136,14 +136,18 @@ #define UT_EXIT_E_EXIT(UT) ((UT)->ut_exit.e_exit) /* This is a near-copy of glibc's struct utmpx, which stops working after the year 2038. Unlike the glibc version, struct utmpx32 describes the file format even if time_t is 64 bits. */ +#define _GL_UT_USER_SIZE sizeof (((struct utmpx *) 0)->ut_user) +#define _GL_UT_ID_SIZE sizeof (((struct utmpx *) 0)->ut_id) +#define _GL_UT_LINE_SIZE sizeof (((struct utmpx *) 0)->ut_line) +#define _GL_UT_HOST_SIZE sizeof (((struct utmpx *) 0)->ut_host) struct utmpx32 { short int ut_type; /* Type of login. */ pid_t ut_pid; /* Process ID of login process. */ - char ut_line[__UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[__UT_USERSIZE]; /* Username. */ - char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */ + char ut_line[_GL_UT_LINE_SIZE]; /* Devicename. */ + char ut_id[_GL_UT_ID_SIZE]; /* Inittab ID. */ + char ut_user[_GL_UT_USER_SIZE]; /* Username. */ + char ut_host[_GL_UT_HOST_SIZE]; /* Hostname for remote login. */ struct __exit_status ut_exit; /* Exit status of a process marked as DEAD_PROCESS. */ /* The fields ut_session and ut_tv must be the same size when compiled commit 17d3b70fbfcbb392b9a3e64f1ca05168cd16d3e8 Author: Stefan Kangas Date: Mon Aug 14 21:34:34 2023 +0200 Add native WebP support on macOS (Bug#59242) * src/image.c (syms_of_image) [HAVE_NATIVE_IMAGE_API && HAVE_NS && NS_IMPL_COCOA]: Add webp as an image type. * src/nsimage.m (ns_can_use_native_image_api) [NS_IMPL_COCOA && !HAVE_WEBP]: Add webp to list of possible image types in the native image support lookup. diff --git a/src/image.c b/src/image.c index f2079fab6a3..7019bbf31be 100644 --- a/src/image.c +++ b/src/image.c @@ -12834,8 +12834,10 @@ syms_of_image (void) add_image_type (Qpng); #endif -#if defined (HAVE_WEBP) || (defined (HAVE_NATIVE_IMAGE_API) \ - && defined (HAVE_HAIKU)) +#if defined (HAVE_WEBP) \ + || (defined (HAVE_NATIVE_IMAGE_API) \ + && ((defined (HAVE_NS) && defined (NS_IMPL_COCOA)) \ + || defined (HAVE_HAIKU))) DEFSYM (Qwebp, "webp"); DEFSYM (Qwebpdemux, "webpdemux"); add_image_type (Qwebp); diff --git a/src/nsimage.m b/src/nsimage.m index af8eb629989..b33124900bb 100644 --- a/src/nsimage.m +++ b/src/nsimage.m @@ -77,6 +77,10 @@ Updated by Christian Limpach (chris@nice.ch) #ifndef HAVE_RSVG else if (EQ (type, Qsvg)) imageType = @"public.svg-image"; +#endif +#ifndef HAVE_WEBP + else if (EQ (type, Qwebp)) + imageType = @"org.webmproject.webp"; #endif else if (EQ (type, Qheic)) imageType = @"public.heic"; commit 279e3723b10a8aa8323f9094f7f1e7d52820bcec Author: Jim Porter Date: Mon Aug 14 09:20:34 2023 -0700 ; Fix Eshell tests * test/lisp/eshell/eshell-tests.el (eshell-test/forward-arg): Add 'should' calls to check state. * test/lisp/eshell/em-extpipe-tests.el (em-extpipe-tests--deftest): Add 'should' calls and fix temp-buffer substitution. diff --git a/test/lisp/eshell/em-extpipe-tests.el b/test/lisp/eshell/em-extpipe-tests.el index 1184b5df5f8..bdffcd9b320 100644 --- a/test/lisp/eshell/em-extpipe-tests.el +++ b/test/lisp/eshell/em-extpipe-tests.el @@ -48,26 +48,29 @@ em-extpipe-tests--deftest ;; buffer into `input'. The substitution logic is ;; appropriate for only the use we put it to in this file. `(ert-with-temp-file temp - (let ((temp-buffer (generate-new-buffer " *temp*" t))) + (let ((temp-buffer (generate-new-buffer " *tmp*" t))) (unwind-protect (let ((input (replace-regexp-in-string "temp\\([^>]\\|\\'\\)" temp - (string-replace "#" - (buffer-name temp-buffer) - input)))) + (string-replace + "#" + (concat "#") + input)))) ,@body) (when (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (temp-should-string= (expected) - `(string= ,expected (string-trim-right - (with-temp-buffer - (insert-file-contents temp) - (buffer-string))))) + `(should (string= ,expected + (string-trim-right + (with-temp-buffer + (insert-file-contents temp) + (buffer-string)))))) (temp-buffer-should-string= (expected) - `(string= ,expected (string-trim-right - (with-current-buffer temp-buffer - (buffer-string)))))) + `(should (string= ,expected + (string-trim-right + (with-current-buffer temp-buffer + (buffer-string))))))) (skip-unless shell-file-name) (skip-unless shell-command-switch) (skip-unless (executable-find shell-file-name)) diff --git a/test/lisp/eshell/eshell-tests.el b/test/lisp/eshell/eshell-tests.el index 390f75cfbb9..46c9482ecf4 100644 --- a/test/lisp/eshell/eshell-tests.el +++ b/test/lisp/eshell/eshell-tests.el @@ -162,16 +162,13 @@ eshell-test/forward-arg "Test moving across command arguments" (with-temp-eshell (eshell-insert-command "echo $(+ 1 (- 4 3)) \"alpha beta\" file" 'ignore) - (let ((here (point)) begin valid) + (let ((end (point)) begin) (beginning-of-line) (setq begin (point)) (eshell-forward-argument 4) - (setq valid (= here (point))) + (should (= end (point))) (eshell-backward-argument 4) - (prog1 - (and valid (= begin (point))) - (beginning-of-line) - (delete-region (point) (point-max)))))) + (should (= begin (point)))))) (ert-deftest eshell-test/queue-input () "Test queuing command input. commit ef3c410018400f34b7613786542a3ad89b1664da Merge: 545f95d1a32 c868a737e41 Author: Eli Zaretskii Date: Mon Aug 14 18:10:00 2023 +0300 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs commit 545f95d1a3213318389ecadc7cfff3f48b555b03 Author: Eli Zaretskii Date: Mon Aug 14 18:08:54 2023 +0300 Fix slow "C-h f" in Emacs built without native compilation * lisp/help-fns.el (help-fns--signature): Don't try calling 'comp-function-type-spec' if Emacs was built without native compilation. (Bug#65250) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index fc8f431fd11..bedc5a9e49b 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -715,7 +715,8 @@ help-fns--signature (unless (and (symbolp function) (get function 'reader-construct)) (insert high-usage "\n") - (when-let* ((res (comp-function-type-spec function)) + (when-let* ((res (and (native-comp-available-p) + (comp-function-type-spec function))) (type-spec (car res)) (kind (cdr res))) (insert (format commit c868a737e41b76a6c47b1e3101a29f7eb7cc8563 Author: Mattias Engdegård Date: Mon Aug 14 16:53:13 2023 +0200 ; * test/lisp/dired-tests.el (dired-test-bug27243-03): fix unwind diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el index 0701b229edd..8f2b9af09c0 100644 --- a/test/lisp/dired-tests.el +++ b/test/lisp/dired-tests.el @@ -241,12 +241,12 @@ dired-test-bug27243-03 (let ((buffers (find-file (concat (file-name-as-directory test-dir) "*") t))) + (setq allbufs (append buffers allbufs)) (dolist (buf buffers) (let ((pt (with-current-buffer buf (point)))) (switch-to-buffer (find-file-noselect test-dir)) (find-file (buffer-name buf)) - (should (equal (point) pt)))) - (append buffers allbufs))) + (should (equal (point) pt)))))) (dolist (buf allbufs) (when (buffer-live-p buf) (kill-buffer buf))))))) commit 411f1bfc9f8db4f87a11ae18ccf2106e7ff8a6d3 Author: Mattias Engdegård Date: Mon Aug 14 16:47:27 2023 +0200 ; * test/src/syntax-tests.el (syntax-char-syntax): remove junk diff --git a/test/src/syntax-tests.el b/test/src/syntax-tests.el index 0ad3667c060..9e4740c17cc 100644 --- a/test/src/syntax-tests.el +++ b/test/src/syntax-tests.el @@ -518,7 +518,6 @@ syntax-char-syntax (modify-syntax-entry (unibyte-char-to-multibyte 128) "_" st) (set-syntax-table st) (should (equal (eval '(char-syntax 128) t) ?_)) - (should (equal (funcall cs 128) ?_)))) - (list (char-syntax 128) (funcall cs 128)))) + (should (equal (funcall cs 128) ?_)))))) ;;; syntax-tests.el ends here commit 3bc62bfa9ad48428cd280e4c162a06916688f6c1 Author: Mattias Engdegård Date: Mon Aug 14 16:34:29 2023 +0200 Actually check the result of `equal` comparisons in tests * test/lisp/calc/calc-tests.el (calc-bit-ops): * test/lisp/files-tests.el (files-tests-file-name-non-special-substitute-in-file-name) (files-tests-file-name-non-special-temporary-file-directory) (files-tests-file-name-non-special-unhandled-file-name-directory): Add missing `should` assertions. diff --git a/test/lisp/calc/calc-tests.el b/test/lisp/calc/calc-tests.el index 41c47e5332c..5b11dd950ba 100644 --- a/test/lisp/calc/calc-tests.el +++ b/test/lisp/calc/calc-tests.el @@ -698,8 +698,8 @@ calc-bit-ops (calc-tests--not x w))) (dolist (n '(0 1 4 16 32 -1 -4 -16 -32)) - (equal (calcFunc-clip x n) - (calc-tests--clip x n))) + (should (equal (calcFunc-clip x n) + (calc-tests--clip x n)))) (dolist (y '(0 1 #x1234 #x8000 #xabcd #xffff #x12345678 #xabcdef12 #x80000000 #xffffffff diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index f6c7be88b05..7fb862e7892 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -1204,30 +1204,30 @@ files-tests-file-name-non-special-substitute-in-file-name (let ((process-environment (cons "FOO=foo" process-environment)) (nospecial-foo (files-tests--new-name nospecial "$FOO"))) ;; The "/:" prevents substitution. - (equal (substitute-in-file-name nospecial-foo) nospecial-foo))) + (should (equal (substitute-in-file-name nospecial-foo) nospecial-foo)))) (files-tests--with-temp-non-special-and-file-name-handler (tmpfile nospecial) (let ((process-environment (cons "FOO=foo" process-environment)) (nospecial-foo (files-tests--new-name nospecial "$FOO"))) ;; The "/:" prevents substitution. - (equal (substitute-in-file-name nospecial-foo) nospecial-foo)))) + (should (equal (substitute-in-file-name nospecial-foo) nospecial-foo))))) (ert-deftest files-tests-file-name-non-special-temporary-file-directory () (files-tests--with-temp-non-special (tmpdir nospecial-dir t) (let ((default-directory nospecial-dir)) - (equal (temporary-file-directory) temporary-file-directory))) + (should (equal (temporary-file-directory) temporary-file-directory)))) (files-tests--with-temp-non-special-and-file-name-handler (tmpdir nospecial-dir t) (let ((default-directory nospecial-dir)) - (equal (temporary-file-directory) temporary-file-directory)))) + (should (equal (temporary-file-directory) temporary-file-directory))))) (ert-deftest files-tests-file-name-non-special-unhandled-file-name-directory () (files-tests--with-temp-non-special (tmpdir nospecial-dir t) - (equal (unhandled-file-name-directory nospecial-dir) - (file-name-as-directory tmpdir))) + (should (equal (unhandled-file-name-directory nospecial-dir) + (file-name-as-directory tmpdir)))) (files-tests--with-temp-non-special-and-file-name-handler (tmpdir nospecial-dir t) - (equal (unhandled-file-name-directory nospecial-dir) - (file-name-as-directory tmpdir)))) + (should (equal (unhandled-file-name-directory nospecial-dir) + (file-name-as-directory tmpdir))))) (ert-deftest files-tests-file-name-non-special-vc-registered () (files-tests--with-temp-non-special (tmpfile nospecial) commit 33bcd4f2d28a7101dbc0ea5563e99cd7f117e21b Author: Mattias Engdegård Date: Mon Aug 14 16:48:05 2023 +0200 Ignore ert-deftest body value * lisp/emacs-lisp/ert.el (ert-deftest): Since the return value of the body isn't going to be used, ignore it explicitly so that the compiler can warn if we try to return something anyway. In particular, this exposes some comparisons whose result weren't actually checked. diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index be9f013ebcf..4ea894f4ede 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -237,7 +237,9 @@ ert-deftest `(:expected-result-type ,expected-result)) ,@(when tags-supplied-p `(:tags ,tags)) - :body (lambda () ,@body) + ;; Add `nil' after the body to enable compiler warnings + ;; about unused computations at the end. + :body (lambda () ,@body nil) :file-name ,(or (macroexp-file-name) buffer-file-name))) ',name)))) commit 31ee2ad5ac609db73052aee3c37a326693b2f70f Author: Po Lu Date: Mon Aug 14 21:39:42 2023 +0800 ; * ChangeLog.android: Clean up entries after the 11th of March. diff --git a/ChangeLog.android b/ChangeLog.android index 8dd13eafa03..8c54909e60f 100644 --- a/ChangeLog.android +++ b/ChangeLog.android @@ -2960,23 +2960,20 @@ (module_open_channel): Call MODULE_INTERNAL_CLEANUP prior to returning. -2023-03-11 Po Lu - - Implement hourglass cursor on Android * lisp/term/android-win.el (x-pointer-arrow, x-pointer-left-ptr) (x-pointer-left-side, x-pointer-sb-h-double-arrow) (x-pointer-sb-v-double-arrow, x-pointer-watch, x-pointer-xterm) (x-pointer-invisible): New constants. + * src/androidterm.c (android_show_hourglass) (android_hide_hourglass): New functions. (android_toggle_visible_pointer, android_define_frame_cursor): Define or don't define hourglass cursor if x->hourglass. (android_redisplay_interface): Add new functions. + * src/androidterm.h (struct android_output): New field `hourglass'. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-03-10 Po Lu Update Android port commit d5afc8d935e88d0b4ad5a22f6f002222955cad26 Author: Po Lu Date: Mon Aug 14 21:39:02 2023 +0800 ; * ChangeLog.android: Clean up entries after the 11th of March. diff --git a/ChangeLog.android b/ChangeLog.android index 04622fedab0..8dd13eafa03 100644 --- a/ChangeLog.android +++ b/ChangeLog.android @@ -1310,100 +1310,69 @@ 2023-06-23 Po Lu - Update Android port * java/org/gnu/emacs/EmacsDrawRectangle.java (perform): * java/org/gnu/emacs/EmacsSdk7FontDriver.java (Sdk7FontEntity): (hasChar): Clean up dead stores. * src/android.c (android_wc_lookup_string): Fix typo. - - Correctly check result of string lookup - * src/android.c (android_wc_lookup_string): Check that - GetStringChars returns non-NULL, not if it throws an exception. - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-06-22 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android + (android_wc_lookup_string): Check that GetStringChars returns + non-NULL, not if it throws an exception. 2023-06-21 Po Lu - Update Android port - * src/androidfns.c (android_set_tool_bar_position): + * src/androidfns.c (android_set_tool_bar_position) (frame_geometry): - * src/androidterm.c (android_flash): + * src/androidterm.c (android_flash) (android_clear_under_internal_border): Synchronize with X. - Merge remote-tracking branch 'origin/master' into feature/android - - Merge remote-tracking branch 'origin/master' into feature/android - 2023-06-20 Po Lu * src/androidfns.c (android_frame_parm_handlers): Fix typo. - - Synchronize tool bar position code with X - * src/androidfns.c (android_set_tool_bar_position): New - function. + (android_set_tool_bar_position): New function. (android_frame_parm_handlers): Add new frame param handler. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-06-19 Po Lu * lib-src/Makefile.in (seccomp-filter$(EXEEXT)): Link with Gnulib. - Update Android port * java/org/gnu/emacs/EmacsView.java (EmacsView, dimensionsLock): New field. (): Create new lock object. (handleDirtyBitmap, onLayout, onAttachedToWindow): Make sure - measuredWidth and measuredHeight are extracted and set - atomically. Send Expose upon layout changes if the view has - grown. + measuredWidth and measuredHeight are extracted and set atomically. + Send Expose upon layout changes if the view has grown. * exec/Makefile.in (clean): Add `exec1'. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-06-18 Po Lu - Update Android port - * src/window.h (GCALIGNED_STRUCT): Improve documentation of + * src/window.h (struct window): Improve documentation of `last_mark'. + * src/xdisp.c (mark_window_display_accurate_1): Don't set `last_mark' to -1 if the mark is inactive. - Enable text conversion in conf-modes * lisp/textmodes/conf-mode.el (conf-mode-initialize): Set text-conversion-style. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-06-17 Po Lu - Merge remote-tracking branch 'origin/master' into feature/android - - Initialize signal mask earlier * java/org/gnu/emacs/EmacsService.java (onCreate, run): Don't initialize signal mask here. + * java/org/gnu/emacs/EmacsApplication.java (onCreate): Do it here instead. + * src/android.c (JNICALL): Restore previous signal masks. * java/README: More documentation. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-06-16 Po Lu - Fix quitting after changes to signal delivery * src/android.c (android_write_event, JNICALL) (android_run_in_emacs_thread): Don't rely on raise to call deliver_process_signal. - Update Android port * java/org/gnu/emacs/EmacsActivity.java (EmacsActivity): * java/org/gnu/emacs/EmacsApplication.java (findDumpFile): * java/org/gnu/emacs/EmacsContextMenu.java (EmacsContextMenu) @@ -1423,201 +1392,184 @@ (EmacsWindowAttachmentManager): Remove various unused arguments and variables, dead stores, and make minor cleanups and performance improvements. + * src/androidmenu.c (FIND_METHOD_STATIC, android_menu_show): Adjust accordingly. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-06-15 Po Lu - Update Android port * java/org/gnu/emacs/EmacsInputConnection.java - (EmacsInputConnection, beginBatchEdit, reset, endBatchEdit): - Keep track of the number of batch edits and return an - appropriate value. + (EmacsInputConnection, beginBatchEdit, reset, endBatchEdit): Keep + track of the number of batch edits and return an appropriate + value. (takeSnapshot): Implement function. + * java/org/gnu/emacs/EmacsNative.java (takeSnapshot): New function. + * java/org/gnu/emacs/EmacsService.java (resetIC): Improve debugging output. + * java/org/gnu/emacs/EmacsView.java (onCreateInputConnection): Call `reset' to clear the UI side batch edit count. - * src/androidterm.c (struct - android_get_surrounding_text_context): New fields - `conversion_start' and `conversion_end'. + + * src/androidterm.c (struct android_get_surrounding_text_context): + New fields `conversion_start' and `conversion_end'. (android_get_surrounding_text): Return the conversion region. (android_get_surrounding_text_internal, NATIVE_NAME): Factor out `getSurroundingText'. (takeSnapshot): New function. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-06-14 Po Lu - Improve IM synchronization on Android * java/org/gnu/emacs/EmacsInputConnection.java (EmacsInputConnection): Reimplement as an InputConnection, not BaseInputConnection. + * src/androidterm.c (performEditorAction): Sync prior to sending keyboard events. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-06-13 Po Lu - Improve behavior of Gnus on Android * etc/NEWS: Fix typo. + * lisp/gnus/gnus-score.el (gnus-read-char): New function. (gnus-summary-increase-score): Use it to display a dialog box on Android, where input methods have trouble with plain old read-char. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-06-12 Po Lu - Improve appearance of custom dialog buttons on Android * java/org/gnu/emacs/EmacsDialog.java (toAlertDialog): Resolve dialog button style and use it instead. - Fix deadlocks * java/org/gnu/emacs/EmacsView.java (EmacsView) (showOnScreenKeyboard, hideOnScreenKeyboard): Don't synchronize. + * java/org/gnu/emacs/EmacsWindow.java (EmacsWindow) - (toggleOnScreenKeyboard): Revert to calling IMM functions from - the main thread. + (toggleOnScreenKeyboard): Revert to calling IMM functions from the + main thread. + * src/android.c (struct android_event_container) (android_pselect_nfds, android_pselect_readfds) (android_pselect_writefds, android_pselect_exceptfds) (android_pselect_timeout): Don't make volatile. (android_wait_event): Run queries if necessary. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-06-11 Po Lu - Update Android port * lisp/net/tramp.el (tramp-encoding-shell): * lisp/obsolete/terminal.el (terminal-emulator): * lisp/term.el (term-exec-1): * lisp/textmodes/artist.el (artist-figlet-get-font-list): - * src/android.c (JNICALL): Where /bin/sh was previously used, - use /system/bin/sh on Android. + * src/android.c (JNICALL): Where /bin/sh was previously used, use + /system/bin/sh on Android. - Update Android port * java/org/gnu/emacs/EmacsSurfaceView.java (EmacsSurfaceView): Document member variables. (onDraw): Use separate Paint object on the UI thread. + * src/textconv.c (really_commit_text, really_set_composing_text) (really_delete_surrounding_text): Run modification hooks when deleting text. - Avoid extraneous calls to the UI thread * java/org/gnu/emacs/EmacsView.java (EmacsView) (showOnScreenKeyboard, hideOnScreenKeyboard) (onCheckIsTextEditor): Make synchronized. + * java/org/gnu/emacs/EmacsWindow.java (EmacsWindow) (toggleOnScreenKeyboard): Don't post to the main thread. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-06-10 Po Lu - ; Update Android port * src/keyboard.c (handle_input_available_signal): Don't generate instructions not available in arm mode. - Update Android port * src/android.c (android_select, android_check_query) (android_check_query_urgent, android_answer_query) - (android_answer_query_spin, android_begin_query, android_end_query) + (android_answer_query_spin, android_begin_query) + (android_end_query) (android_run_in_emacs_thread): Use finer grained memory synchronization semantics. + * src/androidterm.c (android_get_selection): Use the current selection, not its value at the time of the last redisplay. + * src/keyboard.c (handle_input_available_signal): Place memory barrier. - Inherit surrounding text properties when inserting conversion text * src/textconv.c (really_commit_text) (really_set_composing_text): Improve behavior of certain fontification mechanisms by inheriting text properties from surrounding text. - Merge remote-tracking branch 'origin/master' into feature/android - - Prevent hangs from IM requests with the main thread busy * src/android.c (android_select): Clear `android_urgent_query'. - (android_check_query): Make static. Clear - `android_urgent_query'. + (android_check_query): Make static. Clear `android_urgent_query'. (android_check_query_urgent): New function; work like `android_check_query', but only answer urgent queries. (android_answer_query, android_end_query): Clear urgent query flag. - (android_run_in_emacs_thread): Initially wait two seconds for - the query to run from the keyboard loop; upon a timeout, set + (android_run_in_emacs_thread): Initially wait two seconds for the + query to run from the keyboard loop; upon a timeout, set `android_urgent_query' to true and wait for it to run while reading async input. + * src/android.h: Update prototypes. + * src/keyboard.c (handle_async_input): Call `android_check_query_urgent'. 2023-06-09 Po Lu - ; Fix typos - * src/textconv.c (really_commit_text): + * src/textconv.c (really_commit_text) (handle_pending_conversion_events): Fix minor typos. - Avoid responding to input method queries asynchronously * src/androidterm.c (handle_one_android_event): Don't answer - queries here; just rely on the event interrupting - android_select. This avoids exposing buffer contents to input - methods while a command is being executed. + queries here; just rely on the event interrupting android_select. + This avoids exposing buffer contents to input methods while a + command is being executed. + * src/textconv.c (TEXTCONV_DEBUG, really_commit_text) (really_finish_composing_text, really_set_composing_text) (really_set_composing_region, really_delete_surrounding_text) (really_set_point_and_mark, get_extracted_text): Add debugging printouts. - Initialize text conversion hooks for each C Mode buffer * lisp/progmodes/cc-mode.el (c-initialize-cc-mode): Always add text conversion hooks. * src/android.c (android_get_gc_values): Remove redundancy. - Block profiling signals in the Android UI thread * java/org/gnu/emacs/EmacsNative.java (EmacsNative): New function `setupSystemThread'. + * java/org/gnu/emacs/EmacsService.java (onCreate): Block all signals except for SIGBUS and SIGSEGV in the UI thread. + * src/android.c (setupSystemThread): New function. - Fix crash starting Emacs to open file * java/org/gnu/emacs/EmacsThread.java (run): Correct check against extraStartupArgument when an initial file is specified. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-06-08 Po Lu - Merge remote-tracking branch 'origin/master' into feature/android - - Correctly display popup dialogs from Emacsclient * java/org/gnu/emacs/EmacsContextMenu.java (EmacsContextMenu): Make subclasses final. + * java/org/gnu/emacs/EmacsDialog.java (display1): Check if an instance of EmacsOpenActivity is open; if it is, try using it to display the pop up dialog. + * java/org/gnu/emacs/EmacsDialogButtonLayout.java (EmacsDialogButtonLayout): Make final. - * java/org/gnu/emacs/EmacsHolder.java (EmacsHolder): - Likewise. + + * java/org/gnu/emacs/EmacsHolder.java (EmacsHolder): Likewise. + * java/org/gnu/emacs/EmacsOpenActivity.java (EmacsOpenActivity): New field `currentActivity'. (onCreate, onDestroy, onWindowFocusChanged, onPause): Set that field as appropriate. - Update Android port * src/android.c (android_is_special_directory): New function. (android_get_asset_name, android_content_name_p) (android_get_content_name): @@ -1628,64 +1580,59 @@ * src/inotify.c (IN_ONLYDIR, Finotify_add_watch): Factor out checks against asset and content directories to that function. - ; Update from Gnulib - - Merge remote-tracking branch 'origin/master' into feature/android - 2023-06-07 Po Lu - ; Update Android port - * doc/emacs/android.texi (Android Startup): Fix reference to - non existent node. + * doc/emacs/android.texi (Android Startup): Fix reference to non + existent node. - Update Android port * java/org/gnu/emacs/EmacsInputConnection.java (beginBatchEdit) - (endBatchEdit, commitCompletion, commitText, deleteSurroundingText) + (endBatchEdit, commitCompletion, commitText) + (deleteSurroundingText) (finishComposingText, getSelectedText, getTextAfterCursor) (getTextBeforeCursor, setComposingText, setComposingRegion) (performEditorAction, performContextMenuAction, getExtractedText) (setSelection, sendKeyEvent, deleteSurroundingTextInCodePoints) - (requestCursorUpdates): Ensure that the input connection is up - to date. + (requestCursorUpdates): Ensure that the input connection is up to + date. (getSurroundingText): New function. - * java/org/gnu/emacs/EmacsNative.java (getSurroundingText): - Export new C function. + + * java/org/gnu/emacs/EmacsNative.java (getSurroundingText): Export + new C function. + * java/org/gnu/emacs/EmacsService.java (resetIC): Invalidate previously created input connections. + * java/org/gnu/emacs/EmacsView.java (EmacsView) (onCreateInputConnection): Signify that input connections are now up to date. - * src/androidterm.c (struct - android_get_surrounding_text_context): New structure. + + * src/androidterm.c (struct android_get_surrounding_text_context): + New structure. (android_get_surrounding_text, NATIVE_NAME): * src/textconv.c (get_surrounding_text): * src/textconv.h: New functions. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-06-06 Po Lu * lisp/simple.el (analyze-text-conversion): Remove old workaround. - Merge remote-tracking branch 'origin/master' into feature/android - - Merge remote-tracking branch 'origin/master' into feature/android - 2023-06-06 Po Lu - Update Android port * java/org/gnu/emacs/EmacsContextMenu.java (display): Use `EmacsHolder' instead of `Holder'. + * java/org/gnu/emacs/EmacsDialog.java (toAlertDialog): Use `EmacsDialogButtonLayout' to ensure that buttons are wrapped properly. (display): Adjust for new holder class. + * java/org/gnu/emacs/EmacsDialogButtonLayout.java (EmacsDialogButtonLayout, onMeasure, onLayout): New functions. * java/org/gnu/emacs/EmacsDrawLine.java: * java/org/gnu/emacs/EmacsFillPolygon.java: Remove redundant imports. + * java/org/gnu/emacs/EmacsHolder.java (EmacsHolder): * java/org/gnu/emacs/EmacsService.java (class Holder) (getEmacsView, EmacsService): Rename `Holder' to `EmacsHolder' @@ -1693,71 +1640,64 @@ 2023-06-06 Po Lu - Improve undo behavior on Android * lisp/simple.el (undo-auto-amalgamate): Update doc string to describe new amalgamating commands. (analyze-text-conversion): Make this an amalgamating command by default, unless a new line has been inserted. Also, shorten the undo boundary timer. + * src/textconv.c (really_commit_text) - (really_set_composing_text): Correctly report ephemeral - deletions. + (really_set_composing_text): Correctly report ephemeral deletions. (syms_of_textconv): Fix doc strings. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-06-05 Po Lu - Clear batch edit state once a new input connection is established * src/androidterm.c (android_handle_ime_event): Clear batch edit state, in case the previous input method forgot to do so. - Update Android port * java/org/gnu/emacs/EmacsNative.java (EmacsNative): New function clearInputFlags. + * java/org/gnu/emacs/EmacsView.java (onCreateInputConnection): Stop reporting changes after a new input method connection is established. + * src/androidterm.c (android_handle_ime_event): Implement that change. (JNICALL): New function. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-06-04 Po Lu * src/keyboard.c: Fix build without window system * configure.ac: Tune pty detection for Android. - Fix input method synchronization problems * java/debug.sh (gdbserver_cmd, is_root): Prefer TCP again. - * java/org/gnu/emacs/EmacsNative.java (EmacsNative): New - function `queryAndSpin'. + + * java/org/gnu/emacs/EmacsNative.java (EmacsNative): New function + `queryAndSpin'. + * java/org/gnu/emacs/EmacsService.java (EmacsService) (icBeginSynchronous, icEndSynchronous, viewGetSelection): New synchronization functions. (resetIC, updateCursorAnchorInfo): Call those instead. + * java/org/gnu/emacs/EmacsView.java (onCreateInputConnection): Call viewGetSelection. + * src/android.c (JNICALL, android_answer_query_spin): New functions. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-06-03 Po Lu - Fix typos in Android port * lisp/bindings.el (global-map): Bind cut, copy and paste. + * src/androidterm.c (JNICALL): Use key. - Behave correctly when IMEs commit or compose text with active mark * src/textconv.c (really_commit_text) - (really_set_composing_text): Delete text between mark and point - if the mark is active. Don't record changes if the text is - empty. + (really_set_composing_text): Delete text between mark and point if + the mark is active. Don't record changes if the text is empty. - Update Android port * src/androidterm.c (struct android_get_extracted_text_context): New field `mark_active'. (android_get_extracted_text): Set that field. @@ -1765,39 +1705,41 @@ (android_build_extracted_text): New argument `mark_active'. Set flags appropriately. (NATIVE_NAME, android_update_selection): Likewise. + * src/textconv.c (get_extracted_text): New argument `mark_active'. Set it if the mark is active. - * src/textconv.h: Update prototypes. - Merge remote-tracking branch 'origin/master' into feature/android + * src/textconv.h: Update prototypes. * etc/MACHINES: Fix reference to obsolete file. 2023-06-02 Po Lu - Improve Eldoc text conversion support - * lisp/emacs-lisp/eldoc.el: ("back-to-indentation"): Register - touch screen and text conversion commands. + * lisp/emacs-lisp/eldoc.el ("back-to-indentation"): Register touch + screen and text conversion commands. - Improve CC Mode support for text conversion * lisp/progmodes/cc-cmds.el (c-post-text-conversion): New function. - * lisp/progmodes/cc-mode.el (c-initialize-cc-mode): Add it as - the `post-texxt-conversion-hook'. + + * lisp/progmodes/cc-mode.el (c-initialize-cc-mode): Add it as the + `post-texxt-conversion-hook'. + * lisp/simple.el (post-text-conversion-hook): New hook. - (analyze-text-conversion): Run it until success before trying - post insert functions. + (analyze-text-conversion): Run it until success before trying post + insert functions. - Update Android port * java/org/gnu/emacs/EmacsInputConnection.java - (EmacsInputConnection): Apply workarounds on Vivo devices as - well. + (EmacsInputConnection): Apply workarounds on Vivo devices as well. + * src/android.c (sendKeyPress, sendKeyRelease): Clear counter. + * src/androidgui.h (struct android_key_event): New field `counter'. - * src/androidterm.c (handle_one_android_event): Generate - barriers as appropriate. + + * src/androidterm.c (handle_one_android_event): Generate barriers + as appropriate. (JNICALL): Set `counter'. + * src/frame.h (enum text_conversion_operation): * src/textconv.c (detect_conversion_events) (really_set_composing_text, handle_pending_conversion_events_1) @@ -1805,52 +1747,51 @@ * src/textconv.h: Implement text conversion barriers and fix various typos. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-06-01 Po Lu - Correctly export file:// URIs on Android * java/org/gnu/emacs/EmacsService.java (browseUrl): If uri's scheme is `file', rewrite it into a content URI. - Update Android port * java/org/gnu/emacs/EmacsInputConnection.java (EmacsInputConnection, performContextMenuAction): New function. + * java/org/gnu/emacs/EmacsNative.java (EmacsNative) (performContextMenuAction): New function. + * src/android.c (android_get_gc_values): Implement more efficiently. + * src/androidterm.c (android_handle_ime_event): Pass through `update' argument to `finish_composing_text'. Fix thinko. + * src/textconv.c (really_finish_composing_text) (really_set_composing_text, really_set_composing_region) (handle_pending_conversion_events_1, finish_composing_text): New argument `update'. Notify IME of conversion region changes if set. + * src/textconv.h: Update structs and prototypes. - Update Android port * java/org/gnu/emacs/EmacsInputConnection.java - (EmacsInputConnection): Add compatibility adjustments for - Samsung devices. + (EmacsInputConnection): Add compatibility adjustments for Samsung + devices. - Correctly report start and end in extracted text * src/androidterm.c (struct android_get_extracted_text_context): New field `start_offset' and `end_offset'. Delete `offset'. (android_get_extracted_text, android_build_extracted_text): Replace `offset' with new args `start_offset' and `end_offset'. (NATIVE_NAME): Set `start_offset' and `end_offset'. (android_update_selection): Likewise. + * src/textconv.c (get_extracted_text): Likewise. - * src/textconv.h: Update prototypes. - Merge remote-tracking branch 'origin/master' into feature/android + * src/textconv.h: Update prototypes. 2023-05-31 Po Lu - Fix build with Lisp_Object type checking - * configure.ac: Pass through `--enable-check-lisp-object-type' - on Android. + * configure.ac: Pass through `--enable-check-lisp-object-type' on + Android. + * src/alloc.c (android_make_lisp_symbol): * src/android.c: * src/androidfns.c (android_set_no_focus_on_map) @@ -1860,88 +1801,72 @@ (Fandroid_get_clipboard_targets): * src/keyboard.c (make_lispy_event, syms_of_keyboard): * src/sfntfont.c (sfnt_enum_font_1, sfntfont_list_1): - * src/textconv.c (really_set_point_and_mark): Fix Lisp_Object - and integer screw-ups. + * src/textconv.c (really_set_point_and_mark): Fix Lisp_Object and + integer screw-ups. - Update Android port * doc/emacs/input.texi (Other Input Devices, Touchscreens) (On-Screen Keyboards): * doc/lispref/commands.texi (Misc Events): * src/android.c (android_faccessat): Improve word choices and commentary. + * lisp/touch-screen.el (touch-screen-handle-scroll): Make precision scrolling work better with horizontal movement. * src/android.c (android_copy_area): Pacify compiler warning. - Update Android port - * exec/exec.c (insert_args): New argument `arg3'. Replace - argv[1] with that argument. + * exec/exec.c (insert_args): New argument `arg3'. Replace argv[1] + with that argument. (exec_0): Pass file name of script to `insert_args'. - Update android.texi - * doc/emacs/android.texi (What is Android?): - (Android Startup): - (Android File System): - (Android Environment): - (Android Windowing): + * doc/emacs/android.texi (What is Android?, Android Startup) + (Android File System, Android Environment, Android Windowing) (Android Troubleshooting): Improve wording and various other issues. - Merge remote-tracking branch 'origin/master' into feature/android - - Update Android port * java/debug.sh (is_root): Go back to using unix sockets; allow adb to forward them correctly. + * java/org/gnu/emacs/EmacsInputConnection.java (getExtractedText): Don't print text if NULL. + * java/org/gnu/emacs/EmacsService.java (EmacsService): New field `imSyncInProgress'. (updateIC): If an IM sync might be in progress, avoid deadlocks. + * java/org/gnu/emacs/EmacsView.java (onCreateInputConnection): Set `imSyncInProgress' across synchronization point. + * src/android.c (android_check_query): Use __atomic_store_n. (android_answer_query): New function. - (android_begin_query): Set `android_servicing_query' to 2. - Check once, and don't spin waiting for query to complete. + (android_begin_query): Set `android_servicing_query' to 2. Check + once, and don't spin waiting for query to complete. (android_end_query): Use __atomic_store_n. (android_run_in_emacs_thread): Compare-and-exchange flag. If originally 1, fail. + * src/textconv.c (really_set_composing_text): Clear conversion region if text is empty. -2023-05-30 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - 2023-05-29 Po Lu - * src/android.c: Fix typos. - - Merge remote-tracking branch 'origin/master' into feature/android + * src/android.c (android_blit_copy, android_blit_xor): Fix typos. - Update Android port - * src/android.c (android_blit_copy): - (android_blit_xor): Fix typos. + * java/org/gnu/emacs/EmacsNative.java (EmacsNative): New function + `blitRect'. - * src/android.c (android_blit_copy): Fix typos. + * java/org/gnu/emacs/EmacsSurfaceView.java (EmacsSurfaceView): Use + it on Android 8.x. - Work around more problems with Bitmaps - * java/org/gnu/emacs/EmacsNative.java (EmacsNative): New - function `blitRect'. - * java/org/gnu/emacs/EmacsSurfaceView.java (EmacsSurfaceView): - Use it on Android 8.x. * src/android.c (blitRect): Implement new function. - - Update Android port - * src/android.c (android_neon_mask_line): Fix iteration - over remainder. + (android_neon_mask_line): Fix iteration over remainder. (android_blit_copy): Be more paranoid. - Implement android_copy_area in C * java/org/gnu/emacs/EmacsCopyArea.java: Remove file. - * java/org/gnu/emacs/EmacsService.java (EmacsService, copyArea): - Delete function. + + * java/org/gnu/emacs/EmacsService.java (copyArea): Delete + function. + * src/android.c (struct android_emacs_service) (android_init_emacs_service): Remove `copy_area'. (android_create_gc, android_change_gc, android_get_gc_values): @@ -1950,68 +1875,66 @@ (android_blit_copy, android_blit_xor): New functions. (android_copy_area): Implement in C. (android_lock_bitmap): Accept drawables instead of windows. + * src/android.h: Adjust prototype for `android_lock_bitmap'. + * src/androidgui.h (struct android_gc): Record last known GC values. 2023-05-27 Po Lu - Add extra thread-related checking * java/org/gnu/emacs/EmacsService.java (EmacsService) (checkEmacsThread): New function. (fillPolygon, drawRectangle, drawLine, drawPoint, copyArea) (clearArea): * java/org/gnu/emacs/EmacsThread.java (EmacsThread): - * java/org/gnu/emacs/EmacsView.java (EmacsView, swapBuffers): - Call where appropriate. + * java/org/gnu/emacs/EmacsView.java (EmacsView, swapBuffers): Call + where appropriate. - Remove synchronization around `damageRegion' * java/org/gnu/emacs/EmacsView.java (EmacsView, swapBuffers): - Remove unnecessary documentation. `damageRegion' is only - changed from the Emacs thread. - - Merge remote-tracking branch 'origin/master' into feature/android + Remove unnecessary documentation. `damageRegion' is only changed + from the Emacs thread. 2023-05-26 Po Lu - Allow starting Emacs --debug-init on Android * doc/emacs/android.texi (Android Troubleshooting): Document `debug-init' option. + * java/AndroidManifest.xml.in (EmacsLauncherPreferencesActivity): New activity. Export on systems older than Android 7.0. + * java/org/gnu/emacs/EmacsActivity.java (onCreate): Adjust for string startup argument. + * java/org/gnu/emacs/EmacsLauncherPreferencesActivity.java: New file. + * java/org/gnu/emacs/EmacsPreferencesActivity.java (EmacsPreferencesActivity): Don't make final. (startEmacsQ): Give start-up argument as an argument, not as a boolean. (startEmacsDebugInit): New function. (onCreate): Register new listener; make final. + * java/org/gnu/emacs/EmacsService.java (onCreate): Pass extraStartupArgument. + * java/org/gnu/emacs/EmacsThread.java (EmacsThread): Rename startDashQ to extraStartupArgument. (run): Adjust accordingly. + * java/res/values-v24/bool.xml: * java/res/values/bool.xml: * java/res/values/strings.xml: New files. + * java/res/xml/preferences.xml: Add new option. Move string resources around. - Merge remote-tracking branch 'origin/master' into feature/android - -2023-05-25 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - 2023-05-24 Po Lu - Update Android port - * src/sfnt.c (sfnt_decompose_compound_glyph): Allow decomposing - up to 16 nested components. + * src/sfnt.c (sfnt_decompose_compound_glyph): Allow decomposing up + to 16 nested components. (CALL, LOOPCALL): Correctly error if no fdef storage exists. (sfnt_interpret_run): New label `next_instruction', for CALL. (sfnt_interpret_compound_glyph_1): Allow decomposing up to 16 @@ -2020,58 +1943,39 @@ (sfnt_read_cvar_table): Prevent assigning uninitialized values. (sfnt_vary_simple_glyph): Update commentary. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-05-23 Po Lu * exec/exec.c (exec_0): Use strcpy. - Merge remote-tracking branch 'origin/master' into feature/android - -2023-05-22 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-05-21 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - 2023-05-20 Po Lu - Remove arbitrary process count limit - * exec/trace.c (handle_clone_prepare): - (handle_clone): When !REENTRANT, use malloc to allocate - tracees after running out of static ones. + * exec/trace.c (handle_clone_prepare, handle_clone): When + !REENTRANT, use malloc to allocate tracees after running out of + static ones. - Update Android port - * java/org/gnu/emacs/EmacsView.java (swapBuffers): Restore - missing damage rect code. + * java/org/gnu/emacs/EmacsView.java (swapBuffers): Restore missing + damage rect code. (onDetachedFromWindow): Remove redundant synchronization. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-05-19 Po Lu - Make tapping on header lines behave reasonably * lisp/touch-screen.el (touch-screen-tap-header-line): New function. ([header-line touchscreen-begin]): Define to `touch-screen-tap-header-line'. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-05-18 Po Lu * make-dist (possibly_non_vc_files): Add Android-specific files. - Allow interacting with the tab line from a touch screen * doc/emacs/frames.texi (Tab Bars): Explain how to interact with the tab bar from a touch screen. + * doc/emacs/input.texi (Touchscreens): Document exactly what a ``long press'' is. + * doc/emacs/windows.texi (Tab Line): Likewise. + * lisp/tab-line.el (tab-line-tab-map, tab-line-add-map) (tab-line-tab-close-map, tab-line-left-map, tab-line-right-map): Bind `touchscreen-begin' to each command. @@ -2079,322 +1983,272 @@ (tab-line-hscroll-right, tab-line-hscroll-left, tab-line-new-tab) (tab-line-select-tab, tab-line-close-tab): Use them. - Merge remote-tracking branch 'origin/master' into feature/android - -2023-05-17 Po Lu - - ; Update from Gnulib - - Merge remote-tracking branch 'origin/master' into feature/android - 2023-05-16 Po Lu - Add touchscreen support to the tab bar * lisp/menu-bar.el (popup-menu-normalize-position): Normalize `touchscreen-begin' events correctly. - * lisp/tab-bar.el (tab-bar-mouse-context-menu): New argument - POSN. Use it if specified. + + * lisp/tab-bar.el (tab-bar-mouse-context-menu): New argument POSN. + Use it if specified. (touch-screen-track-tap, tab-bar-handle-timeout) (tab-bar-touchscreen-begin): New functions. (tab-bar-map): Bind [tab-bar touchscreen-begin]. + * lisp/touch-screen.el (touch-screen-track-drag): Fix doc string. + * src/dispextern.h: Export `get_tab_bar_item_kbd'. + * src/keyboard.c (coords_in_tab_bar_window): New function. (make_lispy_event): Adjust touchscreen begin event mouse position list for tab bar. + * src/xdisp.c (tab_bar_item_info): Allow CLOSE_P to be NULL. (get_tab_bar_item): Adjust doc string. (get_tab_bar_item_kbd): New function. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-05-15 Po Lu - Fix year 2038 code for Android 4.4 and earlier * configure.ac: Also disable enable_year2038. - Fix the MS-DOS build * msdos/sed1v2.inp: Fix removal of ANDROID_BUILD_CFLAGS. - * msdos/sedlibmk.inp: Clear DIR_HAS_FD_MEMBER and - LOCALE_FR_UTF8. - - ; Update from Gnulib - - Merge remote-tracking branch 'origin/master' into feature/android - - Merge remote-tracking branch 'origin/master' into feature/android + * msdos/sedlibmk.inp: Clear DIR_HAS_FD_MEMBER and LOCALE_FR_UTF8. 2023-05-14 Po Lu - Implement document moving on Android * java/org/gnu/emacs/EmacsDocumentsProvider.java (notifyChangeByName): New function. (queryDocument1): Set FLAG_SUPPORTS_MOVE where necessary. (moveDocument): Implement new function. - Merge remote-tracking branch 'origin/master' into feature/android - -2023-05-13 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-05-12 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-05-11 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-05-10 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-05-09 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - 2023-05-08 Po Lu - Update Android port * java/Makefile.in (install_temp/assets/version): Fix generation in out of tree builds. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-05-07 Po Lu - Update Android port * java/org/gnu/emacs/EmacsInputConnection.java (requestCursorUpdates): * java/org/gnu/emacs/EmacsNative.java (requestCursorUpdates): * java/org/gnu/emacs/EmacsService.java (updateCursorAnchorInfo): New functions. + * src/android.c (struct android_emacs_service) (android_init_emacs_service): Add new method. (android_update_cursor_anchor_info): New function. + * src/androidfns.c (android_set_preeditarea): New function. + * src/androidgui.h (enum android_ime_operation): New operation `REQUEST_CURSOR_UPDATES'. (struct android_ime_event): Document new meaning of `length'. + * src/androidterm.c (android_request_cursor_updates): New function. (android_handle_ime_event): Handle new operations. (handle_one_android_event, android_draw_window_cursor): Update the preedit area if needed, like on X. (requestCursorUpdates): New function. + * src/androidterm.h (struct android_output): New field `need_cursor_updates'. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-05-06 Po Lu - Merge remote-tracking branch 'origin/master' into feature/android - - Update Android port * configure.ac (LIBGMP_CFLAGS): Avoid non portable test expression. - Update Android port - * cross/verbose.mk.android: Get rid of badly aligned ANDROID_CC - messages. + * cross/verbose.mk.android (AM_V_CC): Get rid of badly aligned + ANDROID_CC messages. + * java/org/gnu/emacs/EmacsInputConnection.java (syncAfterCommit) (extractAbsoluteOffsets): Add workarounds for several kinds of machines. (commitText, getExtractedText): Likewise. + * src/textconv.c (really_commit_text): Improve definition of POSITION. - (get_extracted_text): Default to providing at least 4 - characters. - - Merge remote-tracking branch 'origin/master' into feature/android + (get_extracted_text): Default to providing at least 4 characters. 2023-05-05 Po Lu - Fix execution of /proc/self/exe within child processes - * exec/exec.h (struct exec_tracee): New field `new_child'. - Also, make `waiting_for_syscall' a bitfield. + * exec/exec.h (struct exec_tracee): New field `new_child'. Also + make `waiting_for_syscall' a bitfield. + * exec/trace.c (PTRACE_GETEVENTMSG): New declaration. (MAX_TRACEES): Bump to 4096. (handle_clone_prepare): New function. - (handle_clone): If required, set `new_child' and wait for a - ptrace event describing the parent to arrive. + (handle_clone): If required, set `new_child' and wait for a ptrace + event describing the parent to arrive. (after_fork): Clear new field. - (exec_waitpid): Upon a ptrace event describing a clone, create - the child's tracee if it doesn't already exist. Otherwise, copy - over the parent's cmdline and start running it. + (exec_waitpid): Upon a ptrace event describing a clone, create the + child's tracee if it doesn't already exist. Otherwise, copy over + the parent's cmdline and start running it. - Update Android port * doc/emacs/android.texi (Android Environment): Document lossage with SIGSTOP. + * exec/exec.c (exec_0): Check X_OK on file being opened. Also handle /proc/self/exe. - Update Android port * exec/trace.c (SYS_SECCOMP): Define when not present. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-05-04 Po Lu - Document another misfeature of Android * doc/emacs/android.texi (Android Environment): Describe how to turn off process killing. - Update Android port * exec/trace.c (check_signal): New function. (handle_exec, process_system_call): Handle signal-delivery-stop while waiting synchronously for syscall completion. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-05-03 Po Lu - Update Android port - * exec/config.h.in: Autoheader. + * exec/config.h.in: Update from new automatically generated + headers. + * exec/configure.ac: Check for siginfo_t.si_syscall. - * exec/trace.c (exec_waitpid): If SIGSYS is received, and caused by - seccomp, drop it should the call number be the invalid system call - used by Emacs. - Update Android port - * exec/config.h.in: Autoheader. + * exec/trace.c (exec_waitpid): If SIGSYS is received, and caused + by seccomp, drop it should the call number be the invalid system + call used by Emacs. + * exec/configure.ac: Use system extensions. (HAVE_PROCESS_VM): Define if process_vm_readv and process_vm_writev are available. + * exec/trace.c (read_memory, user_copy): Implement in terms of process_vm if possible. - Remove extra debugging code * exec/loader-mipsel.s (__start): Remove extraneous debugging code. - Update Android port * exec/Makefile.in: (.PHONY): Add `bootstrap-clean' and `extraclean'. (bootstrap-clean): New rule. - Update Android port * java/Makefile.in (FIND_DELETE): New substitution. (clean): Use FIND_DELETE. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-05-02 Po Lu * doc/emacs/android.texi (Android Environment): Improve doc. - Update Android port * exec/config.h.in (__bool_true_false_are_defined): - * exec/configure.ac (REENTRANT): New definition. + * exec/configure.ac (REENTRANT): New definitions. (READLINKAT_SYSCALL, READLINK_SYSCALL): New defines. Set on all hosts. - * exec/exec.c (MIN, MAX): Remove redundant declarations. Move - to config.h. + + * exec/exec.c (MIN, MAX): Remove redundant declarations. Move to + config.h. (exec_0): Copy name of executable into NAME when !REENTRANT. + * exec/exec.h (struct exec_tracee): New struct `exec_file'. + * exec/trace.c (remove_tracee, handle_exec, handle_readlinkat) - (process_system_call, after_fork): Handle readlinkat system - calls. + (process_system_call, after_fork): Handle readlinkat system calls. - Fix ps name in Android subprocesses * exec/Makefile.in (.SUFFIXES): Include ., then `srcdir'. + * exec/loader-aarch64.s (_start): * exec/loader-armeabi.s (_start): * exec/loader-mips64el.s (__start): * exec/loader-mipsel.s (__start): * exec/loader-x86.s (_start): - * exec/loader-x86_64.s (_start): Get basename of opened exec - file and make it the command name. Fix envp skipping on x86 - and various leaks. - - Port Android port to older Android systems - * exec/config.h.in: Autoheader. - * exec/configure.ac: Check for declarations of stpcpy and - stpncpy. - * exec/exec.c (stpcpy, stpncpy): Use replacements if - declarations are not present; this happens when a new Android - NDK is building for an old version of Android. + * exec/loader-x86_64.s (_start): Get basename of opened exec file + and make it the command name. Fix envp skipping on x86 and + various leaks. - Merge remote-tracking branch 'origin/master' into feature/android + * exec/configure.ac: Check for declarations of stpcpy and stpncpy. + + * exec/exec.c (stpcpy, stpncpy): Use replacements if declarations + are not present; this happens when a new Android NDK is building + for an old version of Android. 2023-05-01 Po Lu - Update Android port * exec/config.h.in: Update config.h.in. + * exec/configure.ac: Check for stpcpy and stpncpy. - * exec/exec.c (rpl_stpcpy, rpl_stpncpy): Define replacements - when they are not present on the system. + + * exec/exec.c (rpl_stpcpy, rpl_stpncpy): Define replacements when + they are not present on the system. (process_program_header): Fill comment. * src/term.c (syms_of_term): Pretend Android uses TERMINFO. - Fix cwd relative process execution on Android * exec/exec.c (format_pid): New function. - (exec_0): Make cwd relative file names relative to - /proc/pid/cwd. + (exec_0): Make cwd relative file names relative to /proc/pid/cwd. + * exec/trace.c (handle_exec): Handle EINTR. + (process_system_call): Report failure without clobbering x0. * README: Describe `exec' directory. - Fix use dialog box regression on Android * lisp/subr.el (use-dialog-box-p): Always prefer dialog boxes. - Make it easier to quit on Android - * src/android.c (android_write_event): - (JNICALL): Raise SIGIO on key press and window action events. + * src/android.c (android_write_event, JNICALL): Raise SIGIO on key + press and window action events. - Fix syscall error reporting on aarch64 - * exec/trace.c (process_system_call): Save and restore x0, x1 - and x2 regs after replacing them with an invalid file - descriptor. + * exec/trace.c (process_system_call): Save and restore x0, x1 and + x2 regs after replacing them with an invalid file descriptor. - Update Android port * Makefile.in (extraclean): Clean in exec as well. + * configure.ac: Fix detection of absolute srcdir. Also, pass CFLAGS. - * exec/Makefile.in: (.c.o): Add -I. so config.h can be - found.:(.s.o): Don't create m4 temporary in srcdir. - * exec/config-mips.m4.in (DADDI2, DADDI3): New macros. Define - to substitute if as cannot assemble daddi. + + * exec/Makefile.in: (.c.o): Add -I. so config.h can be found. + (.s.o): Don't create m4 temporary in srcdir. + + * exec/config-mips.m4.in (DADDI2, DADDI3): New macros. Define to + substitute if as cannot assemble daddi. + * exec/configure.ac (user_h): Look for user.h in asm/ as well. Use new user.h. Also look in ptrace.h on arm systems. Check if as supports daddi on mips64. + * exec/exec.c (check_interpreter): Fix char signedness bug. - * exec/loader-mips64el.s (__start): Use DADDI2 and DADDI3 for - two- and 3-operand daddi. + + * exec/loader-mips64el.s (__start): Use DADDI2 and DADDI3 for two- + and 3-operand daddi. + * exec/mipsel-user.h: Don't include sgidefs.h. + * java/INSTALL: Document that m4 is now required. - * src/android.c (android_rewrite_spawn_argv): Add missing NULL. - Merge remote-tracking branch 'origin/master' into feature/android + * src/android.c (android_rewrite_spawn_argv): Add missing NULL. - Work around system restrictions regarding exec * doc/emacs/android.texi (Android Environment): Document `android-use-exec-loader'. + * exec/exec1.c (main): Set program group of child process. + * src/android.c (android_rewrite_spawn_argv): New function. + * src/android.h: Update prototypes. + * src/androidfns.c (syms_of_androidfns): New variable `android_use_exec_loader'. - * src/callproc.c (emacs_spawn): Rewrite the argument vector to - use exec1 if necessary. - Remove exec/configure - * exec/configure: Remove file. + * src/callproc.c (emacs_spawn): Rewrite the argument vector to use + exec1 if necessary. + * .gitignore: Add exec/configure. 2023-04-30 Po Lu - Add helper binary `exec1' * .gitignore: New files. + * Makefile.in (mostlyclean_dirs): Add libexec, if its Makefile exists. + * autogen.sh (do_git): Autoreconf in exec as well. + * configure.ac: Configure libexec on Android. + * exec/Makefile.in: * exec/README: * exec/config-mips.m4.in: @@ -2430,182 +2284,94 @@ (user_alloca, user_copy, remove_tracee, handle_clone) (syscall_trap_p, handle_exec, process_system_call, tracing_execve) (after_fork, find_tracee, exec_waitpid, exec_init): New files. - * java/Makefile.in (CROSS_EXEC_BINS): Add exec1 and - loader. + * java/Makefile.in (CROSS_EXEC_BINS): Add exec1 and loader. ($(CROSS_EXEC_BINS) &): New target. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-04-29 Po Lu - Merge remote-tracking branch 'origin/master' into feature/android - - Update Android port * build-aux/ndk-build-helper.mk (TARGET_ARCH): Define variable. + * configure.ac (ENABLE_CHECKING, CHECK_STRUCTS) (GC_CHECK_STRING_OVERRUN, GC_CHECK_STRING_FREE_LIST, GLYPH_DEBUG) (GC_CHECK_STRING_BYTES): Enable checking correctly on Android. + * java/README: Fix typos. + * m4/ndk-build.m4 (ndk_run_test): Pass target arch. + * src/android.c (android_get_content_name, android_close) (android_fclose, android_check_string): Fix various typos caught by checking. + * src/charset.c (load_charset_map_from_file): Call emacs_fclose, not fclose. - * src/image.c (image_set_transform): Fix thinko. - (png_load_body, jpeg_load_body, gif_load): Call emacs_fclose, - not fclose. Use open instead of fdopen. - * src/xfaces.c (Fx_load_color_file): Likewise. - -2023-04-28 Po Lu - Merge remote-tracking branch 'origin/master' into feature/android + * src/image.c (image_set_transform): Fix thinko. + (png_load_body, jpeg_load_body, gif_load): Call emacs_fclose, not + fclose. Use open instead of fdopen. - Merge remote-tracking branch 'origin/master' into feature/android + * src/xfaces.c (Fx_load_color_file): Likewise. 2023-04-27 Po Lu - Update Android port * src/image.c (image_create_bitmap_from_data): Fix typo in preprocessor conditionals. - Merge remote-tracking branch 'origin/master' into feature/android - - Update Android port - * doc/emacs/android.texi (Android File System): - (Android Windowing): Make Emacs manual more portable. + * doc/emacs/android.texi (Android File System, Android Windowing): + Make Emacs manual more portable. - Update Android port * doc/lispref/commands.texi (Misc Events): - * doc/lispref/frames.texi (Accessing Selections): - (X Selections): Fix pieces of the Info manual. - - Merge remote-tracking branch 'origin/master' into feature/android + * doc/lispref/frames.texi (Accessing Selections, X Selections): + Fix pieces of the Info manual. 2023-04-26 Po Lu - Make two well known amusements work on Android - * lisp/play/doctor.el (text-conversion-style): - (doctor-mode): - * lisp/play/dunnet.el (text-conversion-style): - (dun-mode): Set `text-conversion-style' to `action'. - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-04-25 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-04-24 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-04-23 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-04-22 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-04-21 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-04-20 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-04-19 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-04-18 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-04-17 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-04-16 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-04-15 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-04-14 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android + * lisp/play/doctor.el (text-conversion-style, doctor-mode): + * lisp/play/dunnet.el (text-conversion-style, dun-mode): Set + `text-conversion-style' to `action'. 2023-04-13 Po Lu - Update Android port * doc/emacs/android.texi (Android Fonts): Update documentation. + * doc/lispref/frames.texi (Accessing Selections, X Selections): Fix typos. + * src/sfntfont-android.c (system_font_directories) (init_sfntfont_android): Add `/product/fonts'. - Merge remote-tracking branch 'origin/master' into feature/android - -2023-04-12 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-04-11 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-04-10 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-04-09 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - 2023-04-08 Po Lu - Merge remote-tracking branch 'origin/master' into feature/android - - Document selections on Android more thoroughly * doc/lispref/elisp.texi (Top): * doc/lispref/frames.texi (Frames): Add ``Accessing Selections'' to menu. - (Accessing Selections, X Selections, Other Selections): New - nodes. - -2023-04-07 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-04-06 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android + (Accessing Selections, X Selections, Other Selections): New nodes. 2023-04-06 Po Lu - Implement `yank-media' on Android * doc/emacs/android.texi (Android Windowing): Update selection restrictions. + * java/org/gnu/emacs/EmacsClipboard.java (EmacsClipboard): New functions `getClipboardTargets' and `getClipboardData'. + * java/org/gnu/emacs/EmacsSdk11Clipboard.java (EmacsSdk11Clipboard, getClipboardTargets, getClipboardData): - Implement. + Implement these virtual functions defined in EmacsClipboard. + * java/org/gnu/emacs/EmacsSdk8Clipboard.java: Stub out new functions. * lisp/term/android-win.el (android-get-clipboard-1): Implement MIME type targets. + * src/android.c (android_exception_check) (android_exception_check_1, android_exception_check_2): Fix punctuation in warning message. (android_exception_check_nonnull_1): New function. + * src/android.h: Update prototypes. + * src/androidselect.c (struct android_emacs_clipboard): New methods. (android_init_emacs_clipboard): Initialize new methods. @@ -2613,58 +2379,24 @@ (Fandroid_get_clipboard_data): New functions. (syms_of_androidselect): Define new subrs. -2023-04-05 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - 2023-04-04 Po Lu - * lisp/subr.el (read-char-from-minibuffer): Fix typo. - - Update Android port * lisp/subr.el (read-char-from-minibuffer): Don't use undefined variable. Reported by Robert Pluim. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-04-03 Po Lu - Merge remote-tracking branch 'origin/master' into feature/android - - ; * src/androidselect.c (Fandroid_clipboard_exists_p): Add check. - - Update Android port * src/sfnt.c (sfnt_normalize_vector): Don't rely on undefined sign extension semantics. - Merge remote-tracking branch 'origin/master' into feature/android - -2023-04-02 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-04-01 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - - Merge remote-tracking branch 'origin/master' into feature/android - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-03-31 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - 2023-03-30 Po Lu - Tweak outline cache stuff * src/sfntfont.c: Adjust font cache size constants. * src/sfnt.c (GETINFO): Fix typo. * src/sfnt.h: Fix typo. - Update Android port * src/sfnt.c (sfnt_make_interpreter): New argument `fvar'. Set axis count. (SCANCTRL): Implement selector bit 8. @@ -2677,72 +2409,50 @@ (sfnt_vary_interpreter): Set naxis and norm_coords. (sfnt_make_test_interpreter, pushb_test_args, pushw_test_args) (sfnt_name_instruction, main): Adjust accordingly. - * src/sfnt.h (struct sfnt_interpreter, PROTOTYPE): - * src/sfntfont.c (sfntfont_setup_interpreter, sfntfont_open): - Set up distortion information. - Merge remote-tracking branch 'origin/master' into feature/android + * src/sfnt.h (struct sfnt_interpreter): + * src/sfntfont.c (sfntfont_setup_interpreter, sfntfont_open): Set + up distortion information. 2023-03-29 Po Lu - Improve rules for enumerating user fonts * doc/emacs/android.texi (Android Fonts): Document distortable font replacement rules. + * src/sfntfont.c (sfnt_replace_fonts_p): New function. (sfnt_enum_font_1): Call it. - Fix optimized move functions - * src/sfnt.c (sfnt_move_x): - (sfnt_move_y): - (sfnt_move): Set N flags and don't forget to - set N points too. - - * src/sfnt.c (sfnt_read_avar_table): Fix sequencing problem. + * src/sfnt.c (sfnt_move_x, sfnt_move_y, sfnt_move): Set N flags + and don't forget to set N points too. + (sfnt_read_avar_table): Fix sequencing problem. - Merge remote-tracking branch 'origin/master' into feature/android - - Update Android port * src/sfntfont.c (sfntfont_setup_interpreter): Don't create interpreter for blatently broken fonts. + (sfntfont_open): Avoid specifying redundant blends. - Update Android port - * src/sfntfont.c (sfntfont_open): Avoid specifying redundant - blends. - - Merge remote-tracking branch 'origin/master' into feature/android - - Update Android port * src/sfnt.c (sfnt_validate_gs): Fix validation of projection vector. 2023-03-28 Po Lu - Update Android port * src/sfnt.c (sfnt_vary_compound_glyph): * src/sfntfont.c (sfntfont_get_glyph) (sfntfont_get_glyph_outline): Avoid clobbering offset size flag when varying compound glyph. - Update Android port * src/sfnt.c (sfnt_vary_simple_glyph, sfnt_vary_compound_glyph): Fix application of intermediate tuples. * src/sfntfont.c (sfntfont_open): Set xlfd name after applying distortion. - Correctly round lbearing values * src/sfnt.h (SFNT_ROUND_FIXED): * src/sfntfont.c (sfntfont_probe_widths): (sfntfont_measure_pcm): Round lbearing properly. + (sfnt_open_tables): Fix typos in non-HarfBuzz code. - Update Android port - * src/sfntfont.c (sfnt_open_tables): Fix typos in non-HarfBuzz - code. - - Merge remote-tracking branch 'origin/master' into feature/android - - Update Android port * src/androidterm.c (android_draw_image_glyph_string): Restore potentially clobbered GC clipping. + * src/sfnt.c (sfnt_large_integer_add, sfnt_multiply_divide_round) (sfnt_mul_fixed_round): New functions. (sfnt_build_glyph_outline): Take unscaled glyph metrics. @@ -2750,24 +2460,24 @@ (sfnt_vary_compound_glyph, sfnt_vary_interpreter): Use rounding multiplication to scale deltas. (main): Adjust tests. + * src/sfntfont.c (sfntfont_get_glyph_outline) (sfntfont_probe_widths, sfntfont_open, sfntfont_measure_pcm) (sfntfont_draw): More minor fixes to variable fonts. 2023-03-27 Po Lu - Update Android port * src/sfnt.c (sfnt_normalize_blend): Don't crash when axis variations are not present. - Merge remote-tracking branch 'origin/master' into feature/android - - Update Android port * configure.ac (HAVE_OTF_GET_VARIATION_GLYPHS): Check for `hb_font_set_var_named_instance'. + * src/sfnt.c (main): Update tests. + * src/sfntfont-android.c (Fandroid_enumerate_fonts): Blacklist bad font. + * src/sfntfont.c (struct sfnt_font_tables, struct sfnt_font_desc) (sfnt_decode_instance_name, sfnt_weight_descriptions) (sfnt_enum_font_1, sfntfont_list_1, sfntfont_desc_to_entity) @@ -2778,24 +2488,22 @@ (sfntfont_draw, sfntfont_begin_hb_font, syms_of_sfntfont) (mark_sfntfont): Handle variable fonts correctly. - Refactor sfntfont.c * src/sfnt.c (sfnt_build_glyph_outline): Take scale, not head and pixel size. (sfnt_scale_metrics_to_pixel_size): Delete function. (sfnt_get_scale): New function. (main): Update tests. - * src/sfnt.h (PROTOTYPE): Update prototypes. + + * src/sfnt.h: Update prototypes. + * src/sfntfont.c (struct sfnt_outline_cache) (sfntfont_get_glyph_outline, struct sfnt_font_info) (sfntfont_open): Save scale in font information and use it. (sfntfont_measure_instructed_pcm): Delete function. (sfntfont_measure_pcm): Make this the only ``measure pcm'' function. - (sfntfont_draw): Rely on sfntfont_get_glyph_outline for the - scale. - - Refactor sfntfont.c - * src/sfntfont.c (struct sfnt_font_tables): New structure. + (sfntfont_draw): Rely on sfntfont_get_glyph_outline for the scale. + (struct sfnt_font_tables): New structure. (struct sfnt_font_desc): New field `tables'. (struct sfnt_font_info): New field `desc'. (sfntfont_setup_interpreter): Drop fd arguments and don't try to @@ -2808,11 +2516,6 @@ 2023-03-26 Po Lu - Merge remote-tracking branch 'origin/master' into feature/android - -2023-03-26 Po Lu - - Update Android port * src/sfnt.c (sfnt_table_names): Add avar. (sfnt_read_glyph): Clear distortion fields. (sfnt_build_glyph_outline): Calculate the outline origin point. @@ -2837,40 +2540,25 @@ (struct sfnt_test_dcontext, sfnt_test_get_glyph, main): Test distortable font handling. - * src/sfnt.h (SFNT_ENABLE_HINTING): - (enum sfnt_table): - (struct sfnt_glyph): - (struct sfnt_glyph_outline): - (struct sfnt_raster): - (struct sfnt_default_uvs_table): - (struct sfnt_unicode_value_range): - (struct sfnt_nondefault_uvs_table): - (struct sfnt_uvs_mapping): - (struct sfnt_mapped_variation_selector_record): - (struct sfnt_table_offset_rec): - (struct sfnt_uvs_context): - (struct sfnt_mapped_table): - (struct sfnt_variation_axis): - (struct sfnt_instance): - (struct sfnt_fvar_table): - (struct sfnt_short_frac_correspondence): - (struct sfnt_short_frac_segment): - (struct sfnt_avar_table): - (struct sfnt_tuple_variation): - (struct sfnt_cvar_table): - (struct sfnt_gvar_table): - (struct sfnt_blend): - (struct sfnt_metrics_distortion): - (PROTOTYPE): Update prototypes. - - * src/sfntfont.c (sfntfont_get_glyph_outline): + * src/sfnt.h (SFNT_ENABLE_HINTING, enum sfnt_table) + (struct sfnt_glyph, struct sfnt_glyph_outline, struct sfnt_raster) + (struct sfnt_default_uvs_table, struct sfnt_unicode_value_range) + (struct sfnt_nondefault_uvs_table, struct sfnt_uvs_mapping) + (struct sfnt_mapped_variation_selector_record) + (struct sfnt_table_offset_rec, struct sfnt_uvs_context) + (struct sfnt_mapped_table, struct sfnt_variation_axis) + (struct sfnt_instance, struct sfnt_fvar_table) + (struct sfnt_short_frac_correspondence) + (struct sfnt_short_frac_segment, struct sfnt_avar_table) + (struct sfnt_tuple_variation, struct sfnt_cvar_table) + (struct sfnt_gvar_table, struct sfnt_blend) + (struct sfnt_metrics_distortion): Update prototypes. + + * src/sfntfont.c (sfntfont_get_glyph_outline) (sfntfont_measure_pcm): Adjust calls. 2023-03-24 Po Lu - Merge remote-tracking branch 'origin/master' into feature/android - - Update Android port * src/sfnt.c (sfnt_table_names): Add fvar, gvar, cvar. (sfnt_read_maxp_table): Call xmalloc, not malloc. (sfnt_read_simple_glyph): Avoid use-after-free if simple is @@ -2887,6 +2575,7 @@ (sfnt_read_packed_points, sfnt_read_packed_deltas) (sfnt_compute_tuple_scale, sfnt_infer_deltas_1, sfnt_infer_deltas) (sfnt_vary_glyph): Add WIP variation glyph implementation. + * src/sfnt.h (enum sfnt_table, struct sfnt_simple_glyph): Likewise. @@ -2894,14 +2583,14 @@ * java/INSTALL: Fix typo. - Merge remote-tracking branch 'origin/master' into feature/android - - Update Android port * configure.ac: Add support for HarfBuzz on Android. + * java/INSTALL: Document where to get Emacs with HarfBuzz. + * lisp/subr.el (overriding-text-conversion-style, y-or-n-p): Correctly set text conversion style if y-or-n-p is called inside the minibuffer. + * src/sfnt.c (sfnt_read_cmap_format_8) (sfnt_read_cmap_format_12): Fix typos. (sfnt_read_24, sfnt_read_cmap_format_14): New function. @@ -2913,6 +2602,7 @@ (sfnt_variation_glyph_for_char, sfnt_map_table, sfnt_unmap_table) (sfnt_read_table, sfnt_test_uvs): New functions. (main): Add UVS tests. + * src/sfnt.h (struct sfnt_cmap_format_14) (struct sfnt_variation_selector_record) (struct sfnt_default_uvs_table, struct sfnt_unicode_value_range) @@ -2920,8 +2610,10 @@ (struct sfnt_mapped_variation_selector_record) (struct sfnt_table_offset_rec, struct sfnt_uvs_context) (struct sfnt_mapped_table): New structures. Update prototypes. + * src/sfntfont-android.c (android_sfntfont_driver): Register HarfBuzz callbacks where required. + * src/sfntfont.c (sfntfont_select_cmap): Look for a format 14 table. Save it in new arg FORMAT14. (sfntfont_read_cmap): Adjust accordingly. @@ -2935,87 +2627,75 @@ (sfntfont_get_variation_glyphs): New function. (sfntfont_unmap_blob, sfntfont_get_font_table) (sfntfont_begin_hb_font): New functions. - * src/sfntfont.h: Update prototypes. - * src/textconv.c (Fset_text_conversion_style): Fix doc string. -2023-03-19 Po Lu + * src/sfntfont.h: Update prototypes. - Merge remote-tracking branch 'origin/master' into feature/android + * src/textconv.c (Fset_text_conversion_style): Fix doc string. 2023-03-18 Po Lu - Update Android port * java/org/gnu/emacs/EmacsView.java (onAttachedToWindow): Send measured width and height in exposures again. - Merge remote-tracking branch 'origin/master' into feature/android - - Remove extraneous debugging code * src/androidterm.c (handle_one_android_event): Don't log expose events. - Work around pselect lossage on Android * src/android.c (android_run_select_thread): New flag. Use it rather than the rc of pselect and errno to determine whether or not it has been interrupted. (android_handle_sigusr1): Set said flag. - Update Android port - * java/org/gnu/emacs/EmacsView.java (EmacsView) - (prepareForLayout): New function. Call this prior to mapping - the view. + * java/org/gnu/emacs/EmacsView.java (prepareForLayout): New + function. Call this prior to mapping the view. (onGlobalLayout): New function. Register as global layout listener. + * java/org/gnu/emacs/EmacsWindow.java (EmacsWindow) (notifyContentRectPosition): New function. Use specified - xPosition and yPosition when reporting the offsets of children - of the root window. + xPosition and yPosition when reporting the offsets of children of + the root window. + * java/org/gnu/emacs/EmacsWindowAttachmentManager.java (registerWindow): Specify activity launch bounds if necessary. + * src/androidterm.c (handle_one_android_event): Send MOVE_FRAME_EVENT where necessary. 2023-03-17 Po Lu - Merge remote-tracking branch 'origin/master' into feature/android - - Include more information in Android bug reports * src/androidfns.c (Fx_server_vendor, Fx_server_version): New functions. (syms_of_androidfns): Define new functions. + * src/androidterm.c (android_set_build_fingerprint) (syms_of_androidterm): Set new variable Vandroid_build_manufacturer. + * src/xfns.c (Fx_server_vendor, Fx_server_version): Update doc strings. - Fix WINDOWSNT build of fileio.c and image.c * src/fileio.c (emacs_fd_to_int): Don't define on WINDOWSNT. + * src/image.c (image_create_bitmap_from_data): Don't abort if !defined HAVE_ANDROID. - Update Android port * configure.ac: - * m4/ndk-build.m4 (ndk_INIT): - (ndk_LATE): Avoid AC_REQUIRE magic. - - Merge remote-tracking branch 'origin/master' into feature/android + * m4/ndk-build.m4 (ndk_INIT, ndk_LATE): Avoid AC_REQUIRE magic. - Improve radio button appearance in Android menus - * java/org/gnu/emacs/EmacsContextMenu.java (EmacsContextMenu): - New field `lastGroupId'. + * java/org/gnu/emacs/EmacsContextMenu.java (EmacsContextMenu): New + field `lastGroupId'. (Item): New field `isRadio'. (addItem): New arg `isRadio'. - (inflateMenuItems): Apply an empty radio button group if - required. + (inflateMenuItems): Apply an empty radio button group if required. + * src/androidmenu.c (android_init_emacs_context_menu): Adjust accordingly. (android_menu_show): Likewise. - Update Android port * java/org/gnu/emacs/EmacsView.java (cancelPopupMenu): Dismiss context menu correctly. (isOpaque): New function. + * java/org/gnu/emacs/EmacsWindowAttachmentManager.java: Make consumer list public. @@ -3023,16 +2703,12 @@ 2023-03-16 Po Lu - Merge remote-tracking branch 'origin/master' into feature/android - - Update Android port * lisp/frame.el (android-detect-mouse): - * lisp/term/android-win.el (android-get-connection): Add - function declarations. + * lisp/term/android-win.el (android-get-connection): Add function + declarations. * configure.ac: Remove unnecessary escape. - Make ANDROID_CC and SDK_BUILD_TOOLS precious variables * configure.ac (AUTO_DEPEND, ANDROID_STUBIFY, ANDROID_LDFLAGS): * lib/Makefile.in (ANDROID_CFLAGS, ANDROID_BUILD_CFLAGS) (ALL_CFLAGS): @@ -3043,194 +2719,168 @@ variables precious. Rename ANDROID_CFLAGS substitution to ANDROID_BUILD_CFLAGS. - Update Android port * nt/mingw-cfg.site: Suppress build of gnulib printf. - Update Android port * java/org/gnu/emacs/EmacsDocumentsProvider.java (queryRoots): Add icon to document root. - Update Android port - * lisp/loadup.el (current-load-list): Set to empty load list - after startup. + * lisp/loadup.el (current-load-list): Set to empty load list after + startup. * src/lread.c (build_load_history): Revert earlier changes. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-03-15 Po Lu - Update Android port * configure.ac: Improve portability. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-03-15 Robert Pluim - Fix typos in Android port * src/fileio.c (Finsert_file_contents): * src/window.c (replace_buffer_in_windows): Call Fboundp, not boundp. 2023-03-15 Po Lu - Update Android port - * cross/Makefile.in (lib/gnulib.mk): Edit out - build-aux stuff. + * cross/Makefile.in (lib/gnulib.mk): Edit out build-aux stuff. * m4/ndk-build.m4: Also look for cross ranlib. * src/sfntfont.c (sfntfont_close): Fix warning w/o mmap. - Port to systems without endian.h - * lib-src/asset-directory-tool.c (main_2): Port to systems - without htole32. + * lib-src/asset-directory-tool.c (main_2): Port to systems without + htole32. 2023-03-15 Po Lu - Update Android port * configure.ac (XCONFIGURE): Disable NS. - * cross/Makefile.in (lib-src/config.h): - (lib/libgnu.a): + * cross/Makefile.in (lib-src/config.h, lib/libgnu.a) (src/android-emacs): Port sed invocation to Mac OS without GNU sed. 2023-03-15 Po Lu - Update Android port * doc/lispref/commands.texi (Misc Events): Document variable `disable-inhibit-text-conversion'. - * java/org/gnu/emacs/EmacsDialog.java (display1): Try an - activity that is certain to be focused first. + + * java/org/gnu/emacs/EmacsDialog.java (display1): Try an activity + that is certain to be focused first. + * lisp/touch-screen.el (touch-screen-track-tap) - (touch-screen-track-drag): Bind - `disable-inhibit-text-conversion'. - * src/keyboard.c (read_key_sequence): Only disable text - conversion if an actual function or numeric key is found in the - key sequence. + (touch-screen-track-drag): Bind `disable-inhibit-text-conversion'. + + * src/keyboard.c (read_key_sequence): Only disable text conversion + if an actual function or numeric key is found in the key sequence. (syms_of_keyboard): New variable `disable-inhibit-text-conversion'. + * src/lread.c (read_filtered_event): Check new variable. + * src/textconv.c (textconv_query): Remove unused label. - Omit gnulib modules added by Android port on MinGW * nt/gnulib-cfg.mk: Omit new gnulib modules. 2023-03-14 Po Lu - Update Android port - * lisp/minibuffer.el (minibuffer-setup-on-screen-keyboard): - Handle cases where last-event-frame is a kbd macro. + * lisp/minibuffer.el (minibuffer-setup-on-screen-keyboard): Handle + cases where last-event-frame is a kbd macro. * src/keyboard.c (lispy_function_keys): Remove duplicates. - Fix the MS-DOS build * msdos/sed1v2.inp: * msdos/sed3v2.inp: * msdos/sedlibcf.inp: * msdos/sedlibmk.inp: Update for Android port and new Gnulib modules. - Update Android port - * java/org/gnu/emacs/EmacsWindow.java (figureChange): Detect - mice on up events as well. + * java/org/gnu/emacs/EmacsWindow.java (figureChange): Detect mice + on up events as well. (onSomeKindOfMotionEvent): Work past framework bug. + * src/androidterm.c (android_perform_conversion_query): * src/textconv.c (textconv_query): * src/textconv.h (TEXTCONV_SKIP_ACTIVE_REGION): Remove unused code. - Update Android port * doc/emacs/android.texi (Android Windowing): Document how to display dialogs when Emacs is in the background. + * java/org/gnu/emacs/EmacsDialog.java (display1): Use system dialogs if possible. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-03-13 Po Lu - Update Android port * etc/NEWS: Announce new option. + * lisp/menu-bar.el (menu-bar-close-window): New option. - (kill-this-buffer): - (kill-this-buffer-enabled-p): Adjust accordingly. - * src/keyboard.c (lispy_function_keys): Add more silly - keys. + (kill-this-buffer, kill-this-buffer-enabled-p): Adjust + accordingly. + + * src/keyboard.c (lispy_function_keys): Add more silly keys. - Update Android port * src/android.c (android_check_string, android_build_string): Reduce consing when building menu bar strings. * etc/MACHINES (Android): Update with more recent information. - Update Android port * doc/emacs/android.texi (Android Startup): Document changes to emacsclient wrapper. + * java/org/gnu/emacs/EmacsOpenActivity.java (EmacsOpenActivity) (startEmacsClient): Open EmacsActivity if the service is not running. + * java/org/gnu/emacs/EmacsService.java (onCreate): - * java/org/gnu/emacs/EmacsThread.java (EmacsThread, run): Pass - any file to open to Emacs. + * java/org/gnu/emacs/EmacsThread.java (run): Pass any file to open + to Emacs. + * lisp/term/android-win.el (handle-args-function): Implement. - Update Android port * src/image.c (image_create_bitmap_from_file, image_find_image_fd) (close_android_fd, slurp_file): Return and use `struct android_fd_or_asset' on Android. (xbm_load, xpm_load, pbm_load, png_load_body, jpeg_load_body) (webp_load, svg_load): Adjust accordingly. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-03-12 Po Lu - Update Android port - * src/android.c (android_get_screen_width): - (android_get_screen_height): - (android_get_mm_width): - (android_get_mm_height): - (android_detect_mouse): Correctly handle Java exceptions. + * src/android.c (android_get_screen_width) + (android_get_screen_height, android_get_mm_width) + (android_get_mm_height, android_detect_mouse): Correctly handle + Java exceptions. - Merge remote-tracking branch 'origin/master' into feature/android + * src/android.c (android_check_if_event): New function. + + * src/androidgui.h: Update prototypes. - Update Android port - * src/android.c (android_check_if_event): - * src/androidgui.h: New function. * src/androidterm.c (android_event_is_for_frame): New function. (android_reset_conversion): Free and unqueue all text conversion events for the given frame. - Update Android port * src/androidterm.c (NATIVE_NAME, JNICALL) (android_build_extracted_text, android_update_selection): Use 0-based indices for Android buffer positions. Also, report surrounding text relative to the region, not to the cursor. - * src/textconv.c (textconv_query): Accept new values of - position. - (really_set_composing_text): Use ephemeral last point. - Merge remote-tracking branch 'origin/master' into feature/android + * src/textconv.c (textconv_query): Accept new values of position. + (really_set_composing_text): Use ephemeral last point. - Update Android port - * java/org/gnu/emacs/EmacsOpenActivity.java (EmacsOpenActivity) - (onCancel): New function. + * java/org/gnu/emacs/EmacsOpenActivity.java (onCancel): New + function. (displayFailureDialog): Handle dialog cancellation. + * src/sfntfont.c (sfnt_parse_languages): Look for SLNG tag if DLNG is not present. - Add Super modifier support to Android port * src/androidgui.h (enum android_modifier_mask): New modifier ANDROID_SUPER_MASK. + * src/androidterm.c (android_android_to_emacs_modifiers) (android_emacs_to_android_modifiers): Add new modifier. - Fix crash during androidterm init * src/androidterm.c (syms_of_androidterm): Initialize Vandroid_build_fingerprint in case GC happens. - * src/emacs-module.c (module_reset_handlerlist): Fix macro conflict. + * src/emacs-module.c (module_reset_handlerlist): Fix macro + conflict. - Clean up emacs-module.c * src/emacs-module.c (MODULE_HANDLE_NONLOCAL_EXIT) (module_make_global_ref, module_free_global_ref) (module_make_function, module_get_function_finalizer) @@ -3247,50 +2897,43 @@ (module_open_channel, module_reset_handlerlist): Adjust as recommended by Paul Eggert . - Update Android port - * configure.ac: Take option `--with-shared-user-id' and give it - to AndroidManifest.xml.in. + * configure.ac: Take option `--with-shared-user-id' and give it to + AndroidManifest.xml.in. + * java/AndroidManifest.xml.in: Substitute that into the application info. + * java/INSTALL (BUILDING WITH A SHARED USER ID): New section. 2023-03-11 Po Lu - Merge remote-tracking branch 'origin/master' into feature/android - - Improve default value of `with_mailutils' on Android - * configure.ac: Default to off on Android. + * configure.ac (with_mailutils): Default to off on Android. - * configure.ac: Fix typo. - - 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. + * src/callproc.c (syms_of_callproc): Avoid using built-in movemail + when --with-mailutils. - Update Android port * src/android.c (android_resolve_handle) - (android_resolve_handle2): Don't perform checking done by - CheckJNI by default. + (android_resolve_handle2): Don't perform checking done by CheckJNI + by default. (android_copy_area): Check for errors here because CopyArea can perform a lot of consing. (android_define_cursor): Remove redundant code. - Fix problems with the menu bar on large screen Android devices * java/org/gnu/emacs/EmacsActivity.java (onContextMenuClosed): Process submenu closing normally if it happens more than 300 ms after a submenu item was selected. + * java/org/gnu/emacs/EmacsContextMenu.java (EmacsContextMenu) (onMenuItemClick, display1): Give `wasSubmenuSelected' different values depending on how the submenu was selected. * lib/gnulib.mk.in: Update from gnulib. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-03-11 Po Lu Don't use GCC extensions in src/emacs-module.c commit cca14e0253c0b93ad65ffe1e212bf2a21b26020f Author: Po Lu Date: Mon Aug 14 16:45:27 2023 +0800 Correct touch screen event translation * lisp/touch-screen.el (touch-screen-handle-point-up) : Provide for situations where both the old and new posns land on a special area of the window by comparing their nominal row, column, and area. diff --git a/lisp/touch-screen.el b/lisp/touch-screen.el index 0914071f2a0..577c993efcf 100644 --- a/lisp/touch-screen.el +++ b/lisp/touch-screen.el @@ -1122,16 +1122,33 @@ touch-screen-handle-point-up ;; If the position of the touch point hasn't ;; changed, or it doesn't start or end on a ;; window... - (if (and (eq new-window old-window) - (eq new-point old-point) - (windowp new-window) - (windowp old-window)) - ;; ... generate a mouse-1 event... - (list 'mouse-1 posn) - ;; ... otherwise, generate a drag-mouse-1 event. - (list 'drag-mouse-1 (cons old-window - old-posn) - (cons new-window posn)))))) + (if (and (not old-point) (not new-point)) + ;; Should old-point and new-point both equal + ;; nil, compare the posn areas and nominal + ;; column position. If either are different, + ;; generate a drag event. + (let ((new-col-row (posn-col-row posn)) + (new-area (posn-area posn)) + (old-col-row (posn-col-row old-posn)) + (old-area (posn-area old-posn))) + (if (and (equal new-col-row old-col-row) + (eq new-area old-area)) + ;; ... generate a mouse-1 event... + (list 'mouse-1 posn) + ;; ... otherwise, generate a drag-mouse-1 event. + (list 'drag-mouse-1 (cons old-window + old-posn) + (cons new-window posn)))) + (if (and (eq new-window old-window) + (eq new-point old-point) + (windowp new-window) + (windowp old-window)) + ;; ... generate a mouse-1 event... + (list 'mouse-1 posn) + ;; ... otherwise, generate a drag-mouse-1 event. + (list 'drag-mouse-1 (cons old-window + old-posn) + (cons new-window posn))))))) ((eq what 'mouse-1-menu) ;; Generate a `down-mouse-1' event at the position the tap ;; took place. commit 1c353ae3715339f253bfed9b90340297dbfab6db Author: Po Lu Date: Mon Aug 14 16:27:41 2023 +0800 ; * ChangeLog.android: Clean up entries after the 10th of July. diff --git a/ChangeLog.android b/ChangeLog.android index 3cb88b6f10c..04622fedab0 100644 --- a/ChangeLog.android +++ b/ChangeLog.android @@ -39,29 +39,25 @@ 2023-08-04 Po Lu - Optimize creation of multibyte menu items on Android * src/androidvfs.c (android_verify_jni_string): Move to android.c. + * src/android.c (android_verify_jni_string): New function. (android_build_string): Forgo encoding menu text if TEXT is a multibyte string that's also a valid JNI string. + * src/android.h: Update prototypes. - Avoid encoding commonplace characters in tree names * java/org/gnu/emacs/EmacsService.java (getDocumentTrees): Don't encode some characters that need not be escaped within file names. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-08-03 Po Lu * src/fileio.c (check_vfs_filename): Revert earlier change. - Merge remote-tracking branch 'origin/master' into feature/android - - Isolate fchmodat within the Android VFS layer * src/android.h: Update prototypes. + * src/androidvfs.c (unix_vfs_ops, android_unix_chmod, afs_vfs_ops) (android_afs_chmod, content_vfs_ops, android_content_chmod) (authority_vfs_ops, android_authority_chmod, saf_root_vfs_ops) @@ -70,61 +66,56 @@ (root_vfs_ops): Add `chmod' to the list of functions implemented by each vnode. (android_fchmodat): New function. + * src/fileio.c (Fset_file_modes): Use `emacs_fchmodat'. + * src/lisp.h: * src/sysdep.c (emacs_fchmodat): Delegate to android_fchmodat on Android. - Update Android port - * java/org/gnu/emacs/EmacsSafThread.java (CacheToplevel): - (EmacsSafThread): - (DocIdEntry): - (getCache): - (pruneCache): - (cacheDirectoryFromCursor): - (run): - (documentIdFromName1): - (statDocument1): - (openDocumentDirectory1): - (openDocument1): Introduce a file status cache and populate - it with files within directories as they are opened. - * java/org/gnu/emacs/EmacsService.java (createDocument): - (createDirectory): - (moveDocument): Invalidate the file status cache wherever - needed. + * java/org/gnu/emacs/EmacsSafThread.java (CacheToplevel) + (EmacsSafThread, DocIdEntry, getCache, pruneCache) + (cacheDirectoryFromCursor, run, documentIdFromName1) + (statDocument1, openDocumentDirectory1, openDocument1): Introduce + a file status cache and populate it with files within directories + as they are opened. + + * java/org/gnu/emacs/EmacsService.java (createDocument) + (createDirectory, moveDocument): Invalidate the file status cache + wherever needed. + * src/fileio.c (check_vfs_filename): (Fset_file_modes): Permit `set-file-modes' to silently fail on asset and content files. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-08-02 Po Lu - Fix reporting of key events containing SYM and META - * doc/emacs/android.texi (Android)::(What is Android?): - (Android Startup, Android File System, Android Environment) - (Android Windowing, Android Fonts, Android Troubleshooting): - Improve section titles. + * doc/emacs/android.texi (Android, What is Android?, Android + Startup, Android File System, Android Environment,Android + Windowing, Android Fonts, Android Troubleshooting): Improve + section titles. (Android Windowing): Describe the relation between keyboard modifiers reported by Android and those in key events. + * java/org/gnu/emacs/EmacsWindow.java (onKeyDown, onKeyUp): Clear META_SYM_ON and META_META_MASK when retrieving ASCII characters. + * src/androidgui.h: Add ANDROID_META_MASK. + * src/androidterm.c (android_android_to_emacs_modifiers) (android_emacs_to_android_modifiers): Transform META to Alt, and vice versa. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-08-01 Po Lu - Update Android port * doc/emacs/android.texi (Android File System): Describe how to access real files named /assets or /contents if so required. + * java/org/gnu/emacs/EmacsService.java (validAuthority): * src/android.c (android_init_emacs_service): * src/android.h: New function. + * src/androidvfs.c (android_saf_valid_authority_p): New function. Wrap the Java function. (android_saf_root_stat, android_saf_root_access): Don't return @@ -132,51 +123,45 @@ (android_saf_tree_from_name): Check validity of string data before giving it to JNI. - Micro-optimize PUSHW/PUSHB * src/sfnt.c (CHECK_STACK_AVAILABLE): New macro. - (PUSH): - (PUSH_UNCHECKED): Always define to unchecked versions, + (PUSH, PUSH_UNCHECKED): Always define to unchecked versions, even if TEST. (PUSH2_UNCHECKED): New macro. - (NPUSHB): - (NPUSHW): - (PUSHB): - (PUSHW): Check the number of remaining stack elements - once. + (NPUSHB, NPUSHW, PUSHB, PUSHW): Check the number of remaining + stack elements once. (stack_overflow_test_args): Expect zero stack arguments. * src/android.c (ANDROID_THROW): Remove unused macro. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-07-31 Po Lu - Update Android port * src/sfnt.c (ISECT): Micro-optimize this instruction. - * src/sfntfont.c (sfnt_parse_style): Avoid GC safety problem. - Update Android port - * src/sfntfont.c (sfnt_parse_style): Fix misworded commentary. + * src/sfntfont.c (sfnt_parse_style): Avoid GC safety problem. + (sfnt_parse_style): Fix misworded commentary. - Initialize Android API level earlier * java/org/gnu/emacs/EmacsNative.java (EmacsNative): * java/org/gnu/emacs/EmacsNoninteractive.java (main): * java/org/gnu/emacs/EmacsService.java (run): * java/org/gnu/emacs/EmacsThread.java (run): * src/android.c (initEmacs, setEmacsParams): Set `android_api_level' within setEmacsParams, not in initEmacs. + * src/androidvfs.c: Pacify compiler warnings. - Implement cross-directory SAF rename operations * java/org/gnu/emacs/EmacsService.java (renameDocument): Don't catch UnsupportedOperationException; handle ENOSYS in android_saf_rename_document instead. (moveDocument): New function. + * lisp/subr.el (y-or-n-p): Always change the text conversion style. + * src/android.c (android_init_emacs_service) (android_exception_check_4): New function. + * src/android.h: Update Java function table. + * src/androidvfs.c (android_saf_rename_document): Handle ENOSYS here by setting errno to EXDEV. (android_saf_move_document): New function. @@ -184,40 +169,36 @@ (android_saf_tree_rename): Use delete-move-rename to implement cross-directory renames. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-07-30 Po Lu - Partially implement rename operations on SAF files * java/org/gnu/emacs/EmacsSafThread.java (postInvalidateCacheDir): * java/org/gnu/emacs/EmacsService.java (renameDocument): New functions. + * src/android.c (android_init_emacs_service): * src/android.h (struct android_emacs_service): Link to new JNI function. + * src/androidvfs.c (android_saf_rename_document): New function. (android_saf_tree_rename): Implement in terms of that function if possible. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-07-29 Po Lu - Correct directory permissions reported for VFS files * java/org/gnu/emacs/EmacsSafThread.java (statDocument1): + * src/androidvfs.c (android_afs_stat, android_content_stat) (android_saf_root_stat): Report search permissions for files. - Update Android port * src/androidvfs.c: Improve commentary. 2023-07-29 Po Lu - Update Android port * java/org/gnu/emacs/EmacsSafThread.java (postInvalidateCache): New argument cacheName. Remove that file from the cache. (accessDocument1): Consult the storage cache as well. + * java/org/gnu/emacs/EmacsService.java (deleteDocument): New argument NAME. @@ -228,62 +209,57 @@ 2023-07-29 Po Lu - ; Update Android port * src/androidvfs.c (android_saf_exception_check): Describe exceptions earlier. - Update Android port - * java/org/gnu/emacs/EmacsSafThread.java (DocIdEntry): - (getCacheEntry): - (CacheEntry): - (documentIdFromName1): Fix earlier change. - - Merge remote-tracking branch 'origin/master' into feature/android + * java/org/gnu/emacs/EmacsSafThread.java (DocIdEntry) + (getCacheEntry, CacheEntry, documentIdFromName1): Fix earlier + change. - Update Android port * java/org/gnu/emacs/EmacsSafThread.java (DocIdEntry) (getCacheEntry, CacheEntry): Use `uptimeMillis' as the basis for cache expiration. - Update Android port * java/org/gnu/emacs/EmacsSafThread.java (EmacsSafThread, getCache) (pruneCache1, pruneCache, cacheChild, cacheDirectoryFromCursor) (documentIdFromName1, openDocumentDirectory1): Implement the cache referred to by the commentary. + * java/org/gnu/emacs/EmacsService.java (deleteDocument): Invalidate the cache upon document removal. + * src/androidvfs.c (android_saf_exception_check) (android_document_id_from_name): Correctly preserve or set errno in error cases. 2023-07-28 Po Lu - Fix SAF query * java/org/gnu/emacs/EmacsSafThread.java (documentIdFromName1): Fix query argument placeholder string. - Update Android port * src/androidvfs.c (android_document_id_from_name): Don't return 0 if an SAF exception occurs. - Avoid crashes when the primary clip is empty * src/androidselect.c (Fandroid_get_clipboard): Don't return data if clipboard is empty. Reported by Johan Widén . 2023-07-28 Po Lu - Allow quitting from Android content provider operations * doc/emacs/android.texi (Android Document Providers): Say that quitting is now possible. + * java/org/gnu/emacs/EmacsNative.java (EmacsNative): New functions `safSyncAndReadInput', `safync' and `safPostRequest'. + * java/org/gnu/emacs/EmacsSafThread.java: New file. Move cancel-able SAF operations here. + * java/org/gnu/emacs/EmacsService.java (EmacsService): Allow quitting from most SAF operations. - * src/androidvfs.c (android_saf_exception_check): Return EINTR - if OperationCanceledException is received. + + * src/androidvfs.c (android_saf_exception_check): Return EINTR if + OperationCanceledException is received. (android_saf_stat, android_saf_access) (android_document_id_from_name, android_saf_tree_opendir_1) (android_saf_file_open): Don't allow reentrant calls from async @@ -292,20 +268,24 @@ (android_vfs_init): Initialize new class. * src/dired.c (open_directory): Handle EINTR from opendir. + * src/sysdep.c: Describe which operations may return EINTR on Android. 2023-07-28 Po Lu - Update Android port * java/org/gnu/emacs/EmacsDirectoryEntry.java (EmacsDirectoryEntry): Make class final. + * java/org/gnu/emacs/EmacsService.java (accessDocument) (openDocumentDirectory, openDocument, createDocument): Throw access and IO error exceptions instead of catching them. (createDirectory, deleteDocument): New functions. + * src/android.c (android_init_emacs_service): Add new functions. + * src/android.h (struct android_emacs_service): Likewise. + * src/androidvfs.c (android_saf_exception_check): New function. Translate between Java exceptions and errno values. (android_saf_stat, android_saf_access, android_saf_delete_document) @@ -319,13 +299,11 @@ (android_vfs_init): Initialize exception classes. (android_mkdir, android_fstat): Remove trailing whitespace. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-07-27 Po Lu - Update Android port * doc/emacs/android.texi (Android Document Providers): Improve wording of paragraph clarifying limits on subprocesses. + * java/org/gnu/emacs/EmacsService.java (getDocumentTrees): Use Java standard US-ASCII coding standard instead of the undocumented ``ASCII'' alias. @@ -333,78 +311,88 @@ (documentIdFromName): * src/android.c (android_init_emacs_service): Take a String for NAME instead of a byte array. + * src/androidvfs.c (android_verify_jni_string): New function. (android_document_id_from_name): Verify that STRING is a valid Modified UTF-8 string. - Update Android port - * src/androidvfs.c (android_afs_initial): - (android_content_get_directory_name): - (android_saf_tree_name): - (android_saf_tree_from_name): - (android_vfs_init): Silence compiler warnings. + * src/androidvfs.c (android_afs_initial) + (android_content_get_directory_name, android_saf_tree_name) + (android_saf_tree_from_name, android_vfs_init): Silence compiler + warnings. - Update Android port * src/android.c (android_run_in_emacs_thread): Behave more robustly if SIGIO arrives too late Emacs for Emacs to check for signals, but too early to preempt a long running syscall. - Avoid crashes in some edge cases * java/org/gnu/emacs/EmacsActivity.java (onActivityResult): - Avoid crashes in some edge cases. - Avoid dereference of a freed vnode's operations table - * src/androidvfs.c (android_renameat_noreplace): - (android_rename): Free vdst using vdst->ops, not vp->ops. - - Merge remote-tracking branch 'origin/master' into feature/android + * src/androidvfs.c (android_renameat_noreplace, android_rename): + Free vdst using vdst->ops, not vp->ops. 2023-07-27 Po Lu - Update Android port * configure.ac (ANDROID_STUBIFY): Add androidvfs.o when building libemacs.so. - * doc/emacs/android.texi (Android): Add `Android Document Providers'. + + * doc/emacs/android.texi (Android): Add `Android Document + Providers'. (Android Startup): Update the location of the content identifier directory. (Android File System): Describe access to document provider directories. (Android Document Providers): New node. + * doc/emacs/emacs.texi (Top): Update the menu for the Android appendix. - * java/Makefile.in (filename, install_temp/assets/build_info): Make - directory-tree depend on build_info. + + * java/Makefile.in (filename, install_temp/assets/build_info): + Make directory-tree depend on build_info. + * java/org/gnu/emacs/EmacsActivity.java (onActivityResult): New function. When a document tree is accepted, persist access to it. - * java/org/gnu/emacs/EmacsDirectoryEntry.java (EmacsDirectoryEntry): - New struct. - * java/org/gnu/emacs/EmacsOpenActivity.java (checkReadableOrCopy): Use - EmacsService.buildContentName. - * java/org/gnu/emacs/EmacsService.java (getEmacsView, openContentUri) + + * java/org/gnu/emacs/EmacsDirectoryEntry.java + (EmacsDirectoryEntry): New struct. + + * java/org/gnu/emacs/EmacsOpenActivity.java (checkReadableOrCopy): + Use EmacsService.buildContentName. + + * java/org/gnu/emacs/EmacsService.java (getEmacsView) + (openContentUri) (checkContentUri): Remove excessive debug logging. (buildContentName, getDocumentAuthorities, requestDirectoryAccess) (getDocumentTrees, decodeFileName, documentIdFromName, getTreeUri) - (statDocument, accessDocument, openDocumentDirectory, readDirectoryEntry) + (statDocument, accessDocument, openDocumentDirectory) + (readDirectoryEntry) (openDocument, createDocument): New functions. - * lib-src/asset-directory-tool.c: Improve commentary by illustrating - the difference between directory and ordinary files. + * lib-src/asset-directory-tool.c: Improve commentary by + illustrating the difference between directory and ordinary files. * src/android.c (ANDROID_THROW, enum android_fd_table_entry_flags) (struct android_emacs_service, android_extract_long) (android_scan_directory_tree, android_is_directory) - (android_get_asset_name, android_url_encode, android_content_name_p) - (android_get_content_name, android_check_content_access, android_fstat) - (android_fstatat, android_file_access_p, android_hack_asset_fd_fallback) - (android_detect_ashmem, android_hack_asset_fd, android_close_on_exec) - (android_open, android_close, android_fclose, android_create_lib_link) - (android_faccessat, struct android_dir, android_opendir, android_dirfd) - (android_readdir, android_closedir, android_lookup_asset_directory_fd) + (android_get_asset_name, android_url_encode) + (android_content_name_p) + (android_get_content_name, android_check_content_access) + (android_fstat) + (android_fstatat, android_file_access_p) + (android_hack_asset_fd_fallback) + (android_detect_ashmem, android_hack_asset_fd) + (android_close_on_exec) + (android_open, android_close, android_fclose) + (android_create_lib_link) + (android_faccessat, struct android_dir, android_opendir) + (android_dirfd) + (android_readdir, android_closedir) + (android_lookup_asset_directory_fd) (android_exception_check_3, android_get_current_api_level) (android_open_asset, android_close_asset, android_asset_read_quit) - (android_asset_read, android_asset_lseek, android_asset_fstat): Move - content and asset related functions to androidvfs.c. - (android_init_emacs_service): Obtain handles for new JNI functions. + (android_asset_read, android_asset_lseek, android_asset_fstat): + Move content and asset related functions to androidvfs.c. + (android_init_emacs_service): Obtain handles for new JNI + functions. (initEmacsParams): Initialize the VFS layer. (android_request_directory_access): New function. (android_display_toast): Remove unused function. @@ -425,7 +413,8 @@ (struct android_parcel_file_descriptor_class) (android_init_cursor_class, android_init_entry_class) (android_init_fd_class, android_vfs_canonicalize_name) - (struct android_unix_vnode, struct android_unix_vdir, unix_vfs_ops) + (struct android_unix_vnode, struct android_unix_vdir) + (unix_vfs_ops) (android_unix_name, android_unix_vnode, android_unix_open) (android_unix_close, android_unix_unlink, android_unix_symlink) (android_unix_rmdir, android_unix_rename, android_unix_stat) @@ -453,7 +442,8 @@ (android_content_opendir, android_content_get_directory_name) (android_content_initial, android_get_content_name) (android_check_content_access, struct android_authority_vnode) - (authority_vfs_ops, android_authority_name, android_authority_open) + (authority_vfs_ops, android_authority_name) + (android_authority_open) (android_authority_close, android_authority_unlink) (android_authority_symlink, android_authority_rmdir) (android_authority_rename, android_authority_stat) @@ -464,7 +454,7 @@ (android_saf_root_close, android_saf_root_unlink) (android_saf_root_symlink, android_saf_root_rmdir) (android_saf_root_rename, android_saf_root_stat) - (android_saf_root_access, android_saf_root_mkdir) + (androqid_saf_root_access, android_saf_root_mkdir) (android_saf_root_readdir, android_saf_root_closedir) (android_saf_root_dirfd, android_saf_root_opendir) (android_saf_root_initial, android_saf_root_get_directory) @@ -483,7 +473,8 @@ (saf_file_vfs_ops, android_saf_file_name, android_saf_file_open) (android_saf_file_unlink, android_saf_file_rmdir) (android_saf_file_opendir, android_close_parcel_fd) - (android_saf_new_vnode, android_saf_new_name, android_saf_new_open) + (android_saf_new_vnode, android_saf_new_name) + (android_saf_new_open) (android_saf_new_unlink, android_saf_new_symlink) (android_saf_new_rmdir, android_saf_new_rename) (android_saf_new_stat, android_saf_new_access) @@ -491,7 +482,8 @@ (special_vnodes, android_root_name, android_name_file) (android_vfs_init, android_open, android_unlink, android_symlink) (android_rmdir, android_mkdir, android_renameat_noreplace) - (android_rename, android_fstat, android_fstatat_1, android_fstatat) + (android_rename, android_fstat, android_fstatat_1) + (android_fstatat) (android_faccessat, android_fdopen, android_close, android_fclose) (android_open_asset, android_close_asset, android_asset_read_quit) (android_asset_read, android_asset_lseek, android_asset_fstat) @@ -508,7 +500,8 @@ * src/fileio.c (check_mutable_filename, Fcopy_file) (Fmake_directory_internal, Fdelete_directory_internal) (Fdelete_file, Frename_file, Fadd_name_to_file) - (Fmake_symbolic_link, file_accessible_directory_p, Fset_file_modes) + (Fmake_symbolic_link, file_accessible_directory_p) + (Fset_file_modes) (Fset_file_times, write_region): * src/filelock.c (get_boot_time, rename_lock_file) (create_lock_file, current_lock_owner, unlock_file): @@ -524,40 +517,27 @@ for fopen, fdopen, unlink, symlink, rmdir, mkdir, renameat_norepalce and rename. -2023-07-26 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - -2023-07-24 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - 2023-07-23 Po Lu - Facilitate locating the app library directory - * doc/emacs/android.texi (Android File System): Document where - the app library directory can probably be found. - * src/android.c (android_create_lib_link): New function. Try to - symlink `lib' in the directory holding the files directory to - the app library directory. - (setEmacsParams): Call that function if Emacs is being - initialized from an application context. + * doc/emacs/android.texi (Android File System): Document where the + app library directory can probably be found. - Merge remote-tracking branch 'origin/master' into feature/android + * src/android.c (android_create_lib_link): New function. Try to + symlink `lib' in the directory holding the files directory to the + app library directory. + (setEmacsParams): Call that function if Emacs is being initialized + from an application context. 2023-07-22 Po Lu - Try harder to keep the initial word selected * lisp/touch-screen.el (touch-screen-drag): If touch-screen-word-select, also keep the initial word within the region while scrolling. - Fix window box computation for menu bar windows * src/window.h (WINDOW_MENU_BAR_P): Check for external menu bars using HAVE_WINDOW_SYSTEM && HAVE_EXT_MENU_BAR instead of hard coding X without Xt or GTK. - Update Android port * doc/lispref/commands.texi (Key Sequence Input): Describe which events receive imaginary prefix keys. * lisp/touch-screen.el (touch-screen-translate-touch): Consider @@ -566,104 +546,95 @@ * etc/NEWS: Announce `current-key-remap-sequence'. - Fix default value of scroll bar frame parameters on Android * src/androidfns.c (Fx_create_frame): Default Qvertical_scroll_bars to Qnil, but set scroll-bar-width and scroll-bar-height. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-07-21 Po Lu - Improve touch screen and text conversion behavior of many commands * doc/lispref/commands.texi (Key Sequence Input): Document new argument to `read-key-sequence' etc. + * lisp/help-macro.el (make-help-screen): - * lisp/subr.el (read-key, read-char-choice-with-read-key): - Disable text conversion and display the OSK before reading a key - sequence. + * lisp/subr.el (read-key, read-char-choice-with-read-key): Disable + text conversion and display the OSK before reading a key sequence. + * lisp/touch-screen.el (touch-screen-window-selection-changed): Only cancel the minibuffer OSK timer. (touch-screen-handle-point-up): Update comment accordingly. + * src/keyboard.c (command_loop_1, read_menu_command) (read_key_sequence, read_key_sequence_vs, Fread_key_sequence) (Fread_key_sequence_vector): New arg DISABLE_TEXT_CONVERSION. All callers changed. - Correctly translate touchscreen-up events outside a frame - * lisp/touch-screen.el (touch-screen-translate-touch): Check if - a prefix is specified separately from prefix being non-nil. - Accept `nil' as an imaginary prefix key. - (function-key-map): Register translation functions on the tab - bar, tab lines and internal border. + * lisp/touch-screen.el (touch-screen-translate-touch): Check if a + prefix is specified separately from prefix being non-nil. Accept + `nil' as an imaginary prefix key. + (function-key-map): Register translation functions on the tab bar, + tab lines and internal border. - Improve touch screen scrolling support * lisp/touch-screen.el (touch-screen-preview-select): Avoid unnecessary redisplays. (touch-screen-drag): Scroll at window margins using window scrolling functions instead of relying on redisplay to recenter the window around point. - Update Android port * doc/emacs/input.texi (Touchscreens): Document `touch-screen-preview-select'. - * doc/lispref/commands.texi (Touchscreen Events): Fix typo in - the descriptions of two touch screen events. - * lisp/dired.el (dired-insert-set-properties): Adjust for - changes to file end computation. + + * doc/lispref/commands.texi (Touchscreen Events): Fix typo in the + descriptions of two touch screen events. + + * lisp/dired.el (dired-insert-set-properties): Adjust for changes + to file end computation. + * lisp/minibuffer.el (clear-minibuffer-message): Don't clear minibuffer message if dragging. + * lisp/touch-screen.el (touch-screen-current-tool): Fix doc string. (touch-screen-preview-select): New function. (touch-screen-drag): Call it if point changes. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-07-20 Po Lu - Update Android port * exec/trace.c (handle_readlinkat): Adjust commentary to match behavior. + * src/android.c (android_get_keysym_name): NULL terminate - *name_return. + *NAME_RETURN. - Update some menu definitions for Android * lisp/international/mule-cmds.el (set-coding-system-map): Don't display `set-terminal-coding-system' on Android. * lisp/cus-edit.el (custom-display): Add `android' display type. - Merge remote-tracking branch 'origin/master' into feature/android - - Update Android port * src/android.c (struct android_event_queue): Don't make unnecessarily volatile. - Update Android port - * lisp/touch-screen.el (touch-screen-handle-touch): Don't - restart dragging if point is at ZV and the tap falls on a - different row. + * lisp/touch-screen.el (touch-screen-handle-touch): Don't restart + dragging if point is at ZV and the tap falls on a different row. - Use context menu header titles on Android - * java/org/gnu/emacs/EmacsContextMenu.java (EmacsContextMenu): - New field `title'. + * java/org/gnu/emacs/EmacsContextMenu.java (EmacsContextMenu): New + field `title'. (addSubmenu): New arg TITLE. Set that field. (expandTo): Set MENU's header title if it's a context menu. + * src/androidmenu.c (android_init_emacs_context_menu): Adjust signature of `createContextMenu'. (android_menu_show): Use TITLE instead of pane titles if there's only one pane. - Merge remote-tracking branch 'origin/master' into feature/android - - Introduce a `dired-click-select' mode * doc/emacs/dired.texi (Marks vs Flags): Document command bound to `touchscreen-hold'. + * doc/lispref/commands.texi (Touchscreen Events): Describe `touch-screen-inhibit-drag'. + * etc/NEWS: Improve description of changes to touch screen support. + * lisp/dired-aux.el (dired-do-chxxx, dired-do-chmod) (dired-do-print, dired-do-shell-command, dired-do-compress-to) (dired-do-create-files, dired-do-rename, dired-do-isearch) @@ -671,6 +642,7 @@ (dired-do-query-replace-regexp, dired-do-find-regexp) (dired-vc-next-action): Disable ``click to select'' after running this command. + * lisp/dired.el (dired-insert-set-properties): Attach click-to-select keymap to file names if necessary. (dired-mode-map): Bind `touchscreen-hold' to click to select @@ -680,6 +652,7 @@ (dired-mark-for-click, dired-enable-click-to-select-mode): New functions. (dired-click-to-select-mode): New minor mode. + * lisp/touch-screen.el (touch-screen-current-tool): Fix doc string. (touch-screen-inhibit-drag): New function. @@ -688,19 +661,20 @@ * src/sfnt.c (sfnt_infer_deltas): Improve commentary. - Improve behavior of `restart-drag' - * lisp/touch-screen.el (touch-screen-handle-point-up): If what - is `restart-drag' (meaning that a drag has been restarted but - the touchpoint has not moved), translate the release into a - regular mouse click to deactivate the region. + * lisp/touch-screen.el (touch-screen-handle-point-up): If what is + `restart-drag' (meaning that a drag has been restarted but the + touchpoint has not moved), translate the release into a regular + mouse click to deactivate the region. - Update Android port * build-aux/makecounter.sh (curcount): Rename `counter' to `emacs_shortlisp_counter'. + * doc/emacs/input.texi (Touchscreens): Document `touch-screen-extend-selection'. + * doc/lispref/commands.texi (Touchscreen Events): Document `touchscreen-restart-drag'. + * lisp/touch-screen.el (touch-screen-extend-selection): New user option. (touch-screen-restart-drag): New function. @@ -710,15 +684,15 @@ extending a previous drag gesture are met, and generate such events if so. (touch-screen-translate-touch): Update doc string. + * src/Makefile.in (otherobj): Remove BUILD_COUNTER_OBJ. ($(lispsource)/international/charprop.el): - (%.elc): Don't depend on bootstrap-emacs if cross configuring - for Android. - (libemacs.so): Directly depend on and link with - BUILD_COUNTER_OBJ. + (%.elc): Don't depend on bootstrap-emacs if cross configuring for + Android. + (libemacs.so): Directly depend on and link with BUILD_COUNTER_OBJ. - Make sure Android builds are redumped upon changes to shortlisp * build-aux/makecounter.sh: New script. + * src/Makefile.in (abs_top_builddir): New variable. (BUILD_COUNTER_OBJ): Define to build-counter.o if compiling for Android. @@ -728,106 +702,94 @@ (emacs$(EXEEXT)): Adjust acordingly. (mostlyclean): Remove build-counter.c. - Merge remote-tracking branch 'origin/master' into feature/android - - Merge remote-tracking branch 'origin/master' into feature/android - 2023-07-18 Po Lu - Fix typos in touch-screen.el * lisp/touch-screen.el (touch-screen-handle-point-update) (touch-screen-handle-point-up): Fix typos. - Merge remote-tracking branch 'origin/master' into feature/android - - Merge remote-tracking branch 'origin/master' into feature/android - - * lisp/touch-screen.el (touch-screen-handle-point-update): Fix typo. + * lisp/touch-screen.el (touch-screen-handle-point-update): Fix + typo. - Avoid splurious menu-bar nil events * src/keyboard.c (make_lispy_event): Return nil if no menu item is found. - Update Android port * lisp/touch-screen.el (touch-screen-hold) (touch-screen-handle-point-up): Don't select inactive minibuffer windows. (touch-screen-handle-point-update): Improve detection of left and right edges. - Update Android port - * lisp/touch-screen.el (touch-screen-handle-touch): Fix - treatment of stray update events. + * lisp/touch-screen.el (touch-screen-handle-touch): Fix treatment + of stray update events. - Don't enable scroll-bar-mode by default on Android * src/frame.c (syms_of_frame): Default to nil if HAVE_ANDROID. * src/keyboard.c (make_lispy_event): Fix botched merge. - Update Android port * doc/lispref/commands.texi (Touchscreen Events): Describe treatment of canceled touch sequences during touch event translation. + * java/org/gnu/emacs/EmacsNative.java (EmacsNative): Update JNI prototypes. + * java/org/gnu/emacs/EmacsWindow.java (motionEvent): Set cancelation flag in events sent where appropriate. + * lisp/touch-screen.el (touch-screen-handle-point-update): Improve treatment of horizontal scrolling near window edges. (touch-screen-handle-touch): Don't handle point up if the touch sequence has been canceled. + * src/android.c (sendTouchDown, sendTouchUp, sendTouchMove): New argument `flags'. + * src/androidgui.h (enum android_touch_event_flags): New enum. (struct android_touch_event): New field `flags'. + * src/androidterm.c (handle_one_android_event): Report cancelation in TOUCHSCREEN_END_EVENTs. - * src/keyboard.c (make_lispy_event): Fix botched merge. - Merge remote-tracking branch 'origin/master' into feature/android - - Merge remote-tracking branch 'origin/master' into feature/android + * src/keyboard.c (make_lispy_event): Fix botched merge. 2023-07-17 Po Lu - Merge remote-tracking branch 'origin/master' into feature/android + * doc/lispref/commands.texi (Touchscreen Events): Document meaning + of `mouse-1-menu-command'. - Update Android port - * doc/lispref/commands.texi (Touchscreen Events): Document - meaning of `mouse-1-menu-command'. * lisp/mouse.el (minor-mode-menu-from-indicator): New arg EVENT. Give it to popup-menu. (mouse-minor-mode-menu): Use posn specified within EVENT. + * lisp/touch-screen.el (touch-screen-handle-touch): Fix interactive translation. Treat commands labeled `mouse-1-menu-command' like ordinary keymaps. - Update Android port * doc/lispref/commands.texi (Touchscreen Events): Document changes to simple translation. + * lisp/touch-screen.el (touch-screen-handle-point-up): Generate `down-mouse-1' if the current gesture is `mouse-1-menu'. - (touch-screen-handle-touch): If binding is a keymap, set state - to `mouse-1-menu' and wait for point to be released before - generating down-mouse-1. + (touch-screen-handle-touch): If binding is a keymap, set state to + `mouse-1-menu' and wait for point to be released before generating + down-mouse-1. - Improve word selection behavior * lisp/tab-bar.el (tab-bar-map): Don't bind touch-screen-drag. + * lisp/touch-screen.el (touch-screen-drag): Extend the region based on the position of the mark, not the position of point relative to EVENT. (touch-screen-translate-touch): Don't generate virtual function keys for non-mouse events. (function-key-map): Remove redundant definitions. - * src/keyboard.c (read_key_sequence): Don't generate *-bar - prefix keys for mock input (such as input from function key - translation.) - Improve touch screen support + * src/keyboard.c (read_key_sequence): Don't generate *-bar prefix + keys for mock input (such as input from function key translation.) + * doc/emacs/input.texi (Touchscreens): Document the new feature for people who have trouble dragging to word boundaries. - * lisp/touch-screen.el (touch-screen-word-select): New - defcustom. + + * lisp/touch-screen.el (touch-screen-word-select): New defcustom. (touch-screen-word-select-bounds) (touch-screen-word-select-initial-word): New variable definitions. @@ -840,25 +802,24 @@ (touch-screen-translate-touch): Fix doc strings and fill comments. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-07-16 Po Lu - Update Android port * java/org/gnu/emacs/EmacsService.java (displayToast): * src/android.c (android_init_emacs_service): Remove unused function. + * lisp/touch-screen.el (touch-screen-handle-point-up): Correctly compute posn point. (touch-screen-translate-touch): Update doc string. (function-key-map): Define touch screen translation functions within the internal border. - Update Android port * doc/lispref/commands.texi (Touchscreen Events): Improve documentation. + * lisp/tab-bar.el (tab-bar-map): Bind `[tab-bar touchscreen-hold]'. + * lisp/touch-screen.el (touch-screen-hold, touch-screen-drag): New functions. (touch-screen-handle-timeout): Generate a `touchscreen-hold' @@ -867,33 +828,37 @@ `touchscreen-drag' event upon dragging. (touch-screen-translate-touch): Cancel touch screen timer upon exit. + * src/keyboard.c (access_keymap_keyremap): Take unsigned int start and end instead. - Improve touch-screen support * doc/emacs/emacs.texi (Top): * doc/emacs/input.texi (Other Input Devices): Correctly capitalize subsection name. (Touchscreens): Document additional translation. + * doc/lispref/commands.texi (Touchscreen Events): Document that `touchscreen-end' events now have prefix keys. Also, describe mouse emulation and `touchscreen-scroll' events. + * doc/lispref/keymaps.texi (Translation Keymaps): Document `current-key-remap-sequence'. + * lisp/touch-screen.el (touch-screen-translate-prompt): New function. - (touch-screen-scroll): New command. Bind to - `touchscreen-scroll'. + (touch-screen-scroll): New command. Bind to `touchscreen-scroll'. (touch-screen-handle-point-update, touch-screen-handle-point-up) - (touch-screen-handle-touch): Refactor to actually translate - touch screen event sequences, as opposed to looking up commands - and executing them. + (touch-screen-handle-touch): Refactor to actually translate touch + screen event sequences, as opposed to looking up commands and + executing them. (touch-screen-translate-touch): New function. Bind in function-key-map to all touch screen events. (touch-screen-drag-mode-line-1, touch-screen-drag-mode-line) (touch-screen-tap-header-line): Remove special commands for dragging the mode line and clicking on the header line. + * lisp/wid-edit.el (widget-button-click): Adjust accordingly. + * src/keyboard.c (access_keymap_keyremap): Bind `current-key-remap-sequence' to the key sequence being remapped. (keyremap_step): Give fkey->start and fkey->end to @@ -902,158 +867,153 @@ well. (syms_of_keyboard): New variable Vcurrent_key_remap_sequence. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-07-15 Po Lu - Update Android port * doc/emacs/android.texi (Android): Add new node to menu. (Android Environment): Add footnote pointing to new node. (Android Software): New node. + * doc/emacs/emacs.texi (Top): Add new node to menu. + * java/AndroidManifest.xml.in (manifest): Fix location of sharedUserId property. + * java/INSTALL: Improve documentation of shared user ID support. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-07-14 Po Lu - Make --with-shared-user-id work * configure.ac (ANDROID_SHARED_USER_NAME): New variable. Substitute it. + * java/AndroidManifest.xml.in: Set `sharedUserLabel' if a shared user ID is enabled. + * java/res/values/strings.xml (shared_user_name): New string resource. - Update Android port * src/android.c (android_blit_copy): Don't check for overflow where not required. - Merge remote-tracking branch 'origin/master' into feature/android - - Clean up Android debug code * java/org/gnu/emacs/EmacsInputConnection.java - (getSurroundingText): Don't print debug information if DEBUG_IC - is off. + (getSurroundingText): Don't print debug information if DEBUG_IC is + off. * lisp/calc/calc.el (calc): Fix typo. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-07-13 Po Lu - Add a Doc View tool bar * etc/NEWS: Announce the new tool bar. + * etc/images/last-page.xpm: * etc/images/last-page.pbm: New images. Mirrored from next-page.xpm. + * lisp/doc-view.el (doc-view-menu): Use `doc-view-new-search' instead of an anonymous function. (doc-view-tool-bar-map): New keymap. - (doc-view-search): Update the tool bar after initiating a - search. + (doc-view-search): Update the tool bar after initiating a search. (doc-view-new-search): New command. (doc-view-mode): Set the tool bar map appropriately. - Improve workaround for partial texture updates on Android + Restore hardware acceleration, as a small degree of tearing is + preferable towards large slowdowns on some specific devices. The + slight tearing remains, but a workaround for the GPU texture + remaining partially updated has been introduced. + * java/AndroidManifest.xml.in: * java/org/gnu/emacs/EmacsDialog.java (toAlertDialog): Don't change hardware acceleration state. + * java/org/gnu/emacs/EmacsNative.java (notifyPixelsChanged): New function. + * java/org/gnu/emacs/EmacsSurfaceView.java (EmacsSurfaceView): New field `bitmapChanged'. (copyToFrontBuffer): Signal that the bitmap has changed. - (onDraw): If the bitmap has changed, increment the generation - ID. + (onDraw): If the bitmap has changed, increment the generation ID. + * src/android.c (JNICALL): Implement new function. 2023-07-13 Po Lu - Disable hardware acceleration on Android - It serves no purpose and causes tearing. Uploading the bitmap - to the GPU takes about as long as it does to incrementally - update the surface in software. + Disable hardware acceleration on Android. It serves no purpose + and causes tearing. Uploading the bitmap to the GPU takes about + as long as it does to incrementally update the surface in + software. * java/AndroidManifest.xml.in: Disable hardware acceleration. + * java/org/gnu/emacs/EmacsActivity.java (EmacsActivity): Make lastClosedMenu static. + * java/org/gnu/emacs/EmacsDialog.java (toAlertDialog): Enable hardware acceleration within alert dialogs. + * java/org/gnu/emacs/EmacsSurfaceView.java (onDraw): Describe why hardware acceleration is disabled. + * java/org/gnu/emacs/EmacsWindow.java (run): Remove redundant call. -2023-07-13 Po Lu - - Merge remote-tracking branch 'origin/master' into feature/android - 2023-07-12 Po Lu * src/android.c (android_run_select_thread): Fix typo. - Update Android port - * src/android.c (android_run_select_thread): Correctly return - the set of ready read and write descriptors on __ANDROID_API__ < - 16 systems. + * src/android.c (android_run_select_thread): Correctly return the + set of ready read and write descriptors on __ANDROID_API__ < 16 + systems. (android_select): Clear the set of ready file descriptors if events from the event queue are present despite pselect failing. - Fix keyboard state translation on Android * src/androidterm.c (android_android_to_emacs_modifiers) (android_emacs_to_android_modifiers): Fix statement precedence bugs. * src/doc.c (doc_close): Remove unused macro. - Update Android port * java/org/gnu/emacs/EmacsWindow.java (whatButtonWasIt): Handle back and forward buttons along with styluses. + * src/doc.c (close_file_unwind_android_fd): New function. (get_doc_string, Fsnarf_documentation): Don't create a temporary fd if it can be avoided. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-07-11 Po Lu - Fix doc file generation on Android * .gitignore: Ignore cross/etc/DOC. + * configure.ac: Make the directory `cross/etc'. + * cross/Makefile.in (CLEAN_SUBDIRS): Clean files inside `etc' as well. + * java/Makefile.in (install_temp): Copy cross/etc/DOC to the package if it is available. + * src/Makefile.in (SOME_MACHINE_OBJECTS): Add androidselect.c, sfntfont-android.c and sfntfont.c. (libemacs.so): Depend on $(etc)/DOC. - Update Android port * src/sfnt.c (sfnt_fill_span): Correctly clip span to raster width, ensuring that the last pixel is filled. (main): Adjust test sizes. - Update Android port * java/org/gnu/emacs/EmacsView.java (onGenericMotionEvent): Call onGenericMotionEvent. + * java/org/gnu/emacs/EmacsWindow.java (Coordinate): New fields `button' and `id'. (): Add new arguments to the construtor. (whatButtonWasIt): Return 0 if the button state has not changed. (buttonForEvent): New function. - (figureChange): Return the Coordinate object associated to - EVENT. Determine whether or not EVENT was accompanied by a - change to the button state, and ascertain which button that was. + (figureChange): Return the Coordinate object associated to EVENT. + Determine whether or not EVENT was accompanied by a change to the + button state, and ascertain which button that was. (motionEvent): New function. (onGenericMotionEvent, onTouchEvent): Factor out touch and mouse event delivery to motionEvent. - Merge remote-tracking branch 'origin/master' into feature/android - 2023-07-10 Po Lu Update Android port commit dcaf424cb6b6527f5f31b62674aad339a5058d32 Author: Mattias Engdegård Date: Mon Aug 14 10:16:32 2023 +0200 Revert "* lisp/emacs-lisp/ert.el (ert-run-tests-batch-and-exit): Inhibit interaction" This reverts commit bb9133f09dafb069cafe2bea72452bd34b3d6dd2, because it inadvertently made many tests fail. diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index cd4b9c5a2b3..be9f013ebcf 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -1540,9 +1540,7 @@ ert-run-tests-batch-and-exit (or noninteractive (user-error "This function is only for use in batch mode")) (let ((eln-dir (and (featurep 'native-compile) - (make-temp-file "test-nativecomp-cache-" t))) - ;; Don't ever wait for user input. - (inhibit-interaction t)) + (make-temp-file "test-nativecomp-cache-" t)))) (when eln-dir (startup-redirect-eln-cache eln-dir)) ;; Better crash loudly than attempting to recover from undefined commit b9b4d8689fa78a5696a5e2d96a08a761fbf3cc82 Merge: 9fb00904f95 fdab7aaadac Author: Michael Albinus Date: Mon Aug 14 09:45:07 2023 +0200 Merge from origin/emacs-29 fdab7aaadac ; * lisp/net/tramp.el (tramp-skeleton-write-region): Fix ... 3eff53b4564 Update to Org 9.6.7-13-g99cc96 commit fdab7aaadacaaddef2733a9dae0dea643feb7481 Author: Michael Albinus Date: Mon Aug 14 09:42:43 2023 +0200 ; * lisp/net/tramp.el (tramp-skeleton-write-region): Fix last change. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index caa6baabc31..d10f93b34b2 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3781,7 +3781,7 @@ tramp-skeleton-write-region ;; likely that it is needed shortly after `write-region'. (tramp-set-file-property v localname "file-exists-p" t) - (let ((need-chown t)) + (let (last-coding-system-used (need-chown t)) ;; Set file modification time. (when (or (eq ,visit t) (stringp ,visit)) (when-let ((file-attr (file-attributes filename 'integer))) commit 3eff53b4564ba7633807d67708dc9337765db259 Author: Kyle Meyer Date: Sun Aug 13 22:11:45 2023 -0400 Update to Org 9.6.7-13-g99cc96 diff --git a/lisp/org/ol-bibtex.el b/lisp/org/ol-bibtex.el index fd9517233e0..a16a4b39277 100644 --- a/lisp/org/ol-bibtex.el +++ b/lisp/org/ol-bibtex.el @@ -761,7 +761,10 @@ org-bibtex-yank "If kill ring holds a bibtex entry yank it as an Org headline." (interactive) (let (entry) - (with-temp-buffer (yank 1) (setf entry (org-bibtex-read))) + (with-temp-buffer + (yank 1) + (bibtex-mode) + (setf entry (org-bibtex-read))) (if entry (org-bibtex-write) (error "Yanked text does not appear to contain a BibTeX entry")))) diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index d7fe14cd5e1..b85ce6a6368 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -2069,6 +2069,7 @@ org-clock-display h m)))) (defvar-local org-clock-overlays nil) +(put 'org-clock-overlays 'permanent-local t) (defun org-clock-put-overlay (time) "Put an overlay on the headline at point, displaying TIME. diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el index 92a3b473d15..28cfd0d910c 100644 --- a/lisp/org/org-colview.el +++ b/lisp/org/org-colview.el @@ -116,6 +116,7 @@ org-columns-summary-types (defvar-local org-columns-overlays nil "Holds the list of current column overlays.") +(put 'org-columns-overlays 'permanent-local t) (defvar-local org-columns-current-fmt nil "Local variable, holds the currently active column format.") diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el index df43ebcf0c5..296468eed1a 100644 --- a/lisp/org/org-element.el +++ b/lisp/org/org-element.el @@ -6567,7 +6567,9 @@ org-element--parse-to ;; Make sure that we return referenced element in cache ;; that can be altered directly. (if element - (setq element (or (org-element--cache-put element) element)) + (progn + (org-element-put-property element :granularity 'element) + (setq element (or (org-element--cache-put element) element))) ;; Nothing to parse (i.e. empty file). (throw 'exit parent)) (unless (or (not (org-element--cache-active-p)) parent) @@ -6942,12 +6944,13 @@ org-element--cache-for-removal (let ((current (org-with-point-at (org-element-property :begin up) (org-element-with-disabled-cache (and (looking-at-p org-element-headline-re) - (org-element-headline-parser)))))) + (org-element-headline-parser nil 'fast)))))) (when (eq 'headline (org-element-type current)) (org-element--cache-log-message "Found non-robust headline that can be updated individually: %S" (org-element--format-element current)) (org-element-set-element up current) + (org-element-put-property up :granularity 'element) t))) ;; If UP is org-data, the situation is similar to ;; headline case. We just need to re-parse the diff --git a/lisp/org/org-num.el b/lisp/org/org-num.el index cbe5e455ea6..807fa66223b 100644 --- a/lisp/org/org-num.el +++ b/lisp/org/org-num.el @@ -156,6 +156,7 @@ org-num--comment-re (defvar-local org-num--overlays nil "Ordered list of overlays used for numbering outlines.") +(put 'org-num--overlays 'permanent-local t) (defvar-local org-num--skip-level nil "Level below which headlines from current tree are not numbered. diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 83bad3f3a64..fd10ccf576f 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -477,6 +477,7 @@ org-table-row-get-visible-string (format "|%s" (mapconcat #'identity (reverse str) ""))))) (defvar-local org-table-header-overlay nil) +(put 'org-table-header-overlay 'permanent-local t) (defun org-table-header-set-header () "Display the header of the table at point." (let ((gcol temporary-goal-column)) @@ -3812,6 +3813,7 @@ org-table-remove-rectangle-highlight (defvar-local org-table-coordinate-overlays nil "Collects the coordinate grid overlays, so that they can be removed.") +(put 'org-table-coordinate-overlays 'permanent-local t) (defun org-table-overlay-coordinates () "Add overlays to the table at point, to show row/column coordinates." diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el index 9116e298aa9..57e406b24fc 100644 --- a/lisp/org/org-version.el +++ b/lisp/org/org-version.el @@ -11,7 +11,7 @@ org-release (defun org-git-version () "The Git version of Org mode. Inserted by installing Org or when a release is made." - (let ((org-git-version "release_9.6.7-5-gd1d0c3")) + (let ((org-git-version "release_9.6.7-13-g99cc96")) org-git-version)) (provide 'org-version) diff --git a/lisp/org/org.el b/lisp/org/org.el index 0043c0407a9..c5c0808104f 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -5893,6 +5893,8 @@ org-toggle-pretty-entities (defvar-local org-custom-properties-overlays nil "List of overlays used for custom properties.") +;; Preserve when switching modes or when restarting Org. +(put 'org-custom-properties-overlays 'permanent-local t) (defun org-toggle-custom-properties-visibility () "Display or hide properties in `org-custom-properties'." @@ -10673,6 +10675,7 @@ org-sparse-tree (defvar-local org-occur-highlights nil "List of overlays used for occur matches.") +(put 'org-occur-highlights 'permanent-local t) (defvar-local org-occur-parameters nil "Parameters of the active org-occur calls. This is a list, each call to org-occur pushes as cons cell, @@ -16159,6 +16162,10 @@ org-normalize-color ;; Image display (defvar-local org-inline-image-overlays nil) +;; Preserve when switching modes or when restarting Org. +;; If we clear the overlay list and later enable Or mode, the existing +;; image overlays will never be cleared by `org-toggle-inline-images'. +(put 'org-inline-image-overlays 'permanent-local t) (defun org--inline-image-overlays (&optional beg end) "Return image overlays between BEG and END." diff --git a/lisp/org/ox-publish.el b/lisp/org/ox-publish.el index f9c3877d7df..cff34f05882 100644 --- a/lisp/org/ox-publish.el +++ b/lisp/org/ox-publish.el @@ -1183,7 +1183,8 @@ org-publish-resolve-external-link (org-link-search search nil t) (error (signal 'org-link-broken (cdr err))))) - (and (org-at-heading-p) + (and (derived-mode-p 'org-mode) + (org-at-heading-p) (org-string-nw-p (org-entry-get (point) "CUSTOM_ID")))))))) ((not org-publish-cache) (progn diff --git a/lisp/org/ox.el b/lisp/org/ox.el index 6f819def93a..94cc5a22881 100644 --- a/lisp/org/ox.el +++ b/lisp/org/ox.el @@ -5684,11 +5684,8 @@ org-export-smart-quotes-alist (primary-closing :utf-8 " »" :html " »" :latex "\\fg{}" :texinfo "@tie{}@guillemetright{}") - (secondary-opening - :utf-8 "« " :html "« " :latex "\\og " - :texinfo "@guillemetleft{}@tie{}") - (secondary-closing :utf-8 " »" :html " »" :latex "\\fg{}" - :texinfo "@tie{}@guillemetright{}") + (secondary-opening :utf-8 "“" :html "“" :latex "``" :texinfo "``") + (secondary-closing :utf-8 "”" :html "”" :latex "''" :texinfo "''") (apostrophe :utf-8 "’" :html "’")) ("is" (primary-opening