1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-03 08:30:09 +00:00
Commit Graph

171067 Commits

Author SHA1 Message Date
F. Jason Park
56706254a8 ; Don't mention erc-branded Compat macros in ERC-NEWS
* doc/misc/erc.texi: Change fancy SASL example to also demonstrate
`let'-binding a local module.
* etc/ERC-NEWS: Don't mention `erc-compat-call' and
`erc-compat-function' because Emacs now ships with a compat.el stub
library.
* lisp/erc/erc-backend.el (erc-decode-parsed-server-response): Add
comments.
* lisp/erc/erc.el (erc): Mention return value.
2024-02-23 18:29:07 -08:00
Po Lu
8d5983aa78 Fix bug#69321
* java/org/gnu/emacs/EmacsWindow.java (onKeyDown, onKeyUp):
Provide Right Alt (Alt Gr) masks to system keymap routines.
(bug#69321)
2024-02-24 10:01:57 +08:00
Po Lu
65d4bf7110 ; * .dir-locals.el (java-mode): Transfer suitable c-mode options. 2024-02-24 10:01:03 +08:00
Stefan Monnier
26290870b3 diff-mode.el (diff-refine-nonmodified): New option
* lisp/vc/diff-mode.el (diff-font-lock-keywords): Refer directly to
font-lock faces.
(diff-apply-hunk): Use `user-error` for errors usually not due to bugs.
(diff--refine-propertize): New function.
(diff-refine-nonmodified): New custom var (bug#61396).
(diff--refine-hunk): Use them.
2024-02-23 17:03:10 -05:00
Stefan Monnier
84f72f19e5 elisp-mode.el: Use handler-bind instead of debug-on-error
* lisp/progmodes/elisp-mode.el (elisp-enable-lexical-binding):
Don't get fooled by a global binding of `lexical-binding` to t.
(elisp--eval-last-sexp-fake-value): Delete var.
(elisp--eval-defun): Don't let-bind `debug-on-error` since it's
already arranged by the only caller.
(eval-last-sexp, eval-defun): Use `handler-bind` instead of
`debug-on-error`.
2024-02-23 16:46:01 -05:00
Stefan Monnier
c0d7f7fc54 Merge remote-tracking branch 'refs/remotes/origin/master' 2024-02-23 11:39:26 -05:00
Stefan Monnier
3599a9a1cf * lisp/mail/rmail.el (rmail-resend): Use with-syntax-table 2024-02-23 11:38:48 -05:00
Stefan Monnier
048eaadd8c rmail.el: Prefer #' to quote function names
* lisp/mail/rmail.el (rmail-pop-to-buffer, rmail-mode-map)
(rmail-mode-1, rmail-generate-viewer-buffer, rmail-variables)
(rmail-find-all-files, rmail-insert-inbox-text)
(rmail-set-message-counters, rmail-only-expunge, rmail-reply)
(rmail-resend, rmail-fontify-buffer-function)
(rmail-unfontify-buffer-function, rmail-install-speedbar-variables)
(after-save-hook): Use #' where applicable.
2024-02-23 11:37:24 -05:00
Stefan Monnier
0b855e1465 (rmail-font-lock-keywords): Avoid old-style font-lock*-face variables
* lisp/mail/rmail.el (rmail-font-lock-keywords): Refer directly to the
font-lock faces.
2024-02-23 11:31:43 -05:00
Robert A. Burks
2b7dc7fef8 Fix Flymake lighter tool-tip from generating errors
Flymake tool-tip was generating errors on mouse over of
mode-line lighter on inactive windows and on the minor mode
indicator in the describe-mode Help page.
* lisp/progmodes/flymake.el (flymake--mode-line-title):
'help-echo' now uses buffer local state and makes null
check.  (Bug#69248)

Copyright-paperwork-exempt: yes
2024-02-23 17:45:40 +02:00
Mattias Engdegård
90d3b3408e Warn about docstrings with control characters
It is easy to include control chars in doc strings by mistake, and the
result is often an unreadable mess.

* lisp/emacs-lisp/bytecomp.el (byte-compile-warning-types)
(byte-compile-warnings, byte-compile--docstring-style-warn):
Add `docstrings-control-chars` warning.
* etc/NEWS: Announce.
2024-02-23 15:16:30 +01:00
Mattias Engdegård
a8f167547b Replace use of obsolete eshell-kill-output in test
* test/lisp/eshell/eshell-tests.el (eshell-test/flush-output):
Use eshell-delete-output instead of eshell-kill-output.
2024-02-23 13:14:18 +01:00
Mattias Engdegård
6803b70c19 Update NEWS and manual after obarray changes
* doc/lispref/abbrevs.texi (Abbrev Tables):
* doc/lispref/symbols.texi (Creating Symbols):
* doc/lispref/objects.texi (Type Predicates): Update text for obarray
now being an opaque type.
* etc/NEWS: Announce.
2024-02-23 13:02:27 +01:00
Mattias Engdegård
3ea77c735d Use the new obarray type for the initial obarray
This can improve performance a lot, especially after the obarray has
been fed many symbols.

* src/lread.c (OBARRAY_SIZE): Remove.
(load_path_check): Create an obarray object instead of a vector.
2024-02-23 13:02:27 +01:00
Mattias Engdegård
462d8ba813 Add a proper type for obarrays
The new opaque type replaces the previous use of vectors for obarrays.
`obarray-make` now returns objects of this type.  Functions that take
obarrays continue to accept vectors for compatibility, now just using
their first slot to store an actual obarray object.

obarray-size and obarray-default-size now obsolete.

* lisp/obarray.el (obarray-default-size, obarray-size):
Declare obsolete.
(obarray-make, obarrayp, obarray-clear): Remove from here.
* src/fns.c (reduce_emacs_uint_to_hash_hash): Remove from here.
* src/lisp.h (struct Lisp_Obarray, OBARRAYP, XOBARRAY, CHECK_OBARRAY)
(make_lisp_obarray, obarray_size, check_obarray)
(obarray_iter_t, make_obarray_iter, obarray_iter_at_end)
(obarray_iter_step, obarray_iter_symbol, DOOBARRAY, knuth_hash): New.
(reduce_emacs_uint_to_hash_hash): Moved here.
* src/lread.c (check_obarray): Renamed and reworked as...
(checked_obarray_slow): ...this.
(intern_sym, Funintern, oblookup, map_obarray)
(Finternal__obarray_buckets): Adapt to new type.
(obarray_index, allocate_obarray, make_obarray, grow_obarray)
(obarray_default_bits, Fobarray_make, Fobarrayp, Fobarray_clear): New.
* etc/emacs_lldb.py (Lisp_Object):
* lisp/emacs-lisp/cl-macs.el (`(,type . ,pred)):
* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types):
* lisp/emacs-lisp/comp-common.el (comp-known-type-specifiers):
* lisp/emacs-lisp/comp.el (comp-known-predicates):
* src/alloc.c (cleanup_vector, process_mark_stack):
* src/data.c (Ftype_of, syms_of_data):
* src/minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
* src/pdumper.c (dump_obarray_buckets, dump_obarray, dump_vectorlike):
* src/print.c (print_vectorlike_unreadable):
* test/lisp/abbrev-tests.el (abbrev-make-abbrev-table-test):
* test/lisp/obarray-tests.el (obarrayp-test)
(obarrayp-unchecked-content-test, obarray-make-default-test)
(obarray-make-with-size-test):
Adapt to new type.
2024-02-23 13:02:27 +01:00
Mattias Engdegård
6a182658a5 Add obarray-clear and use it
* lisp/obarray.el (obarray-clear): New.
* lisp/abbrev.el (clear-abbrev-table):
* lisp/vc/vc.el (vc-clear-context): Use it instead of assuming the
obarray is a vector that can be 0-filled.
* test/lisp/obarray-tests.el (obarray-clear): New test.
2024-02-23 13:02:27 +01:00
Mattias Engdegård
3beaa3131e Use obarrayp, not vectorp, to detect obarrays
* lisp/abbrev.el (abbrev--active-tables):
* lisp/mail/mailabbrev.el (mail-abbrevs-setup, build-mail-abbrevs)
(define-mail-abbrev, mail-resolve-all-aliases)
(mail-abbrev-insert-alias):
* lisp/mail/rmail.el (rmail-resend):
* lisp/minibuffer.el (completion-table-with-context):
* lisp/progmodes/etags.el (etags-tags-apropos-additional):
(etags--xref-apropos-additional):
Use obarrayp as predicate for obarrays.
2024-02-23 13:02:27 +01:00
Mattias Engdegård
aa82fe9931 Use obarray-make instead of make-vector to create obarrays
This prepares for the introduction of an actual obarray type.

