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

11996 commits

Author SHA1 Message Date
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
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
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
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
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
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
Eli Zaretskii
d6c7092ff0 ; Improve documentation of 'echo-keystrokes-help'
* doc/emacs/display.texi (Display Custom): Document
'echo-keystrokes-help'.

* etc/NEWS: Mark the 'echo-keystrokes-help' entry documented.
2024-02-08 08:56:42 +02:00
Jim Porter
5c43ef86bf Document arguments to Eshell's built-in commands
* lisp/eshell/em-unix.el (eshell/ln): LINK_NAME is required.

* lisp/eshell/esh-ext.el (eshell/addpath):
* lisp/eshell/esh-var.el (eshell/env): Improve help strings slightly.

* doc/misc/eshell.texi (Scripts): Explain $0, $1, etc.
(Dollars Expansion): Use "@dots{}" instead of "...".
(Built-ins, Tramp extensions, Extra built-in commands): Document
command-line arguments.
2024-02-04 21:12:42 -08:00
Yuan Fu
be6de56906
Use treesit-node-match-p in treesit-parent-until/while
* lisp/treesit.el (treesit-parent-until): Use treesit-node-match-p.
(treesit-parent-while): Update docstring.
* doc/lispref/parsing.texi (Retrieving Nodes): Update docstring.
2024-02-04 20:13:59 -08:00
Juri Linkov
4749699370 * doc/lispref/parsing.texi (Retrieving Nodes): Improve documentation.
Update optional arguments 'predicate' and 'include-node'
of 'treesit-node-top-level'.
2024-02-04 19:22:21 +02:00
Stefan Monnier
ecf3488477 * doc/emacs/buffers.texi (List Buffers): Update example 2024-02-03 18:22:05 -05:00
João Távora
c2aaa8f15a Process read-symbol-shorthands from longest to shortest (bug#67390)
This ensures that overlapping shorthands are handled correctly and
consistently even if specified out-of-order by the user.

* doc/lispref/symbols.texi (Shorthands): Describe shorthand sort
order.

* lisp/files.el (hack-local-variables--find-variables): Specially
handle read-symbol-shorthands.
2024-02-03 08:40:03 -06:00
Eli Zaretskii
e2d1ac2f25 ; * doc/lispref/sequences.texi (Sequence Functions): Fix typo. 2024-02-02 18:33:54 +02:00
Eli Zaretskii
02bdb1e4c5 ; Another fix of last change. 2024-02-02 17:46:19 +02:00
Eli Zaretskii
f9a15b8a15 ; Fix last change
* lisp/sort.el (sort-on): Doc fix.

* doc/lispref/sequences.texi (Sequence Functions): Fix description
of 'sort-on'.
2024-02-02 17:39:23 +02:00
Eli Zaretskii
dcce1e07fe ; Fix last change
* doc/lispref/sequences.texi (Sequence Functions): Improve
indexing of last change
2024-02-02 15:27:25 +02:00
Eli Zaretskii
4b79c80c99 New function 'sort-on'
* lisp/sort.el (sort-on): New function.  Patch by John Wiegley
<jwiegley@gmail.com>.

* etc/NEWS:
* doc/lispref/sequences.texi (Sequence Functions): Document
'sort-on'.
2024-02-02 15:24:55 +02:00
Po Lu
849f8c1d49 ; * doc/emacs/basic.texi (Continuation Lines): Rearrange pxref. 2024-02-01 16:25:09 +08:00
Po Lu
b86bc02096 Introduce a global variant of visual-wrap-prefix-mode
* doc/emacs/basic.texi (Continuation Lines):

* etc/NEWS:

* lisp/visual-wrap.el (visual-wrap-prefix-mode): Document this
new global minor mode.
(global-visual-wrap-prefix-mode): New global minor mode.
2024-02-01 16:08:47 +08:00
Mattias Engdegård
9bcc9690a8 Eliminate lazy bytecode loading
The obsolete lazy-loaded bytecode feature, enabled by
`byte-compile-dynamic`, slows down Lisp execution even when not in use
because every call to a bytecode function has to check that function
for laziness.

This change forces up-front loading of all lazy bytecode so that we
can remove all those checks.  (Dynamically loaded doc strings are not
affected.)

There is no point in generating lazy bytecode any more so we stop
doing that; this simplifies the compiler.  `byte-compile-dynamic` now
has no effect.

This is a fully compatible change; the few remaining users of
`byte-compile-dynamic` should not notice any difference.

* src/lread.c (bytecode_from_rev_list): Force eager loading of
lazy bytecode.
* src/bytecode.c (exec_byte_code): Remove lazy bytecode checks.
* src/eval.c (fetch_and_exec_byte_code, Ffetch_bytecode): Remove.
(funcall_lambda): Call exec_byte_code directly, avoiding checks.
* lisp/subr.el (fetch-bytecode): New definition, obsolete no-op.
* lisp/emacs-lisp/disass.el (disassemble-1):
* lisp/emacs-lisp/bytecomp.el (byte-compile-unfold-bcf):
Remove calls to fetch-bytecode.
(byte-compile-dynamic): Update doc string.
(byte-compile-close-variables, byte-compile-from-buffer)
(byte-compile-insert-header, byte-compile-output-file-form)
(byte-compile--output-docform-recurse, byte-compile-output-docform)
(byte-compile-file-form-defmumble):
Remove effects of byte-compile-dynamic.
* doc/lispref/compile.texi (Dynamic Loading): Remove node now that
the entire `byte-compile-dynamic` facility has been rendered inert.
* etc/NEWS: Announce changes.
2024-01-31 17:12:25 +01:00
Stefan Kangas
71b5d5a979 ; Fix typos 2024-01-28 17:11:51 +01:00
Eli Zaretskii
396b49871a ; Fix last change in package.texi
* doc/lispref/package.texi (Multi-file Packages): Fix wording and
markup.  (Bug#65027)

(cherry picked from commit 6d76e39912)
2024-01-28 15:06:37 +01:00
Eli Zaretskii
6d76e39912 ; Fix last change in package.texi
* doc/lispref/package.texi (Multi-file Packages): Fix wording and
markup.  (Bug#65027)
2024-01-28 07:43:25 +02:00
Jim Porter
b2db82c5ae * doc/lispref/package.texi (Multi-file Packages): Document ".elpaignore".
(cherry picked from commit 744a10a4d7)
2024-01-28 03:51:48 +01:00
Jim Porter
744a10a4d7 * doc/lispref/package.texi (Multi-file Packages): Document ".elpaignore". 2024-01-27 12:31:32 -08:00
Eli Zaretskii
58f0603d40 Allow users to opt out of following Windows Dark mode
* src/w32fns.c (globals_of_w32fns) <w32-follow-system-dark-mode>:
New variable.
(w32_applytheme): Disable application of Dark mode if
'w32-follow-system-dark-mode' is nil.

* etc/NEWS:
* doc/emacs/msdos.texi (Windows Misc): Document
'w32-follow-system-dark-mode'.
2024-01-27 19:11:22 +02:00
Eli Zaretskii
4e5dd1a796 ; * doc/misc/calc.texi (Fractions): Fix typos. (Bug#66944) 2024-01-27 16:47:10 +02:00
Daniel Brooks
77d9d05df8 Calc parses fractions written using U+2044 FRACTION SLASH
Fractions of the form 123⁄456 are handled as if written 123:456. Note
in particular the difference in behavior from U+2215 DIVISION SLASH
and U+002F SOLIDUS, which result in division rather than a rational
fraction.
* lisp/calc/calc-aent.el (math-read-replacement-list): Substitute a
colon for any fraction slash.  (Bug#66944)

* test/lisp/calc/calc-tests.el (calc-frac-input): Test various
fraction types.

* etc/NEWS:
* doc/misc/calc.texi (Fractions): Mention fraction slash, precomposed
fractions.

Copyright-paperwork-exempt: yes
2024-01-27 16:42:47 +02:00
Eli Zaretskii
6176924238 Merge from origin/emacs-29
53481cc954 Fix description of when "\xNNN" is considered a unibyte c...
1ef8b90ae0 Simplify imenu setup for {cmake,dockerfile}-ts-modes
7338af9c98 ; * etc/PROBLEMS: Document that GnuPG 2.4.4 solves the Ea...
5483a1df99 Improve documentation of profiler commands
fb4cf0ab46 ; Fix xref under Output Overrides in Elisp manual.
aa6c24da61 Fix broken links to Freedesktop notifications spec
14d68221d2 Fix nasty cut'n'waste error in Tramp
51ca049608 Fix image-dired-tags-db-file void variable error
c450eec07f typescript-ts-mode: Skip test if tsx grammar missing
9841ced147 ; Fix typos
557ed9c046 * admin/README: Document the run-codespell script.
5701f96335 * admin/README: Fix entry on coccinelle subdirectory.
1805f4bfd6 Add script admin/run-codespell and supporting files
2024-01-27 08:14:31 -05:00
Eli Zaretskii
67392fc0dd Merge from origin/emacs-29
3a541b25df Update Polish translation of tutorial
6df731431a * doc/misc/gnus.texi (Summary Mail Commands): Fix command...
409bb8eb24 ; * doc/misc/gnus.texi (Scoring): Typo (bug#68581).
25734dd40c ; Delete pre-release remainder in NEWS.27
2024-01-27 08:14:30 -05:00
Eli Zaretskii
d36c370ce5 ; Minor improvements of last change
* lisp/register.el (register-use-preview): Doc fix.
* doc/emacs/regs.texi (Registers): Fix wording.  (Bug#68654)
2024-01-27 12:52:55 +02:00
Thierry Volpiatto
6b93e16e43 Add new option to 'register-use-preview'
When set to 'insist', exit minibuffer with same key as
register name, instead of pressing RET.  E.g., pressing
"a" selects register "a", then pressing "a" again exits
the minibuffer.

* lisp/register.el (register-use-preview): New option 'insist'.
(register-read-with-preview-fancy): Handle new option.
* doc/emacs/regs.texi: Document it.
* etc/NEWS: Mention 'insist'.  (Bug#68654)
2024-01-27 12:46:32 +02:00
Eli Zaretskii
43e2f3acdd ; Minor improvements in 'visual-wrap-prefix-mode'
* lisp/visual-wrap.el (visual-wrap-extra-indent): Add :version.
(visual-wrap-fill-context-prefix): Doc fix.
* lisp/menu-bar.el (menu-bar-line-wrapping-menu): Move the menu to
a better place, improve the help-echo text.

* etc/NEWS:
* doc/emacs/basic.texi (Continuation Lines): Improve documentation
and indexing of 'visual-wrap-prefix-mode'.
2024-01-27 10:38:14 +02:00
Eli Zaretskii
53481cc954 Fix description of when "\xNNN" is considered a unibyte character
* doc/lispref/objects.texi (Non-ASCII in Strings): More accurate
description of when a hexadecimal escape sequence yields a unibyte
character.  (Bug#68751)
2024-01-27 10:11:32 +02:00
Po Lu
6667d6c19c Import ELPA package adaptive-wrap as visual-wrap
* doc/emacs/basic.texi (Continuation Lines): Document
visual-wrap and its applications.

* etc/NEWS (Editing Changes in Emacs 30.1): Ditto.

* lisp/visual-wrap.el (visual-wrap-extra-indent)
(visual-wrap--face-extend-p, visual-wrap--prefix-face)
(visual-wrap--prefix, visual-wrap-fill-context-prefix)
(visual-wrap-prefix-function, visual-wrap-prefix-mode, lookup-key)
(visual-wrap): New file.  Update copyright years and rename to
`visual-wrap'.
2024-01-27 09:30:16 +08:00
Jim Porter
723b097351 Add support for running commands via Eshell's "env" command
* (eshell-handle-local-variables): Move most of the code to...
(eshell-parse-local-variables): ... here.
(eshell/env): Call 'eshell-parse-local-variables'.

* test/lisp/eshell/esh-var-tests.el
(esh-var-test/local-variables/env): New test.

* doc/misc/eshell.texi (Built-ins): Describe the new behavior.

* etc/NEWS: Announce this change.
2024-01-25 21:05:02 -08:00
Eli Zaretskii
5483a1df99 Improve documentation of profiler commands
* doc/lispref/debugging.texi (Profiling): Document more commands.
Improve indexing.  (Bug#68693)
2024-01-24 21:34:16 +02:00
Stefan Monnier
1f3371b46e Take stock of the wheel-up/down confusion
While we're hopefully all aware of the usual confusion between
the scroll operation moving the document or moving the viewport, Emacs
has its very own instance of that confusion where the
`mouse-wheel-down-event` variable is the one that (used to) hold
the value `wheel-up` and vice versa.

Thanks for Po Lu's commit 957b4f826a which not only fixed my change
but brought that confusion to my attention.
This patch doesn't fix the problem, but tries to fix the other places
in the code where we did not take it into account.

* doc/lispref/commands.texi (Misc Events): Mention the
wheel-up/down confusion.

* lisp/progmodes/flymake.el (flymake--mode-line-counter-map):
* lisp/completion-preview.el (completion-preview--mouse-map):
Fix wheel-up/down confusion.

* lisp/mwheel.el (mouse-wheel-down-event, mouse-wheel-up-event):
Fix docstrings.
2024-01-24 12:57:33 -05:00
Basil L. Contovounesios
fb4cf0ab46 ; Fix xref under Output Overrides in Elisp manual. 2024-01-23 11:39:20 +01:00
Basil L. Contovounesios
aa6c24da61 Fix broken links to Freedesktop notifications spec
* doc/lispref/os.texi (Desktop Notifications):
* lisp/notifications.el: Replace broken developer.gnome.org links
with specifications.freedesktop.org (bug#67939).
2024-01-23 10:52:31 +01:00
Mattias Engdegård
7a87ca09a7 Clarify permitted mutation in maphash documentation
* doc/lispref/hash.texi (Hash Access):
* src/fns.c (Fmaphash):
Make it clear what the function passed as argument can do.  Until now
these rules were unwritten, and are still unenforced.
2024-01-21 11:21:51 +01:00
Stefan Monnier
54d3de64e1 Merge branch 'mwheel-no-alts' 2024-01-20 15:04:12 -05:00
Stefan Monnier
db8890b3c9 mwheel.el: Unconditionally use the wheel-up/down/... events
The `mouse-wheel-DIR-event` vars were introduced because under X11
we get different `mouse-N` events depending on the users' mouse and
those same events can be used for other things for other rodents, so we
can't unconditionally treat those events as mouse-wheel events.

But this does not apply to the `wheel-up/down/...` events.
So hard code them.

* lisp/mwheel.el (mwheel--is-dir-p): Always consider the `wheel-DIR` events.
(mouse-wheel--setup-bindings): Always bind the `wheel-DIR` events.

* lisp/completion-preview.el (completion-preview--mouse-map):
Unconditionally bind the `wheel-DIR` events.
* lisp/edmacro.el (edmacro-fix-menu-commands): Hard code the
`wheel-DIR` events as mouse events regardless of `mouse-wheel-*-event`s.
* lisp/progmodes/flymake.el (flymake--mode-line-counter-map):
Do nothing, because it's already been done in commit e5be6c7ae3.

* doc/lispref/commands.texi (Misc Events): Document the need to use
`wheel-up/down/left/right` unconditionally.
2024-01-20 15:03:26 -05:00
Paul Eggert
3add626f14 Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08: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
Michael Albinus
115908469d Sync with Tramp 2.6.3-pre (don't merge with master)
* doc/misc/tramp.texi (Obtaining @value{tramp}): Mention the ELPA
Tramp manual.
(Remote processes): Adapt index.

* doc/misc/trampver.texi:
* lisp/net/trampver.el (tramp-version): Set to "2.6.3-pre".

* lisp/net/tramp.el (tramp-local-host-regexp): Extend.  Adapt :version.
(tramp-signal-process): PROCESS can also be a string.
(tramp-skeleton-directory-files):
* lisp/net/tramp-cache.el (with-tramp-saved-file-property)
(with-tramp-saved-file-properties)
(with-tramp-saved-connection-property)
(with-tramp-saved-connection-properties): Use `setf' but `setq' in macro.

* lisp/net/tramp-compat.el (tramp-compat-funcall): Declare debug.

* lisp/net/tramp-crypt.el (tramp-crypt-file-name-p): Exclude lock files.
(tramp-crypt-file-name-handler-alist): Use `identity' for
`abbreviate-file-name'.
(tramp-crypt-add-directory, tramp-crypt-remove-directory):
Adapt docstrings.
(tramp-crypt-cleanup-connection): New defun.  Add it to
`tramp-cleanup-connection-hook'

* lisp/net/tramp.el (tramp-skeleton-file-name-all-completions):
Handle "." and "..".

* lisp/net/tramp-adb.el (tramp-adb-handle-file-name-all-completions):
* lisp/net/tramp-fuse.el (tramp-fuse-handle-file-name-all-completions):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions):
Remove special handling of "." an "..".

* lisp/net/tramp-sh.el (tramp-pipe-stty-settings): New defcustom.
(tramp-sh-handle-make-process): Use it.  (Bug#62093)

* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes):
Adapt test.
(tramp-test31-signal-process): Extend.
2024-01-20 10:45:27 +01:00
Michael Albinus
6df731431a * doc/misc/gnus.texi (Summary Mail Commands): Fix command name. 2024-01-19 18:21:37 +01:00
Manuel Giraud
409bb8eb24 ; * doc/misc/gnus.texi (Scoring): Typo (bug#68581). 2024-01-19 13:52:42 +02:00