1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-27 07:41:28 -08:00
Commit graph

170924 commits

Author SHA1 Message Date
Mattias Engdegård
bb77944306 Make minibuf-tests independent of obarray hash order
* test/src/minibuf-tests.el (minibuf-tests--set-equal): New.
(minibuf-tests--all-completions)
(minibuf-tests--all-completions-pred)
(minibuf-tests--all-completions-regexp): Use it.
2024-02-12 18:23:33 +01:00
Mattias Engdegård
79cfc1eaa0 Internal function for obarray performance analysis (bug#68244)
* src/lread.c (Finternal__obarray_buckets): New function.
2024-02-12 18:23:33 +01:00
Philip Kaludercic
6aeeae6888 Allow using 'vc-prepare-patch' in non-VC buffers
* lisp/vc/vc.el (vc-prepare-patch): Remove
'vc-ensure-vc-buffer', as it is not necessary to verify this for
the command to work.
2024-02-12 17:37:52 +01:00
Basil L. Contovounesios
2f7d662dd4 ; Update Lisp_Hash_Table hash for CHECK_STRUCTS
This follows commit 05e3183ede of 2024-02-06
"Rearrange and pack hash table fields to reduce space".
2024-02-12 12:07:37 +01:00
Po Lu
bc6c55c5cf Disable exec loader when Emacs is running under an existing instance
* src/androidfns.c (syms_of_androidfns_for_pdumper): Check if
Emacs is running under process tracing, and if so, disable
android_use_exec_loader.
2024-02-12 11:55:01 +08:00
Stefan Monnier
57544fa2a2 loaddefs-gen.el: Generate an autoload for pcase-defmacro
Autoload cookies on uses of `pcase-defmacro` used to copy
the definition wholesale instead of generating the expected autoload.

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload):
Look inside `eval-and-compile` as well.
2024-02-11 22:19:49 -05:00
Stefan Monnier
806759dc0a (pcase): New _ syntax in pred/app functions
The current syntax for functions in `app` and `pred` patterns
allows a shorthand (F ARGS) where the object being matched is
added as an extra last argument.  This is nice for things like
(pred (< 5)) but sometimes the object needs to be at
another position.
Until now you had to use (pred (lambda (x) (memq x my-list)))
or (pred (pcase--flip memq my-list)) in those cases.
So, introduce a new shorthand where `_` can be used to indicate
where the object should be passed: (pred (memq _ my-list))

