]> git.eshelyaron.com Git - emacs.git/log
emacs.git
16 months agoImprove boot-time gathering
Paul Eggert [Sun, 13 Aug 2023 02:39:11 +0000 (19:39 -0700)]
Improve boot-time gathering

Simplify Emacs proper by using Gnulib’s boot-time module
instead of doing it all by hand.  This should port Emacs
better to obscurish hosts, as Bruno Haible has merged the
best of Emacs’s and Gnulib’s boot-time gathering.
* lib/boot-time-aux.h, lib/boot-time.c, lib/boot-time.h:
* lib/readutmp.h, m4/readutmp.m4: New files, copied from Gnulib.
* admin/merge-gnulib (GNULIB_MODULES): Add boot-time.
* configure.ac: Do not check for utmp.h;
the boot-time module now does this.
(BOOT_TIME_FILE): Remove; no longer used.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/filelock.c [__FreeBSD__]: Do not include <sys/sysctl.h>.
[HAVE_UTMP_H]: Do not include utmp.h.
Include boot-time instead: boot-time does the work now.
(BOOT_TIME) [HAVE_ANDROID && !ANDROID_STUBIFY]: Don’t undef.
(WTMP_FILE): Don’t define.
(boot_time, boot_time_initialized, get_boot_time_1, get_boot_time):
Remove.
(get_boot_sec): New function that simply calls Gnulib get_boot_time.
(lock_file_1, current_lock_owner): Use get_boot_sec instead
of get_boot_time.

16 months agoFix bootstrap-clean in the cross directory on USG
Po Lu [Sun, 13 Aug 2023 01:45:36 +0000 (09:45 +0800)]
Fix bootstrap-clean in the cross directory on USG

* cross/Makefile.in (FIND_DELETE): New variable.
(CLEAN_SUBDIRS): Avoid including src if not already present.
(clean, bootstrap-clean, etc): Use FIND_DELETE.

16 months agoEmploy careadlinkat in getProcName
Po Lu [Sun, 13 Aug 2023 01:10:07 +0000 (09:10 +0800)]
Employ careadlinkat in getProcName

* src/android.c (android_proc_name): Delete args BUFFER and
SIZE.  Return buffer allocated by careadlinkat.
(NATIVE_NAME): Adjust correspondingly.

16 months agoAvoid stpncpy
Paul Eggert [Sat, 12 Aug 2023 19:50:15 +0000 (12:50 -0700)]
Avoid stpncpy

It’s not worth the porting hassle, and as the glibc manual says,
“this function is generally a poor choice for processing strings”.
* admin/merge-gnulib (GNULIB_MODULES): Remove stpncpy.
* exec/configure.ac: Do not check for stpncpy.
* exec/exec.c (rpl_stpncpy, stpncpy): Remove this replacement.
(exec_0): Properly clear buffer1.  Use memcpy instead of
stpncpy to add the trailing name.  This code is clearly
still suboptimal but efficiency is not that important here
and I tried to minimize the change.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.

16 months agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Sat, 12 Aug 2023 19:50:15 +0000 (12:50 -0700)]
Update from Gnulib by running admin/merge-gnulib

16 months agoAdjust to recent Gnulib changes
Paul Eggert [Sat, 12 Aug 2023 19:50:15 +0000 (12:50 -0700)]
Adjust to recent Gnulib changes

The Gnulib regex module now pulls in some wide-char stuff
that I think Emacs doesn’t need.
* admin/merge-gnulib (AVOIDED_MODULES): Add iswblank, iswctype,
iswdigit, iswxdigit, wctype.

16 months ago* lisp/emacs-lisp/cl-macs.el (cl--labels-convert): Remove outdated fixme
Stefan Monnier [Sat, 12 Aug 2023 18:20:59 +0000 (14:20 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl--labels-convert): Remove outdated fixme

This was fixed in commit 44d7fd3805.

16 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 12 Aug 2023 17:50:38 +0000 (13:50 -0400)]
Merge from origin/emacs-29

842dbf500e0 * Fix `batch-byte+native-compile' target directory.
8dbd5aa1eef Avoid crashes in 'display_count_lines' when current buffe...
47b4f4cf783 ; * doc/emacs/mini.texi (Completion Commands): Fix a typo...
78999d52136 Update csharp tree-sitter support due to upstream changes
556cb01b48e Substitute command keys in 'ielm-header' at use time
99367078e50 ; * etc/PROBLEMS: Add entry about XIM problems (bug#65205).
03e897c08fa Fix rare crashes in redisplay due to problems with fontsets
b1ba06a1e4b Fix a typo in 'leuven-dark-theme.el'
e80a9dcabb9 ; * admin/git-bisect-start: Update failing commits
9091f42784b ; * admin/git-bisect-start: Update failing commits
344ac529ca9 ; * etc/PROBLEMS: Fix typo.
bccf848b26c Adapt Tramp test
71bc060e403 Properly expand the JSX indentation rules in 'js-ts-mode'
889cfb42ed9 * Add `emacs-lisp-native-compile' to easy-menu.
4535aafa8a3 * lisp/progmodes/elisp-mode.el (emacs-lisp-mode-menu): Si...
173af0cad51 * Introduce `emacs-lisp-native-compile'.
063d7d89d7a Fix the -x switch in non-X builds
5a7fb0b39b7 Document that `set-mouse-color' does not work everywhere
d06fc72496f ; * doc/emacs/dired.texi (Misc Dired Features): Fix last ...
97b8ac376b5 Fix the effects and documentation of 'dired-free-space'
75c72e59f69 ; Fix typo
6d11b7b3007 Fix cross-reference to eldoc in eglot manual
913e50aba6c Add native-compilation to Emacs Lisp mode menu
b93107c20b2 Fix emacs-lisp-native-compile-and-load eln target directo...

16 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 12 Aug 2023 17:48:34 +0000 (13:48 -0400)]
; Merge from origin/emacs-29

The following commits were skipped:

7e3c6160860 ; Re-enable the /dev/urandom test
ff21717f05b Disable failing test (bug#65156)

16 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 12 Aug 2023 17:42:14 +0000 (13:42 -0400)]
Merge from origin/emacs-29

4767f5eaeed Better fix for bug#65156
dd1d8414b33 Fix insert-file-contents with pipes and /dev/stdin
50649a6d1a2 ; * etc/PROBLEMS: Fix wording.
f0dda682ffb ; * etc/NEWS.28: Add deletion of levents.el.
f4acae842c0 Fix bug#65042
e1874c4e8bf * configure.ac (HAVE_TREE_SITTER): Set NEED_DYNLIB=yes (b...
ef8838c3a5f * etc/NEWS: Mention tramp-show-ad-hoc-proxies.
495bee253fc * test/lisp/net/tramp-tests.el (tramp-test42-utf8): Skip ...
de1effd73b4 ; Fix last change
7c7966862bc * test/lisp/net/tramp-tests.el (tramp-test10-write-region...
16205e8db65 ; Improve help-echo in package.el
a95e7006989 ; Filter packages available for upgrade via menu bar
adff72dd1d2 Fix reverting Rmail buffers

16 months ago* Fix `batch-byte+native-compile' target directory.
Andrea Corallo [Sat, 12 Aug 2023 16:42:33 +0000 (18:42 +0200)]
* Fix `batch-byte+native-compile' target directory.

* lisp/emacs-lisp/comp.el (batch-native-compile): Don't shadow
`native-compile-target-directory' unless necessary.

16 months agorx: Better translation of char-matching patterns
Mattias Engdegård [Sat, 12 Aug 2023 15:39:58 +0000 (17:39 +0200)]
rx: Better translation of char-matching patterns

Translate or-patterns that (even partially) match single characters
into character alternatives which are more efficient in matching,
sometimes algorithmically so.  Example:

  (or "%" (in "a-z") space)

was previously translated to

  "%\\|[a-z]\\|[[:space:]]"

but now becomes

  "[%a-z[:space:]]"

Single-char patterns include `nonl` and `anychar`, which now can also
be used in set operations (union, complement and intersection), and
character classes.  For example, `(or nonl "\n")` is now equivalent to
`anychar`.

* lisp/emacs-lisp/rx.el (rx--expand-def): Remove, split into...
(rx--expand-def-form, rx--expand-def-symbol): ...these.
(rx--translate-compat-symbol-entry)
(rx--translate-compat-form-entry): New functions for handling the
legacy extension mechanism.
(rx--normalise-or-arg): Renamed to...
(rx--normalise-char-pattern): ...this, and rewrite.
(rx--all-string-or-args): Remove, split into...
(rx--all-string-branches-p, rx--collect-or-strings): ...these.
(rx--char-alt-union, rx--intersection-intervals)
(rx--reduce-to-char-alt, rx--optimise-or-args)
(rx--translate-char-alt, rx--human-readable): New.
(rx--translate-or, rx--translate-not, rx--translate-intersection):
Rewrite.
(rx--charset-p, rx--intervals-to-alt, rx--charset-intervals)
(rx--charset-union, rx--charset-intersection, rx--charset-all)
(rx--translate-union): Remove.
(rx--generate-alt): Decide whether to generate a negated character
alternative.
(rx--complement-intervals, rx--intersect-intervals)
(rx--union-intervals): Rename to...
(rx--interval-set-complement, rx--interval-set-intersection)
(rx--interval-set-union): ...these.
(rx--translate-symbol, rx--translate-form): Refactor extension
processing.  Handle synthetic `rx--char-alt` form.
* test/lisp/emacs-lisp/rx-tests.el (rx-or, rx-char-any-raw-byte)
(rx-any, rx-charset-or): Adapt to changes and extend.
* test/lisp/emacs-lisp/rx-tests.el (rx--complement-intervals)
(rx--union-intervals, rx--intersect-intervals): Rename to...
(rx--interval-set-complement, rx--interval-set-union)
(rx--interval-set-intersection): ...these.

16 months ago; * lisp/net/dictionary.el (dictionary-search): Fix last change.
Eli Zaretskii [Sat, 12 Aug 2023 15:35:24 +0000 (18:35 +0300)]
; * lisp/net/dictionary.el (dictionary-search): Fix last change.

16 months agoImprove dictionary-mode documentation
Stefan Kangas [Sat, 12 Aug 2023 14:40:10 +0000 (16:40 +0200)]
Improve dictionary-mode documentation

* lisp/net/dictionary.el (dictionary-mode): Improve docstring

16 months agoConvert dictionary-mode to define-derived-mode
Stefan Kangas [Sat, 12 Aug 2023 14:30:08 +0000 (16:30 +0200)]
Convert dictionary-mode to define-derived-mode

* lisp/net/dictionary.el (dictionary-instances): Delete.
(dictionary-mode): Use define-derived-mode.
(dictionary--count-mode-buffers): New function.
(dictionary-close): Use above new function.

16 months agoRemove dictionary-color-support compat code
Stefan Kangas [Sat, 12 Aug 2023 14:06:10 +0000 (16:06 +0200)]
Remove dictionary-color-support compat code

* lisp/net/dictionary.el (dictionary-color-support): Make obsolete
in favor of 'display-color-p'.  Update single caller.

16 months ago; Fix typo
Stefan Kangas [Sat, 12 Aug 2023 13:46:32 +0000 (15:46 +0200)]
; Fix typo

16 months agoRemove compat code for XEmacs' itimer.el
Stefan Kangas [Sat, 12 Aug 2023 13:29:09 +0000 (15:29 +0200)]
Remove compat code for XEmacs' itimer.el

* lisp/progmodes/idlwave.el (idlwave-update-routine-info)
(idlwave-start-load-rinfo-timer):
* lisp/type-break.el (type-break-cancel-function-timers)
(type-break-run-at-time): Remove XEmacs compat code.

16 months agoMake dired-move-to-filename-regexp obsolete
Stefan Kangas [Sat, 12 Aug 2023 12:36:59 +0000 (14:36 +0200)]
Make dired-move-to-filename-regexp obsolete

* lisp/dired.el (dired-move-to-filename-regexp): Make Emacs 21
compatibility alias obsolete.

16 months agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Sat, 12 Aug 2023 13:17:59 +0000 (15:17 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

16 months agoRemove superfluous check from vc-hooks.el
Michael Albinus [Sat, 12 Aug 2023 13:17:32 +0000 (15:17 +0200)]
Remove superfluous check from vc-hooks.el

* lisp/vc/vc-hooks.el (vc-registered): Don't check whether
`file-name-handler-alist' is bound, the check is superfluous.

16 months ago; * java/INSTALL (LOCATING NECESSARY FILES): New section.
Po Lu [Sat, 12 Aug 2023 12:58:13 +0000 (20:58 +0800)]
; * java/INSTALL (LOCATING NECESSARY FILES): New section.

16 months agoAvoid crashes in 'display_count_lines' when current buffer was killed
Eli Zaretskii [Sat, 12 Aug 2023 12:06:48 +0000 (15:06 +0300)]
Avoid crashes in 'display_count_lines' when current buffer was killed

* src/xdisp.c (Fformat_mode_line):
* src/fns.c (Fline_number_at_pos): Don't allow to count lines in a
dead buffer.  (Bug#65060)

16 months agoStop `use-package-report` from displaying an empty buffer
Stefan Kangas [Sat, 12 Aug 2023 10:43:19 +0000 (12:43 +0200)]
Stop `use-package-report` from displaying an empty buffer

* lisp/use-package/use-package-core.el (use-package-report): Signal
user-error if there are no statistics to display, instead of showing
an empty buffer.

16 months ago; * doc/emacs/mini.texi (Completion Commands): Fix a typo (bug#65242).
Daniel Martín [Sat, 12 Aug 2023 08:32:45 +0000 (10:32 +0200)]
; * doc/emacs/mini.texi (Completion Commands): Fix a typo (bug#65242).

16 months agoFix 'insert-file-contents' with non-regular files
Eli Zaretskii [Sat, 12 Aug 2023 08:02:52 +0000 (11:02 +0300)]
Fix 'insert-file-contents' with non-regular files

* src/fileio.c (Finsert_file_contents): Fix the doc string.  Erase
only the accessible portion of the buffer, not the entire buffer.
(Bug#65156)

16 months agoUpdate csharp tree-sitter support due to upstream changes
J M [Thu, 10 Aug 2023 22:23:20 +0000 (23:23 +0100)]
Update csharp tree-sitter support due to upstream changes

A change in tree-sitter-c-sharp grammar for csharp (commit
18a531), has removed the keyword void_keyword and advised
we should use predefined_type.
* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
Support both old and new style of keywords in tree-sitter-c-sharp
grammar.  (Bug#65113)

16 months agoSubstitute command keys in 'ielm-header' at use time
Matthew Tromp [Thu, 10 Aug 2023 14:41:24 +0000 (10:41 -0400)]
Substitute command keys in 'ielm-header' at use time

Before, command keys were substituted into the ielm-header when
ielm.el was loaded, which resulted in the substitutions depending on
the user's current buffer instead of the ielm buffer.
For example, if the user was in an info-mode buffer, the key would
appear as 'H' instead of 'C-h m'.
Now, the command key is substituted after the ielm buffer has been
created.
* lisp/ielm.el (ielm-header): Remove substitute-command-keys.
(inferior-emacs-lisp-mode): Add substitute-command-keys.  (Bug#65213)

Copyright-paperwork-exempt: yes

16 months ago; * etc/PROBLEMS: Add entry about XIM problems (bug#65205).
Eli Zaretskii [Sat, 12 Aug 2023 07:04:55 +0000 (10:04 +0300)]
; * etc/PROBLEMS: Add entry about XIM problems (bug#65205).

16 months agoFix rare crashes in redisplay due to problems with fontsets
Eli Zaretskii [Sat, 12 Aug 2023 06:38:28 +0000 (09:38 +0300)]
Fix rare crashes in redisplay due to problems with fontsets

* src/xdisp.c (get_next_display_element): If we have no usable
face to display a character/composition, treat that as glyphless.
(produce_glyphless_glyph): If neither it->face nor its ASCII face
are usable, fall back to the frame's default font.  (Bug#65198)

16 months agoFix a typo in 'leuven-dark-theme.el'
Eli Zaretskii [Sat, 12 Aug 2023 06:27:23 +0000 (09:27 +0300)]
Fix a typo in 'leuven-dark-theme.el'

* etc/themes/leuven-dark-theme.el (leuven-dark): Fix a typo.
Reported by John Poole <saxcos@posteo.es>.  (Bug#65239)

16 months agoUpdate lists of non-UTF files
Paul Eggert [Sat, 12 Aug 2023 06:09:39 +0000 (23:09 -0700)]
Update lists of non-UTF files

* .gitattributes: Don't diff text files with encodings
incompatible with UTF-8.  Add some new binary file extensions,
like '.webp'.  etc/e/eterm-direct and java/emacs.keystore
are also binary.
* admin/notes/unicode: Update similarly.

16 months ago* lisp/emacs-lisp/cl-macs.el (cl--labels-convert): Fix bug#65017
Stefan Monnier [Sat, 12 Aug 2023 03:14:05 +0000 (23:14 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl--labels-convert): Fix bug#65017

This fixes what I consider to be the core of the bug, by handling
`cl--labels-convert-cache` more carefully (i.e. being more careful how
we look up its value and by flushing it ASAP).

16 months agoImprove precision pixel scrolling
Po Lu [Sat, 12 Aug 2023 02:21:34 +0000 (10:21 +0800)]
Improve precision pixel scrolling

* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down-page)
(pixel-scroll-precision-scroll-up-page): Use
pos-visible-in-window-p to opt between the next line or to the
window start rather than computing the next position by hand.
(pixel-scroll-precision-mode): Disable
make-cursor-line-fully-visible.  (bug#65214)
* src/image.c (jpeg_load_body): Fix crash if libjpeg detects an
error before ximg is initialized.
* src/xdisp.c (display_and_set_cursor): Don't display cursor in
vscrolled-away row.

16 months ago* lisp/indent-aux.el (kill-ring-deindent-mode): Add autoload cookie.
Po Lu [Sat, 12 Aug 2023 01:06:52 +0000 (09:06 +0800)]
* lisp/indent-aux.el (kill-ring-deindent-mode): Add autoload cookie.

16 months agoMake kill-ring-deindent-mode autoloaded
Po Lu [Sat, 12 Aug 2023 01:04:19 +0000 (09:04 +0800)]
Make kill-ring-deindent-mode autoloaded

* lisp/indent-aux.el
(kill-ring-deindent-buffer-substring-function)
(kill-ring-deindent-mode, indent-aux):
* lisp/simple.el (kill-ring-deindent-buffer-substring-function)
(kill-ring-deindent-mode): Move kill-ring-deindent-mode to
indent-aux.el.

16 months agoUnbreak project-find-file's future history when cpd is not root
Dmitry Gutov [Sat, 12 Aug 2023 00:58:53 +0000 (03:58 +0300)]
Unbreak project-find-file's future history when cpd is not root

* lisp/progmodes/project.el (project-find-file): Pass in
buffer-file-name as absolute name (bug#63829).
(project--read-file-cpd-relative): Make it relative to the
appropriate common parent dir.

16 months agoxref-find-references-and-replace: Use identifier-at-point in prompt
Dmitry Gutov [Sat, 12 Aug 2023 00:39:32 +0000 (03:39 +0300)]
xref-find-references-and-replace: Use identifier-at-point in prompt

* lisp/progmodes/xref.el (xref-find-references-and-replace):
Use identifier-at-point in prompt as defined by backend (bug#63939).

16 months ago(project--keymap-prompt): Use help-key-binding face
Dmitry Gutov [Sat, 12 Aug 2023 00:34:53 +0000 (03:34 +0300)]
(project--keymap-prompt): Use help-key-binding face

* lisp/progmodes/project.el (project--keymap-prompt): Use
help-key-binding face and adjust the prompt to fit (bug#64799).

16 months ago; * admin/git-bisect-start: Update failing commits
Gregory Heytings [Fri, 11 Aug 2023 14:22:17 +0000 (14:22 +0000)]
; * admin/git-bisect-start: Update failing commits

16 months ago; * lisp/files.el (delete-file): Add expand-file-name back.
Eli Zaretskii [Fri, 11 Aug 2023 12:03:48 +0000 (15:03 +0300)]
; * lisp/files.el (delete-file): Add expand-file-name back.

16 months ago; Improve documentation of a recent addition
Eli Zaretskii [Fri, 11 Aug 2023 11:52:12 +0000 (14:52 +0300)]
; Improve documentation of a recent addition

* lisp/simple.el (kill-ring-deindent-buffer-substring-function):
Doc fix.

16 months agoImprove kill-ring-deindent-mode
Po Lu [Fri, 11 Aug 2023 08:08:16 +0000 (16:08 +0800)]
Improve kill-ring-deindent-mode

* etc/NEWS:
* lisp/simple.el (kill-ring-deindent-buffer-substring-function):
(kill-ring-deindent-mode): Deindent by the column number at BEG
in lieu of the indentation at BEG.

16 months agoNew global minor mode `kill-ring-deindent-mode'
Po Lu [Fri, 11 Aug 2023 07:58:31 +0000 (15:58 +0800)]
New global minor mode `kill-ring-deindent-mode'

* etc/NEWS: Announce the new minor mode.

* lisp/simple.el (kill-ring-deindent-buffer-substring-function):
New function.
(kill-ring-deindent-mode): New minor mode, for trimming excess
indentation from saved text.

16 months agoMinor adjustments to Android port
Po Lu [Fri, 11 Aug 2023 06:55:21 +0000 (14:55 +0800)]
Minor adjustments to Android port

* java/org/gnu/emacs/EmacsService.java (readDirectoryEntry):
Also refrain from returning NULL or file names containing
non-representable NULL bytes.
* src/callproc.c (get_current_directory): Clean up by employing
android_is_special_directory.

16 months agoRepair mailutils configury
Po Lu [Fri, 11 Aug 2023 00:57:04 +0000 (08:57 +0800)]
Repair mailutils configury

* configure.ac (with_mailutils): When processing defaults,
set to yes-unless-android if with_features.
(HAVE_MAILUTILS): Later, disable Mailutils if yes-on-android
and with_android is set.  This is the minimal Emacs build
for the build machine.  (bug#65190)

16 months ago; * doc/misc/eshell.texi (Bugs and ideas): Remove already-fixed bugs.
Jim Porter [Thu, 10 Aug 2023 22:01:39 +0000 (15:01 -0700)]
; * doc/misc/eshell.texi (Bugs and ideas): Remove already-fixed bugs.

16 months agoReturn separators from 'eshell-split-commands' directly when requested
Jim Porter [Tue, 8 Aug 2023 05:28:24 +0000 (22:28 -0700)]
Return separators from 'eshell-split-commands' directly when requested

This eliminates the need for using a dynamically-bound variable to
hold the list of separators.

* lisp/eshell/esh-cmd.el (eshell--sep-terms): Remove.
(eshell-split-commands): New function, adapted from
'eshell-separate-commands'.
(eshell-separate-commands): Make obsolete, and call
'eshell-split-commands'.
(eshell-parse-command, eshell-parse-pipeline): Use
'eshell-split-commands'.

* lisp/eshell/esh-arg.el (eshell-parse-delimiter): Update comment.

16 months agoSimplify command parsing in Eshell
Jim Porter [Tue, 8 Aug 2023 05:15:18 +0000 (22:15 -0700)]
Simplify command parsing in Eshell

* lisp/eshell/esh-cmd.el (eshell-parse-command): Do all modifications
to each command in a single pass.
(eshell-parse-pipeline): Remove unncessary reversing of parsed
results.

16 months ago; * admin/git-bisect-start: Update failing commits
Gregory Heytings [Thu, 10 Aug 2023 17:34:40 +0000 (17:34 +0000)]
; * admin/git-bisect-start: Update failing commits

16 months ago; * etc/PROBLEMS: Fix typo.
Robert Pluim [Thu, 10 Aug 2023 10:42:30 +0000 (12:42 +0200)]
; * etc/PROBLEMS: Fix typo.

16 months agoAdapt Tramp test
Michael Albinus [Thu, 10 Aug 2023 10:17:59 +0000 (12:17 +0200)]
Adapt Tramp test

* test/lisp/net/tramp-tests.el (tramp-test41-special-characters):
Skip for macOS.

16 months agoUniformly verify sfnt_read_table_directory doesn't return TTC header
Po Lu [Thu, 10 Aug 2023 09:24:24 +0000 (17:24 +0800)]
Uniformly verify sfnt_read_table_directory doesn't return TTC header

* src/sfntfont.c (sfnt_enum_font, sfntfont_read_cmap)
(sfnt_open_tables): Check for -1 return value from
sfnt_read_table_directory.

16 months ago; [NSString lispString]: clarify unpaired surrogate behaviour
Mattias Engdegård [Thu, 10 Aug 2023 08:56:21 +0000 (10:56 +0200)]
; [NSString lispString]: clarify unpaired surrogate behaviour

16 months agoScroll up and down in image-dired
Manuel Giraud [Thu, 9 Mar 2023 13:35:31 +0000 (14:35 +0100)]
Scroll up and down in image-dired

* lisp/image/image-dired.el (image-dired-scroll):
Function to manage scroll in image-dired.
(image-dired-scroll-up, image-dired-scroll-down): Scroll up and down
command in image-dired.
(image-dired-thumbnail-mode-map): Use them.  (Bug#65052)

16 months agoProperly expand the JSX indentation rules in 'js-ts-mode'
dannyfreeman [Mon, 7 Aug 2023 19:55:27 +0000 (15:55 -0400)]
Properly expand the JSX indentation rules in 'js-ts-mode'

* lisp/progmodes/js.el (js--treesit-indent-rules): Fix
'js-ts-mode' indent bug in JSX expressions. Before this
change, treesit indent mechanisms were trying to call this
compatibility function like a matching or anchor rule.
This resulted in an error when running `indent-for-tab-command`
while the cursor was in a JSX expression:

treesit--simple-indent-eval: Wrong number of
arguments: ((cl-struct-js--pitem-tags ido-cur-list t) nil "Indent rules
helper, to handle different releases of tree-sitter-javascript."

(Bug#65134)

16 months agoStreamline definition of BOOT_TIME_FILE on MS-Windows
Eli Zaretskii [Thu, 10 Aug 2023 08:44:49 +0000 (11:44 +0300)]
Streamline definition of BOOT_TIME_FILE on MS-Windows

* nt/inc/ms-w32.h: Don't define BOOT_TIME_FILE here...
* configure.ac: ...define it here instead, as for the other
systems.

16 months ago* Add `emacs-lisp-native-compile' to easy-menu.
Andrea Corallo [Thu, 10 Aug 2023 08:39:14 +0000 (10:39 +0200)]
* Add `emacs-lisp-native-compile' to easy-menu.

* lisp/progmodes/elisp-mode.el (emacs-lisp-mode-menu): Add menu
item for emacs-lisp-native-compile.

16 months ago* lisp/progmodes/elisp-mode.el (emacs-lisp-mode-menu): Simplify condition.
Andrea Corallo [Thu, 10 Aug 2023 08:34:01 +0000 (10:34 +0200)]
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode-menu): Simplify condition.

16 months ago* Introduce `emacs-lisp-native-compile'.
Andrea Corallo [Thu, 10 Aug 2023 08:18:43 +0000 (10:18 +0200)]
* Introduce `emacs-lisp-native-compile'.

* lisp/progmodes/elisp-mode.el (emacs-lisp-native-compile): New command.
(emacs-lisp-native-compile-and-load): Make use of.

16 months agoFix the -x switch in non-X builds
Eli Zaretskii [Thu, 10 Aug 2023 07:50:35 +0000 (10:50 +0300)]
Fix the -x switch in non-X builds

* src/emacs.c (main): Move the handling of the -x switch out of
the HAVE_X_WINDOWS condition, and simplify the rest of the code by
avoiding code duplication in HAVE_X_WINDOWS and !HAVE_X_WINDOWS
cases.  (Bug#65048)

16 months agoDocument that `set-mouse-color' does not work everywhere
Po Lu [Thu, 10 Aug 2023 07:31:03 +0000 (15:31 +0800)]
Document that `set-mouse-color' does not work everywhere

* etc/PROBLEMS (Miscellaneous Problems): Mention where
`set-mouse-color' does not work.

16 months ago; Improve sectioning and documentation in xterm.c
Po Lu [Thu, 10 Aug 2023 06:15:03 +0000 (14:15 +0800)]
; Improve sectioning and documentation in xterm.c

* src/xterm.c (x_dnd_compute_toplevels, x_dnd_get_target_window_1)
(x_dnd_get_wm_state_and_proto, xi_frame_selected_for)
(xi_convert_event_state, x_free_xi_devices)
(xi_populate_device_from_info): Improve sectioning, fill some
lines to 80 columns.  Not all lines could be filled as a result
of XCB's heretically long identifier names.

16 months ago; * doc/emacs/dired.texi (Misc Dired Features): Fix last change.
Eli Zaretskii [Thu, 10 Aug 2023 06:08:59 +0000 (09:08 +0300)]
; * doc/emacs/dired.texi (Misc Dired Features): Fix last change.

16 months agoFix the effects and documentation of 'dired-free-space'
Eli Zaretskii [Thu, 10 Aug 2023 06:06:05 +0000 (09:06 +0300)]
Fix the effects and documentation of 'dired-free-space'

* lisp/dired.el (dired-free-space): Fix doc string and Custom tags.
(dired--insert-disk-space): When 'dired-free-space' is 'separate',
return the position of the beginning of the disk-space line, to be
compatible with pre-Emacs 29 behavior under
'dired-hide-details-mode'.  (Bug#65186)

* doc/emacs/dired.texi (Misc Dired Features): Fix wording in
documentation of 'dired-free-space'.

16 months ago; * lisp/calendar/cal-move.el (calendar-scroll-left): Fix last change.
Po Lu [Thu, 10 Aug 2023 05:32:30 +0000 (13:32 +0800)]
; * lisp/calendar/cal-move.el (calendar-scroll-left): Fix last change.

16 months agoAlso fix calendar-scroll-left
Po Lu [Thu, 10 Aug 2023 05:30:33 +0000 (13:30 +0800)]
Also fix calendar-scroll-left

* lisp/calendar/cal-move.el (calendar-scroll-left): Use
`calendar-event-buffer' instead of assuming that EVENT's
posn-window is always a window.

16 months agoRepair several minor breakages
Po Lu [Thu, 10 Aug 2023 05:25:29 +0000 (13:25 +0800)]
Repair several minor breakages

* lisp/calendar/calendar.el (calendar-event-buffer): New
function.
(calendar-cursor-to-date, calendar-other-month):

* lisp/calendar/holidays.el (calendar-list-holidays)
(calendar-mark-holidays):

* lisp/calendar/lunar.el (calendar-lunar-phases): Use that
function to derive event windows, in case these commands are
being called from the menu bar.

* lisp/doc-view.el (doc-view-tool-bar-map): Fix typo in help
text.

16 months ago; Fix typo
Stefan Kangas [Thu, 10 Aug 2023 05:21:22 +0000 (07:21 +0200)]
; Fix typo

16 months ago; * configure.ac: Fix typo.
Po Lu [Thu, 10 Aug 2023 01:58:02 +0000 (01:58 +0000)]
; * configure.ac: Fix typo.

16 months agoFix the MS-DOS, Haiku, USG, etc builds
Po Lu [Thu, 10 Aug 2023 01:53:26 +0000 (01:53 +0000)]
Fix the MS-DOS, Haiku, USG, etc builds

* configure.ac (emacs_cv_boot_time_file): Only compute this on
GNU/Linux, the sole system with systemd.
* nt/inc/ms-w32.h (BOOT_TIME_FILE): Remove now redundant #undef.
* src/filelock.c (get_boot_time): Eschew BOOT_TIME_FILE if not
defined.

16 months agoFurther improve android.texi
Po Lu [Thu, 10 Aug 2023 01:03:23 +0000 (09:03 +0800)]
Further improve android.texi

* doc/emacs/android.texi (Android Environment): Improve
sectioning by replacing subsections with simple entries in the
concept index.

16 months agoFix crash when reading TTC font for glyph mapping table selection
Po Lu [Thu, 10 Aug 2023 00:58:04 +0000 (08:58 +0800)]
Fix crash when reading TTC font for glyph mapping table selection

* src/sfnt.c (sfnt_read_cmap_table): Seek to the table directory
if DESC->offset is provided.
* src/sfntfont.c (sfntfont_read_cmap): Accurately verify cmap
subtable header size.  (bug#65185)

16 months agoMake node-less sections subsections in android.texi
Po Lu [Thu, 10 Aug 2023 00:42:23 +0000 (08:42 +0800)]
Make node-less sections subsections in android.texi

* doc/emacs/android.texi (Android Environment): Change node-less
sections into subsections.

16 months agoFix pinch gestures after toolkit menu
Po Lu [Thu, 10 Aug 2023 00:40:48 +0000 (08:40 +0800)]
Fix pinch gestures after toolkit menu

* src/xmenu.c (leave_toolkit_menu): Restore gesture event
mask.  (bug#65129)

16 months agoAdjust to random-seed move
Paul Eggert [Wed, 9 Aug 2023 19:06:25 +0000 (12:06 -0700)]
Adjust to random-seed move

For some time, GNU/Linux systems have put their random-seed file
somewhere other than where src/filelock.c looks for it.
Catch up to this by having 'configure' scout for it.
* configure.ac (BOOT_TIME_FILE):
Define this at configure-time.
* nt/inc/ms-w32.h (BOOT_TIME_FILE): Override 'configure'.
* src/filelock.c (BOOT_TIME_FILE): Remove default definition,
since 'configure' defaults it now.

16 months ago; Improve INSTALL files
Eli Zaretskii [Wed, 9 Aug 2023 19:03:00 +0000 (22:03 +0300)]
; Improve INSTALL files

* INSTALL:
* java/INSTALL: Improve and clarify instructions.

16 months agoFix cross-reference to eldoc in eglot manual
Stefan Kangas [Wed, 9 Aug 2023 14:48:54 +0000 (16:48 +0200)]
Fix cross-reference to eldoc in eglot manual

* doc/misc/eglot.texi (Eglot Features): Fix cross-reference to eldoc
node in the Emacs manual.

16 months agoAdd native-compilation to Emacs Lisp mode menu
Eli Zaretskii [Wed, 9 Aug 2023 14:35:24 +0000 (17:35 +0300)]
Add native-compilation to Emacs Lisp mode menu

* lisp/progmodes/elisp-mode.el (emacs-lisp-mode-menu): Add menu
item for emacs-lisp-native-compile-and-load.

16 months agoFix emacs-lisp-native-compile-and-load eln target directory (bug#64226)
Andrea Corallo [Wed, 9 Aug 2023 13:13:48 +0000 (15:13 +0200)]
Fix emacs-lisp-native-compile-and-load eln target directory (bug#64226)

* lisp/emacs-lisp/comp.el (comp-spill-lap-function): Don't use
`byte+native-compile' to select output directory but always axpect
it explicit through `native-compile-target-directory'.
(batch-byte+native-compile): Set `native-compile-target-directory'.
* test/src/comp-tests.el (comp-tests-bootstrap): Set
`native-compile-target-directory'.

16 months ago; Fix whitespace in eglot.el
Eli Zaretskii [Wed, 9 Aug 2023 13:15:25 +0000 (16:15 +0300)]
; Fix whitespace in eglot.el

* lisp/progmodes/eglot.el (eglot-server-programs): Fix whitespace.
Reported by Allen Li <darkfeline@felesatra.moe>.  (Bug#65161)

16 months ago; * test/lisp/net/tramp-tests.el: duck make-process bytecomp warning
Mattias Engdegård [Wed, 9 Aug 2023 12:57:07 +0000 (14:57 +0200)]
; * test/lisp/net/tramp-tests.el: duck make-process bytecomp warning

16 months agoDon't signal when I-search occurs within a kbd macro
Po Lu [Wed, 9 Aug 2023 12:42:44 +0000 (20:42 +0800)]
Don't signal when I-search occurs within a kbd macro

* lisp/isearch.el (isearch-mode): Check last-event-frame is not
`macro' before providing it to `device-class'.  (bug#65175)

16 months agoRemove harmful and redundant bindings from the byte compiler.
Alan Mackenzie [Wed, 9 Aug 2023 11:27:28 +0000 (11:27 +0000)]
Remove harmful and redundant bindings from the byte compiler.

This fixes bug#65017.  Binding symbols-with-pos-enabled in two
macro handling functions was harmful; one of these caused
cl--labels-convert to fail.  Binding print-symbols-bare in many
places in the byte compiler was redundant.

* lisp/emacs-lisp/bytecomp.el (byte-compile-recurse-toplevel)
(byte-compile-initial-macro-environment)
(byte-compile-output-file-form, byte-compile-output-docform)
(byte-compile-preprocess): Remove bindings of
print-symbols-bare.

* lisp/emacs-lisp/macroexp.el (macroexp--compiler-macro)
(internal-macroexpand-for-load): Remove bindings of
symbols-with-pos-enabled.
(internal-macroexpand-for-load): Remove binding of
print-symbols-bare.

16 months ago; Re-enable the /dev/urandom test
Eli Zaretskii [Wed, 9 Aug 2023 11:25:59 +0000 (07:25 -0400)]
; Re-enable the /dev/urandom test

* test/src/fileio-tests.el (fileio-tests--non-regular-insert):
Remove :unstable, but comment out the single failing test.

16 months agoFaster NSString to Lisp string conversion
Mattias Engdegård [Wed, 9 Aug 2023 10:34:06 +0000 (12:34 +0200)]
Faster NSString to Lisp string conversion

Since we know that the value from [NSString UTF8String] is valid
UTF-8, using make_string is wastefully slow.

* src/nsfns.m (count_utf8_chars): New function, at least twice as fast
as parse_str_as_multibyte used by make_string for this purpose.
([NSString lispString]): Use count_utf8_chars.  We now always make a
multibyte string because there is no reason not to.

16 months agoRemove a DEFSYM that no longer needs to be in the C core.
Eric S. Raymond [Wed, 9 Aug 2023 10:05:24 +0000 (06:05 -0400)]
Remove a DEFSYM that no longer needs to be in the C core.

* src/fileio.c (syms_of_fileio): Remove Qmove_file_to_trash.

16 months agoDisable failing test (bug#65156)
Mattias Engdegård [Wed, 9 Aug 2023 08:23:28 +0000 (10:23 +0200)]
Disable failing test (bug#65156)

* test/src/fileio-tests.el (fileio-tests--non-regular-insert):
Mark as :unstable, since /dev/urandom is seekable.

Do not merge to master.

16 months agoFix crashes runninging android-emacs with bad LD_LIBRARY_PATH
Po Lu [Wed, 9 Aug 2023 06:23:25 +0000 (14:23 +0800)]
Fix crashes runninging android-emacs with bad LD_LIBRARY_PATH

* doc/emacs/input.texi (Touchscreens, On-Screen Keyboards): Fix
section titles.

* src/android-emacs.c (main): If EMACS_LD_LIBRARY_PATH is set,
make it LD_LIBRARY_PATH.

* src/android.c (JNICALL): Set LD_LIBRARY_PATH as well as
EMACS_LD_LIBRARY_PATH.

16 months agoImprove Emacsbug output
Po Lu [Wed, 9 Aug 2023 04:21:03 +0000 (12:21 +0800)]
Improve Emacsbug output

* lisp/mail/emacsbug.el (report-emacs-bug--os-description):
Handle `android'.
(emacs-build-description): Don't print the Android build
fingerprint here.

16 months agoAdd a string check to delete-file-internal.
Eric S. Raymond [Wed, 9 Aug 2023 04:02:22 +0000 (00:02 -0400)]
Add a string check to delete-file-internal.

* src/fileio.c (delete-file-internal): Argument should be a string.

16 months agoBetter fix for bug#65156
Po Lu [Wed, 9 Aug 2023 02:49:44 +0000 (10:49 +0800)]
Better fix for bug#65156

* src/fileio.c (Finsert_file_contents): Correct seek-ability
test, since lseek returns -1 upon failure.  (Bug#65156)

16 months ago* lisp/ldefs-boot.el: Restore no-byte-compile cookie.
Po Lu [Wed, 9 Aug 2023 01:50:35 +0000 (09:50 +0800)]
* lisp/ldefs-boot.el: Restore no-byte-compile cookie.

16 months ago* doc/misc/calc.texi (Musical Notes): Fix build with Texinfo 4.13.
Po Lu [Wed, 9 Aug 2023 01:21:36 +0000 (09:21 +0800)]
* doc/misc/calc.texi (Musical Notes): Fix build with Texinfo 4.13.

16 months agoRun Git hooks within xcu4
Po Lu [Wed, 9 Aug 2023 01:20:15 +0000 (09:20 +0800)]
Run Git hooks within xcu4

* build-aux/git-hooks/pre-commit (LC_ALL):
* build-aux/git-hooks/prepare-commit-msg (SHA1): Run using xcu4
tools.

16 months ago; Minor adjustments to configury, loaddefs and gitignore
Po Lu [Wed, 9 Aug 2023 01:19:11 +0000 (09:19 +0800)]
; Minor adjustments to configury, loaddefs and gitignore

* .gitignore: Add exec/aclocal.m4.

* configure.ac (bitmapdirs): Circumvent shell substitution that
isn't supported by the Bourne shell.

* lisp/ldefs-boot.el: Update from loaddefs.el.

16 months ago; * .gitignore: Add exec/aclocal.m4.
Stefan Kangas [Wed, 9 Aug 2023 01:35:18 +0000 (03:35 +0200)]
; * .gitignore: Add exec/aclocal.m4.

16 months agoAdd calling convention to face-attr-construct
Stefan Kangas [Wed, 9 Aug 2023 01:30:56 +0000 (03:30 +0200)]
Add calling convention to face-attr-construct

* lisp/faces.el (face-attr-construct): Add
advertised-calling-convention declaration.

16 months agoDon't depend on Automake to generate exec/aclocal.m4
Po Lu [Wed, 9 Aug 2023 00:26:45 +0000 (08:26 +0800)]
Don't depend on Automake to generate exec/aclocal.m4

* autogen.sh (do_git): Generate exec/aclocal.m4 by hand.
(bug#65160)

16 months agoFix all my attributions to be correct and consistent...
Eric S. Raymond [Wed, 9 Aug 2023 00:02:17 +0000 (20:02 -0400)]
Fix all my attributions to be correct and consistent...

...in case people are trying to track me down for questions.

.mailmap, ChangeLog.1, admin/notes/copyright, doc/emacs/ChangeLog.1,
doc/emacs/ack.texi, doc/lispref/ChangeLog.1, doc/misc/gnus.texi,
etc/ChangeLog.1, lib-src/ChangeLog.1, lisp/ChangeLog.13,
lisp/ChangeLog.14, lisp/ChangeLog.15, lisp/ChangeLog.17,
lisp/ChangeLog.3, lisp/ChangeLog.4, lisp/ChangeLog.5,
lisp/ChangeLog.6, lisp/ChangeLog.7, lisp/emacs-lisp/lisp-mnt.el,
lisp/finder.el, lisp/loadhist.el, lisp/play/cookie1.el,
lisp/progmodes/asm-mode.el, lisp/progmodes/gud.el,
lisp/progmodes/make-mode.el, lisp/term/AT386.el, src/ChangeLog.3