Merge from savannah/emacs-30
99e510977b
Correct JNI string error checking and miscellaneous corre...bbe95a8cea
Correctly highlight SYMTAB in `awk-mode`9625e4af99
Fix formatting of tables with thead/tfoot but no tbody
This commit is contained in:
commit
14d2e89af1
7 changed files with 58 additions and 67 deletions
|
@ -2342,8 +2342,9 @@ See `outline-search-function' for BOUND, MOVE, BACKWARD and LOOKING-AT."
|
|||
(defun shr--fix-tbody (tbody)
|
||||
(nconc (list 'tbody (dom-attributes tbody))
|
||||
(cl-loop for child in (dom-children tbody)
|
||||
collect (if (or (stringp child)
|
||||
(not (eq (dom-tag child) 'tr)))
|
||||
for tag = (and (not (stringp child)) (dom-tag child))
|
||||
unless (or (eq tag 'thead) (eq tag 'tfoot))
|
||||
collect (if (not (eq tag 'tr))
|
||||
(list 'tr nil (list 'td nil child))
|
||||
child))))
|
||||
|
||||
|
|
|
@ -990,7 +990,7 @@
|
|||
"ERRNO" "FIELDWIDTHS" "FILENAME" "FNR" "FPAT" "FS" "FUNCTAB"
|
||||
"IGNORECASE" "LINT" "NF" "NR" "OFMT" "OFS" "ORS" "PREC"
|
||||
"PROCINFO" "RLENGTH" "ROUNDMODE" "RS" "RSTART" "RT" "SUBSEP"
|
||||
"SYNTAB" "TEXTDOMAIN") t) "\\>")
|
||||
"SYMTAB" "TEXTDOMAIN") t) "\\>")
|
||||
'font-lock-variable-name-face)
|
||||
|
||||
;; Special file names. (acm, 2002/7/22)
|
||||
|
|
|
@ -52,49 +52,6 @@ main (int argc, char **argv)
|
|||
args[0] = (char *) "/system/bin/app_process";
|
||||
#endif /* __x86_64__ || __aarch64__ || __mips64 */
|
||||
|
||||
/* Machines with ART require the boot classpath to be manually
|
||||
specified. Machines with Dalvik however refuse to do so, as they
|
||||
open the jars inside the BOOTCLASSPATH environment variable at
|
||||
startup, resulting in the following crash:
|
||||
|
||||
W/dalvikvm( 1608): Refusing to reopen boot DEX
|
||||
'/system/framework/core.jar'
|
||||
W/dalvikvm( 1608): Refusing to reopen boot DEX
|
||||
'/system/framework/bouncycastle.jar'
|
||||
E/dalvikvm( 1608): Too many exceptions during init (failed on
|
||||
'Ljava/io/IOException;' 'Re-opening BOOTCLASSPATH DEX files is
|
||||
not allowed')
|
||||
E/dalvikvm( 1608): VM aborting */
|
||||
|
||||
#if HAVE_DECL_ANDROID_GET_DEVICE_API_LEVEL
|
||||
if (android_get_device_api_level () < 21)
|
||||
{
|
||||
bootclasspath = NULL;
|
||||
goto skip_setup;
|
||||
}
|
||||
#else /* !HAVE_DECL_ANDROID_GET_DEVICE_API_LEVEL */
|
||||
if (__ANDROID_API__ < 21)
|
||||
{
|
||||
bootclasspath = NULL;
|
||||
goto skip_setup;
|
||||
}
|
||||
#endif /* HAVE_DECL_ANDROID_GET_DEVICE_API_LEVEL */
|
||||
|
||||
/* Next, obtain the boot class path. */
|
||||
bootclasspath = getenv ("BOOTCLASSPATH");
|
||||
|
||||
if (!bootclasspath)
|
||||
{
|
||||
fprintf (stderr, "The BOOTCLASSPATH environment variable"
|
||||
" is not set. As a result, Emacs does not know"
|
||||
" how to start app_process.\n"
|
||||
"This is likely a change in the Android platform."
|
||||
" Please report this to bug-gnu-emacs@gnu.org.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
skip_setup:
|
||||
|
||||
/* And the Emacs class path. */
|
||||
emacs_class_path = getenv ("EMACS_CLASS_PATH");
|
||||
|
||||
|
@ -115,23 +72,11 @@ main (int argc, char **argv)
|
|||
if (ld_library_path)
|
||||
setenv ("LD_LIBRARY_PATH", ld_library_path, 1);
|
||||
|
||||
if (bootclasspath)
|
||||
if (asprintf (&bootclasspath, "-Djava.class.path=%s",
|
||||
emacs_class_path) < 0)
|
||||
{
|
||||
if (asprintf (&bootclasspath, "-Djava.class.path=%s:%s",
|
||||
bootclasspath, emacs_class_path) < 0)
|
||||
{
|
||||
perror ("asprintf");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (asprintf (&bootclasspath, "-Djava.class.path=%s",
|
||||
emacs_class_path) < 0)
|
||||
{
|
||||
perror ("asprintf");
|
||||
return 1;
|
||||
}
|
||||
perror ("asprintf");
|
||||
return 1;
|
||||
}
|
||||
|
||||
args[1] = bootclasspath;
|
||||
|
|
|
@ -2019,6 +2019,8 @@ NATIVE_NAME (initEmacs) (JNIEnv *env, jobject object, jarray argv,
|
|||
c_argument
|
||||
= (*env)->GetStringUTFChars (env, (jstring) dump_file_object,
|
||||
NULL);
|
||||
if (!c_argument)
|
||||
emacs_abort ();
|
||||
|
||||
/* Copy the Java string data once. */
|
||||
dump_file = strdup (c_argument);
|
||||
|
@ -6497,18 +6499,18 @@ android_browse_url (Lisp_Object url, Lisp_Object send)
|
|||
buffer = (*android_java_env)->GetStringUTFChars (android_java_env,
|
||||
(jstring) value,
|
||||
NULL);
|
||||
android_exception_check_1 (value);
|
||||
android_exception_check_nonnull ((void *) buffer, value);
|
||||
|
||||
/* Otherwise, build the string describing the error. */
|
||||
tem = build_string_from_utf8 (buffer);
|
||||
tem = build_unibyte_string (buffer);
|
||||
|
||||
(*android_java_env)->ReleaseStringUTFChars (android_java_env,
|
||||
(jstring) value,
|
||||
buffer);
|
||||
|
||||
/* And return it. */
|
||||
/* And decode and return the same. */
|
||||
ANDROID_DELETE_LOCAL_REF (value);
|
||||
return tem;
|
||||
return code_convert_string_norecord (tem, Qandroid_jni, false);
|
||||
}
|
||||
|
||||
/* Tell the system to restart Emacs in a short amount of time, and
|
||||
|
|
|
@ -3162,6 +3162,37 @@ android_saf_exception_check (int n, ...)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* Verify that OBJECT is non-NULL. If NULL, free each of the N local
|
||||
references given as arguments, and clear exceptions.
|
||||
|
||||
Value is 1 if it be NULL, 0 otherwise. */
|
||||
|
||||
static int
|
||||
android_saf_check_nonnull (jobject object, int n, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
if (object)
|
||||
return 0;
|
||||
|
||||
va_start (ap, n);
|
||||
|
||||
/* Clear the active exception, making it safe to subsequently call
|
||||
other JNI functions. */
|
||||
(*android_java_env)->ExceptionClear (android_java_env);
|
||||
|
||||
/* Delete each of the N arguments. */
|
||||
|
||||
while (n > 0)
|
||||
{
|
||||
ANDROID_DELETE_LOCAL_REF (va_arg (ap, jobject));
|
||||
n--;
|
||||
}
|
||||
|
||||
va_end (ap);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Content authority-based vnode implementation.
|
||||
|
@ -6428,7 +6459,7 @@ android_saf_new_mkdir (struct android_vnode *vnode, mode_t mode)
|
|||
new_doc_id = (*android_java_env)->GetStringUTFChars (android_java_env,
|
||||
new_id, NULL);
|
||||
|
||||
if (android_saf_exception_check (3, name, id, uri))
|
||||
if (android_saf_check_nonnull (new_doc_id, 3, name, id, uri))
|
||||
return -1;
|
||||
|
||||
xfree (vp->document_id);
|
||||
|
|
7
test/lisp/net/shr-resources/table.html
Normal file
7
test/lisp/net/shr-resources/table.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<table>
|
||||
<thead><tr><th>A</th><th>B</th></tr></thead>
|
||||
<tr><td>1</td><td>2</td></tr>
|
||||
<tr><td>3</td><td>4</td></tr>
|
||||
5678
|
||||
<tfoot><tr><th>A</th><th>B</th></tr></tfoot>
|
||||
</table>
|
5
test/lisp/net/shr-resources/table.txt
Normal file
5
test/lisp/net/shr-resources/table.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
A B
|
||||
1 2
|
||||
3 4
|
||||
5678
|
||||
A B
|
Loading…
Add table
Reference in a new issue