Commit graph

177925 commits

Author SHA1 Message Date
Sean Whitton
ef8c4779dd Update descriptions of VC's capabilities for Git and Mercurial
* doc/emacs/maintaining.texi (Version Control Systems): Update
descriptions of VC's capabilities for Git and Mercurial.
2025-04-08 13:17:17 +08:00
Stefan Monnier
19257efbf7 lisp/files.el (internal--get-default-lexical-binding): Buttonize the M-x 2025-04-07 23:24:21 -04:00
Stefan Monnier
9dc6177206 lisp/files.el (internal--get-default-lexical-binding): Handle nested loads 2025-04-07 22:48:01 -04:00
Po Lu
b392038560 Replace some calls to `intern' with DEFSYMs
* src/filelock.c (lock_file, unlock_file_handle_error): Call
constant symbols rather than interning them all the time.
(syms_of_filelock): New symbols Qask_user_about_lock,
Quserlock__handle_unlock_error, and
Quserlock__ask_user_about_supersession_threat.
2025-04-08 10:26:18 +08:00
Po Lu
9b7402c5fd ; * src/lread.c (get_lexical_binding): Fix coding style. 2025-04-08 09:46:16 +08:00
Stefan Monnier
9f25d46568 (Fload, Feval_buffer): Emit a warning when lexbind is unset (bug#74145)
This emits a warning at run-time rather than at compile time.

* src/lread.c (get_lexical_binding): New function.
(Fload, Feval_buffer): Use it.
(syms_of_lread): New var `internal--get-default-lexical-binding-function`.
* lisp/files.el: Set it.
(internal--get-default-lexical-binding): New function.
2025-04-07 21:41:35 -04:00
Stefan Monnier
9663c959c7 eieio: Improve some obsolecence warnings and fix #<CLASS CLASS-XX> names
* lisp/emacs-lisp/eieio.el (eieio--constructor-macro): Improve message.
(eieio-object-name-string): Avoid repeated class name in the output of
`eieio-object-name`.
(make-instance, clone): Improve message.

* lisp/emacs-lisp/eieio-core.el (eieio-defclass-autoload): Use the same
obsolescence warning as elsewhere.
2025-04-07 12:48:18 -04:00
Stefan Monnier
ae5c608eca (Freplace_region_contents): Fix point preservation (bug#77607)
* src/editfns.c (Freplace_region_contents): Save excursion around
temporary restriction (bug#77607) and remove
`record_unwind_protect_excursion` made redundant by commit 40d8650d51.
2025-04-07 11:54:06 -04:00
Stefan Monnier
fb5da5035a Merge branch 'cedet-object-name' 2025-04-07 00:58:32 -04:00
Stefan Monnier
31c5fd3bfb test/eieio: Silence warnings about slots and obsolete name arg
* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
(eieio-test-method-order-list-3, eieio-test-method-order-list-6)
(eieio-test-method-order-list-7, eieio-test-method-order-list-8):
Delete obsolete name argument to constructors.
(eieio-test-method-order-list-4): Make sure backward compatibility is
active when testing the obsolete name arg.

* test/lisp/jsonrpc-tests.el (jsonrpc--call-with-emacsrpc-fixture):
Delete obsolete name argument to constructor.

* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (derived-value):
Silence unknown slot warning.
2025-04-07 00:55:48 -04:00
Stefan Monnier
aca9f8c50a lisp/emacs-lisp/eieio-custom.el: Require eieio-base to silence warning 2025-04-07 00:10:42 -04:00
Stefan Monnier
71afa12941 eieio: Emit compilation warnings a bit more thoroughly
We used to warn about unknown slots only in `oref`: add the same check
for `oset` and `slot-boundp`.
Similarly, we warned about obsolete name args only when calling the
constructors: add the same check to `make-instance`.

* lisp/emacs-lisp/eieio-core.el (eieio--check-slot-name): New function
extracted from the compiler-macro of `eieio-oref`.
(eieio-oref, eieio-oset): Use it.
* lisp/emacs-lisp/eieio.el (slot-boundp): Use it.
 (eieio--constructor-macro): Add category to warning.
(make-instance): Add compiler-macro to warn about obsolete name.
2025-04-07 00:06:52 -04:00
Stefan Monnier
308a5ff0f8 (srecode-macro-help): Use cl--class-docstring
* lisp/cedet/srecode/srt-mode.el (srecode-macro-help): Don't
rely on `variable-documentation`.
2025-04-07 00:06:52 -04:00
Stefan Monnier
f0c1de75e1 cedet: Prefer slot-value over eieio-object-name-string
* lisp/cedet/srecode/mode.el (srecode-minor-mode-templates-menu):
* lisp/cedet/srecode/insert.el (srecode-insert-subtemplate):
* lisp/cedet/srecode/compile.el (srecode-dump): Prefer `slot-value`
over `eieio-object-name-string` since we know it's an
`eieio-named` object.
2025-04-07 00:06:08 -04:00
Stefan Monnier
48b41d595c cedet: Don't abuse initargs for slot names
* lisp/cedet/ede/base.el (ede-normalize-file/directory):
* lisp/cedet/ede/emacs.el (initialize-instance):
* lisp/cedet/ede/generic.el (initialize-instance):
* lisp/cedet/ede/linux.el (initialize-instance, project-rescan):
* lisp/cedet/srecode/map.el (srecode-map-update-map):
* lisp/cedet/srecode/srt-mode.el (srecode-parse-this-macro):
* lisp/cedet/ede/simple.el (ede-simple-load):
Use slot names rather than initargs with oref/oset/slot-value/...
2025-04-07 00:05:28 -04:00
Stefan Monnier
05680dc6c5 cedet: Delete obsolete object name arg to EIEIO constructors
For classes that don't inherit from `eieio-named`, this argument
is ignored anyway.

* lisp/auth-source-pass.el (auth-source-pass-backend): Delete obsolete
object-name argument to `auth-source-backend` constructor.

* lisp/cedet/ede/config.el (ede-config-get-configuration): Delete obsolete
object-name argument to ede-config constructor.

* lisp/cedet/ede/cpp-root.el (ede-find-target): Delete obsolete
object-name argument to `ede-cpp-root-target` constructor.

* lisp/cedet/ede/locate.el (ede-enable-locate-on-project): Delete obsolete
object-name argument to ede-locate constructor.

* lisp/cedet/ede/project-am.el (project-am-load-makefile): Delete obsolete
object-name argument to `project-am-makefile` constructor.

* lisp/cedet/semantic/complete.el (semantic-complete-read-tag-buffer-deep)
(semantic-complete-read-tag-local-members)
(semantic-complete-read-tag-project, semantic-complete-read-tag-analyzer):
Delete obsolete object-name argument to
`semantic-collector-buffer-deep`,
`semantic-collector-local-members`,
`semantic-collector-project-brutish`, and
`semantic-collector-analyze-completions` constructors.

* lisp/cedet/semantic/db-ebrowse.el (semanticdb-create-database):
Delete obsolete object-name argument to
`semanticdb-project-database-ebrowse` constructor.

* lisp/cedet/semantic/db-file.el (semanticdb-create-database): Delete
obsolete object-name argument to
`semanticdb-project-database-file` constructor.

* lisp/cedet/semantic/db-typecache.el (semanticdb-get-typecache):
Delete obsolete object-name argument to `semanticdb-typecache` constructor.

* lisp/cedet/semantic/db.el (semanticdb-get-table-index)
(semanticdb-create-table):
Delete obsolete object-name argument to
`semanticdb-default-find-index-class`, new-table-class, and
desired-class constructors.

* lisp/cedet/semantic/bovine/c.el (semantic-analyze-tag-references):
* lisp/cedet/semantic/analyze/refs.el
(semantic-analyze-tag-references-default): Delete obsolete
object-name argument to `semantic-analyze-references` constructor.

* lisp/cedet/srecode/compile.el (srecode-compile-templates):
Delete obsolete object-name argument to `srecode-compile-state` and
`srecode-dictionary-compound-variable` constructors.

* lisp/cedet/srecode/cpp.el (srecode-semantic-apply-tag-to-dict)
(srecode-c-apply-templates): Delete obsolete object-name argument to
`srecode-semantic-tag` constructors.

* lisp/cedet/srecode/dictionary.el (srecode-dictionary-add-entries)
(srecode-compound-toString): Delete obsolete object-name argument to
`srecode-dictionary-compound-variable` and `srecode-field` constructors.

* lisp/cedet/srecode/insert.el (srecode-insert-method-field):
Delete obsolete object-name argument to `srecode-field-value` constructor.

* lisp/cedet/srecode/semantic.el (srecode-semantic-handle-:tag)
(srecode-semantic-insert-tag, srecode-semantic-apply-tag-to-dict-default):
Delete obsolete object-name argument to `srecode-semantic-tag` constructors.

* lisp/cedet/srecode/table.el (srecode-mode-table-new): Delete
obsolete object-name argument to `srecode-template-table` constructor.
2025-04-07 00:03:20 -04:00
Stefan Monnier
f75f8f3d6a cedet: Pass object name via explicit :object-name arg
* lisp/cedet/srecode/insert.el (srecode-parse-input):
* lisp/cedet/srecode/compile.el (srecode-compile-one-template-tag)
(srecode-compile-inserter): Pass object name via explicit
`:object-name` arg to `srecode-template`,
`srecode-template-inserter-variable`, and children of `srecode-template`.

* lisp/cedet/semantic/mru-bookmark.el (semantic-mrub-push):
Pass object name via explicit `:object-name` arg to `semantic-bookmark`.
2025-04-07 00:02:20 -04:00
Sean Whitton
94148549d7 ; Note existing binding of vc-git-stash-delete-at-point 2025-04-07 11:30:37 +08:00
Sean Whitton
e9e11f7281 Add bindings for vc-git-stash-delete-at-point, vc-git-stash-delete
* lisp/vc/vc-git.el (vc-git-stash-map): Bind "D" to
vc-git-stash-delete-at-point.
(vc-dir-git-mode-map): Bind "z d" to vc-git-stash-delete.
* etc/NEWS: Announce the new bindings.
2025-04-07 11:28:35 +08:00
Sean Whitton
1e100f482c ; * lisp/vc/ediff-wind.el (ediff-with-live-window): Use cl-once-only 2025-04-07 10:19:58 +08:00
Sean Whitton
3ccd25f6b0 * lisp/vc/vc-git.el (vc-git-checkin): Actually pass down TO-STASH. 2025-04-07 10:05:08 +08:00
Sean Whitton
7f60aa45aa vc-git-checkin: Don't relativize names of temporary files
* lisp/vc/vc-git.el (vc-git-checkin)
(vc-git--stash-staged-changes): Don't relativize names of
temporary files passed to 'git apply --cached'.  More generally,
these are not files managed by the underlying VCS, so they
shouldn't go in the FILE-OR-LIST argument to vc-git-command.
2025-04-07 10:03:46 +08:00
João Távora
ba13e7de32 Icomplete: rename some internal helper functions (bug#77546)
The naming convention for internal functions is

  <package-name>--foo

not

  <package-name-subfunctionality>--foo

* lisp/icomplete.el (icomplete--adjust-lines-for-column): Rename
from icomplete-vertical--adjust-lines-for-column.
(icomplete--ensure-visible-lines-inside-buffer): Rename from
icomplete-vertical--ensure-visible-lines-inside-buffer.
(icomplete--add-indicator-to-selected): Rename from
icomplete-vertical--add-indicator-to-selected.
(icomplete--render-vertical): Use new internal function names.
2025-04-06 14:08:14 +01:00
João Távora
819f92cb12 Icomplete: check flag before rendering vertical indicators
Fixes: bug#77546

* lisp/icomplete.el (icomplete-vertical--add-indicator-to-selected): Rework.
(icomplete--render-vertical): Fix bug.
2025-04-06 14:08:14 +01:00
Sean Whitton
417d14a95e ; * admin/MAINTAINERS: Complete the handover of VC
Changed agreed with Dmitry Gutov <dmitry@gutov.dev>.
2025-04-06 19:03:41 +08:00
Michael Albinus
bb756b195a ; Fix typo in Tramp
* lisp/net/tramp-cache.el (with-tramp-saved-connection-property):
Fix typo.
2025-04-06 09:11:06 +02:00
Sean Whitton
8ae7224b8f ; VC credits: Add some names 2025-04-06 11:46:23 +08:00
Sean Whitton
936b2efdb3 Teach VC-Dir to automatically add and remove marks on other lines
* lisp/vc/vc-dir.el (vc-dir-allow-mass-mark-changes): New option.
(vc-dir-parent-marked-p): Replace with ...
(vc-dir--parent): ... this.
(vc-dir-children-marked-p): Replace with ...
(vc-dir--children): ... this.
(vc-dir-mark-file): Unmark subitems before marking a directory.
Offer to unmark a directory before marking a subitem.
(vc-dir-unmark-file): For an implicitly marked item, offer to
unmark it by marking everything else that's implicitly marked.
For an unmarked directory with marked subitems, offer to unmark
them all.
* etc/NEWS: Document the changes.
2025-04-06 11:18:57 +08:00
Sean Whitton
c0b1b54d73 Fix dired-vc-next-action generating inconsistent marks
* lisp/vc/vc-dir.el (vc-dir-mark-files): Document that
directories passed to this function must have trailing slashes.
Don't mark both a directory and also items under it (bug#76769).
* lisp/dired-aux.el (dired-vc-next-action): Update docstring.
2025-04-06 11:09:22 +08:00
Sean Whitton
a5f574429d vc-dir-mark-file: Consistently don't allow marking a subdirectory
* lisp/vc/vc-dir.el (vc-dir-mark-file): Don't allow marking a
subdirectory if its parent is already marked.  This fixes an
inconsistency whereby if a subdirectory was already marked then
its parent could not be marked, but not vice-versa (bug #76769).
2025-04-06 09:09:32 +08:00
Alan Mackenzie
c418e454b3 macroexp--expand-all: Don't call function-get on non-symbols
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Don't call
function-get on non-symbols (bug#77550).
2025-04-06 07:30:27 +08:00
shipmints
5fc1bd879e Add tab-bar test for "effectively dedicated window" (bug#71386)
* test/lisp/tab-bar-tests.el (tab-bar-tests-quit-restore-window):
New test for 'delete-frame' for effectively-dedicated windows.
2025-04-05 21:41:04 +03:00
Eli Zaretskii
684adc07c2 ; Fix a recent backport
* lisp/progmodes/typescript-ts-mode.el
(treesit-node-child-by-field-name, treesit-node-match-p)
(treesit-node-type): Declare.  Do not merge to master.
2025-04-05 15:09:20 +03:00
Eli Zaretskii
54b485ced6 Merge from origin/emacs-30
99d70ce6c2 Fix Tramp problem with loooongish file names
2025-04-05 07:07:29 -04:00
Eli Zaretskii
971f41fd66 ; Merge from origin/emacs-30
The following commit was skipped:

9869aa1a10 Tighten the criteria for a defun in typescript-ts-mode (b...
2025-04-05 07:07:29 -04:00
Eli Zaretskii
2054060d56 Merge from origin/emacs-30
ae7f65f3f9 Fix obsolete documentation of desktop library
fd5f817882 Improve Tramp's initial warnings
1e865a2f28 Explain, how to suppress Tramp warnings
a096207474 printed manuals: xrefs in and out of "Preparing Patches"
3f9ac99fc7 Fix Tramp's file-attributes cache
2025-04-05 07:07:29 -04:00
Eli Zaretskii
d403be4811 ; Merge from origin/emacs-30
The following commits were skipped:

6cac92928a Fix compilation errors due to insufficient compiler safet...
43c9eb3df6 Backport expansion of Time Stamp documentation
2025-04-05 07:07:29 -04:00
Eli Zaretskii
d42ee9f33a Merge from origin/emacs-30
38fec86281 ; Improve the documentation of 'slice' display spec (bug#...
3f05b455f7 ; * src/editfns.c (Fmessage): Mention 'inhibit-message' (...
2025-04-05 07:07:28 -04:00
James Thomas
5987d77f40 * lisp/gnus/nnfeed.el (nnfeed--write-server): Use default print settings.
Bug#77113
2025-04-05 13:35:40 +03:00
Eli Zaretskii
52e7a71e3f Teach 'current-column' to account for images
* src/indent.c (check_display_width): Handle 'image' and 'slice'
display specs, instead of using the width of the underlying text.
Accept 2 additional arguments: WINDOW and SCAN_BYTE.  (Bug#76107)
2025-04-05 13:24:22 +03:00
Eli Zaretskii
a4ee1e6709 ; * etc/NEWS: Announce new input methods (bug#77026). 2025-04-05 12:48:42 +03:00
Billy Lei
183ab3372e Add input method for languages based on Burmese
This adds 4 new input methods:
 . Burmese
 . Burmese Visual
 . Shan
 . Mon
* lisp/leim/quail/burmese.el: New file.  (Bug#77026)
2025-04-05 12:44:39 +03:00
Eli Zaretskii
bf7b3c5ddd ; * src/xdisp.c (display_mode_line, display_mode_element): Fix comments. 2025-04-05 12:35:42 +03:00
Pengji Zhang
c94f0d3dc8 Fix mouse highlighting for compact mode lines (bug#77336)
When 'mode-line-compact' is non-nil, the mode line string is
displayed as a whole.  That confuses the computation of ranges
of mouse highlighting on the mode line because all the glyphs
have the same Lisp object source.  As such, in this commit we
instead split the mode line string by sources, and display those
elements one by one, so the boundaries of each element could be
correctly detected for the purpose of mouse highlighting.

* src/xdisp.c (display_mode_line): Display mode line elements
one by one when 'mode-line-compact' is non-nil.
(display_mode_element): Record source element number of the
stored string via a text property.
(Fformat_mode_line): Initialize 'mode_line_elt_no' to 0.
(syms_of_xdisp): New symbol for the text property.
2025-04-05 12:30:46 +03:00
Paul Nelson
2d0b5f34a0 Restrict symbol prettification to displayable glyphs
* lisp/international/mule.el (char-displayable-on-frame-p): New
function used to determine whether a character can be
meaningfully displayed on a given frame.
* doc/lispref/display.texi (Fontsets): Document it.
* lisp/progmodes/prog-mode.el
(prettify-symbols--composition-displayable-p): New function used
to restrict to displayable prettification symbols.  This
prevents issues with missing characters appearing as boxes.
(prettify-symbols--make-keywords): Use it.  (Bug#77381)
2025-04-05 12:24:50 +03:00
Paul Nelson
ef6203b64a Extend prettify-symbols-alist in TeX mode
* lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist): Add
further math symbols, quotes and fractions.  (Bug#77381)
2025-04-05 12:21:29 +03:00
Eli Zaretskii
d6f1b25d2e ; * etc/NEWS: Fix last change. 2025-04-05 12:17:12 +03:00
Elías Gabriel Pérez
8fc18d0968 Optionally display function docstring in eldoc
Allow display (optionally) function docstring in eldoc. (Bug#77124)
* etc/NEWS: Document changes.
* lisp/progmodes/elisp-mode.el
(elisp-eldoc-funcall-with-docstring-length): New user option.
(elisp-eldoc-funcall-with-docstring): New function.
2025-04-05 12:08:20 +03:00
Visuwesh
c73e4cdece Improve formatting of 'setopt' suggestion in *Help* buffer
* lisp/help-fns.el (help--recommend-setopt): Remove function,
and...
(help-fns--customize-variable): ... move the relevant code here
to keep related code in the same place.  Change the formatting
to also include the :set function if it is set to a named
function.  (Bug#77173)
2025-04-05 11:45:37 +03:00
Eli Zaretskii
cffe5a0245 ; Fix wording of recent documentation changes
* lisp/desktop.el (desktop-restore-frames):
* etc/NEWS:
* doc/emacs/misc.texi (Saving Emacs Sessions): Fix wording of the
recent changes.
2025-04-05 10:11:03 +03:00