diff options
| author | Po Lu | 2023-08-17 08:45:57 +0800 |
|---|---|---|
| committer | Po Lu | 2023-08-17 08:45:57 +0800 |
| commit | 4509cda5c943964fc8a2983fd90f10b9c255f97a (patch) | |
| tree | 7282ff36a1cb667735ac65356fead2de6610f66f | |
| parent | cbe6b48b3620385a4c9eeb72b20d39cfe706da76 (diff) | |
| download | emacs-4509cda5c943964fc8a2983fd90f10b9c255f97a.tar.gz emacs-4509cda5c943964fc8a2983fd90f10b9c255f97a.zip | |
Update Android port
* configure.ac (emacs_cv_tputs_lib): Only circumvent termcap if
Android windowing support is enabled. (bug#65340)
* etc/PROBLEMS: Fix typo in section recouting problems with the
Anonymous Pro font.
* lisp/subr.el (event-start, event-end): Return the mouse
position list tied to touchscreen-begin and end events.
Reported by Stefan Monnier <monnier@iro.umontreal.ca>.
* lisp/version.el (emacs-build-system, emacs-build-time)
(emacs-repository-get-version, emacs-repository-get-branch):
Bypass Android specific code on non-GUI builds running on
Android. (bug#65340)
* lisp/wid-edit.el (widget-event-point): Remove now redundant
code.
| -rw-r--r-- | configure.ac | 2 | ||||
| -rw-r--r-- | etc/PROBLEMS | 2 | ||||
| -rw-r--r-- | lisp/subr.el | 40 | ||||
| -rw-r--r-- | lisp/version.el | 16 | ||||
| -rw-r--r-- | lisp/wid-edit.el | 6 |
5 files changed, 39 insertions, 27 deletions
diff --git a/configure.ac b/configure.ac index 8120935978d..4cf6751ab82 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -5992,7 +5992,7 @@ AC_DEFUN([tputs_link_source], [ | |||
| 5992 | # than to expect to find it in ncurses. | 5992 | # than to expect to find it in ncurses. |
| 5993 | # Also we need tputs and friends to be able to build at all. | 5993 | # Also we need tputs and friends to be able to build at all. |
| 5994 | AC_CACHE_CHECK([for library containing tputs], [emacs_cv_tputs_lib], | 5994 | AC_CACHE_CHECK([for library containing tputs], [emacs_cv_tputs_lib], |
| 5995 | [if test "${opsys}" = "mingw32" || test "$opsys" = "android"; then | 5995 | [if test "${opsys}" = "mingw32" || test x"$REALLY_ANDROID" = "xyes"; then |
| 5996 | emacs_cv_tputs_lib='none required' | 5996 | emacs_cv_tputs_lib='none required' |
| 5997 | else | 5997 | else |
| 5998 | # curses precedes termcap because of AIX (Bug#9736#35) and OpenIndiana. | 5998 | # curses precedes termcap because of AIX (Bug#9736#35) and OpenIndiana. |
diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 6a4c8cdb34c..6fe0b93f538 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS | |||
| @@ -3400,7 +3400,7 @@ results that are easier to read. | |||
| 3400 | 3400 | ||
| 3401 | ** The "Anonymous Pro" font displays incorrectly. | 3401 | ** The "Anonymous Pro" font displays incorrectly. |
| 3402 | 3402 | ||
| 3403 | Glyphs instruction code within the Anonymous Pro font relies on | 3403 | Glyph instruction code within the Anonymous Pro font relies on |
| 3404 | undocumented features of the Microsoft TrueType font scaler, namely | 3404 | undocumented features of the Microsoft TrueType font scaler, namely |
| 3405 | that the scaler always resets the "projection" and "freedom" vector | 3405 | that the scaler always resets the "projection" and "freedom" vector |
| 3406 | interpreter control registers after the execution of the font | 3406 | interpreter control registers after the execution of the font |
diff --git a/lisp/subr.el b/lisp/subr.el index 616f0a8dfb6..f6bf7988e9d 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1651,8 +1651,9 @@ in the current Emacs session, then this function may return nil." | |||
| 1651 | 1651 | ||
| 1652 | (defun event-start (event) | 1652 | (defun event-start (event) |
| 1653 | "Return the starting position of EVENT. | 1653 | "Return the starting position of EVENT. |
| 1654 | EVENT should be a mouse click, drag, or key press event. If | 1654 | EVENT should be a mouse click, drag, touch screen, or key press |
| 1655 | EVENT is nil, the value of `posn-at-point' is used instead. | 1655 | event. If EVENT is nil, the value of `posn-at-point' is used |
| 1656 | instead. | ||
| 1656 | 1657 | ||
| 1657 | The following accessor functions are used to access the elements | 1658 | The following accessor functions are used to access the elements |
| 1658 | of the position: | 1659 | of the position: |
| @@ -1675,27 +1676,32 @@ nil or (STRING . POSITION)'. | |||
| 1675 | 1676 | ||
| 1676 | For more information, see Info node `(elisp)Click Events'." | 1677 | For more information, see Info node `(elisp)Click Events'." |
| 1677 | (declare (side-effect-free t)) | 1678 | (declare (side-effect-free t)) |
| 1678 | (or (and (consp event) | 1679 | (if (or (eq (car event) 'touchscreen-begin) |
| 1679 | ;; Ignore touchscreen events. They store the posn in a | 1680 | (eq (car event) 'touchscreen-end)) |
| 1680 | ;; different format, and can have multiple posns. | 1681 | ;; Touch screen begin and end events save their information in a |
| 1681 | (not (memq (car event) '(touchscreen-begin | 1682 | ;; different format, where the mouse position list is the cdr of |
| 1682 | touchscreen-update | 1683 | ;; (nth 1 event). |
| 1683 | touchscreen-end))) | 1684 | (cdadr event) |
| 1684 | (nth 1 event)) | 1685 | (or (and (consp event) |
| 1685 | (event--posn-at-point))) | 1686 | ;; Ignore touchscreen update events. They store the posn |
| 1687 | ;; in a different format, and can have multiple posns. | ||
| 1688 | (not (eq (car event) 'touchscreen-update)) | ||
| 1689 | (nth 1 event)) | ||
| 1690 | (event--posn-at-point)))) | ||
| 1686 | 1691 | ||
| 1687 | (defun event-end (event) | 1692 | (defun event-end (event) |
| 1688 | "Return the ending position of EVENT. | 1693 | "Return the ending position of EVENT. |
| 1689 | EVENT should be a click, drag, or key press event. | 1694 | EVENT should be a click, drag, touch screen, or key press event. |
| 1690 | 1695 | ||
| 1691 | See `event-start' for a description of the value returned." | 1696 | See `event-start' for a description of the value returned." |
| 1692 | (declare (side-effect-free t)) | 1697 | (declare (side-effect-free t)) |
| 1693 | (or (and (consp event) | 1698 | (if (or (eq (car event) 'touchscreen-begin) |
| 1694 | (not (memq (car event) '(touchscreen-begin | 1699 | (eq (car event) 'touchscreen-end)) |
| 1695 | touchscreen-update | 1700 | (cdadr event) |
| 1696 | touchscreen-end))) | 1701 | (or (and (consp event) |
| 1697 | (nth (if (consp (nth 2 event)) 2 1) event)) | 1702 | (not (eq (car event) 'touchscreen-update)) |
| 1698 | (event--posn-at-point))) | 1703 | (nth (if (consp (nth 2 event)) 2 1) event)) |
| 1704 | (event--posn-at-point)))) | ||
| 1699 | 1705 | ||
| 1700 | (defsubst event-click-count (event) | 1706 | (defsubst event-click-count (event) |
| 1701 | "Return the multi-click count of EVENT, a click or drag event. | 1707 | "Return the multi-click count of EVENT, a click or drag event. |
diff --git a/lisp/version.el b/lisp/version.el index ca61f8cfeee..0eb4ea76f4f 100644 --- a/lisp/version.el +++ b/lisp/version.el | |||
| @@ -61,13 +61,19 @@ returned by `current-time'." | |||
| 61 | (string-to-number (match-string 1 emacs-version))) | 61 | (string-to-number (match-string 1 emacs-version))) |
| 62 | "Minor version number of this version of Emacs.") | 62 | "Minor version number of this version of Emacs.") |
| 63 | 63 | ||
| 64 | (defconst emacs-build-system (or (and (eq system-type 'android) | 64 | ;; N.B. (featurep 'android) is tested for in addition to |
| 65 | ;; `system-type', because that can also be Android on a TTY-only | ||
| 66 | ;; Android build that doesn't employ the window system packaging | ||
| 67 | ;; support. (bug#65319) | ||
| 68 | (defconst emacs-build-system (or (and (featurep 'android) | ||
| 69 | (eq system-type 'android) | ||
| 65 | (android-read-build-system)) | 70 | (android-read-build-system)) |
| 66 | (system-name)) | 71 | (system-name)) |
| 67 | "Name of the system on which Emacs was built, or nil if not available.") | 72 | "Name of the system on which Emacs was built, or nil if not available.") |
| 68 | 73 | ||
| 69 | (defconst emacs-build-time (if emacs-build-system | 74 | (defconst emacs-build-time (if emacs-build-system |
| 70 | (or (and (eq system-type 'android) | 75 | (or (and (featurep 'android) |
| 76 | (eq system-type 'android) | ||
| 71 | (android-read-build-time)) | 77 | (android-read-build-time)) |
| 72 | (current-time))) | 78 | (current-time))) |
| 73 | "Time at which Emacs was dumped out, or nil if not available.") | 79 | "Time at which Emacs was dumped out, or nil if not available.") |
| @@ -183,7 +189,8 @@ correspond to the running Emacs. | |||
| 183 | 189 | ||
| 184 | Optional argument DIR is a directory to use instead of `source-directory'. | 190 | Optional argument DIR is a directory to use instead of `source-directory'. |
| 185 | Optional argument EXTERNAL is ignored." | 191 | Optional argument EXTERNAL is ignored." |
| 186 | (cond ((eq system-type 'android) | 192 | (cond ((and (featurep 'android) |
| 193 | (eq system-type 'android)) | ||
| 187 | (emacs-repository-version-android)) | 194 | (emacs-repository-version-android)) |
| 188 | (t (emacs-repository-version-git | 195 | (t (emacs-repository-version-git |
| 189 | (or dir source-directory))))) | 196 | (or dir source-directory))))) |
| @@ -229,7 +236,8 @@ this reports on the current state of the sources, which may not | |||
| 229 | correspond to the running Emacs. | 236 | correspond to the running Emacs. |
| 230 | 237 | ||
| 231 | Optional argument DIR is a directory to use instead of `source-directory'." | 238 | Optional argument DIR is a directory to use instead of `source-directory'." |
| 232 | (cond ((eq system-type 'android) | 239 | (cond ((and (featurep 'android) |
| 240 | (eq system-type 'android)) | ||
| 233 | (emacs-repository-branch-android)) | 241 | (emacs-repository-branch-android)) |
| 234 | (t (emacs-repository-branch-git | 242 | (t (emacs-repository-branch-git |
| 235 | (or dir source-directory))))) | 243 | (or dir source-directory))))) |
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 9e7c31224e0..fabf590f6b8 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el | |||
| @@ -64,12 +64,10 @@ | |||
| 64 | 64 | ||
| 65 | ;;; Compatibility. | 65 | ;;; Compatibility. |
| 66 | 66 | ||
| 67 | (defun widget-event-point (event) | 67 | (defsubst widget-event-point (event) |
| 68 | "Character position of the end of event if that exists, or nil. | 68 | "Character position of the end of event if that exists, or nil. |
| 69 | EVENT can either be a mouse event or a touch screen event." | 69 | EVENT can either be a mouse event or a touch screen event." |
| 70 | (if (eq (car-safe event) 'touchscreen-begin) | 70 | (posn-point (event-end event))) |
| 71 | (posn-point (cdadr event)) | ||
| 72 | (posn-point (event-end event)))) | ||
| 73 | 71 | ||
| 74 | (defun widget-button-release-event-p (event) | 72 | (defun widget-button-release-event-p (event) |
| 75 | "Non-nil if EVENT is a mouse-button-release event object." | 73 | "Non-nil if EVENT is a mouse-button-release event object." |