Po Lu [Wed, 19 Jun 2024 08:41:59 +0000 (16:41 +0800)]
Don't follow symlinks in returning directory attributes of /
* src/androidvfs.c (struct android_vops) <stat>: New argument
for flags.
(android_unix_stat): Implement in terms of fstatat, not stat,
and provide flags to the same.
(android_afs_stat, android_content_stat, android_authority_stat)
(android_saf_root_stat, android_saf_tree_stat)
(android_saf_new_stat, android_fstatat): Adjust to match.
Po Lu [Tue, 18 Jun 2024 06:41:26 +0000 (14:41 +0800)]
Correct resolution of non-virtual directory names on Android
* src/androidvfs.c (android_vfs_canonicalize_name): Correct
return value in cases of underflowing the directory stack.
(android_unix_name): Reset vnode operations vector of copied
vnodes to their standard value, and exclude virtual directories
from subdirectories of the root directory's parent directory.
(android_root_name): Adjust to match.
Dmitry Gutov [Mon, 17 Jun 2024 19:51:23 +0000 (22:51 +0300)]
diff-mode: Optimize source language syntax highlighting
* lisp/vc/diff-mode.el (diff--get-revision-properties):
Never pass FILE to 'diff-syntax-fontify-props'; assume that
'vc-find-revision-no-save' has called the major mode function
already (bug#71604).
Juri Linkov [Mon, 17 Jun 2024 16:47:53 +0000 (19:47 +0300)]
* lisp/tab-line.el (tab-line-force-update): New function (bug#71601).
(tab-line-tab-name-function, tab-line-tabs-function)
(tab-line-tabs-buffer-group-function)
(tab-line-tabs-buffer-group-sort-function)
(tab-line-tabs-buffer-groups-sort-function)
(tab-line-tab-name-format-function):
Use 'tab-line-force-update' in the :set lambda of defcustom.
(tab-line-tab-name-function, tab-line-tabs-function)
(tab-line-cache-key-function): Mention 'tab-line-force-update'
in the docstring.
(tab-line-new-button-show, tab-line-close-button-show):
In the :set lambda of defcustom use 'force-mode-line-update'
with the non-nil arg ALL.
Juri Linkov [Mon, 17 Jun 2024 16:40:00 +0000 (19:40 +0300)]
* lisp/outline.el: Make revert-related functions internal.
(outline--hidden-headings-paths)
(outline--hidden-headings-restore-paths): Rename with the prefix
'outline--' to mark them internal to discourage from relying on
their arguments and return values.
Po Lu [Mon, 17 Jun 2024 09:43:24 +0000 (17:43 +0800)]
Reinforce bitmap reconfiguration on Android
* java/org/gnu/emacs/EmacsView.java (EmacsView) <unswapped>: New
field in which to record whether the back buffer has received
contents beyond those present at the last buffer swap.
<dimensionsLock>: Delete field.
(onAttachedToWindow, onLayout, handleDirtyBitmap)
(prepareForLayout): Rather, synchronize window dimensions with
the view.
(getCanvas, getBitmap): Do not reconfigure the back buffer
bitmap if such outstanding data exists.
(postSwapBuffers): New function.
(swapBuffers): If such outstanding data exists and the back
bufferis pending reconfiguration, recreate the back buffer and
report exposure.
Juri Linkov [Mon, 17 Jun 2024 06:32:45 +0000 (09:32 +0300)]
* lisp/outline.el: Keep point on the same outline after revert.
(outline-hidden-headings-paths): Return the current path as well.
(outline-hidden-headings-restore-paths): Move point to the path
that was current before reverting the buffer (bug#71466).
(outline-revert-buffer-restore-visibility):
Handle both values returned from outline-hidden-headings-paths.
* lisp/net/tramp.el (tramp-use-file-attributes): New defcustom and
defsubst.
(tramp-skeleton-file-exists-p):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-executable-p)
(tramp-adb-handle-file-readable-p):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-executable-p)
(tramp-sudoedit-handle-file-readable-p)
(tramp-sudoedit-handle-file-writable-p): Use it.
* lisp/net/tramp-sh.el (tramp-sh-handle-file-executable-p)
(tramp-sh-handle-file-readable-p)
(tramp-sh-handle-file-writable-p): Use it.
(tramp-sh-handle-set-file-acl): Fix property name.
Robert Pluim [Sun, 16 Jun 2024 12:23:37 +0000 (14:23 +0200)]
Fix clipboard request on macOS for yank-media
'yank-media' makes a request with 'CLIPBOARD and 'TARGETS, which on
other platforms returns the type(s) of the current selection, but on
macOS returned the selection itself. Make it return the types instead.
This fixes (Bug#71377).
* src/nsselect.m (ns_get_local_selection): Return nil when called with
QCLIPBOARD and QTARGETS, so that 'ns_get_foreign_selection' is called to
return the type(s) of the selection.
Po Lu [Sun, 16 Jun 2024 07:27:43 +0000 (15:27 +0800)]
Minor adjustments to battery.el on Android
* src/android.c (android_query_battery):
* java/org/gnu/emacs/EmacsService.java (queryBattery19)
(queryBattery): Reorder items in value for consistency with
Fandroid_query_battery.
* lisp/battery.el (battery-status-function): Select
battery-android only when android-query-battery is present.
(battery-android): Return temperature and correct values of
power source constants.
Jim Porter [Sat, 15 Jun 2024 23:59:11 +0000 (16:59 -0700)]
Fix Eshell "which" test on MS-Windows
* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/which/plain/external-program): Compare the file name
case-insensitively on case-insensitive file systems.
* test/lisp/eshell/eshell-tests-helpers.el
(eshell-command-result--equal): Revert to the previous implementation.
Po Lu [Sun, 16 Jun 2024 03:35:44 +0000 (11:35 +0800)]
Simplify bitmap reallocation on Android
* java/org/gnu/emacs/EmacsView.java: Update outdated commentary.
(handleDirtyBitmap): Don't copy contents of the previous bitmap
to the new.
(onLayout): Unconditionally expose upon layout changes.
Vincenzo Pupillo [Sat, 15 Jun 2024 16:57:29 +0000 (18:57 +0200)]
Fix 'wrong-type-argument' in 'php-ts-mode--webserver-read-args'
Prevents php-ts-mode--webserver-read-args from throwing an
error if the current buffer is not associated with a file.
* lisp/progmodes/php-ts-mode.el (php-ts-mode--webserver-read-args):
Use 'default-directory if' the current buffer is not associated
with a file. (Bug#71574)
(php-ts-mode-run-php-webserver): Fix doc string.
kobarity [Tue, 11 Jun 2024 16:09:21 +0000 (01:09 +0900)]
Allow escape sequences in Python prompts
* lisp/progmodes/python.el (python-shell-prompt-detect): Use
Python's json package if available, and remove escape sequences
in prompts.
* test/lisp/progmodes/python-tests.el
(python-tests-interpreter-2-6-higher-p): New predicate
function.
(python-shell-prompt-detect-7): New test. (Bug#71440)
Po Lu [Sat, 15 Jun 2024 02:04:07 +0000 (10:04 +0800)]
Send proper substitution character to Android IMEs
* src/androidterm.c (android_text_to_string): Substitute
REPLACEMENT CHARACTER for NULL in converting characters not
representable without surrogate pairs to UTF-16.
Eshel Yaron [Sat, 15 Jun 2024 17:22:11 +0000 (19:22 +0200)]
New commands for minibuffer history control
* lisp/minibuffer.el (minibuffer-alternate-history)
(minibuffer-kill-from-history): New commands.
(minibuffer-local-map): Bind them.
(minibuffer-hint-mode): Make interactive.
(minibuffer-action-history): New variable.
(minibuffer-set-completion-action): Use it, new command.
(minibuffer-local-completion-map): Bind them.
(minibuffer-apply): Use 'completion-identity', if present.
(read-history-variable-history): New variable.
(read-history-variable): Use it.
Eshel Yaron [Fri, 14 Jun 2024 17:49:21 +0000 (19:49 +0200)]
; Fix Icomplete error during candidate highlighting
* lisp/icomplete.el (icomplete-completions): Pass completion
candidates through 'completion-lazy-hilit' before trimming
common prefix, rather than after.
Dmitry Gutov [Fri, 14 Jun 2024 16:50:59 +0000 (19:50 +0300)]
"Insert before markers" in read_and_insert_process_output properly
* src/coding.c (setup_coding_system): Initialize it.
(produce_chars, encode_coding, decode_coding_gap):
Obey it in insert_from_gap calls.
(encode_string_utf_8, decode_string_utf_8): Update the other calls
to insert_from_gap to have one new argument (false).
* src/coding.h: New field insert_before_markers.
* src/decompress.c (Fzlib_decompress_region): Here too.
* src/insdel.c (insert_from_gap):
Accept new argument BEFORE_MARKERS (bug#71525) and pass it through
to adjust_markers_for_insert.
* src/lisp.h: Update prototype.
* src/process.c (read_and_insert_process_output):
Set process_coding->insert_before_markers instead of calling
adjust_markers_for_insert.
Eli Zaretskii [Fri, 14 Jun 2024 11:38:01 +0000 (14:38 +0300)]
Fix generation of org.texi from org.org
* doc/misc/Makefile.in (org_template): Bind
'org-id-track-globally' to nil when running
'org-texinfo-export-to-texinfo-batch', to avoid searching local
user files when building the Org manual.
Po Lu [Fri, 14 Jun 2024 08:21:55 +0000 (16:21 +0800)]
Port term.el's terminfo machinery to Android
* lisp/term.el (term-generate-db-directory): New function. Copy
/assets/etc/e to the cache directory, on Android, and return the
same.
(term-exec-1): Call term-generate-db-directory in place of
data-directory.
Po Lu [Fri, 14 Jun 2024 02:44:20 +0000 (10:44 +0800)]
Restore file's original name after a failed rename_replace on Windows 9X
* src/w32.c (sys_rename_replace): If the rename operation fails
and an intermediate name was generated and applied to the input
file, restore the original.
Jim Porter [Thu, 13 Jun 2024 19:22:01 +0000 (12:22 -0700)]
; Minor editorial fixes to some Eshell tests
* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/kill-process/redirect-message): Move next to its sibling
tests.
(esh-proc-test/remote/remote-path): Rename from 'esh-var-test/...'.
* lisp/progmodes/php-ts-mode.el (php-ts-mode-flymake-php):
Don't use `any` to mean `not-newline`; it's misleading.
(php-ts-mode--predefined-constant): Remove duplicate "E_USER_NOTICE".
Eli Zaretskii [Thu, 13 Jun 2024 07:24:21 +0000 (10:24 +0300)]
Fix removal of file locks on MS-Windows 9X
A new Windows-specific function for validating process ID
is introduced that does TRT with possibly negative PID
values returned by 'getpid' on Windows 9X and also with
values larger than INT_MAX, since PID on Windows is
actually an unsigned 32-bit value.
* src/w32proc.c (w32_valid_process_id): New function.
* src/w32common.h (VALID_PROCESS_ID): Define for WINDOWSNT.
* src/filelock.c [WINDOWSNT]: Include w32common.h. (Bug#71477)
F. Jason Park [Thu, 9 Nov 2023 00:45:37 +0000 (16:45 -0800)]
Release ERC 5.6
* lisp/erc/erc.el: Change Version header from 5.6-git to 5.6. A
`customize-package-emacs-version-alist' mapping for ERC 5.6 to Emacs
30.1 was already added when moving from 5.5 to 5.6-git. The ERCVER
variable in doc/misc/erc.texi was likewise updated at that time.
Going forward, such changes will continue to happen preemptively, on
the flip side of each release.
(erc-version): Change version from 5.6-git to 5.6.
F. Jason Park [Tue, 11 Jun 2024 04:56:02 +0000 (21:56 -0700)]
; Amend some doc strings in ERC
* lisp/erc/erc-backend.el (define-erc-response-handler): Mention
important distinction between aliases for handlers and hooks, and note
expected type for the latter.
* lisp/erc/erc.el (erc--define-channel-user-status-compat-getter):
Mention that these accessors are not inlined like those generated by
`cl-defstruct'.