Commit graph

170545 commits

Author SHA1 Message Date
Eshel Yaron
412cc0212d Eldoc: play nice with mode-line-format-right-align (bug#68547)
* lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Avoid nesting
'mode-line-format', since that breaks 'mode-line-format-right-align'.
2024-01-20 06:00:21 -06:00
Eli Zaretskii
ce836aafaa ; Merge NEWS.29. 2024-01-20 06:40:54 -05:00
Eli Zaretskii
8bb5525b62 ; Fix merge snafus
* lisp/jsonrpc.el:
* lisp/progmodes/eglot.el: Fix merge snafus.
2024-01-20 06:37:09 -05:00
Eli Zaretskii
1b31a784bf Merge from origin/emacs-29
5bb5590dec Fix blunder in labeled_narrow_to_region
78ddb32fad Fix documentation of icon-elements
725a3f32f8 ; Fix typos in symbol names
6653ee66ca Improve two docstrings in ox-latex
7d869a0402 Doc fix in auth-source-read-char-choice
f149de223b Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
1f97a87879 Fix info-xref-tests
51f391998b Add @kindex in manuals for existing keybindings on 'C-x x...
2024-01-20 06:25:59 -05:00
Eshel Yaron
3a5ee06057 ; Use HTML entities for reserved characters in 'dom-print'
* lisp/dom.el (dom-print): Encode HTML reserved characters in strings.
* test/lisp/dom-tests.el (dom-tests-print): New test.  (Bug#68508)
2024-01-20 11:40:22 +02:00
Po Lu
b3e4fbe867 Round projs computed executing IP/ISECT instructions and improve IUP
* src/sfnt.c (sfnt_multiply_divide_rounded): New function.
(sfnt_multiply_divide_signed): Always round values, as fonts
which rely on IP to move points in concert with prior motion and
subsequently round such points with MDAP are sensitive to minor
deviations in the behavior of the former instruction.
(load_unscaled): New macro.
(IUP_SINGLE_PAIR, sfnt_interpret_iup_1): Compute ratio w/
unscaled points if possible.
2024-01-20 09:30:04 +08:00
Stefan Monnier
a34b76cd66 trace.el: Mention the last change in NEWS 2024-01-19 15:04:50 -05:00
Stefan Monnier
1293aac0df trace.el: Make it usable in batch mode as well
While at it, this fixes a bug where a traced function was not
able to set `deactivate-mark`.

* lisp/emacs-lisp/trace.el (trace--insert): New function, extracted
from `trace-make-advice`.  Output to stdout in batch mode.
(trace--entry-message): Rename from `trace-entry-message`.
Change calling convention.  Do the insertion directly from here.
(trace--exit-message): Rename from `trace-exit-message`.
Change calling convention.  Do the insertion directly from here.
(trace-make-advice, trace-values): Simplify accordingly.
2024-01-19 15:02:50 -05:00
Po Lu
bd5bfc2913 Fix another cause of superfluous inotify signals on Android
* src/android.c (android_select): If the event queue isn't
empty upon the initial check, clear all fdsets.
2024-01-19 20:51:24 +08:00
F. Jason Park
dd2caf1a76 Redo doc strings for ERC's entry point commands
* lisp/erc/erc.el: Bump Compat version in Package-Requires header to
29.1.4.4.
(erc-select-read-args): Revise doc string, and update name of internal
`--interactive-env--' entry-point parameter.
(erc, erc-tls): Don't use `&interactive-env' as a variable name, in
case it confuses persons or programs.  Overhaul doc string in response
to user complaints.  For `erc' specifically, include literal
`:keyword' symbols to help non-Emacs users understand the required
syntax, which isn't obvious without an example, like `erc-tls' has,
and with only "&key" and upcased metasynctatic variables to go by.
(erc--current-buffer-joined-p): Remove assertion.
* test/lisp/erc/erc-scenarios-keep-place-indicator.el
(erc-scenarios-keep-place-indicator--follow): Try waiting for
intermittently failing condition.
* test/lisp/erc/erc-tests.el (erc-select-read-args): Update name of
internal keyword variable.
2024-01-18 17:06:08 -08:00
F. Jason Park
13c7933a9d Add test for erc-extract-command-from-line
* lisp/erc/erc.el (erc-extract-command-from-line): Redo doc string.
* test/lisp/erc/erc-tests.el (erc--parse-isupport-value): Add case for
commonly seen escaped character ?=.
(erc-extract-command-from-line): New test.
; * test/lisp/erc/resources/erc-d/resources/basic.eld: Update.
; Don't send unnegotiated multi-prefixed userhost names.
; * test/lisp/erc/resources/erc-d/resources/dynamic-barnet.eld: Update.
; * test/lisp/erc/resources/erc-d/resources/dynamic-foonet.eld: Update.
; * test/lisp/erc/resources/erc-d/resources/dynamic.eld: Update.
; * test/lisp/erc/resources/erc-d/resources/eof.eld: Update.
; * test/lisp/erc/resources/erc-d/resources/fuzzy.eld: Update.
; * test/lisp/erc/resources/erc-d/resources/incremental.eld: Update.
; * test/lisp/erc/resources/erc-d/resources/linger.eld: Update.
; * test/lisp/erc/resources/erc-d/resources/no-block.eld: Update.
; * test/lisp/erc/resources/erc-d/resources/no-match.eld: Update.
; * test/lisp/erc/resources/erc-d/resources/unexpected.eld: Update.
2024-01-18 17:01:22 -08:00
Stefan Monnier
81a2212bd5 * lisp/international/quail.el (quail-input-method): Fix bug#68338 2024-01-18 18:28:54 -05:00
Stefan Monnier
a33f3947ea * lisp/progmodes/elisp-mode.el (elisp-completion-at-point): Fix bug#68514
Redo the commit 0db2126d71 to try and avoid selecting more than
a mere symbol.
2024-01-18 14:05:16 -05:00
Stefan Monnier
b07a86abb6 * test/lisp/emacs-lisp/comp-cstr-tests.el: Use macros in a simpler way
(comp-cstr-test-ts): Move out of `cl-eval-when`.
(comp-cstr-typespec-test): Delete.
(comp-cstr-synthesize-tests): Make it take the tests as an argument.
(comp-cstr-typespec-tests-alist): Delete var, pass its value to the
macro instead.
2024-01-18 14:00:54 -05:00
Mattias Engdegård
e7a6ce847f Don't use Qunbound as hash table key when printing (bug#68244)
This flaw could cause an assertion failure.

* src/print.c (PRINT_CIRCLE_CANDIDATE_P): Don't consider Qunbound a
print-circle candidate; it should never be seen by Lisp anyway.
2024-01-18 18:57:03 +01:00
Mattias Engdegård
ef01250ef9 Only use a hash index size of 1 for tables with size 0 (bug#68244)
This invariant was intended but insufficiently enforced which could
lead to an assertion failure.

* src/fns.c (hash_index_size): Assume size>0, and return a value >1.
(make_hash_table): Only use hash_index_size for size>0.
2024-01-18 18:56:26 +01:00
Eric Abrahamsen
2c887f497c Avoid font-lock reset in `gnus-message-citation-mode'
* lisp/gnus/gnus-cite.el (gnus-message-citation-mode): Use
`font-lock-add-keywords' and `font-lock-remove-keywords' instead of
modifying font-lock defaults.  Make no font-lock changes until
`font-lock-mode' is active.

Thanks to Morgan Willcock
2024-01-18 07:25:52 -08:00
Po Lu
d4d5830f8a ; * src/androidterm.c (handle_one_android_event): Fix typo. 2024-01-18 10:32:50 +08:00
Jim Porter
5f5faad249 ; Fix test failures from the fix for bug#67661
* test/lisp/eshell/em-cmpl-tests.el
  (em-cmpl-test/file-completion/non-unique): Make test more robust.
2024-01-17 09:32:18 -08:00
Andrea Corallo
c5031a52c5 * Update a comp test (bug#68523)
* test/src/comp-tests.el (comp-tests-ret-type-spec-71): Update a test
due to new 'sxhash-equal' behaviour.
2024-01-17 15:50:17 +01:00
Po Lu
daec3e7b41 Increase accuracy of IP instruction
* src/sfnt.c (sfnt_interpret_ip): Avoid precision loss by
retrieving original positions from the unscaled outline,
whenever possible.
2024-01-17 09:30:47 +08:00
Mattias Engdegård
f19f5604de Update pdumper hashes for buffer and Lisp_Hash_Table
* src/pdumper.c (dump_hash_table): Update for changes in recent
hash-table patch suites (bug#68244).
(dump_buffer): Update for case-fold-search changes (bug#66117).
2024-01-16 20:34:43 +01:00
Mattias Engdegård
dc404c5d0c More efficient hash table thawing
* src/fns.c (hash_table_thaw): Don't allocate anything for empty
tables.  Don't initialise the next vector twice.
(maybe_resize_hash_table): Factor out min_size constant.
2024-01-16 20:34:43 +01:00
Eli Zaretskii
0b8fe3c73c ; * etc/NEWS: Fix wording of recently-added entry. 2024-01-16 19:14:09 +02:00
Juri Linkov
6f75d0f36d New display action alist entry 'post-command-select-window' (bug#67993)
* doc/lispref/windows.texi (Buffer Display Action Alists):
Add 'post-command-select-window'.

* lisp/window.el (display-buffer): Add 'post-command-select-window'
to the docstring and handle at the end of function.
2024-01-16 18:54:04 +02:00
Po Lu
44fcab04f6 Enable the system's Arabic and Khmer fonts under Android
* lisp/international/fontset.el (setup-default-fontset): If
`android', search for Arabic or Khmer fonts with script tags,
not OTF features.
2024-01-16 11:08:37 +08:00
Mike Kupfer
e6a2901b1b Fix folder creation error (Bug#67361)
* lisp/mh-e/mh-funcs.el (mh-kill-folder), lisp/mh-e/mh-search.el
  (mh-index-new-folder), lisp/mh-e/mh-utils.el (mh-prompt-for-folder):
  Check for existence of speedbar-buffer rather than
  mh-speed-folder-map. The latter can exist if mh-speed has only been
  loaded but not displayed.
2024-01-15 17:34:18 -08:00
Stefan Monnier
27ff4d9c49 * lisp/help-fns.el (help-fns--parent-mode): Mention the extra parents
As suggested by Stefan Kangas in bug#68246.
2024-01-15 19:00:50 -05:00
Michael Albinus
2ef3111b13 * lisp/info-xref.el (info-xref-subfile-p): Avoid false positives. (Bug#68428) 2024-01-15 16:55:27 +01:00
João Távora
43612103c2 Jsonrpc: fix bug in jsonrpc--remove
* lisp/jsonrpc.el (jsonrpc--remove): Check timer before cancelling it.
(Version): Bump to 1.2.24

See https://github.com/joaotavora/eglot/issues/1342
2024-01-15 06:36:24 -06:00
Po Lu
c11cdf1858 ; * src/xterm.c (x_focus_frame): Insert missing unblock_input. 2024-01-15 14:32:26 +08:00
Stefan Monnier
314c939d1e (js-json-mode): Don't derive from js-mode (bug#67463)
* lisp/progmodes/js.el (js--mode-setup): New function, extracted from
`js-mode`.
(js-mode): Use it.
(js-json-mode): Use it instead of inheriting from `js-mode`.
2024-01-14 22:17:13 -05:00
Gregory Heytings
0d336507df ; * admin/git-bisect-start: Update failing commits 2024-01-15 00:53:36 +00:00
Gregory Heytings
5bb5590dec Fix blunder in labeled_narrow_to_region
* src/editfns.c (labeled_narrow_to_region): Record point before,
instead of after, calling narrow-to-region; otherwise point may
already have been changed.  Fixes bug#66764.
2024-01-14 21:59:21 +00:00
Daniel Martín
78ddb32fad Fix documentation of icon-elements
* lisp/emacs-lisp/icons.el (icon-elements): The plist key it returns
is `image', not `display'.  (Bug#68451)
2024-01-14 17:03:16 +02:00
Stefan Kangas
725a3f32f8 ; Fix typos in symbol names 2024-01-14 15:16:54 +01:00
Stefan Kangas
6653ee66ca Improve two docstrings in ox-latex
* lisp/org/ox-latex.el (org-latex-src-block-backend)
(org-latex-engraved-theme): Improve docstring; mention that
engrave-faces is a GNU ELPA package.
2024-01-14 14:52:17 +01:00
Stefan Kangas
7d869a0402 Doc fix in auth-source-read-char-choice
* lisp/auth-source.el (auth-source-read-char-choice): Don't
document 'dropdown-list', which was removed in 2011.
2024-01-14 14:47:39 +01:00
Mattias Engdegård
a83e60eccb Fix recent ses-tests mistakes (bug#5852)
* test/lisp/ses-tests.el
(ses-set-formula-write-cells-with-changed-references):
Quote constant list.  Remove unused variable.
2024-01-14 14:17:41 +01:00
Mattias Engdegård
d4b1e2c3b6 Use forward-line instead of next-line in noninteractive test
* test/lisp/textmodes/page-tests.el (page-tests-what-page):
Silence byte-compiler warning; forward-line works nicely here.
2024-01-14 14:17:41 +01:00
Mattias Engdegård
cd0855cbd8 Make object-intervals linear instead of quadratic
* src/fns.c (collect_interval, Fobject_intervals):
Build the returned list in reverse instead of appending single
elements.
2024-01-14 14:17:41 +01:00
Mattias Engdegård
3869944bb4 Speed up sxhash-equal-including-properties
This function now no longer conses at all.  Previously, it constructed
a list structure of all string intervals for the sole purpose of
hashing.

* src/fns.c (hash_interval): New.
(Fsxhash_equal_including_properties):
Use it instead of collect_interval.
2024-01-14 14:17:41 +01:00
Mattias Engdegård
a9cee9c667 Retype traverse_interval arg type from Lisp_Object to void *
This is a refactoring.  It eliminates a few unnecessary conses and
allows for further improvements.

* src/intervals.c (traverse_intervals):
Change argument type.  All callers adapted.
* src/fns.c (collect_interval, Fsxhash_equal_including_properties)
(Fobject_intervals):
* src/print.c (print_check_string_charset_prop)
(print_prune_string_charset, print_object, print_interval):
Pass a pointer to a Lisp_Object instead of a Lisp_Object.
2024-01-14 14:17:40 +01:00
Po Lu
dd83db2e23 Correct implementations of FLIPRGON and FLIPRGOFF
* src/sfnt.c (sfnt_interpret_fliprgoff)
(sfnt_interpret_fliprgon): Reorder arguments to match
the order in which arguments are popped by macro wrappers.
Fix sundry typos.
2024-01-14 21:07:21 +08:00
Po Lu
c566ee9d06 Fix bug#65116
* src/xterm.c (xi_focus_handle_for_device): Correct typo.
(x_focus_frame): Don't focus frames Emacs believes to be
focused if they are frames with independent minibuffer
frames.  (bug#65116)
2024-01-14 08:28:20 +08:00
Mattias Engdegård
d2c3a98314 Hash-table documentation updates (bug#68244)
* doc/lispref/hash.texi (Creating Hash, Other Hash):
Manual updates for make-hash-table, hash-table-rehash-size and
hash-table-rehash-threshold.
* doc/lispref/objects.texi (Hash Table Type): Update example.
* src/fns.c (Fhash_table_rehash_size, Fhash_table_rehash_threshold):
Update doc strings.
* etc/NEWS: Announce changes.
2024-01-13 20:52:08 +01:00
Mattias Engdegård
519c7ca735 Don't pretend that hash-table-size is useful
* lisp/emacs-lisp/shortdoc.el (hash-table): Remove hash-table-size entry.
* doc/lispref/hash.texi (Other Hash):
* src/fns.c (Fhash_table_size): Make it clear that hash-table-size is
probably not worth using.
2024-01-13 20:50:39 +01:00
Mattias Engdegård
1998039f7a Change hash_hash_t to uint32_t
This saves a lot of memory and is quite sufficient.  Hash functions
are adapted to produce a hash_hash_t eventually, which eliminates some
useless and information-destroying intermediate hash reduction steps.

We still use EMACS_UINT for most of the actual hashing steps before
producing the final value; this may be slightly wasteful on 32-bit
platforms with 64-bit EMACS_UINT.

* src/lisp.h (hash_hash_t): Change to uint32_t.
* src/fns.c (reduce_emacs_uint_to_hash_hash): New.
(hashfn_eq, hashfn_equal, hashfn_user_defined): Reduce return values
to hash_hash_t.
(sxhash_string): Remove.  Caller changed to hash_string.
(sxhash_float, sxhash_list, sxhash_vector, sxhash_bool_vector)
(sxhash_bignum): Remove wasteful calls to SXHASH_REDUCE.
(hash_hash_to_fixnum): New.
(Fsxhash_eq, Fsxhash_eql, Fsxhash_equal)
(Fsxhash_equal_including_properties): Convert return values to fixnum.
2024-01-13 20:50:39 +01:00
Mattias Engdegård
11e467eb60 Use key Qunbound instead of hash value hash_unused for free entries
Previously, free hash table entries were indicated by both hash value
hash_unused and key Qunbound; we now rely on the latter only.
This allows us to change the hash representation to one that does not
have an unused value.

* src/lisp.h (hash_unused): Remove.
All uses adapted to calling hash_unused_entry_key_p on the key instead.
The hash values for unused hash table entries are now undefined; all
initialisation and assignment to hash_unused has been removed.
2024-01-13 20:50:39 +01:00
Mattias Engdegård
7ad5d42773 Don't dump Qunbound
The dumper uses a hash table to keep track of dumped objects but as
this clashes with the use of Qunbound for marking unused hash table
entries, don't dump that value at all.  The symbol name is fixed up
after loading.

An alternative solution would be to use a different unique value for
unused entries.

* src/pdumper.c (dump_object_needs_dumping_p): Skip Qunbound.
(dump_vectorlike_generic): New function.
(pdumper_load): Call it.
2024-01-13 20:50:38 +01:00