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

93965 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Liu Hui
0b9c7148fd Respect the delimiter of completer in Python shell completion
* lisp/progmodes/python.el: (python-shell-completion-setup-code): Fix
the completion code of IPython.  Change the return value to JSON string
and ...
(python-shell-completion-get-completions): ... simplify parsing.
(inferior-python-mode): Update docstring.
(python-shell-readline-completer-delims): New variable indicating the
word delimiters of readline completer.
(python-shell-completion-native-setup): Set the completer delimiter.
(python-shell-completion-native-get-completions): Convert output string
to completions properly.
(python-shell--get-multiline-input)
(python-shell--extra-completion-context)
(python-shell-completion-extra-context): New functions.
(python-shell-completion-at-point): Send text beginning from the line
start if the completion backend does not need word splitting.  Remove
the detection of import statement because it is not needed anymore.
Create proper completion table based on completions returned from
different backends.

* test/lisp/progmodes/python-tests.el (python-tests--completion-module)
(python-tests--completion-parameters)
(python-tests--completion-extra-context): New helper functions.
(python-shell-completion-at-point-jedi-completer)
(python-shell-completion-at-point-ipython): New tests.  (bug#68559)
2024-02-08 14:09:42 +02:00
USAMI Kenta
ebf4ef2022 Fix 'browse-url-url-at-point' so that scheme does not duplicate
* lisp/net/browse-url.el (browse-url-url-at-point): Prepend
the default scheme only if no scheme present.  (Bug#68913)
2024-02-08 14:04:18 +02:00
Eli Zaretskii
e268231686 Don't skip links to "." and ".." in Dired when marking files
* lisp/dired.el (dired-mark): Skip "." and "..", but not symlinks
to those two.  (Bug#38729)  (Bug#68814)
2024-02-08 13:51:55 +02:00
Eshel Yaron
bc099295dd ; Ensure 'thing-at-point-looking-at' finds full match
* lisp/thingatpt.el (thing-at-point-looking-at): Regexp-search from
the beginning forward, instead of the other way around.

* test/lisp/thingatpt-tests.el (thing-at-point-test-data): Add tests.

(Bug#68762)
2024-02-08 13:46:06 +02:00
Michael Albinus
08c81db7c8 `file-remote-p' must not return an error
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler):
`file-remote-p' must not return an error.  (Bug#68976)
2024-02-08 11:17:22 +01:00
Po Lu
1db2255c7c * lisp/touch-screen.el (touch-screen): Fix defgroup version. 2024-02-08 13:20:28 +08:00
Dmitry Gutov
f444786e58 Mention 'C-h' in echo for unfinished commands
* etc/NEWS: Mention it here.

* lisp/cus-start.el (standard): Add type and version for it.

* src/keyboard.c (echo-keystrokes-help): New user option
(https://lists.gnu.org/archive/html/emacs-devel/2024-02/msg00174.html).

* src/keyboard.c (echo_dash): Use it.
2024-02-07 21:50:53 +02:00
Eli Zaretskii
2ecaa60f05 Improve wording of message in buff-menu.el
* lisp/buff-menu.el (Buffer-menu--selection-message): Improve
wording of selection messages.
2024-02-07 19:14:20 +02:00
Mattias Engdegård
ef3fed1a48 ; Fix last changes in buffer-menu.el and NEWS
* etc/NEWS: Remove superfluous mention of key binding.
* lisp/buff-menu.el (Buffer-menu--selection-message): Go back to
previous wording.  It's not about what is hidden but what is shown;
the message is displayed in response to different actions.
2024-02-07 14:51:40 +01:00
Michael Albinus
ccae58a425 Declare function properties in Tramp
* lisp/net/tramp-message.el (tramp-backtrace, tramp-error)
(tramp-error-with-buffer, tramp-user-error):
Declare `tramp-suppress-trace' property.
2024-02-07 13:19:27 +01:00
Wilhelm Kirschbaum
8a39216ce9 elixir-ts-mode: Highlight more method definitions
* lisp/progmodes/elixir-ts-mode.el (elixir-ts--font-lock-settings):
Also highlight method definitions where the arguments are literal
values, not identifiers (bug#67246).
2024-02-07 04:18:54 +02:00
Dmitry Gutov
eb90fb52b0 elixir-ts-mode: Bring the faces' use closer to other ts modes
* lisp/progmodes/elixir-ts-mode.el (elixir-ts--font-lock-settings):
Rename feature 'elixir-function-name' to 'elixir-definition' and
update all deferences.  Add parameters' highlighting with
font-lock-variable-name-face.  Change variable references'
highlighting to use font-lock-variable-use-face.
Move the feature 'elixir-variable' from feature level 3 to level 4, to
match other ts modes (bug#67246).
2024-02-07 04:18:54 +02:00
Wilhelm Kirschbaum
c1cdbb9872 Add access_call fontification to elixir-ts-mode
* lisp/progmodes/elixir-ts-mode.el
(elixir-ts--font-lock-settings):
Add access_call queries to the elixir-variable feature (bug#67246).
2024-02-07 04:18:54 +02:00
Joseph Turner
e25d11314d Pass unquoted filename to user-supplied MUSTMATCH predicate
* lisp/minibuffer.el (read-file-name-default): Pass REQUIRE-MATCH
argument through substitute-in-file-name.
* lisp/minibuffer.el (read-file-name): Update docstring.

Resolves bug#68815.
2024-02-06 16:05:46 -05:00
Stefan Monnier
77f240012f (loaddefs-generate--compute-prefixes): Fix thinko in last change
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--compute-prefixes):
 Fix thinko in last change.  Also,       reduce memory allocation.
2024-02-06 15:36:18 -05:00
Eli Zaretskii
ab318cce1e ; Fix last change in buffer-menu.el
* etc/NEWS: Elaborate about the binding of the new command.

* lisp/buff-menu.el (Buffer-menu--selection-message): Fix wording
of new message.
(Buffer-menu-toggle-internal): Doc fix.  (Bug#68949)
2024-02-06 21:55:57 +02:00
Stefan Monnier
a2201a2034 (loaddefs-generate--parse-file): Be a bit more defensive
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--parse-file):
Don't fail in case of an error while generating the prefixes.
(loaddefs-generate--compute-prefixes): Don't burp when
`read-from-string` returns something else than a symbol.
2024-02-06 13:21:22 -05:00
Juri Linkov
ce7365b591 Use new variable Buffer-menu-show-internal in project-list-buffers.
* lisp/progmodes/project.el (project-list-buffers): Add the new variable
`Buffer-menu-show-internal' used to toggle internal buffers (bug#68949).
2024-02-06 19:55:41 +02:00
Mattias Engdegård
f6225d125c Optionally show internal buffers in Buffer Menu mode
Internal buffers were never shown before but they can be of interest
to Elisp developers, especially since there is no general mechanism to
remove unused buffers.

* lisp/buff-menu.el (Buffer-menu-show-internal)
(Buffer-menu--selection-message, Buffer-menu-toggle-internal): New.
(Buffer-menu-mode-map): Bind to `I`.
(Buffer-menu-mode-menu): Add menu entry.
(list-buffers--refresh): Extend filtering logic.
* etc/NEWS: Announce.
2024-02-06 12:58:57 +01:00
Po Lu
0d2b712078 Don't forcibly display dialogs on Android if a keyboard is present
* java/org/gnu/emacs/EmacsService.java (detectKeyboard): New
function.

* lisp/subr.el (use-dialog-box-p): Don't always return t if a
keyboard is present on Android.

* src/android.c (android_init_emacs_service): Link to new
function.
(android_detect_keyboard): New function.

* src/android.h: Update prototypes.

* src/androidfns.c (Fandroid_detect_keyboard)
(syms_of_androidfns): New function.
2024-02-06 17:53:23 +08:00