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'.
Paul Eggert [Wed, 12 Jun 2024 15:42:24 +0000 (08:42 -0700)]
Start of a fix for bug#71477
* src/filelock.c (integer_prefixed): New static function.
(VALID_PROCESS_ID): New macro.
(current_lock_owner): Use them to allow negative process IDs
on some Microsoft platforms.
Stefan Kangas [Wed, 12 Jun 2024 16:17:13 +0000 (18:17 +0200)]
Fix misspelled symbols in artist.el
* lisp/textmodes/artist.el (artist-key-undraw-continuously)
(artist-key-draw-continuously)
(artist-key-do-continuously-continuously)
(artist-key-do-continuously-poly)
(artist-key-do-continuously-1point)
(artist-key-do-continuously-2points)
(artist-key-do-continuously-common)
(artist-key-set-point-continuously)
(artist-mouse-draw-continuously): Rename functions to fix misspelling of
"continuously". Leave old function names as obsolete aliases and update
all callers.
(artist-mt, artist-go-get-undraw-fn, artist-go-get-interval-fn)
(artist-go-get-fill-pred, artist-go-get-fill-fn)
(artist-key-undraw-common, artist-key-draw-common)
(artist-key-do-continously-common, artist-key-set-point-common)
(artist-down-mouse-1): Rename symbol to 'artist-do-continuously' to fix
misspelling of "continuously". Continue supporting the old symbol for
backwards-compatibility.
Po Lu [Wed, 12 Jun 2024 08:44:21 +0000 (16:44 +0800)]
Restore functionality on Android 2.2
* java/Makefile.in (install_temp): Do not compress
directory-tree and generate such files in a special format that
stores file sizes.
* lib-src/asset-directory-tool.c (struct directory_tree): New
field st_size.
(need_file_size): New variable.
(main_1, main_2, main): Write file sizes before sibling offsets
if `--api-8' is specified.
* src/android-asset.h (struct android_asset_manager): New field
open.
(struct android_asset): New field name.
(AAssetManager_fromJava): Load AssetManager#open.
(AAssetManager_open): If a directory tree has already been
loaded, search for a matching asset and load its size thence, to
avoid the requirement of an AssetFileDescriptor.
(AAsset_close): Don't assume asset->fd exists. Release
asset->name.
(AAsset_getLength): Likewise.
(android_asset_create_stream): If asset->name exists, call
AssetManager#open, in order to open compressed files.
* src/androidvfs.c (OLD_ANDROID_ASSETS): Define to 1 on API 8.
(android_extract_long, android_scan_directory_tree): Mark
arguments as const. Adjust offsets when OLD_ANDROID_ASSETS.
(android_is_directory, android_init_assets, android_afs_readdir):
Likewise.
* src/lread.c (lread_fstat): Define to sys_fstat, not fstat.
Po Lu [Wed, 12 Jun 2024 05:52:33 +0000 (13:52 +0800)]
Improve compression of Emacs packages on Android 2.2
* configure.ac (ZIP): Search for a `zip' executable and
substitute the same if targeting SDK 8.
* java/INSTALL: Document new requirement.
* java/Makefile.in (GZIP_PROG, ZIP): New substitutions.
(.PHONY): Delete references to directory-tree.
(install_temp): On SDK 8 and earlier, compress large *.el and
Info files with gzip, and divide install_temp into three
separate directories, with one for large files, another for
gzipped files, and one more for the remainder.
(install_temp/assets/directory-tree, install_temp/assets/version)
(install_temp/assets/build_info): Merge these rules into
install_tmp, that they may execute before the assets directory
is split.
(emacs.apk-in): Package each directory separately, accounting
for their varied compression requirements.
* lisp/term/android-win.el (input-decode-map): Define select to
return in input-decode-map.
Dmitry Gutov [Tue, 11 Jun 2024 18:02:57 +0000 (21:02 +0300)]
read_and_insert_process_output: Insert before markers
* src/insdel.c (adjust_markers_for_insert): Make non-static.
* src/lisp.h: Add declaration for it.
* src/process.c (read_and_insert_process_output): Use it here.
And also call insert_1_both with BEFORE_MARKERS=t, for
compatibility with internal-default-process-filter (bug#66020).
Michael Albinus [Tue, 11 Jun 2024 12:43:28 +0000 (14:43 +0200)]
Refactor tramp-*-process-file functions
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Don't compute
process name, this is done in `tramp-skeleton-make-process'.
Robert Pluim [Fri, 7 Jun 2024 10:07:50 +0000 (12:07 +0200)]
Use 'char-to-name'
* lisp/international/emoji.el (emoji--name): Lookup name using 'char-to-name'.
* lisp/international/textsec.el (textsec-domain-suspicious-p): And here.
* lisp/simple.el (what-cursor-position): And here.
Robert Pluim [Fri, 7 Jun 2024 10:05:34 +0000 (12:05 +0200)]
Add 'char-to-name' convenience function
* lisp/international/mule-cmds.el (char-to-name): New function. This is
the inverse of 'char-from-name'.
* doc/lispref/nonascii.texi (Character Codes): Document it.
* etc/NEWS: Announce it.
Dmitry Gutov [Tue, 11 Jun 2024 02:54:57 +0000 (05:54 +0300)]
fast-read-process-output: Make safer
* src/process.c (read_process_output): Move the call to
'read_and_insert_process_output' from here.
(read_and_dispose_of_process_output): To here (bug#66020). So
that any Lisp code invoked through modification hook from the
former function also benefit from safety guards like
running_asynch_code, saved match data, inhibit_quot, etc.
* src/process.c (read_process_output_set_last_coding_system):
New function, extracted from read_and_dispose_of_process_output.
(read_and_dispose_of_process_output): Update accordingly.
(read_and_insert_process_output): Use it here instead of just
transferring carryover (bug#66020, also mentioned in bug#71452).
Po Lu [Tue, 11 Jun 2024 02:04:16 +0000 (10:04 +0800)]
Provide for negative PIDs on MS Windows
* src/filelock.c (pid_t, getpid_for_lock, pidintmax, EPRIdMAX):
New macros; define to unsigned long or corresponding values if
WINDOWSNT.
(lock_file_1, current_lock_owner): Replace intmax_t, getpid,
pid_t and the like with the aforementioned macros. (bug#71477)
Stefan Monnier [Mon, 10 Jun 2024 14:43:14 +0000 (10:43 -0400)]
(rng-do-some-validation): Fix dangerous use of `with-silent-modifications`
* lisp/nxml/rng-valid.el (rng-do-some-validation): Don't let-bind
`inhibit-modification-hooks` around code which can wait.
(rng-cache-state): Bind it here instead.
Harald Jörg [Mon, 10 Jun 2024 10:19:04 +0000 (12:19 +0200)]
cperl-mode.el: Update for the current Perl version 5.040
* etc/NEWS: Announce new features of cperl-mode.
* lisp/progmodes/cperl-mode.el (cperl-menu): Add toggle for extra
paired delimiters.
(defconst): new rx expressions `cperl--sub-name-generated-rx' and
`cperl--field-declaration-rx'
(cperl--imenu-entries-rx): Use the new expressions
(cperl--extra-paired-delimiters): New variable holding the paired
delimiters for Perl 5.36 and newer
(cperl-imenu-sub-keywords): Add autogenerated methods to imenu
(cperl-init-faces): Add the __CLASS__ token, builtin constants,
and attributes for field declarations.
(cperl-short-docs): Add __CLASS__ to one-line docs.
(cperl-extra-paired-delimiters-mode): new minor mode to handle
non-ASCII paired delimiters.
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-fontify-builtin-constants): new test.
(cperl-test-fontify-class): New test clauses for attributes.
(cperl-test-field-declaration-rx): new test.
(cperl-test-autogenerated-reader-rx): new unit test for the rx
expression.
(cperl-test-extra-delimiters): new test.
(cperl-test-imenu-index): new clauses for imenu capture of
autogenerated methods.
* test/lisp/progmodes/cperl-mode-resources/grammar.pl: Add
examples for Perl 5.40 syntax.
* test/lisp/progmodes/cperl-mode-resources/extra-delimiters.pl:
New resource for non-ASCII paired delimiters.