]> git.eshelyaron.com Git - emacs.git/log
emacs.git
17 months agoUpdate Android port
Po Lu [Thu, 20 Jul 2023 11:49:47 +0000 (19:49 +0800)]
Update Android port

* src/android.c (struct android_event_queue): Don't make
unnecessarily volatile.

17 months agoUpdate Android port
Po Lu [Thu, 20 Jul 2023 04:48:37 +0000 (12:48 +0800)]
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.

17 months agoUse context menu header titles on Android
Po Lu [Thu, 20 Jul 2023 03:21:25 +0000 (11:21 +0800)]
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.

17 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Thu, 20 Jul 2023 01:23:06 +0000 (09:23 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

17 months agoIntroduce a `dired-click-select' mode
Po Lu [Thu, 20 Jul 2023 01:22:41 +0000 (09:22 +0800)]
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.

17 months agoWarn when toggling erc-nicks-mode in target buffers
F. Jason Park [Wed, 19 Jul 2023 05:18:00 +0000 (22:18 -0700)]
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.

17 months ago; Address some ambiguities in ERC's documentation
F. Jason Park [Sun, 16 Jul 2023 02:11:37 +0000 (19:11 -0700)]
; 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.

17 months agoFix native compilation in dynamically bound files.
Alan Mackenzie [Wed, 19 Jul 2023 11:23:00 +0000 (11:23 +0000)]
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
#

17 months agoPort file-name-case-insensitive-p to Haiku
Po Lu [Wed, 19 Jul 2023 07:03:12 +0000 (07:03 +0000)]
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.

17 months ago; * src/sfnt.c (sfnt_infer_deltas): Improve commentary.
Po Lu [Wed, 19 Jul 2023 07:00:39 +0000 (15:00 +0800)]
; * src/sfnt.c (sfnt_infer_deltas): Improve commentary.

17 months agoImprove behavior of `restart-drag'
Po Lu [Wed, 19 Jul 2023 06:42:02 +0000 (14:42 +0800)]
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.

17 months agoImprove commentary in xterm.c
Po Lu [Wed, 19 Jul 2023 05:51:41 +0000 (13:51 +0800)]
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.

17 months agoUpdate Android port
Po Lu [Wed, 19 Jul 2023 04:46:02 +0000 (12:46 +0800)]
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.

17 months agoMake sure Android builds are redumped upon changes to shortlisp
Po Lu [Wed, 19 Jul 2023 01:53:58 +0000 (09:53 +0800)]
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.

17 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Wed, 19 Jul 2023 00:23:06 +0000 (08:23 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

17 months agoImprove reliability of minor mode menu dispatch
Po Lu [Wed, 19 Jul 2023 00:21:43 +0000 (08:21 +0800)]
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.

17 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Tue, 18 Jul 2023 23:54:08 +0000 (07:54 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

17 months ago; * etc/NEWS (Eshell): Fix typo.
Jim Porter [Tue, 18 Jul 2023 21:07:03 +0000 (14:07 -0700)]
; * etc/NEWS (Eshell): Fix typo.

17 months agoFix line number display under 'mode-line-format-right-align'
Eli Zaretskii [Tue, 18 Jul 2023 18:06:30 +0000 (21:06 +0300)]
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)

17 months agoFix typos in touch-screen.el
Po Lu [Tue, 18 Jul 2023 14:01:17 +0000 (22:01 +0800)]
Fix typos in touch-screen.el

* lisp/touch-screen.el (touch-screen-handle-point-update)
(touch-screen-handle-point-up): Fix typos.

17 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Tue, 18 Jul 2023 13:26:56 +0000 (21:26 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

17 months agoFix event data leak
Po Lu [Tue, 18 Jul 2023 13:26:05 +0000 (21:26 +0800)]
Fix event data leak

* src/xterm.c (handle_one_xevent): Jump to XI_OTHER after
handling touch ownership event.

17 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Tue, 18 Jul 2023 08:17:28 +0000 (16:17 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

17 months agoFix display of minor mode menus when mode-line-compact is enabled
Po Lu [Tue, 18 Jul 2023 08:15:05 +0000 (16:15 +0800)]
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.

17 months ago* lisp/touch-screen.el (touch-screen-handle-point-update): Fix typo.
Po Lu [Tue, 18 Jul 2023 07:46:07 +0000 (15:46 +0800)]
* lisp/touch-screen.el (touch-screen-handle-point-update): Fix typo.

17 months agoAvoid splurious menu-bar nil events
Po Lu [Tue, 18 Jul 2023 05:24:55 +0000 (13:24 +0800)]
Avoid splurious menu-bar nil events

* src/keyboard.c (make_lispy_event): Return nil if no menu item
is found.

17 months agoUpdate Android port
Po Lu [Tue, 18 Jul 2023 05:24:36 +0000 (13:24 +0800)]
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.

17 months agoUpdate Android port
Po Lu [Tue, 18 Jul 2023 04:16:05 +0000 (12:16 +0800)]
Update Android port

* lisp/touch-screen.el (touch-screen-handle-touch): Fix
treatment of stray update events.

17 months agoDon't enable scroll-bar-mode by default on Android
Po Lu [Tue, 18 Jul 2023 04:08:04 +0000 (12:08 +0800)]
Don't enable scroll-bar-mode by default on Android

* src/frame.c (syms_of_frame): Default to nil if HAVE_ANDROID.

17 months ago; * src/keyboard.c (make_lispy_event): Fix botched merge.
Po Lu [Tue, 18 Jul 2023 02:15:16 +0000 (10:15 +0800)]
; * src/keyboard.c (make_lispy_event): Fix botched merge.

17 months agoUpdate Android port
Po Lu [Tue, 18 Jul 2023 02:12:40 +0000 (10:12 +0800)]
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.

17 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Tue, 18 Jul 2023 01:29:16 +0000 (09:29 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

17 months agoExpose the ``cancellation'' of touch events to Lisp
Po Lu [Tue, 18 Jul 2023 01:27:27 +0000 (09:27 +0800)]
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.

17 months agoDelete vc-deduce-fileset-1, taking advantage of set-buffer
Dmitry Gutov [Tue, 18 Jul 2023 00:49:44 +0000 (03:49 +0300)]
Delete vc-deduce-fileset-1, taking advantage of set-buffer

* lisp/vc/vc.el (vc-deduce-fileset): Set buffer to the base
buffer, if any (bug#63949).  That's to replace the more complex
previous strategy.  vc-deduce-fileset is allowed to change the
current buffer, so why not do it for that case.
(vc-deduce-fileset-1): Delete, moving the meat of the logic back
to vc-deduce-fileset.

17 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Tue, 18 Jul 2023 00:09:01 +0000 (08:09 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

17 months ago* lisp/bindings.el (mode--line-format-right-align): Add 'mode-line' face.
Juri Linkov [Mon, 17 Jul 2023 17:56:29 +0000 (20:56 +0300)]
* lisp/bindings.el (mode--line-format-right-align): Add 'mode-line' face.

Like in `tab-bar-format-align-right', use `add-face-text-property' to
add 'mode-line' face on the `rest-str' string for `string-pixel-width'
to calculate the correct pixel width (bug#62606).

17 months agoDon't distort character ranges in rx translation
Mattias Engdegård [Mon, 17 Jul 2023 11:05:21 +0000 (13:05 +0200)]
Don't distort character ranges in rx translation

The Emacs regexp engine interprets character ranges from ASCII to raw
bytes, such as [a-\xfe], as not including non-ASCII Unicode at all;
ranges from non-ACII Unicode to raw bytes, such as [ü-\x91], are
ignored entirely.

To make rx produce a translation that works as intended, split ranges
that that go from ordinary characters to raw bytes. Such ranges may
appear from set manipulation and regexp optimisation.

* lisp/emacs-lisp/rx.el (rx--generate-alt): Split intervals that
straddle the char-raw boundary when rendering a string regexp from an
interval set.
* test/lisp/emacs-lisp/rx-tests.el (rx-char-any-raw-byte):
Add test cases.

17 months agoEglot: check correct capability name in eglot-imenu (bug#64682)
Brian Leung [Mon, 17 Jul 2023 13:29:18 +0000 (14:29 +0100)]
Eglot: check correct capability name in eglot-imenu (bug#64682)

* lisp/progmodes/eglot.el (eglot-imenu): Declare the correct name of
the server capability providing textDocument/documentSymbol.

Without this change, eglot-imenu always aborts even when used with
servers supporting textDocument/documentSymbol.

17 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Mon, 17 Jul 2023 12:44:00 +0000 (20:44 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

17 months agoDon't deliver touch or pinch events from master or slave devices
Po Lu [Mon, 17 Jul 2023 12:42:56 +0000 (20:42 +0800)]
Don't deliver touch or pinch events from master or slave devices

* src/xfns.c (setup_xi_event_mask): Select for gesture events on
only master devices if safe.
* src/xterm.c (handle_one_xevent): Deliver touchscreen events
only from direct slave devices, and gesture events only from
master pointers.

17 months agoFix eshell.texi markup
Robert Pluim [Mon, 17 Jul 2023 08:10:48 +0000 (10:10 +0200)]
Fix eshell.texi markup

* doc/misc/eshell.texi (Aliases): Add missing @end table.  (Bug#64674)

17 months agoCheck correct bit for DNS truncation
Marc van der Wal [Mon, 17 Jul 2023 08:56:06 +0000 (10:56 +0200)]
Check correct bit for DNS truncation

* lisp/net/dns.el (dns-read): The TC bit is the second bit, not the
third bit.  (Bug#64678)

Copyright-paperwork-exempt: yes

17 months ago; * lisp/files.el (create-file-buffer): Add commentary.
Eli Zaretskii [Mon, 17 Jul 2023 11:36:44 +0000 (14:36 +0300)]
; * lisp/files.el (create-file-buffer): Add commentary.

17 months ago; * lisp/files.el (create-file-buffer): Fix last change (bug#62732).
Eli Zaretskii [Mon, 17 Jul 2023 11:34:35 +0000 (14:34 +0300)]
; * lisp/files.el (create-file-buffer): Fix last change (bug#62732).

17 months agoUpdate Android port
Po Lu [Mon, 17 Jul 2023 06:28:20 +0000 (14:28 +0800)]
Update Android port

* doc/lispref/commands.texi (Touchscreen Events): Document
meaning of `mouse-1-menu-command'.
* lisp/mouse.el (minor-mode-menu-from-indicator): New arg EVENT.
Give it to popup-menu.
(mouse-minor-mode-menu): Use posn specified within EVENT.
* lisp/touch-screen.el (touch-screen-handle-touch): Fix
interactive translation.  Treat commands labeled
`mouse-1-menu-command' like ordinary keymaps.

17 months agoUpdate Android port
Po Lu [Mon, 17 Jul 2023 05:58:32 +0000 (13:58 +0800)]
Update Android port

* doc/lispref/commands.texi (Touchscreen Events): Document
changes to simple translation.
* lisp/touch-screen.el (touch-screen-handle-point-up): Generate
`down-mouse-1' if the current gesture is `mouse-1-menu'.
(touch-screen-handle-touch): If binding is a keymap, set state
to `mouse-1-menu' and wait for point to be released before
generating down-mouse-1.

17 months agoImprove word selection behavior
Po Lu [Mon, 17 Jul 2023 04:58:29 +0000 (12:58 +0800)]
Improve word selection behavior

* lisp/tab-bar.el (tab-bar-map): Don't bind touch-screen-drag.
* lisp/touch-screen.el (touch-screen-drag): Extend the region
based on the position of the mark, not the position of point
relative to EVENT.
(touch-screen-translate-touch): Don't generate virtual function
keys for non-mouse events.
(function-key-map): Remove redundant definitions.
* src/keyboard.c (read_key_sequence): Don't generate *-bar
prefix keys for mock input (such as input from function key
translation.)

17 months agoImprove touch screen support
Po Lu [Mon, 17 Jul 2023 01:46:37 +0000 (09:46 +0800)]
Improve touch screen support

* doc/emacs/input.texi (Touchscreens): Document the new feature
for people who have trouble dragging to word boundaries.
* lisp/touch-screen.el (touch-screen-word-select): New
defcustom.
(touch-screen-word-select-bounds)
(touch-screen-word-select-initial-word): New variable
definitions.
(touch-screen-hold): If `touch-screen-word-select', select the
word around EVENT.
(touch-screen-drag): If `touch-screen-word-select', extend the
region to the next word boundary if the character under point
constitutes a word.
(touch-screen-handle-point-update, touch-screen-handle-touch)
(touch-screen-translate-touch): Fix doc strings and fill
comments.

17 months agoxdisp.c: Improve doc of `redisplay` flags a bit
Stefan Monnier [Mon, 17 Jul 2023 01:12:20 +0000 (21:12 -0400)]
xdisp.c: Improve doc of `redisplay` flags a bit

17 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Sun, 16 Jul 2023 23:29:11 +0000 (07:29 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

17 months agoUpdate Android port
Po Lu [Sun, 16 Jul 2023 12:10:18 +0000 (20:10 +0800)]
Update Android port

* java/org/gnu/emacs/EmacsService.java (displayToast):
* src/android.c (android_init_emacs_service): Remove unused
function.
* lisp/touch-screen.el (touch-screen-handle-point-up): Correctly
compute posn point.
(touch-screen-translate-touch): Update doc string.
(function-key-map): Define touch screen translation functions
within the internal border.

17 months agoUpdate Android port
Po Lu [Sun, 16 Jul 2023 09:29:58 +0000 (17:29 +0800)]
Update Android port

* doc/lispref/commands.texi (Touchscreen Events): Improve
documentation.
* lisp/tab-bar.el (tab-bar-map): Bind `[tab-bar
touchscreen-hold]'.
* lisp/touch-screen.el (touch-screen-hold, touch-screen-drag):
New functions.
(touch-screen-handle-timeout): Generate a `touchscreen-hold'
event instead.
(touch-screen-handle-point-update): Generate a
`touchscreen-drag' event upon dragging.
(touch-screen-translate-touch): Cancel touch screen timer upon
exit.
* src/keyboard.c (access_keymap_keyremap): Take unsigned int
start and end instead.

17 months agoFix Wdired with relative and abbreviated file names
Eli Zaretskii [Sun, 16 Jul 2023 09:15:24 +0000 (12:15 +0300)]
Fix Wdired with relative and abbreviated file names

* lisp/wdired.el (wdired-finish-edit): Support Dired buffers where
'dired-directory' is a list made of relative or abbreviated file
names.  (Bug#64606)

17 months agoImprove touch-screen support
Po Lu [Sun, 16 Jul 2023 07:30:01 +0000 (15:30 +0800)]
Improve touch-screen support

* doc/emacs/emacs.texi (Top):
* doc/emacs/input.texi (Other Input Devices): Correctly
capitalize subsection name.
(Touchscreens): Document additional translation.
* doc/lispref/commands.texi (Touchscreen Events): Document that
`touchscreen-end' events now have prefix keys.  Also, describe
mouse emulation and `touchscreen-scroll' events.
* doc/lispref/keymaps.texi (Translation Keymaps): Document
`current-key-remap-sequence'.
* lisp/touch-screen.el (touch-screen-translate-prompt): New
function.
(touch-screen-scroll): New command.  Bind to
`touchscreen-scroll'.
(touch-screen-handle-point-update, touch-screen-handle-point-up)
(touch-screen-handle-touch): Refactor to actually translate
touch screen event sequences, as opposed to looking up commands
and executing them.
(touch-screen-translate-touch): New function.  Bind in
function-key-map to all touch screen events.
(touch-screen-drag-mode-line-1, touch-screen-drag-mode-line)
(touch-screen-tap-header-line): Remove special commands for
dragging the mode line and clicking on the header line.
* lisp/wid-edit.el (widget-button-click): Adjust accordingly.
* src/keyboard.c (access_keymap_keyremap): Bind
`current-key-remap-sequence' to the key sequence being remapped.
(keyremap_step): Give fkey->start and fkey->end to
access_keymap_keyremap.
(head_table): Add imaginary prefix to touchscreen-end events as
well.
(syms_of_keyboard): New variable Vcurrent_key_remap_sequence.

17 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Sun, 16 Jul 2023 00:18:13 +0000 (08:18 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

17 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 15 Jul 2023 19:11:43 +0000 (15:11 -0400)]
Merge from origin/emacs-29

16f3a09e8db ; * lisp/simple.el (kill-new): Fix a typo.  (Bug#64423)
d78e670237b ; * src/lisp.h: Improve commentary for XIL, XLI, XLP (bug...

17 months ago; * lisp/simple.el (kill-new): Fix a typo. (Bug#64423)
Eli Zaretskii [Sat, 15 Jul 2023 19:08:52 +0000 (22:08 +0300)]
; * lisp/simple.el (kill-new): Fix a typo.  (Bug#64423)

17 months agosgml-mode.el: Cosmetic fixes
Stefan Monnier [Sat, 15 Jul 2023 15:41:32 +0000 (11:41 -0400)]
sgml-mode.el: Cosmetic fixes

* lisp/textmodes/sgml-mode.el: Prefer #' to quote function names.
(sgml-font-lock-keywords-1, sgml-font-lock-syntactic-face):
Refer to font-lock faces rather than their variables.
(sgml-mode-facemenu-add-face-function): Remove redundant arg to `mapconcat`.
(sgml-electric-tag-pair-before-change-function): Remove left-over
debugging messages (bug#64636).

17 months ago; * src/lisp.h: Improve commentary for XIL, XLI, XLP (bug#64645).
Eli Zaretskii [Sat, 15 Jul 2023 10:04:41 +0000 (13:04 +0300)]
; * src/lisp.h: Improve commentary for XIL, XLI, XLP (bug#64645).

17 months ago; * src/comp.c (CALL0I): Ifdef away, as it's now unused.
Eli Zaretskii [Sat, 15 Jul 2023 09:49:09 +0000 (12:49 +0300)]
; * src/comp.c (CALL0I): Ifdef away, as it's now unused.

17 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 15 Jul 2023 09:30:28 +0000 (05:30 -0400)]
Merge from origin/emacs-29

d09de2f49d7 Ignore quit while getting interprogram paste in kill-new
afdf54a5313 * lisp/progmodes/gdb-mi.el: Fix interactive invocation of...
b54febef5d7 Fix NetBSD build with and without ncurses
c5fb7301599 ; * lisp/paren.el (show-paren-function): Fix last change ...
ea696ea4b9a ; Fix last change.
b0181dafb9e Improve documentation of 'enable-local-variables' in Emac...
eb7c45ca43f ; Fix copy-paste in Widget Manual (Bug#64610)
aedbc3006e1 ; * doc/misc/eshell.texi (Aliases): Remove stray "@end ta...
673992d28e2 ; * lisp/progmodes/sql.el (sql-interactive-mode): Remove ...

17 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 15 Jul 2023 09:30:28 +0000 (05:30 -0400)]
; Merge from origin/emacs-29

The following commits were skipped:

6a360b08405 ; * doc/misc/eshell.texi (Variables): Add missing index f...
f529bf52eb5 ; * doc/misc/eshell.texi (Invocation): Whitespace cleanup.
3a703545798 Add documentation about remote access in Eshell
7640835ae03 ; * doc/misc/eshell.texi: Fix last change.
e79306fb467 ; * doc/misc/eshell.texi: Fix typos and clean up unclear ...
9f6d79dd967 Document some missing Eshell commands
951671b0e10 Document optional Eshell modules
7c417b2ae55 Correct the Eshell documentation about how to write new m...
6c3fe42bde1 Restructure Eshell extension modules documentation
4e204b56186 ; * doc/misc/eshell.texi (Bugs and ideas): Remove impleme...

17 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 15 Jul 2023 09:30:14 +0000 (05:30 -0400)]
Merge from origin/emacs-29

7ac947f34c7 ; * src/lisp.h (struct Lisp_Overlay): Update commentary (...
9bc93c7996c Replace duplicate text from epa.texi by a reference
74cc1d27f1f Add basic usage information and fix references
f24bdbfaf57 Add concept index, title-case structure titles
0165b50b0ff ; * lisp/emacs-lisp/lisp.el (raise-sexp): Fix typo in doc...
4cf33b6bd02 ; * doc/misc/modus-themes.org: Fix whitespace (bug#64548).
4821da1ad7f Fix show-paren-mode when the parentheses is partially vis...
419b4d44914 ; Improve documentation of with-restriction
be34e8294af ; * admin/git-bisect-start: Update failing commits
8e06809fccd Merge branch 'scratch/bug64391' into emacs-29
dbac8076057 * lisp/net/tramp.el (tramp-get-buffer-string): Stabilize.
01fb898420f Simplify after adding internal function to enter a labele...
b741dc7fcde Add internal function to enter a labeled restriction

# Conflicts:
# doc/misc/modus-themes.org

17 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 15 Jul 2023 09:28:16 +0000 (05:28 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

a82486e5a4e Fix stale cache in Tramp (don't merge)

17 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 15 Jul 2023 09:28:16 +0000 (05:28 -0400)]
Merge from origin/emacs-29

01fb898420f Simplify after adding internal function to enter a labele...
b741dc7fcde Add internal function to enter a labeled restriction

17 months agoIgnore quit while getting interprogram paste in kill-new
Spencer Baugh [Sat, 8 Jul 2023 16:36:22 +0000 (12:36 -0400)]
Ignore quit while getting interprogram paste in kill-new

On X, if the current selection owner is not responding to selection
requests, the user may want to take ownership of the selection.  The
obvious way to do this is to kill some text (which a user might also
be doing just as part of normal editing at the time the selection
owner becomes nonresponsive).  However, if
save-interprogram-paste-before-kill is non-nil, then killing text will
hang until the user quits, and this quit will abort the entire
kill-new, preventing the user from taking ownership of the selection.

Now instead if the user quits while we are attempting to retrieve the
selection from hanging owner, we will proceed to take ownership of the
selection as normal, resolving the problem.

(One example of a selction owner that might not be responding to
selection requests is another instance of Emacs itself; while Emacs is
blocked in call-process or Lisp execution, it currently does not
respond to selection requests.)

* lisp/simple.el (kill-new): Ignore quit while getting interprogram
paste (bug#64423)

17 months ago* lisp/progmodes/gdb-mi.el: Fix interactive invocation of 'gud-go'.
Wang Diancheng [Fri, 14 Jul 2023 03:06:32 +0000 (11:06 +0800)]
* lisp/progmodes/gdb-mi.el: Fix interactive invocation of 'gud-go'.

Bug#64590.

Copyright-paperwork-exempt: yes

17 months agoFix "Improve Python imports management commands"
Matthias Meulien [Thu, 13 Jul 2023 20:47:01 +0000 (22:47 +0200)]
Fix "Improve Python imports management commands"

* lisp/progmodes/python.el (python--list-imports): Prefer to
use an exit status >1.
(python--list-imports-check-status): New function to check
status of Python script.
(python--do-isort): Fix wrong status check introduced with
6295d7abdd4.  (Bug#64406)

17 months agoFix NetBSD build with and without ncurses
Valtteri Vuorikoski [Thu, 13 Jul 2023 09:35:51 +0000 (12:35 +0300)]
Fix NetBSD build with and without ncurses

* configure.ac (netbsd): Don't set TERMINFO=no unless the termcap
library is either -ltermcap or -lcurses.  This prevents aborts
because on recent versions of NetBSD libtermcap is actually a
symlink to libterminfo. (Bug#64577)

Copyright-paperwork-exempt: yes

17 months ago; Fix last change (bug#64533)
Spencer Baugh [Sun, 9 Jul 2023 16:16:28 +0000 (12:16 -0400)]
; Fix last change (bug#64533)

* lisp/progmodes/which-func.el (which-func-display): Fix quoting
in the doc string.

* etc/NEWS: Announce 'which-func-display'.

17 months agoSupport displaying function name in the header line
Spencer Baugh [Sun, 9 Jul 2023 16:16:28 +0000 (12:16 -0400)]
Support displaying function name in the header line

In some languages, the function name as displayed in the mode-line by
which-func-mode can be quite long.  It's useful to be able to display
it in the header-line instead.  Let's support that.

* lisp/progmodes/which-func.el (which-func-display)
(which-func--use-header-line, which-func--use-mode-line):
Add. (Bug#64533)
(which-func-try-to-enable): Support 'which-func--use-header-line'.
(which-func--disable): Add, to support 'which-func--use-header-line'.
(which-func-ff-hook, which-func-update-1): Use 'which-func--disable'.

17 months agoShow SHA-256 digest of a public key in 'nsm-format-certificate'
Łukasz Stelmach [Tue, 13 Jun 2023 11:26:39 +0000 (13:26 +0200)]
Show SHA-256 digest of a public key in 'nsm-format-certificate'

* lisp/net/nsm.el (nsm-format-certificate): Show public key
digest (SHA-256 if available).  Displaying the digest enables
users to verify the certificate with other tools like 'gnutls-cli'
which present much more detailed information.

* src/gnutls (emacs_gnutls_certificate_details): Export SHA-256
public key digest if supported by GnuTLS.  (Bug#64043)

17 months ago; * lisp/paren.el (show-paren-function): Fix last change (bug#64547).
Eli Zaretskii [Sat, 15 Jul 2023 07:21:07 +0000 (10:21 +0300)]
; * lisp/paren.el (show-paren-function): Fix last change (bug#64547).

17 months agoUpdate Android port
Po Lu [Sat, 15 Jul 2023 01:53:22 +0000 (09:53 +0800)]
Update Android port

* doc/emacs/android.texi (Android): Add new node to menu.
(Android Environment): Add footnote pointing to new node.
(Android Software): New node.
* doc/emacs/emacs.texi (Top): Add new node to menu.
* java/AndroidManifest.xml.in (manifest): Fix location of
sharedUserId property.
* java/INSTALL: Improve documentation of shared user ID
support.

17 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Fri, 14 Jul 2023 23:54:24 +0000 (07:54 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

17 months ago; Fix last change.
Eli Zaretskii [Fri, 14 Jul 2023 17:33:29 +0000 (20:33 +0300)]
; Fix last change.

17 months agoImprove documentation of 'enable-local-variables' in Emacs manual
YugaEgo [Fri, 14 Jul 2023 15:49:36 +0000 (18:49 +0300)]
Improve documentation of 'enable-local-variables' in Emacs manual

* doc/emacs/custom.texi (Safe File Variables): Document ':all'.
(Bug#64621)

17 months ago; * lisp/vc/ediff-wind.el: hush bytecomp warnings on non-X platforms
Mattias Engdegård [Fri, 14 Jul 2023 16:47:08 +0000 (18:47 +0200)]
; * lisp/vc/ediff-wind.el: hush bytecomp warnings on non-X platforms

17 months agoProvide backtrace for byte-ops car, cdr, setcar, setcdr, nth and elt
Mattias Engdegård [Fri, 14 Jul 2023 16:05:32 +0000 (18:05 +0200)]
Provide backtrace for byte-ops car, cdr, setcar, setcdr, nth and elt

Include calls to these primitives from byte-compiled code in
backtraces.  For nth and elt, not all errors are covered.
(Bug#64613)

* src/bytecode.c (exec_byte_code): Add error backtrace records for
car, cdr, setcar, setcdr, nth and elt.
* src/data.c (syms_of_data): Add missing defsyms for car, setcar,
setcdr, nth and elt.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--error-frame, bytecomp-tests--byte-op-error-cases)
(bytecomp--byte-op-error-backtrace): New test.

17 months agoMake --with-shared-user-id work
Po Lu [Fri, 14 Jul 2023 12:30:30 +0000 (20:30 +0800)]
Make --with-shared-user-id work

* configure.ac (ANDROID_SHARED_USER_NAME): New variable.
Substitute it.
* java/AndroidManifest.xml.in: Set `sharedUserLabel' if a shared
user ID is enabled.
* java/res/values/strings.xml (shared_user_name): New string
resource.

17 months ago; Fix copy-paste in Widget Manual (Bug#64610)
Mauro Aranda [Fri, 14 Jul 2023 10:41:58 +0000 (07:41 -0300)]
; Fix copy-paste in Widget Manual (Bug#64610)

17 months agoUpdate Android port
Po Lu [Fri, 14 Jul 2023 07:35:58 +0000 (15:35 +0800)]
Update Android port

* src/android.c (android_blit_copy): Don't check for overflow
where not required.

17 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Fri, 14 Jul 2023 07:35:21 +0000 (15:35 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

17 months agoFix misreporting of window top line
Po Lu [Fri, 14 Jul 2023 07:33:48 +0000 (15:33 +0800)]
Fix misreporting of window top line

* src/frame.h (FRAME_TOOL_BAR_TOP_LINES): Return tool_bar_lines,
not tool_bar_height.

17 months agoReorder NaN, INF paras
Paul Eggert [Fri, 14 Jul 2023 06:55:50 +0000 (23:55 -0700)]
Reorder NaN, INF paras

* doc/lispref/numbers.texi (Float Basics):
Reorder paragraphs so that examples follow defns.

17 months agoImprove doc for VAX reading NaN, INF
Paul Eggert [Fri, 14 Jul 2023 06:36:33 +0000 (23:36 -0700)]
Improve doc for VAX reading NaN, INF

* doc/lispref/numbers.texi (Float Basics): Improve description of
how Lisp reads infinities and NaNs on a VAX.

17 months ago; * doc/misc/eshell.texi (Aliases): Remove stray "@end table".
Eli Zaretskii [Fri, 14 Jul 2023 05:32:57 +0000 (08:32 +0300)]
; * doc/misc/eshell.texi (Aliases): Remove stray "@end table".

17 months ago; * lisp/progmodes/sql.el (sql-interactive-mode): Remove FIXME (bug#64602).
YugaEgo [Thu, 13 Jul 2023 19:50:27 +0000 (22:50 +0300)]
; * lisp/progmodes/sql.el (sql-interactive-mode): Remove FIXME (bug#64602).

17 months agocl-print: Allow expanding the contents of hash-tables
Stefan Monnier [Fri, 14 Jul 2023 02:26:19 +0000 (22:26 -0400)]
cl-print: Allow expanding the contents of hash-tables

* lisp/emacs-lisp/cl-print.el (cl-print-object) <hash-table>:
Add an ellipsis.
(cl-print-object-contents) <hash-table>: New method.

17 months ago; * doc/misc/eshell.texi (Variables): Add missing index for $INSIDE_EMACS
Jim Porter [Thu, 13 Jul 2023 16:10:57 +0000 (09:10 -0700)]
; * doc/misc/eshell.texi (Variables): Add missing index for $INSIDE_EMACS

Do not merge to master.  On master, this was fixed by 0bb8a011d57.

17 months ago; * doc/misc/eshell.texi (Invocation): Whitespace cleanup.
Michael Albinus [Tue, 11 Jul 2023 10:18:31 +0000 (12:18 +0200)]
; * doc/misc/eshell.texi (Invocation): Whitespace cleanup.

Do not merge to master.  This is a backport of 04710bd01b2.

17 months agoAdd documentation about remote access in Eshell
Jim Porter [Sun, 9 Jul 2023 19:04:01 +0000 (12:04 -0700)]
Add documentation about remote access in Eshell

Do not merge to master.  This is a backport of 438921161ac.

* doc/misc/eshell.texi
(Invocation): Mention the '*' prefix.
(Remote Access): New section...
(Commands): ... link to it.

17 months ago; * doc/misc/eshell.texi: Fix last change.
Jim Porter [Sat, 8 Jul 2023 19:13:22 +0000 (12:13 -0700)]
; * doc/misc/eshell.texi: Fix last change.

Do not merge to master.  This is a backport of 8c5fef4eb30.

17 months ago; * doc/misc/eshell.texi: Fix typos and clean up unclear wording.
Jim Porter [Sat, 8 Jul 2023 01:19:08 +0000 (18:19 -0700)]
; * doc/misc/eshell.texi: Fix typos and clean up unclear wording.

Do not merge to master.  This is a backport of 118582efb30.

17 months agoDocument some missing Eshell commands
Jim Porter [Sat, 8 Jul 2023 00:30:26 +0000 (17:30 -0700)]
Document some missing Eshell commands

Do not merge to master.  This is a backport of f7a899d7ca0.

* doc/misc/eshell.texi (Built-ins): Document 'eshell-debug'.
(Extra built-in commands): Document 'count', 'ff', and 'gf'.

17 months agoDocument optional Eshell modules
Jim Porter [Sat, 13 May 2023 03:03:48 +0000 (20:03 -0700)]
Document optional Eshell modules

Do not merge to master.  This is a backport of 77f13edab0f.

* doc/misc/eshell.texi (Built-ins): Move disabled-by-default commands
to...
(Tramp extensions, Extra built-in commands): ...here
(Optional modules, Key rebinding, Smart scrolling): Add documentation.
(Bug and ideas): Documentation is no longer incomplete!

17 months agoCorrect the Eshell documentation about how to write new modules
Jim Porter [Sat, 13 May 2023 03:11:01 +0000 (20:11 -0700)]
Correct the Eshell documentation about how to write new modules

* doc/misc/eshell.texi (Writing a module): Fix the documentation.
'eshell-defgroup' doesn't exist anymore.

Do not merge to master.  This is a backport of 77f13edab0f.

17 months agoRestructure Eshell extension modules documentation
Jim Porter [Mon, 30 Jan 2023 03:59:56 +0000 (19:59 -0800)]
Restructure Eshell extension modules documentation

This adds a section for documenting all the optional modules.

Do not merge to master.  This is a backport of f2981a1681d.

* doc/misc/eshell.texi (Extension modules): Move explanation about
writing modules to...
(Writing a module): ... here.
(Module testing): Remove.  Testing an Eshell module doesn't require
any special documentation.
(Key binding, Smart scrolling, Electric forward slash): Move under...
(Optional modules): ... here.
(Directory handling, Terminal emulation): Remove.  These modules are
enabled by default, and so are documented above.
(Tramp extensions, Extra built-in commands): New sections.

17 months ago; * doc/misc/eshell.texi (Bugs and ideas): Remove implemented feature.
Jim Porter [Mon, 30 Jan 2023 02:29:02 +0000 (18:29 -0800)]
; * doc/misc/eshell.texi (Bugs and ideas): Remove implemented feature.

Do not merge to master.  This is a backport of 194de36ca9f.

17 months ago* lisp/emacs-lisp/backtrace.el (backtrace--change-button-skip): Typo)
Stefan Monnier [Fri, 14 Jul 2023 01:51:03 +0000 (21:51 -0400)]
* lisp/emacs-lisp/backtrace.el (backtrace--change-button-skip): Typo)