mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Update Android port
* lisp/touch-screen.el (touch-screen-handle-point-up) <held>: Treat `held' as `drag' as well. * src/android.c (android_is_special_directory): Return bool rather than a pointer to the remainder of the file name, given that said pointer is never used. * src/android.h (android_is_special_directory): Modify correspondingly.
This commit is contained in:
parent
0346bf419a
commit
dc1ed3dbfa
3 changed files with 22 additions and 30 deletions
|
|
@ -1034,9 +1034,9 @@ If the fourth element of `touch-screen-current-tool' is
|
|||
original position of the tool to display its bound keymap as a
|
||||
menu.
|
||||
|
||||
If the fourth element of `touch-screen-current-tool' is `drag',
|
||||
the region is active, and the tool's initial window's selected
|
||||
buffer isn't read-only, display the on screen keyboard.
|
||||
If the fourth element of `touch-screen-current-tool' is `drag' or
|
||||
`held', the region is active, and the tool's initial window's
|
||||
selected buffer isn't read-only, display the on screen keyboard.
|
||||
|
||||
If the command being executed is listed in
|
||||
`touch-screen-set-point-commands' also display the on-screen
|
||||
|
|
@ -1159,7 +1159,10 @@ is not read-only."
|
|||
(throw 'input-event
|
||||
(list 'down-mouse-1
|
||||
(nth 4 touch-screen-current-tool))))
|
||||
((eq what 'drag)
|
||||
((or (eq what 'drag)
|
||||
;; Merely initiating a drag is sufficient to select a
|
||||
;; word if word selection is enabled.
|
||||
(eq what 'held))
|
||||
;; Display the on screen keyboard if the region is now
|
||||
;; active. Check this within the window where the tool was
|
||||
;; first place.
|
||||
|
|
|
|||
|
|
@ -833,22 +833,18 @@ android_user_full_name (struct passwd *pw)
|
|||
return (char *) "Android user";
|
||||
|
||||
return pw->pw_gecos;
|
||||
#else
|
||||
#else /* !HAVE_STRUCT_PASSWD_PW_GECOS */
|
||||
return "Android user";
|
||||
#endif
|
||||
#endif /* HAVE_STRUCT_PASSWD_PW_GECOS */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Determine whether or not the specified file NAME describes a file
|
||||
in the directory DIR, which should be an absolute file name. NAME
|
||||
must be in canonical form.
|
||||
/* Return whether or not the specified file NAME designates a file in
|
||||
the directory DIR, which should be an absolute file name. NAME
|
||||
must be in canonical form. */
|
||||
|
||||
Value is NULL if not. Otherwise, it is a pointer to the first
|
||||
character in NAME after the part containing DIR and its trailing
|
||||
directory separator. */
|
||||
|
||||
const char *
|
||||
bool
|
||||
android_is_special_directory (const char *name, const char *dir)
|
||||
{
|
||||
size_t len;
|
||||
|
|
@ -857,7 +853,7 @@ android_is_special_directory (const char *name, const char *dir)
|
|||
|
||||
len = strlen (dir);
|
||||
if (strncmp (name, dir, len))
|
||||
return NULL;
|
||||
return false;
|
||||
|
||||
/* Now see if the character of NAME after len is either a directory
|
||||
separator or a terminating NULL. */
|
||||
|
|
@ -865,20 +861,13 @@ android_is_special_directory (const char *name, const char *dir)
|
|||
name += len;
|
||||
switch (*name)
|
||||
{
|
||||
case '\0':
|
||||
/* Return the empty string if this is the end of the file
|
||||
name. */
|
||||
return name;
|
||||
|
||||
case '/':
|
||||
/* Return NAME (with the separator removed) if it describes a
|
||||
file. */
|
||||
return name + 1;
|
||||
|
||||
default:
|
||||
/* The file name doesn't match. */
|
||||
return NULL;
|
||||
case '\0': /* NAME is an exact match for DIR. */
|
||||
case '/': /* NAME is a constituent of DIR. */
|
||||
return true;
|
||||
}
|
||||
|
||||
/* The file name doesn't match. */
|
||||
return false;
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ extern char *android_user_full_name (struct passwd *);
|
|||
/* File I/O operations. Many of these are defined in
|
||||
androidvfs.c. */
|
||||
|
||||
extern const char *android_is_special_directory (const char *, const char *);
|
||||
extern bool android_is_special_directory (const char *, const char *);
|
||||
extern const char *android_get_home_directory (void);
|
||||
|
||||
extern void android_vfs_init (JNIEnv *, jobject);
|
||||
|
|
@ -238,7 +238,7 @@ extern int android_rewrite_spawn_argv (const char ***);
|
|||
|
||||
/* Define a substitute for use during Emacs compilation. */
|
||||
|
||||
#define android_is_special_directory(name, dir) ((const char *) NULL)
|
||||
#define android_is_special_directory(name, dir) (false)
|
||||
|
||||
#endif /* !ANDROID_STUBIFY */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue