1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00
Commit Graph

167733 Commits

Author SHA1 Message Date
Po Lu
916ef57489 Update Android port
* exec/trace.c (handle_readlinkat): Adjust commentary to match
behavior.
* src/android.c (android_get_keysym_name): NULL terminate
*name_return.
2023-07-20 20:50:50 +08:00
Po Lu
1a9402b3c3 Update some menu definitions for Android
* lisp/international/mule-cmds.el (set-coding-system-map): Don't
display `set-terminal-coding-system' on Android.
2023-07-20 19:58:32 +08:00
Po Lu
9032d2178d * lisp/cus-edit.el (custom-display): Add `android' display type. 2023-07-20 19:52:44 +08:00
Po Lu
7196d2d18e Merge remote-tracking branch 'origin/master' into feature/android 2023-07-20 19:52:01 +08:00
Po Lu
f9bbe3189b Merge from origin/emacs-29
4bd8e8c6d2 ; * src/xdisp.c: Fix wording in commentary.
3af27a4b81 Improve commentary in nsfns.m
5de5e4b4d0 Fix typos and ommissions in cus-edit.el
9d93c6ba14 ; * src/xdisp.c: Fix typos in the commentary.
86f2d6d62f ; * src/xdisp.c: Improve commentary.  (Bug#64596)
ac075176bf ; * admin/notes/bugtracker: Fix punctuation.
8151853447 ; * admin/notes/bugtracker: Use 'e.g.' throughout the doc...
f063f79a49 Convert NUL-containing NSString objects to Lisp strings c...
d172cd5985 ; * doc/lispref/keymaps.texi (Modifying Menus): Add cross...
927e8b470f ; * doc/lispref/keymaps.texi (Extended Menu Items): Add @...
77f489421e ; * src/xdisp.c: Minor improvements of the commentary.
ce3f9fba1a ; Improve accuracy of out-out-order message insertion
17073af84d ; Improve robustness of package-report-bug
2023-07-20 19:50:45 +08:00
Po Lu
353f90c758 Update Android port
* src/android.c (struct android_event_queue): Don't make
unnecessarily volatile.
2023-07-20 19:49:47 +08:00
Eli Zaretskii
4bd8e8c6d2 ; * src/xdisp.c: Fix wording in commentary. 2023-07-20 13:23:01 +03:00
João Távora
7ff41bf8ed Eglot: fix textDocument/onTypeFormatting for 'newline' command
In the newline command, last-input-event is 13 (carriage return), but
most, if not all, language servers that support
documentOnTypeFormattingProvider expect 10 (linefeed) to be the
trigger, so convert 13 to 10 for the purposes of the
textDocument/onTypeFormatting request.

Also make this common edit silent in the mode-line/messages.

* lisp/progmodes/eglot.el (eglot--post-self-insert-hook): Convert
linefeed to carriage return.
(eglot-format): Pass SILENT to eglot--apply-text-edits.
(eglot--apply-text-edits): Take new optional SILENT arg.

* etc/EGLOT-NEWS: Mention change
2023-07-20 05:08:18 -05:00
Po Lu
3af27a4b81 Improve commentary in nsfns.m
* src/nsfns.m (lispString): Avoid C++ comment and make the
commentary actually relevant to the reason `make_string' is
used.
2023-07-20 16:01:34 +08:00
Po Lu
5de5e4b4d0 Fix typos and ommissions in cus-edit.el
* lisp/cus-edit.el (custom-display): Add missing display types.
2023-07-20 15:55:07 +08:00
Po Lu
b5121503e4 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.
2023-07-20 12:48:37 +08:00
Po Lu
7e8904e796 Use context menu header titles on Android
* 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.
2023-07-20 11:21:25 +08:00
Po Lu
4d3442ebad Merge remote-tracking branch 'origin/master' into feature/android 2023-07-20 09:23:06 +08:00
Po Lu
882e1d659f 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)
(dired-do-isearch-regexp, dired-do-search)
(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
mode.
(dired-post-do-command): New function.
(dired-do-delete): Call it.
(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.
2023-07-20 09:22:41 +08:00
Eli Zaretskii
9d93c6ba14 ; * src/xdisp.c: Fix typos in the commentary. 2023-07-19 19:28:48 +03:00
Eli Zaretskii
86f2d6d62f ; * src/xdisp.c: Improve commentary. (Bug#64596) 2023-07-19 17:54:53 +03:00
F. Jason Park
e2cc16fbd0 Warn when toggling erc-nicks-mode in target buffers
* lisp/erc/erc-nicks.el (erc-nicks-mode, erc-nicks-enable): This local
module isn't autoloaded like most global modules, in part to dissuade
users from attempting to enable it by running M-x erc-nicks-mode RET.
However, rather than signal an error upon detecting such an attempt,
ERC should explain that the only supported means of activation is via
`erc-modules'.  This change does that and then enables it anyway,
despite the degraded experience.
2023-07-19 06:11:21 -07:00
F. Jason Park
8af96d831f ; Address some ambiguities in ERC's documentation
* doc/misc/erc.texi: Change name of example function from
`erc-my-enable-read-indicator-on-join' to
`erc-my-enable-keep-place-indicator-on-join'.  Fix example functions
`erc-cmd-TRACK' and `erc-cmd-UNTRACK' to work with server buffers as
well as target buffers.
* etc/ERC-NEWS: Revise `keep-place' entry and make headlines less
redundant.
* lisp/erc/erc.el (erc-accidental-paste-threshold-seconds): Fix
portion of existing wording that was more likely interpreted as a
single multiline submission, whereas the intended meaning is three
separate submissions.
2023-07-19 06:11:21 -07:00
Eli Zaretskii
ac075176bf ; * admin/notes/bugtracker: Fix punctuation. 2023-07-19 15:05:52 +03:00
Arash Esbati
8151853447 ; * admin/notes/bugtracker: Use 'e.g.' throughout the document. 2023-07-19 15:03:32 +03:00
Alan Mackenzie
f9f9c95ab5 Fix native compilation in dynamically bound files.
This fixes bug#64642.

* lisp/emacs-lisp/comp.el (comp-spill-lap-function/symbol): Add
code for dynamically bound functions.

* test/src/comp-tests.el (comp-tests-result-lambda): New test.

* test/src/comp-resources/comp-test-funcs-dyn2.el: New test
file.

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch master
# Your branch is up to date with 'origin/master'.
#
# Changes to be committed:
#	modified:   lisp/emacs-lisp/comp.el
#	new file:   test/src/comp-resources/comp-test-funcs-dyn2.el
#	modified:   test/src/comp-tests.el
#
# Changes not staged for commit:
#	modified:   .gitignore
#
# Untracked files:
#	.gitignore.acm
#	.gitignore.backup
#	.timestamps.txt
#	2021-01-03.err
#	2021-01-06.err
#	2021-12-16.make
#	2021-12-30.err
#	2021-12-31.err
#	2022-01-01.err
#	2022-01-02.check.err
#	2022-01-02.err
#	2022-01-04.err
#	2022-01-05.err
#	2022-01-06.err
#	2022-01-07.err
#	2022-01-07.outerr
#	2022-01-08.err
#	2022-01-09.err
#	2022-01-09b.err
#	2022-01-10.err
#	2022-01-11
#	2022-01-11.err
#	2022-02-22.err
#	2022-02-22.outerr
#	checkout.20220228.out
#	checkout.20220301.out
#	checkout.20220302.out
#	doc/lispref/syntax.20160318.techsi
#	doc/lispref/syntax.20160318b.techsi
#	lib/.deps/
#	lisp/2022-01-09.err
#	lisp/emacs-lisp/comp.el.rej
#	src/2021-12-20.err
#	src/globals.20211124.aitch
#	src/lisp.20211127.aitch
#	test/lisp/calendar/icalendar-tests.elcr5m9Wq
#
2023-07-19 11:26:11 +00:00
Po Lu
fb5e43040f Port file-name-case-insensitive-p to Haiku
* src/fileio.c (file_name_case_insensitive_err): Don't return
errno upon failure, just 1, since errno is not used in the sole
caller.
2023-07-19 07:03:12 +00:00
Po Lu
1eb24c6c38 ; * src/sfnt.c (sfnt_infer_deltas): Improve commentary. 2023-07-19 15:00:39 +08:00
Po Lu
b3054d69d8 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.
2023-07-19 14:42:02 +08:00
Po Lu
8b1c92da79 Improve commentary in xterm.c
* src/xterm.c (xi_populate_device_from_info, xi_handle_new_classes)
(syms_of_xterm): Improve commentary on touch events.
2023-07-19 13:51:41 +08:00
Po Lu
db48c88e7e 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.
(touch-screen-handle-point-update): Handle `restart-drag'
gestures.
(touch-screen-handle-touch): Check if the prerequisites for
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.
2023-07-19 12:46:02 +08:00
Po Lu
69828fba28 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.
(build-counter.c): New target.  Generate this file using
makecounter.sh upon changes to lisp.mk or shortlisp.
(lisp.mk): Make and load relative to abs_top_builddir.
(emacs$(EXEEXT)): Adjust acordingly.
(mostlyclean): Remove build-counter.c.
2023-07-19 09:53:58 +08:00
Po Lu
5a3de76532 Merge remote-tracking branch 'origin/master' into feature/android 2023-07-19 08:23:06 +08:00
Po Lu
a4087f5955 Improve reliability of minor mode menu dispatch
* lisp/mouse.el (minor-mode-menu-from-indicator): Instead of using the
word at point, search for a matching enabled minor mode from the
beginning of the string object when mode-line-compact is enabled.
2023-07-19 08:21:43 +08:00
Po Lu
a177e8fd18 Merge remote-tracking branch 'origin/master' into feature/android 2023-07-19 07:54:08 +08:00
Jim Porter
dec15620d8 ; * etc/NEWS (Eshell): Fix typo. 2023-07-18 14:07:03 -07:00
Eli Zaretskii
f624b283bf Fix line number display under 'mode-line-format-right-align'
* src/xdisp.c (Fbuffer_text_pixel_size): Restore window attributes
important for redisplay of the target WINDOW.  (Bug#64713)
2023-07-18 21:06:30 +03:00
Po Lu
f13c0464cc Fix typos in touch-screen.el
* lisp/touch-screen.el (touch-screen-handle-point-update)
(touch-screen-handle-point-up): Fix typos.
2023-07-18 22:01:17 +08:00
Mattias Engdegård
f063f79a49 Convert NUL-containing NSString objects to Lisp strings correctly
This cures the inability to paste text containing NUL from other
applications on macOS, introduced by mistake in 7e3c2b553f
(bug#64697).

* src/nsfns.m ([NSString lispString]): Use make_string instead of
build_string which relies on NUL-termination.
2023-07-18 15:51:37 +02:00
Po Lu
a636a66070 Merge remote-tracking branch 'origin/master' into feature/android 2023-07-18 21:26:56 +08:00
Po Lu
607f826edd Fix event data leak
* src/xterm.c (handle_one_xevent): Jump to XI_OTHER after
handling touch ownership event.
2023-07-18 21:26:05 +08:00
Eli Zaretskii
d172cd5985 ; * doc/lispref/keymaps.texi (Modifying Menus): Add cross-references. 2023-07-18 16:17:15 +03:00
Eli Zaretskii
927e8b470f ; * doc/lispref/keymaps.texi (Extended Menu Items): Add @pxref. 2023-07-18 15:57:01 +03:00
Eli Zaretskii
77f489421e ; * src/xdisp.c: Minor improvements of the commentary. 2023-07-18 14:58:09 +03:00
Po Lu
ef497028bd Merge remote-tracking branch 'origin/master' into feature/android 2023-07-18 16:17:28 +08:00
Po Lu
c4f8ead08d Fix display of minor mode menus when mode-line-compact is enabled
* lisp/mouse.el (minor-mode-menu-from-indicator): New arg
WINDOW.  If INDICATOR is a string object and mode-line-compat is
enabled within WINDOW, use the symbol within the object at its
position instead.
(mouse-minor-mode-menu): Pass posn-object and posn-window to
minor-mode-menu-from-indicator.
2023-07-18 16:15:05 +08:00
Po Lu
cf50cd99ce * lisp/touch-screen.el (touch-screen-handle-point-update): Fix typo. 2023-07-18 15:46:07 +08:00
Po Lu
7cd11a71fa Avoid splurious menu-bar nil events
* src/keyboard.c (make_lispy_event): Return nil if no menu item
is found.
2023-07-18 13:24:55 +08:00
Po Lu
eaf13bc739 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.
2023-07-18 13:24:36 +08:00
Po Lu
48329b7914 Update Android port
* lisp/touch-screen.el (touch-screen-handle-touch): Fix
treatment of stray update events.
2023-07-18 12:16:05 +08:00
Po Lu
391c084355 Don't enable scroll-bar-mode by default on Android
* src/frame.c (syms_of_frame): Default to nil if HAVE_ANDROID.
2023-07-18 12:08:04 +08:00
Po Lu
07716075db ; * src/keyboard.c (make_lispy_event): Fix botched merge. 2023-07-18 10:15:16 +08:00
Po Lu
5ff31bf36c 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.
2023-07-18 10:12:40 +08:00
Po Lu
46fd03a496 Merge remote-tracking branch 'origin/master' into feature/android 2023-07-18 09:29:16 +08:00
Po Lu
9ad601e7d7 Expose the ``cancellation'' of touch events to Lisp
* doc/lispref/commands.texi (Touchscreen Events):
* etc/NEWS: Describe new event parameter `canceled'.
* src/keyboard.c (make_lispy_event) <TOUCHSCREEN_END_EVENT>:
If event->modifiers, set canceled to t.

* src/termhooks.h (enum event_kind): Describe meaning of
modifiers in TOUCHSCREEN_END_EVENTs.
* src/xfns.c (setup_xi_event_mask): Select for
XI_TouchOwnership.
* src/xterm.c (xi_link_touch_point): Round X and Y and clear
ownership.
(xi_unlink_touch_point): Return 1 if the touch point is not
owned by Emacs, 2 otherwise.
(handle_one_xevent): Handle XI_TouchOwnership events and report
ownership correctly.
* src/xterm.h (enum xi_touch_ownership): New enum.  Write
commentary on XI touch sequence ownership.
(struct xi_touch_point_t): Use integer X and Y.  New field
`ownership'.  Adjust for alignment.
2023-07-18 09:28:14 +08:00