* lisp/cedet/semantic/lex-spp.el (semantic-lex-spp-dynamic-map)
(semantic-lex-spp-dynamic-map-stack, semantic-lex-make-spp-table):
* lisp/cedet/semantic/lex.el (semantic-lex-make-keyword-table)
(semantic-lex-make-type-table):
* lisp/completion.el (cmpl-prefix-obarray, cmpl-obarray)
(clear-all-completions):
* lisp/emacs-lisp/checkdoc.el (checkdoc-defun-info):
* lisp/emacs-lisp/eldoc.el (eldoc-message-commands)
(eldoc-edit-message-commands):
* lisp/mail/mail-extr.el (mail-extr-all-top-level-domains):
* lisp/mail/rmailkwd.el (rmail-label-obarray):
* lisp/net/dns.el (dns-cache):
* lisp/net/eww.el (eww-suggested-uris):
* lisp/net/imap.el (imap-open, imap-mailbox-select-1)
(imap-message-copyuid-1, imap-message-appenduid-1):
* lisp/obsolete/pgg.el (pgg-passphrase-cache, pgg-pending-timers):
* lisp/play/cookie1.el (cookie-cache):
* lisp/progmodes/cc-defs.el (c-lang-constants, c-define-lang-constant):
* lisp/progmodes/cc-langs.el (c-keywords-obarray):
* lisp/vc/vc-hooks.el (vc-file-prop-obarray):
* test/lisp/obarray-tests.el (obarrayp-test):
* test/src/minibuf-tests.el (minibuf-tests--strings-to-obarray):
Use obarray-make instead of obarray-make.
2024-02-23 13:02:27 +01:00
Andrea Corallo
32843c7b36 * src/pdumper.c (dump_subr): Rename 'native_comp' -> 'non_primitive'. 2024-02-23 11:40:56 +01:00
Mattias Engdegård
6a53836a24 * src/fns.c (sxhash_bignum): Include sign bit in hash. 2024-02-23 11:26:45 +01:00
Mattias Engdegård
53e60fb004 * src/fns.c (hash_string): Suppress warning on 32-bit platforms
Remove a shift-too-wide complaint by GCC in code that is never reached
on platforms where that shift is too wide.
2024-02-23 11:09:49 +01:00
Mattias Engdegård
f85280503a Tone down python-mode warning to a simple message (bug#68559)
* lisp/progmodes/python.el
(python-shell-completion-native-turn-on-maybe):
There is no need for an alarming warning when using an inferior Python
without GNU readline; a calm message will do.
2024-02-23 11:09:31 +01:00
Po Lu
b868690fef Fix bug#69140
* src/window.c (grow_mini_window): Don't adjust frame matrices
or force redisplay if the provided window cannot be
resized.  (bug#69140)
2024-02-23 10:18:17 +08:00
Andrea Corallo
58ca91fe07 * Fix 'parse-colon-path' entry in 'comp-known-type-specifiers'
* lisp/emacs-lisp/comp-common.el (comp-known-type-specifiers): Fix
'parse-colon-path'.
2024-02-22 20:49:55 +01:00
Juri Linkov
cc58626f64 * lisp/help-fns.el (describe-mode-outline): New user option (bug#64684).
(describe-mode, describe-mode--minor-modes): Use 'describe-mode-outline'.

* lisp/help-mode.el (help-setup-xref): After disabling outline-minor-mode
also kill all outline-related local variables.  So that they won't affect
the output of other help commands in the same help buffer.
2024-02-22 19:38:17 +02:00
Jörg Bornemann
6b6761d534 Recognize functions and macros as defuns in 'cmake-ts-mode'
* lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode--function-name):
Renamed to 'cmake-ts-mode--defun-name' since the function handles
now functions and macros.
(cmake-ts-mode--defun-name): Return text of the first 'argument'
node below 'function_def' and 'macro_def' nodes.
(cmake-ts-mode): Set up treesit-defun-type-regexp and
'treesit-defun-name-function'.  Change the imenu setup to
recognize macros too.  Since we have set up
'treesit-defun-name-function', we don't have to
pass 'cmake-ts-mode--function-name' anymore.  (Bug#69186)

To make `treesit-defun-at-point' work properly, we have to recognize
function_def/macro_def nodes, not the lower-level *_command nodes.
2024-02-22 15:02:20 +02:00
Po Lu
8e0f134653 ; Insert missing JNI prologues
* src/android.c (shouldForwardMultimediaButtons)
(shouldForwardCtrlSpace, notifyPixelsChanged, setupSystemThread):

* src/androidvfs.c (safSyncAndReadInput, safSync, safPostRequest)
(ftruncate): Insert absent JNI prologues.
2024-02-22 13:30:18 +08:00
Po Lu
ee6343556a ; * admin/CPP-DEFINES: Fix typos. 2024-02-22 10:21:12 +08:00
Po Lu
f024b63ecf ; * admin/CPP-DEFINES: Update with Android defines. 2024-02-22 10:08:12 +08:00
Po Lu
39a8423270 Enable inotify on systems with inotify_init yet no init1 variant
* configure.ac (HAVE_INOTIFY): Check for the presence of
inotify_init in addition to inotify_init1.

* src/inotify.c (Finotify_add_watch): Implement with
inotify_init if inotify_init1 is absent.
2024-02-22 09:53:48 +08:00
Andrea Corallo
b214cb2843 ; * lisp/emacs-lisp/comp-run.el: Fix typo. 2024-02-21 21:38:11 +01:00
Andrea Corallo
44d5c667d7 * lisp/emacs-lisp/comp.el (comp--compute-function-types): Fix missing doc. 2024-02-21 17:52:52 +01:00
Eshel Yaron
e6882a5cc8
; Fix mid-symbol updating/cycling completion preview
This fixes an issue where 'completion-preview-next-candidate'
would fail to take into account the part of the symbol that
follows point (the suffix) when point is at the middle of a
symbol, as well as a similar issue in 'completion-preview--show'
that would manifest with slow 'completion-at-point-functions'.

* lisp/completion-preview.el (completion-preview-next-candidate)
(completion-preview--show): Ensure that the completion preview
remains at the end of a symbol, when updating it while point is
in the middle of that symbol.

* test/lisp/completion-preview-tests.el
(completion-preview-mid-symbol-cycle): New test.  (Bug#68875)
2024-02-21 17:47:12 +01:00
john muhl
35d99b1ec7 ; Update URL of the tree-sitter-lua grammar
* admin/notes/tree-sitter/build-module/build.sh:
* lisp/progmodes/lua-ts-mode.el:
* test/infra/Dockerfile.emba: Use the new URL.  (bug#69304)
2024-02-21 18:45:46 +02:00
Andrea Corallo
88abbf00af ; Add two comments on comp-known-predicates cl-deftype-satisfies
* lisp/emacs-lisp/comp.el (comp-known-predicates): Add comment.
* lisp/emacs-lisp/cl-macs.el: Likewise.
2024-02-21 17:42:58 +01:00
Andrea Corallo
c65a59a9e9 * Add few missing entries in 'comp-known-predicates'
* lisp/emacs-lisp/comp.el (comp-known-predicates): Add framep, markerp,
number-or-marker-p, overlayp, processp, subrp and windowp and sort it
alphabetically.
2024-02-21 17:42:58 +01:00
Andrea Corallo
5aeea8dc2c * lisp/emacs-lisp/comp-cstr.el (comp-cstr): Rename constructors. 2024-02-21 17:42:58 +01:00
Andrea Corallo
1e1d3f3acd ; * lisp/emacs-lisp/comp.el (native-comp-debug): Fix spacing. 2024-02-21 17:42:58 +01:00
Andrea Corallo
7215c63fc0 * Make 'comp--compute-function-types' a pass
* lisp/emacs-lisp/comp.el (comp-passes): Add comp--compute-function-types.
(comp--compute-function-types): New function.
(comp--compute-function-type): Move it.
(comp--final): Update it.
2024-02-21 17:42:58 +01:00
Eli Zaretskii
8987e1b093 Remove redundant call to 'eln_load_path_final_clean_up'
* src/emacs.c (shut_down_emacs): Remove redundant call to
'eln_load_path_final_clean_up'.  We call it from 'kill-emacs'
right before the call to 'exit'.
2024-02-21 17:16:45 +02:00
Mattias Engdegård
a2eb123fb6 ; * src/lisp.h: Add Lisp_Object tagging scheme overview 2024-02-21 15:50:35 +01:00
kobarity
d575717846 Set tty mode to raw when setting up Inferior Python
* lisp/progmodes/python.el (python-shell-setup-code): New constant.
(python-shell-comint-watch-for-first-prompt-output-filter): Send
`python-shell-setup-code' to the Inferior Python process.
* test/lisp/progmodes/python-tests.el (python-ffap-module-path-1):
Eliminate skipping on Mac. (Bug#68559)
2024-02-21 15:23:59 +01:00
Po Lu
0a4d4781dd * java/org/gnu/emacs/EmacsContextMenu.java (display): Reduce timeout. 2024-02-21 21:55:48 +08:00
Stefan Monnier
3b34c5e4a5 * lisp/emacs-lisp/map.el (map--make-pcase-bindings): Fix use in Emacs<30 2024-02-21 08:49:15 -05:00
Po Lu
7b0d750188 Work around premature dismissals of submenus under Android
* java/org/gnu/emacs/EmacsContextMenu.java (display): If between
HONEYCOMB and N, set wasSubmenuSelected.
2024-02-21 11:49:47 +08:00
Jonas Bernoulli
1acc7cb851
Do not attempt to check declarations in lock files
* lisp/emacs-lisp/check-declare.el (check-declare-directory): Do
not attempt to check declarations in lock files.  (Bug#69084)
2024-02-20 22:49:07 +01:00
Jonas Bernoulli
167d9b9040 Allow trivially autoloading uses of transient's define macros
Since 49e41991b2 transient-define-prefix itself was autoloaded, but
that meant that when ever an autoload file was loaded, which contained
an autoload for a command defined using that macro, transient itself
had to be loaded.

That shouldn't be necessary.  For commands using these macros, an
autoload that is identical to what would have been generated if it
had been defined using defun, works just fine.

* lisp/emacs-lisp/loaddefs-gen.el
(loaddefs-generate--make-autoload): Allow uses of
transient-define-prefix, transient-define-suffix,
transient-define-infix and transient-define-argument
to be autoloaded using just ";;;autoload".

* lisp/transient.el (transient-define-prefix): No longer autoload.
2024-02-20 22:04:51 +01:00
Andrea Corallo
bbf0b7d040 * Fix missing entry in 'cl--typeof-types'
* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types): Add
'native-comp-unit'.
2024-02-20 19:52:37 +01:00
Jonas Bernoulli
d9afa1f30f
Make find-function-regexp also find transient-define-*
* lisp/emacs-lisp/find-func.el (find-function-regexp): Also find
transient-define-prefix, transient-define-suffix,
transient-define-infix and transient-define-argument.
2024-02-20 13:58:32 +01:00
Michael Albinus
d5775ae4d3 ; Copyedits 2024-02-20 12:53:15 +01:00