# than to expect to find it in ncurses.
# Also we need tputs and friends to be able to build at all.
AC_CACHE_CHECK([for library containing tputs], [emacs_cv_tputs_lib],
-[if test "${opsys}" = "mingw32" || test "$opsys" = "android"; then
+[if test "${opsys}" = "mingw32" || test x"$REALLY_ANDROID" = "xyes"; then
emacs_cv_tputs_lib='none required'
else
# curses precedes termcap because of AIX (Bug#9736#35) and OpenIndiana.
** The "Anonymous Pro" font displays incorrectly.
-Glyphs instruction code within the Anonymous Pro font relies on
+Glyph instruction code within the Anonymous Pro font relies on
undocumented features of the Microsoft TrueType font scaler, namely
that the scaler always resets the "projection" and "freedom" vector
interpreter control registers after the execution of the font
(defun event-start (event)
"Return the starting position of EVENT.
-EVENT should be a mouse click, drag, or key press event. If
-EVENT is nil, the value of `posn-at-point' is used instead.
+EVENT should be a mouse click, drag, touch screen, or key press
+event. If EVENT is nil, the value of `posn-at-point' is used
+instead.
The following accessor functions are used to access the elements
of the position:
For more information, see Info node `(elisp)Click Events'."
(declare (side-effect-free t))
- (or (and (consp event)
- ;; Ignore touchscreen events. They store the posn in a
- ;; different format, and can have multiple posns.
- (not (memq (car event) '(touchscreen-begin
- touchscreen-update
- touchscreen-end)))
- (nth 1 event))
- (event--posn-at-point)))
+ (if (or (eq (car event) 'touchscreen-begin)
+ (eq (car event) 'touchscreen-end))
+ ;; Touch screen begin and end events save their information in a
+ ;; different format, where the mouse position list is the cdr of
+ ;; (nth 1 event).
+ (cdadr event)
+ (or (and (consp event)
+ ;; Ignore touchscreen update events. They store the posn
+ ;; in a different format, and can have multiple posns.
+ (not (eq (car event) 'touchscreen-update))
+ (nth 1 event))
+ (event--posn-at-point))))
(defun event-end (event)
"Return the ending position of EVENT.
-EVENT should be a click, drag, or key press event.
+EVENT should be a click, drag, touch screen, or key press event.
See `event-start' for a description of the value returned."
(declare (side-effect-free t))
- (or (and (consp event)
- (not (memq (car event) '(touchscreen-begin
- touchscreen-update
- touchscreen-end)))
- (nth (if (consp (nth 2 event)) 2 1) event))
- (event--posn-at-point)))
+ (if (or (eq (car event) 'touchscreen-begin)
+ (eq (car event) 'touchscreen-end))
+ (cdadr event)
+ (or (and (consp event)
+ (not (eq (car event) 'touchscreen-update))
+ (nth (if (consp (nth 2 event)) 2 1) event))
+ (event--posn-at-point))))
(defsubst event-click-count (event)
"Return the multi-click count of EVENT, a click or drag event.
(string-to-number (match-string 1 emacs-version)))
"Minor version number of this version of Emacs.")
-(defconst emacs-build-system (or (and (eq system-type 'android)
+;; N.B. (featurep 'android) is tested for in addition to
+;; `system-type', because that can also be Android on a TTY-only
+;; Android build that doesn't employ the window system packaging
+;; support. (bug#65319)
+(defconst emacs-build-system (or (and (featurep 'android)
+ (eq system-type 'android)
(android-read-build-system))
(system-name))
"Name of the system on which Emacs was built, or nil if not available.")
(defconst emacs-build-time (if emacs-build-system
- (or (and (eq system-type 'android)
+ (or (and (featurep 'android)
+ (eq system-type 'android)
(android-read-build-time))
(current-time)))
"Time at which Emacs was dumped out, or nil if not available.")
Optional argument DIR is a directory to use instead of `source-directory'.
Optional argument EXTERNAL is ignored."
- (cond ((eq system-type 'android)
+ (cond ((and (featurep 'android)
+ (eq system-type 'android))
(emacs-repository-version-android))
(t (emacs-repository-version-git
(or dir source-directory)))))
correspond to the running Emacs.
Optional argument DIR is a directory to use instead of `source-directory'."
- (cond ((eq system-type 'android)
+ (cond ((and (featurep 'android)
+ (eq system-type 'android))
(emacs-repository-branch-android))
(t (emacs-repository-branch-git
(or dir source-directory)))))
;;; Compatibility.
-(defun widget-event-point (event)
+(defsubst widget-event-point (event)
"Character position of the end of event if that exists, or nil.
EVENT can either be a mouse event or a touch screen event."
- (if (eq (car-safe event) 'touchscreen-begin)
- (posn-point (cdadr event))
- (posn-point (event-end event))))
+ (posn-point (event-end event)))
(defun widget-button-release-event-p (event)
"Non-nil if EVENT is a mouse-button-release event object."