* lisp/emacs-lisp/pcase.el (pcase--split-pred): Document new syntax
for pred/app functions.
(pcase--funcall): Support new syntax.
(pcase--flip): Declare obsolete.
(pcase--u1, \`): Use `_` instead.
(pcase--split-pred): Adjust accordingly.

* doc/lispref/control.texi (pcase Macro): Document new syntax
for pred/app functions.

* lisp/progmodes/opascal.el (pcase-defmacro):
* lisp/emacs-lisp/seq.el (seq--make-pcase-bindings):
* lisp/emacs-lisp/eieio.el (eieio):
* lisp/emacs-lisp/cl-macs.el (cl-struct, cl-type):
Use _ instead of `pcase--flip`.
(cl--pcase-mutually-exclusive-p): Adjust accordingly.

* lisp/emacs-lisp/map.el (map--pcase-map-elt): Declare obsolete.
(map--make-pcase-bindings): Use `_` instead.
2024-02-11 22:00:44 -05:00
Stefan Kangas
9ebc91795f Remove redundant apply with derived-mode-p
* lisp/cedet/mode-local.el (mode-local-map-mode-buffers):
* lisp/progmodes/which-func.el (which-func-try-to-enable):
(which-func-ff-hook): Remove redundant 'apply' with 'derived-mode-p'.
Suggested by Philip Kaludercic <philipk@posteo.net>.
2024-02-12 02:43:35 +01:00
Stefan Monnier
9a1522197f (cl--generic-describe): Fix regression introduced by fix to bug#54628
Since that fix, we made other changes (put arg names in allcaps)
which also happen to fix bug#54628, so we can remove the original fix
which was suboptimal when the type includes quotes.

* lisp/emacs-lisp/cl-generic.el (cl--generic-describe):
Don't rebind `print-quoted` to nil.

* test/lisp/emacs-lisp/cl-generic-tests.el
(cl-generic-tests--print-quoted): New test.
2024-02-11 18:13:27 -05:00
Stefan Monnier
052c2ce028 (pcase): Add buttons to the macros' defs in the docstring of pcase
* lisp/emacs-lisp/pcase.el (pcase--find-macro-def-regexp): New var.
(find-function-regexp-alist): Add entry for `pcase-macro`s.
(help-fns--signature): Move declaration to where we know it is valid.
(pcase--make-docstring): Add buttons to jump to the definition
of Pcase macros.
2024-02-11 17:43:37 -05:00
Philip Kaludercic
998f9d98c3 Tolerate errors while recompiling all packages
* lisp/emacs-lisp/package.el (package-recompile-all): Demote errors
raised by 'package-recompile'.  (Bug#68678)
2024-02-11 22:50:29 +01:00
Philip Kaludercic
db195116a4 Add the public API of Compat to the core
* lisp/emacs-lisp/compat.el: Add stub file with minimal definitions,
so that core packages, that haven't been installed from ELPA, can make
use of the public API and use more recent function signatures.
* lisp/progmodes/python.el (compat): Remove 'noerror flag, because
Compat can now be required without the real package being available.
* doc/lispref/package.texi (Forwards-Compatibility): Mention Compat
and link to the manual.
* etc/NEWS: Document change.  (Bug#66554)
2024-02-11 22:50:29 +01:00
Dmitry Gutov
c0f656617d Make sure the binding shown by echo-keystrokes-help is not shadowed
And choose just one binding to display rather than two together.
(https://lists.gnu.org/archive/html/emacs-devel/2024-02/msg00311.html)

* lisp/help.el (help--append-keystrokes-help): New function.

* src/keyboard.c (syms_of_keyboard): Add a symbol for it.
(echo_dash): Use them here.
2024-02-11 22:34:41 +02:00
Andrea Corallo
faa46eb866 Rename a number of native compiler functions
* lisp/emacs-lisp/comp.el (comp-passes): Update.
(comp-mvar): Update constructor name.
(comp--loop-insn-in-block, comp--lex-byte-func-p)
(comp--spill-decl-spec, comp--spill-speed)
(comp--decrypt-arg-list, comp--byte-frame-size)
(comp--add-func-to-ctxt, comp--spill-lap-function)
(comp--intern-func-in-ctxt, comp--spill-lap-function)
(comp--spill-lap, comp--lap-eob-p, comp--lap-fall-through-p)
(comp--sp, comp--with-sp, comp--slot-n, comp--slot, comp-slot+1)
(comp--label-to-addr, comp--mark-curr-bb-closed)
(comp--bb-maybe-add, comp--call, comp--callref, make-comp-mvar)
(comp--new-frame, comp--emit, comp--emit-set-call)
(comp--copy-slot, comp--emit-annotation, comp--emit-setimm)
(comp--make-curr-block, comp--latch-make-fill)
(comp--emit-uncond-jump, comp--emit-cond-jump)
(comp--emit-handler, comp--limplify-listn, comp--new-block-sym)
(comp--fill-label-h, comp--jump-table-optimizable)
(comp--emit-switch, comp--emit-set-call-subr, comp--op-to-fun)
(comp--body-eff, comp--op-case, comp--limplify-lap-inst)
(comp--emit-narg-prologue, comp--limplify-finalize-function)
(comp--prepare-args-for-top-level, comp--emit-for-top-level)
(comp--emit-lambda-for-top-level, comp--limplify-top-level)
(comp--addr-to-bb-name, comp--limplify-block)
(comp--limplify-function, comp--limplify, comp--mvar-used-p)
(comp--collect-mvars, comp--collect-rhs)
(comp--negate-arithm-cmp-fun, comp--reverse-arithm-fun)
(comp--emit-assume, comp--maybe-add-vmvar)
(comp--add-new-block-between, comp--cond-cstrs-target-mvar)
(comp--add-cond-cstrs-target-block, comp--add-cond-cstrs-simple)
(comp--add-cond-cstrs, comp--insert-insn, comp--emit-call-cstr)
(comp--lambda-list-gen, comp--add-call-cstr, comp--add-cstrs)
(comp--collect-calls, comp--pure-infer-func, comp--ipa-pure)
(make--comp--ssa-mvar, comp--clean-ssa, comp--compute-edges)
(comp--collect-rev-post-order, comp--compute-dominator-tree)
(comp--compute-dominator-frontiers, comp--log-block-info)
(comp--place-phis, comp--dom-tree-walker, comp--ssa)
(comp--ssa-rename-insn, comp--ssa-rename, comp--finalize-phis)
(comp--remove-unreachable-blocks, comp--ssa)
(comp--fwprop-max-insns-scan, comp--copy-insn)
(comp--apply-in-env, comp--fwprop-prologue)
(comp--function-foldable-p, comp--function-call-maybe-fold)
(comp--fwprop-call, comp--fwprop-insn, comp--fwprop*)
(comp--rewrite-non-locals, comp--fwprop, comp--func-in-unit)
(comp--call-optim-form-call, comp--call-optim-func)
(comp--call-optim, comp--collect-mvar-ids)
(comp--dead-assignments-func, comp--dead-code)
(comp--form-tco-call-seq, comp--tco-func, comp--tco)
(comp--remove-type-hints-func, comp--remove-type-hints)
(comp--args-to-lambda-list, comp--compute-function-type)
(comp--finalize-container, comp--finalize-relocs)
(comp--compile-ctxt-to-file, comp--final1, comp--final)
(comp--make-lambda-list-from-subr, comp-trampoline-compile)
(comp--write-bytecode-file): Rename and/or update due to renaming.
* test/src/comp-resources/comp-test-funcs.el (comp-test-copy-insn-f): Update.
* src/comp.c (Fcomp__compile_ctxt_to_file0): Rename.
(syms_of_comp): Update.
2024-02-11 15:26:12 +01:00
Eli Zaretskii
67486ab415 Fix 'min-width' display property in 'buffer-text-pixel-size'
* src/xdisp.c (display_min_width): Don't return without doing
anything when called from the move_it_* functions.  This is needed
to have functions that simulate display layout handle the
min-width display property correctly.  (Bug#68374)
2024-02-11 15:21:14 +02:00
Mekeor Melire
30b4d90232 In Info-url-alist, add .html extension to %e format-sequence
* lisp/info.el (Info-url-for-node): Implement the change. (Bug#68970)
(Info-url-alist): Document the change.
* test/lisp/info-tests.el (test-info-urls): Adjust tests to account for
the change and add a test for the "Top" node.
2024-02-11 09:25:19 +02:00
Po Lu
e67e7185ce Fix signed/unsigned promotion errors involving Emacs_Rectangle
* src/androidterm.c (android_note_mouse_movement):

* src/pgtkterm.c (note_mouse_movement):

* src/xdisp.c (get_glyph_string_clip_rects, remember_mouse_glyph)
(expose_area, expose_window, gui_intersect_rectangles): Cast
width or height fields in Emacs_Rectangles to int before summing
with or subtracting them from their coordinate fields, as they
are unsigned outside X, and the sign of the coordinates is thus
not preserved.
2024-02-11 10:01:31 +08:00
Eric Abrahamsen
7a0ee5d65f Fix behavior of gnus-summary-very-wide-reply with prefix arg
* lisp/gnus/gnus-msg.el (gnus-summary-very-wide-reply): If a prefix
argument has been given, the value of YANK will be a list containing the
current article number.  This should not be used to retrieve a number of
work articles; that should be derived from the value of the
current-prefix-arg (or marked articles).
* doc/misc/gnus.texi: The interplay of prefix arg and marked articles is
complex; attempt to clarify.
2024-02-10 10:33:51 -08:00
Juri Linkov
3e5aba8837 * lisp/buff-menu.el: Force other-window commands to use other window.
(Buffer-menu-other-window, Buffer-menu-switch-other-window):
Let-bind 'display-buffer-overriding-action' to
'(nil (inhibit-same-window . t))' that will force the buffer
to be displayed in another window in any case (bug#68978).
2024-02-10 19:56:39 +02:00
Juri Linkov
0a01b998d1 * lisp/menu-bar.el (menu-bar-showhide-menu): Add "Outlines" (bug#68979).
The menu item "Outlines" toggles 'outline-minor-mode' when one
of outline-search-function/outline-regexp/outline-level is defined
in the current buffer.
2024-02-10 19:34:23 +02:00
Eshel Yaron
939187fd7a
; Fix 'thing-at-point' edge case involving overlapping matches
* lisp/thingatpt.el (thing-at-point-looking-at): When finding a match
that ends before point, continue searching from the beginning of that
match, not its end, in case the match we're looking is overlapping with
this one.
* test/lisp/thingatpt-tests.el
(thing-at-point-looking-at-overlapping-matches): New test.
2024-02-10 17:39:26 +01:00
Steven Allen
55b4a743b6 Record dependencies in packages installed via package-vc
* lisp/emacs-lisp/package-vc.el (package-vc--unpack-1): Record a
package's declared dependencies in the package's metadata
file.  (Bug#68761)
2024-02-10 16:52:49 +01:00
Damien Cassou
7e8b1863af Add support for deriving major modes in which-func
* lisp/progmodes/which-func.el (which-func-try-to-enable)
(which-func-ff-hook): Use `derived-mode-p' to check if the current major
mode is within `which-func-modes' or `which-func-non-auto-modes'.
(Bug#68981)
2024-02-10 12:01:53 +01:00
Eli Zaretskii
cbf2c297b8 ; Merge from origin/emacs-29
The following commit was skipped:

f1e7b5230a Tramp: Handle PIN requests from security keys (don't merge)
2024-02-10 05:09:30 -05:00
Eli Zaretskii
22d500ce21 Merge from origin/emacs-29
7d3a144486 ; Mention defface's and their :version tags in CONTRIBUTE.
09c53b717d * admin/notes/kind-communication: New file.
31ca4e5501 ; And another fix of CONTRIBUTE.
d65499e790 ; Another clarification in CONTRIBUTE.
571ec583d6 ; Clarify "ChangeLog entries" in CONTRIBUTE.
e268231686 Don't skip links to "." and ".." in Dired when marking files
e25d11314d Pass unquoted filename to user-supplied MUSTMATCH predicate
4749699370 * doc/lispref/parsing.texi (Retrieving Nodes): Improve do...
d0673ea0d4 ; * etc/PROBLEMS: Workaround for Windows key "stuck" (bug...

* lisp/emacs-lisp/trace.el:
* java/org/gnu/emacs/EmacsWindow.java (onDragEvent): Remove
training whitespace.
2024-02-10 05:07:56 -05:00
Eli Zaretskii
7f3baf352b ; * etc/NEWS: Announce support of 'lzip' compressed Info files (bug#69004). 2024-02-10 11:22:01 +02:00
Eli Zaretskii
13ee21eb48 Support Info files compressed by 'lzip'
* lisp/info.el (Info-suffix-list): Support lzip compression of
Info files.  (Bug#69004)
2024-02-10 11:20:22 +02:00
Eli Zaretskii
86c5b7c49c * lisp/bind-key.el (personal-keybindings): Autoload it (bug#68999). 2024-02-10 11:10:08 +02:00
Eli Zaretskii
20f7a022f8 Avoid errors in winner.el's 'post-command-hook'
* lisp/winner.el (winner-save-old-configurations): Don't save
configuration of dead frames.  (Bug#68977)
2024-02-10 11:04:22 +02:00
Michael Albinus
55aea79676 Fix warning in tramp-register-archive-autoload-file-name-handler
* lisp/net/tramp-archive.el
(tramp-register-archive-autoload-file-name-handler): Do not use
read syntax #' for `tramp-archive-file-name-handler', it isn't
autoloaded.
2024-02-10 09:50:12 +01:00
Eli Zaretskii
59b849d1ea Run 'read-only-mode-hook' when visiting a file that is not writable
* lisp/files.el (after-find-file): Run 'read-only-mode-hook'
when the visited file is not writable.  (Bug#68648)
2024-02-10 10:35:18 +02:00
john muhl
4330eb2864 Fix volume refresh bug in mpc
* lisp/mpc.el (mpc-volume-refresh): Only refresh volume when mpd
is playing.  When stopped or paused, volume is nil.  (Bug#68785)
2024-02-10 10:22:40 +02:00
Eli Zaretskii
6195a57b8e ; Improve documentation of a recent change in Gnus
* lisp/image.el (find-image): Doc fix.
* lisp/gnus/gnus.el (gnus-mode-line-logo): Fix doc string and
:type texts.  Add :version.  (Bug#68985)
2024-02-10 09:28:11 +02:00
Po Lu
e7d1b12878 Make miscellaneous improvements to the Android port
* java/org/gnu/emacs/EmacsActivity.java (onCreate): Deal with
omitted calls to onWindowFocusChanged after activity recreation.

* java/org/gnu/emacs/EmacsService.java (clearWindow, clearArea):
Delete redundant wrapper functions.
(getUsefulContentResolver, getContentResolverContext): Delete
functions.
(openContentUri, checkContentUri): Stop searching for an
activity content resolver, as that's actually not necessary.

* src/android.c (android_init_emacs_service)
(android_init_emacs_window, android_clear_window)
(android_clear_area): Adjust to match.
2024-02-10 15:06:01 +08:00
Mekeor Melire
6568a9a009 Add option gnus-mode-line-logo
* lisp/gnus/gnus.el (gnus-mode-line-logo): New option specifying
whether and which logo will be displayed in the mode-line.
* etc/NEWS: Announce the change.
2024-02-09 19:37:49 -08:00
Jim Porter
de5acc3b0d Add concept indices for some Eshell commands
* doc/misc/eshell.texi (List of Built-ins): Add indices for some
directory- and process-related commands.
(Aliases): Change to concept index.
2024-02-09 17:42:13 -08:00
Jim Porter
b5b80de49c In Eshell manual, put command index anchors above the item
This makes sure that when navigating to the command's documentation from
the index, it shows the item heading (which lists the supported
arguments).

* doc/misc/eshell.texi (List of Built-ins, Tramp extensions)
(Extra built-in commands): Adjust placement of '@cmindex'.
2024-02-09 17:42:13 -08:00
Jim Porter
7a13e705b1 Put the list of built-in Eshell commands in its own manual node
* doc/misc/eshell.texi (Built-ins): Fix capitalization of node to be
more consistent with the rest of the manual.  Fix a cross reference.
List child nodes.
(List of Built-ins): New section and node.
(Defining New Built-ins): Make this a node.  Fix capitalization.
2024-02-09 17:42:13 -08:00
Stefan Monnier
efedb8f479 modula2.el: Avoid font-lock-*-face variables
* lisp/progmodes/modula2.el (m3-font-lock-keywords-1)
(m3-font-lock-keywords-2): Refer to the font-lock faces directly
2024-02-09 14:22:14 -05:00
Stefan Monnier
3c3702b9bb * lisp/subr.el (with-output-to-temp-buffer): Add indent rule 2024-02-09 14:13:29 -05:00
Stefan Monnier
c4ec6d0472 * lisp/subr.el (read-char-from-minibuffer): Fix bug#68995 2024-02-09 14:08:51 -05:00
Michael Albinus
8d6a8e573f Tramp: Handle PIN requests from security keys
* doc/misc/tramp.texi (Frequently Asked Questions): Clarify FIDO entry.

* lisp/net/tramp-sh.el (tramp-actions-before-shell)
(tramp-actions-copy-out-of-band):
Use `tramp-security-key-pin-regexp'.

* lisp/net/tramp.el (tramp-security-key-pin-regexp): New defcustom.
(tramp-action-otp-password, tramp-read-passwd): Trim password prompt.
(tramp-action-show-and-confirm-message): Expand for PIN requests.
2024-02-09 11:21:05 +01:00
Michael Albinus
f1e7b5230a Tramp: Handle PIN requests from security keys (don't merge)
* doc/misc/tramp.texi (Frequently Asked Questions): Clarify FIDO entry.

* lisp/net/tramp-sh.el (tramp-actions-before-shell)
(tramp-actions-copy-out-of-band):
Use `tramp-security-key-pin-regexp'.

* lisp/net/tramp.el (tramp-security-key-pin-regexp): New defcustom.
(tramp-action-otp-password, tramp-read-passwd): Trim password prompt.
(tramp-action-show-and-confirm-message): Expand for PIN requests.
2024-02-09 11:05:14 +01:00
Paul Eggert
8d09e1def5 Port to GNU Make 03ecd94488b85adc38746ec3e7c2a297a522598e
Problem reported by Collin Funk (Bug#68996).
* GNUmakefile (.): New macro.
(help): Use ‘$.’ instead of ‘$ ’.
* cross/verbose.mk.android, src/verbose.mk.in (.): New macro.
(AM_V_AR, AM_V_CC, AM_V_CXX, AM_V_CCLD, AM_V_CXXLD, AM_V_GEN):
Use ‘$.’ instead of ‘$ ’.
* lib-src/Makefile.in (install): Use ‘$.’ instead of ‘$ ’.
2024-02-08 23:22:00 -08:00
Eli Zaretskii
7d3a144486 ; Mention defface's and their :version tags in CONTRIBUTE. 2024-02-09 08:49:55 +02:00
Dominique Quatravaux
4e5068b7b3
Fix treesit_traverse_get_predicate (bug#68954)
Commit d005e685e1 should have used
assq_no_signal, but didn't, this commit fixes that.

* src/treesit.c (treesit_traverse_get_predicate): Replace assq_no_quit
with assq_no_signal.

Copyright-paperwork-exempt: yes
2024-02-08 21:25:34 -08:00
Po Lu
b382135769 Set adstyle within sfnt font objects
* src/sfntfont.c (sfntfont_open): Don't incorrectly clear
desc->adstyle.
2024-02-09 13:15:57 +08:00
Po Lu
5af4e346b0 Don't lose track of adstyles during face merging
* src/xfaces.c (merge_face_vectors): If an adstyle exists in
FROM, guarantee that a font spec will exist in TO with the same.
2024-02-09 10:43:48 +08:00
Po Lu
8290a1bacb Replace a few calls to intern with constant strings
* src/fns.c (do_yes_or_no_p, Fyes_or_no_p): Use symbol globals
rather than intern.
(syms_of_fns) <Qyes_or_no_p, Qy_or_n_p>: New symbols.

* src/lread.c (readevalloop): Use symbol global.
(syms_of_lread) <Qinternal_macroexpand_for_load>: New symbol.
2024-02-09 09:53:33 +08:00
Stefan Kangas
09c53b717d * admin/notes/kind-communication: New file. 2024-02-08 22:31:54 +01:00