Commit graph

10183 commits

Author SHA1 Message Date
Stefan Monnier
0e1f81b9bc lisp/emacs-lisp/smie.el (smie-config-show-indent): Tweak message 2025-03-18 08:42:42 -04:00
Stefan Kangas
5f4c905353 ; Use defvar-keymap in define-derived-mode
* lisp/emacs-lisp/derived.el (define-derived-mode): Use defvar-keymap.
This change is for documentation purposes on macro expansion.
2025-03-18 00:33:32 +01:00
Stefan Kangas
69210eb84e Use 'help-key' function in more places
* lisp/dired-aux.el (dired-query):
* lisp/emacs-lisp/helper.el (Helper-help-map):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Use 'help-key'.
* lisp/net/tramp-cmds.el (tramp-rename-files):
* lisp/which-key.el (which-key--next-page-hint): Prefer 'help-key'
when available.
* lisp/help.el (help-key): Simplify.
* etc/symbol-releases.eld: Add 'help-key'.
2025-03-18 00:16:29 +01:00
Stefan Kangas
dec21bcc99 Use substitute-quotes for checkdoc errors
* lisp/emacs-lisp/checkdoc.el (checkdoc-create-error): Use
substitute-quotes.
2025-03-16 13:48:11 +01:00
Sean Whitton
ad57fbc58f find-function-mode-lower-precedence: Also remove the global bindings
* lisp/emacs-lisp/find-func.el (find-function-mode): When
find-function-mode-lower-precedence is non-nil, apply the
bindings in such a way that we can also remove them when the
mode is deactivated.  Approach due to Stefan Monnier.
2025-03-12 11:00:16 +08:00
Sean Whitton
2aef2951c0 ; Replace "Elisp" with "Lisp" or "Emacs Lisp" in some places
* configure.ac (libgccjit_not_found_err)
(libgccjit_dev_not_found_err):
* doc/lispref/elisp.texi (Top):
* doc/lispref/functions.texi (What Is a Function):
* doc/lispref/parsing.texi (Parsing Program Source)
(Tree-sitter C API):
* doc/misc/gnus.texi (The Gnus Registry):
* etc/TODO:
* lisp/auth-source.el (auth-source-search):
* lisp/cedet/semantic/bovine/el.el (emacs-lisp-mode):
* lisp/editorconfig.el
(editorconfig-get-local-variables-functions):
* lisp/emacs-lisp/cconv.el (cconv-make-interpreted-closure):
* lisp/emacs-lisp/oclosure.el (cconv--interactive-helper):
* lisp/net/tramp-message.el (tramp-debug-font-lock-keywords):
* src/frame.c (do_switch_frame):
* test/lisp/emacs-lisp/shortdoc-tests.el
(shortdoc-help-fns-examples-function-test): Say "Lisp"
not "Elisp".
* lisp/progmodes/peg.el (peg-translate-exp): Say "Emacs Lisp"
not "Elisp".
2025-03-12 10:24:22 +08:00
Sean Whitton
99852fb867 Merge from origin/emacs-30
894b0e3a2f ; Adapt comment in tramp.el
cc87717fa0 Add keyword placeholder to tramp.el
7d0d61d854 Rewrite ERT manual introduction
b2f124f2a8 ; cperl-mode.el: Don't misinterpret exec_fcn as keyword exec
59d1aac49d Document return values of the various read-* functions
2025-03-12 10:09:09 +08:00
Sean Whitton
60c0524ad2 Fix capitalization ELisp -> Elisp
* configure.ac (libgccjit_not_found_err)
(libgccjit_dev_not_found_err):
* doc/emacs/buffers.texi (List Buffers):
* doc/lispref/elisp.texi (Tree-sitter C API):
* doc/lispref/functions.texi (What Is a Function):
* doc/lispref/parsing.texi (Parsing Program Source)
(Tree-sitter C API):
* doc/misc/gnus.texi (The Gnus Registry):
* etc/DEBUG:
* etc/NEWS:
* etc/NEWS.25:
* etc/NEWS.26:
* etc/NEWS.28:
* etc/NEWS.30:
* etc/TODO:
* lib-src/emacsclient.c (print_help_and_exit):
* lisp/auth-source.el (auth-source-search):
* lisp/cedet/semantic/bovine/el.el (emacs-lisp-mode):
* lisp/cedet/semantic/wisent/comp.el
(wisent-automaton-lisp-form):
* lisp/cedet/srecode/el.el (srecode-semantic-apply-tag-to-dict):
* lisp/editorconfig.el
(editorconfig-get-local-variables-functions):
* lisp/emacs-lisp/bindat.el (bindat-type):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand):
* lisp/emacs-lisp/cconv.el (cconv-make-interpreted-closure):
* lisp/emacs-lisp/cl-macs.el (cl--labels-convert):
* lisp/emacs-lisp/lisp-mode.el (lisp-fdefs)
(lisp-fill-paragraphs-as-doc-string):
* lisp/emacs-lisp/macroexp.el (macroexp--fgrep):
* lisp/emacs-lisp/oclosure.el (cconv--interactive-helper):
* lisp/emacs-lisp/re-builder.el:
* lisp/erc/erc-button.el (erc-emacswiki-lisp-url):
* lisp/help-fns.el
(help-fns--describe-function-or-command-prompt):
* lisp/menu-bar.el (menu-bar-search-documentation-menu):
* lisp/net/tramp-message.el (tramp-debug-font-lock-keywords):
* lisp/org/org-capture.el (org-capture):
* lisp/org/org.el (org-category, org-todo):
* lisp/org/ox.el (org-export-async-start):
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode):
* lisp/progmodes/peg.el (peg-translate-exp):
* lisp/progmodes/ruby-ts-mode.el:
* lisp/woman.el (woman-mode, woman-parse-numeric-arg):
* src/chartab.c (map_char_table_for_charset):
* src/fns.c (extract_data_from_object):
* src/frame.c (do_switch_frame):
* src/keyboard.c (make_lispy_event):
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments):
* test/lisp/emacs-lisp/shortdoc-tests.el
(shortdoc-help-fns-examples-function-test):
* test/manual/etags/c-src/emacs/src/keyboard.c
(make_lispy_event): Fix capitalization ELisp -> Elisp.
2025-03-12 09:38:33 +08:00
Sean Whitton
261205dbb5 ; Replace non-standard "CLisp" abbreviation for "Common Lisp" 2025-03-12 09:20:05 +08:00
Stefan Kangas
ffb7d656a2 lisp/emacs-lisp/track-changes.el: Make GNU ELPA release 2025-03-12 01:17:34 +01:00
Stefan Kangas
523f792457 Unbreak track-changes in Emacs 24
* lisp/emacs-lisp/track-changes.el (track-changes--after): Don't use
'incf', added in Emacs 31; this :core package supports Emacs 24.
2025-03-12 01:17:23 +01:00
Stefan Kangas
af851dd82e Remove variable aliases obsolete since Emacs 23.2
* lisp/dired.el (dired-advertised-find-file):
* lisp/simple.el (advertised-undo):
* lisp/wid-edit.el (advertised-widget-backward): Remove variable
aliases obsolete since Emacs 23.2.  They are replaced by
':advertised-binding' properties.
* lisp/arc-mode.el (archive-mode-map):
* lisp/dired.el (dired-mode-map):
* lisp/obsolete/landmark.el (landmark-mode-map):
* lisp/play/decipher.el (decipher-mode-map):
* lisp/play/gomoku.el (gomoku-mode-map):
* lisp/proced.el (proced-mode-map): Don't bind above removed commands.
2025-03-11 21:20:38 +01:00
Michael Heerdegen
0c8d30045b Fix overlay-start and overlay-end gv setters
This fixes Bug#76730.

* lisp/emacs-lisp/gv.el (overlay-start, overlay-end):
Avoid computing the set value twice.
2025-03-11 19:40:02 +01:00
Stefan Monnier
4980089960 lisp/emacs-lisp/track-changes.el: Make GNU ELPA release 2025-03-10 15:48:33 -04:00
Mauro Aranda
6d99b74ef7 Fix Package name for cond-star
* lisp/emacs-lisp/cond-star.el: Fix name.  (Bug#76861)
2025-03-10 07:45:21 -03:00
Sean Whitton
57cef07710 Restore find-function-mode-map (bug#76700)
* lisp/emacs-lisp/find-func.el
(find-function-mode-lower-precedence): New option.
(find-function-mode-map): Restore.
(find-function-mode): Don't unconditionally bind keys into the
global map.  Instead respond to the new user option (bug#76700).
* etc/NEWS: Mention the new option in existing entry.
2025-03-09 21:50:16 +08:00
Eli Zaretskii
59d1aac49d Document return values of the various read-* functions
* lisp/textmodes/string-edit.el (read-string-from-buffer):
* lisp/simple.el (read-from-kill-ring, read-shell-command)
(read-signal-name):
* lisp/replace.el (read-regexp-case-fold-search):
* lisp/auth-source.el (read-passwd):
* lisp/subr.el (read-key, read-number):
* lisp/minibuffer.el (read-file-name, read-no-blanks-input):
* lisp/international/mule-cmds.el (read-multilingual-string):
* lisp/language/japan-util.el (read-hiragana-string):
* lisp/files-x.el (read-file-local-variable)
(read-file-local-variable-mode, read-file-local-variable-value):
* lisp/faces.el (read-face-font, read-face-name):
* lisp/simple.el (read-extended-command):
* lisp/env.el (read-envvar-name):
* lisp/files.el (read-directory-name):
* lisp/faces.el (read-color):
* lisp/international/mule-diag.el (read-charset):
* lisp/emacs-lisp/map-ynp.el (read-answer):
* src/coding.c (Fread_coding_system)
(Fread_non_nil_coding_system):
* src/minibuf.c (Fread_command, Fread_from_minibuffer):
* src/lread.c (Fread_char, Fread_char_exclusive, Fread_event): Doc
fixes.
2025-03-09 15:02:39 +02:00
Stefan Kangas
ce43d6732b Support :maintainers in plural in <foo>-pkg.el
For some reason, MELPA emits the keyword :maintainers, despite it
being unsupported and thus leads to the "Maintainer" field being empty
in all released Emacs versions.  That said, it seems like a good idea
to support the plural form, to be consistent with :authors.

* lisp/emacs-lisp/package.el (describe-package-1): Support
:maintainers in plural, in addition to :maintainer, to be consistent
with :authors.
2025-03-08 02:29:54 +01:00
Stefan Kangas
ebb94d712e ; Add Maintainer header to checkdoc.el
* lisp/emacs-lisp/checkdoc.el: Add Maintainer header.
2025-03-07 23:00:39 +01:00
Stefan Kangas
af828499c6 Add type check to package-upgrade
* lisp/emacs-lisp/package.el (package-upgrade): Add type check.
2025-03-07 17:44:27 +01:00
Basil L. Contovounesios
e62e7aa899 Clean up ert-font-lock error messages
* lisp/emacs-lisp/ert-font-lock.el: Remove redundant requires.
(ert-font-lock--parse-macro-args): First return value 'doc' being
nil already indicates omission of a docstring, so remove redundant
second return value doc-p.  All users updated.  Fix error
messages (bug#76372).
(ert-font-lock--check-faces): Simplify with ensure-list.
2025-03-07 15:58:08 +01:00
Stefan Monnier
fb33e3b4c7 (debug--early): Avoid re-entering the debugger for the same error
Fixes bug#76787.

* lisp/emacs-lisp/debug.el (debugger--last-error): Move ...
* lisp/emacs-lisp/debug-early.el (debugger--last-error): ... here.
(debug--early): Use it.
2025-03-06 15:23:03 -05:00
Philip Kaludercic
4719df9f42
Prepare cond-start for addition to GNU ELPA 2025-03-06 19:58:16 +01:00
Stefan Monnier
82affcaeff (debug): Don't kill-emacs upon exit when in batch mode
AFAICT this is a left over code from many years ago before
the `debug` special case was added to `condition-case` and
at a time where exiting from `debug` did not proceed to handle
remaining handlers.

In the usual case where we indeed want to kill Emacs,
`signal_or_quit` does it for us.

* lisp/emacs-lisp/debug.el (debug): Don't `kill-emacs` upon exit
when in batch mode (bug#76786)
2025-03-06 13:02:37 -05:00
Stefan Kangas
4b5cc0bfc6 Rewrite cl--parsing-keywords using backtick
* lisp/emacs-lisp/cl-seq.el (cl--parsing-keywords): Rewrite using
backtick.
2025-03-06 00:47:24 +01:00
Stefan Kangas
af44c7630c Remove more redundant 'cl-' prefixes
* lisp/emacs-lisp/cl-seq.el (cl-substitute-if, cl-substitute-if-not)
(cl-count, cl-sort): Remove more redundant 'cl-' prefixes from
arguments and let-bound variables.
2025-03-06 00:47:24 +01:00
Stefan Kangas
679966b5a0 New user option checkdoc-arguments-missing-flag
* lisp/emacs-lisp/checkdoc.el
(checkdoc-arguments-missing-flag): New user option.
(checkdoc-this-string-valid-engine): Use above new option.
(checkdoc--argument-missing-flag): Make into obsolete variable alias for
above new option.
2025-03-06 00:47:24 +01:00
Stefan Monnier
25de262bd9 (pp-fill): Fix bug#76715
* lisp/emacs-lisp/pp.el (pp-fill): Don't break before `.` within symbols.
* test/lisp/emacs-lisp/pp-tests.el (pp-tests--bug76715): New test.
2025-03-05 18:35:35 -05:00
Po Lu
b06d605bc0 Merge from savannah/emacs-30
121371a706 Move java/incrementing-version-code to AndroidManifest.xm...
8099dc6e3a Provide an Android version code derived from the Emacs ve...
59fcb2aa1b ; * lisp/register.el (register-use-preview): Doc fix (bug...
0383937a70 ; Improve documentation of 'shortdoc'
2025-03-05 15:00:22 +08:00
Stefan Kangas
7ba6228413 Make byte-compile-cond-use-jump-table obsolete
This user option was introduced in 2017, with the rationale:

    "This is a workaround for when `byte-compile-cond-jump-table'
    accidentally generates wrong code (hasn't happened so far in my
    tests), and should be removed once we're sure there are no issues
    with it."  https://lists.gnu.org/r/emacs-devel/2017-02/msg00223.html

There hasn't been any bugs in this area within the last 6 years, and the
few we did see before that were quickly resolved.  Let's declare this
variable obsolete now, while keeping its behavior when set to nil.  We
can always revert the obsoletion if it turns out to be needed after all.

* lisp/emacs-lisp/bytecomp.el
(byte-compile-cond-use-jump-table): Declare obsolete.
2025-03-05 03:41:49 +01:00
Stefan Kangas
8c8ff13e7b Clean up 'cl-' prefixes for local variables
The 'cl-' prefixes used for let-bound variables and argument names is a
holdover from the dynbind days.  They are no longer necessary, and make
the code hard to read.  This was partially cleaned up in the past; let's
finish the job now.

* lisp/emacs-lisp/cl-extra.el (cl--mapcar-many, cl-map, cl-maplist)
(cl-mapc, cl-mapl, cl-mapcan, cl-mapcon, cl-some, cl-every, cl-notany)
(cl-notevery, cl--map-keymap-recursively, cl--map-intervals)
(cl--map-overlays):
* lisp/emacs-lisp/cl-lib.el (cl-mapcar, cl-adjoin, cl-subst)
(cl--do-subst):
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause):
* lisp/emacs-lisp/cl-seq.el (cl-reduce, cl-fill, cl-replace, cl-remove)
(cl-remove-if, cl-remove-if-not, cl-delete, cl-delete-if)
(cl-delete-if-not, cl-remove-duplicates, cl-delete-duplicates)
(cl--delete-duplicates, cl-substitute, cl-substitute-if)
(cl-substitute-if-not, cl-nsubstitute, cl-nsubstitute-if)
(cl-nsubstitute-if-not, cl-find, cl-find-if, cl-find-if-not)
(cl-position, cl--position, cl-position-if, cl-position-if-not)
(cl-count, cl-count-if, cl-count-if-not, cl-mismatch, cl-search)
(cl-sort, cl-stable-sort, cl-merge, cl-member, cl-member-if)
(cl-member-if-not, cl--adjoin, cl-assoc, cl-assoc-if, cl-assoc-if-not)
(cl-rassoc, cl-rassoc-if, cl-rassoc-if-not, cl-union, cl-nunion)
(cl-intersection, cl-nintersection, cl-set-difference)
(cl-nset-difference, cl-set-exclusive-or, cl-nset-exclusive-or)
(cl-subsetp, cl-subst-if, cl-subst-if-not, cl-nsubst, cl-nsubst-if)
(cl-nsubst-if-not, cl-sublis, cl--sublis-rec, cl-nsublis)
(cl--nsublis-rec, cl-tree-equal, cl--tree-equal-rec): Clean up 'cl-'
prefixes for let-bound variables and arguments.
2025-03-05 03:16:59 +01:00
Stefan Kangas
c18089a658 Avoid rare warning when byte-compiling cl-loaddefs.el
* lisp/emacs-lisp/cl-extra.el: Add autoloaded declare-function to avoid
rare byte-compilation warning.
Problem reported by Eli Zaretskii <eliz@gnu.org>.
2025-03-04 22:55:44 +01:00
Eli Zaretskii
0383937a70 ; Improve documentation of 'shortdoc'
* lisp/emacs-lisp/shortdoc.el (shortdoc-display-group): Fix doc
string and wording of prompt.  (Bug#76723)
2025-03-04 16:01:32 +02:00
Po Lu
9daab9be34 Merge from savannah/emacs-30
7dcf9b71e6 ; Don't document package-x.el
a5fd518d52 ; Document spurious warnings on macOS 15
625ed68aea Fix the use of xref-window-local-history together with Xr...
8091772767 completing-read-multiple: Fix support for ":" as separator
38cc36a375 ; Improve docstring of cl-check-type
2025-03-04 14:32:33 +08:00
Stefan Monnier
035077febe (advice--make-nadvice-docstring): Rename
* lisp/emacs-lisp/nadvice.el (advice--make-nadvice-docstring): Rename
from `nadvice--make-docstring`, to stick to the `advice-` namespace.
Update all callers.
2025-03-03 22:18:02 -05:00
Matthew Bauer
ec517d1dcf Replace anonymous lambda timers with named functions
* lisp/emacs-lisp/eldoc.el (eldoc--update, eldoc-schedule-timer):
* lisp/jit-lock.el (jit-lock-context--update)
(jit-lock--antiblink-update): New functions broken out from...
* lisp/emacs-lisp/eldoc.el (eldoc-schedule-timer):
* lisp/jit-lock.el (jit-lock-mode, jit-lock--antiblink-post-command):
...here.  Use them as values for timers, to give them readable names
in 'M-x list-timers'.  (Bug#71354)
2025-03-04 02:42:45 +01:00
Stefan Kangas
5dd8b7e752 Don't accept strings in package-(install|upgrade)
* lisp/emacs-lisp/package.el (package-install): Revert recent change to
accept string PKG argument.
(package-upgrade): No longer accept string NAME argument.  (Bug#72160)
2025-03-04 01:58:12 +01:00
Stefan Kangas
558e6792c0 ; Add Maintainer header to loaddefs-gen.el 2025-03-02 06:45:53 +01:00
Stefan Kangas
735eace97b Make package-install accept a string as well
* lisp/emacs-lisp/package.el (package-install): Allow passing a string
instead of a symbol.  (Bug#72160)
(package-upgrade): Improve docstring.

* test/lisp/emacs-lisp/package-tests.el
(package-test-install-single-from-archive/string-type): New test.
2025-03-02 04:19:35 +01:00
Dmitry Gutov
8091772767 completing-read-multiple: Fix support for ":" as separator
* lisp/emacs-lisp/crm.el (completing-read-multiple):
Do not search for separators inside the prompt (bug#76461).
2025-03-02 05:13:59 +02:00
Stefan Kangas
38cc36a375 ; Improve docstring of cl-check-type
* lisp/emacs-lisp/cl-macs.el (cl-check-type): Improve docstring.
2025-03-02 04:11:55 +01:00
Eli Zaretskii
6c411de542 Merge from origin/emacs-30
f88dc0f2f9 ; Fix documentation of 'buffer-text-pixel-size'
734986349f ; Minor Android documentation improvements
a90da89903 ; Fix up emacs-lisp-mode docstring
58c7acb555 ; Fix completion-fail-discreetly docstring typo.
02c830ba22 Fix ert-font-lock macro signatures
0c6b8643ae Fix a typo in 'window_text_pixel_size'
8a8c25eacc ; Add Rudolf Schlatte to authors.el
94c0ea39a5 * doc/misc/efaq.texi (New in Emacs 30): Fix typo.  (Bug#7...
0be5f9115e ; * etc/images/README (Files): Add an entry for last-page...
63adf9dcf5 ; Reflow some cl-lib docstrings
99253f7970 ; * etc/TODO: New section "Make it easier to contribute".

# Conflicts:
#	lisp/emacs-lisp/cl-macs.el
2025-03-01 10:01:09 -05:00
Stefan Kangas
77f597ee3d Make '(setf (process-get ...) VAL)' return VAL
* lisp/emacs-lisp/gv.el (process-get): Return only the last value
when set as a generalized variable.  (Bug#76643)
2025-03-01 02:11:24 +01:00
Stefan Monnier
5f165caf31 (internal--c-header-file-path): Move to ffap.el
This function is used so rarely that it's really best not to
preload it.

* lisp/ffap.el (ffap-url-regexp): Precompute.
(ffap-c-path): Use `ffap--c-path`.
(ffap--gcc-is-clang-p, ffap--c-path): Move and rename from subr.el's
* lisp/subr.el (internal--gcc-is-clang-p)
(internal--c-header-file-path): Move to ffap.el and rename.

* lisp/man.el (Man-header-file-path): Default to a new value that
delegates to ffap.
(Man-header-file-path): Obey that new value.

* lisp/emacs-lisp/ert-x.el (ert-gcc-is-clang-p): Use `ffap--gcc-is-clang-p`.

* test/lisp/ffap-tests.el (ffap-tests--c-path)
(ffap-tests--c-path/gcc-mocked, ffap-tests--c-path/clang-mocked):
Move and rename from `subr-tests.el`.
* test/lisp/subr-tests.el (subr-tests-internal--c-header-file-path)
(subr-tests-internal--c-header-file-path/gcc-mocked)
(subr-tests-internal--c-header-file-path/clang-mocked):
Move to `ffap-tests.el` and rename.
2025-02-28 17:03:21 -05:00
Stefan Kangas
678fdcc165 ; Grammar fixes for "native-compiled"
1. Prefer "native-compiled" to "native compiled".
The adjective "native-compiled" with the hyphen is generally more
consistent with the typical pattern in English, especially when the
compound modifies a noun (e.g., "native-compiled code").

2. Prefer "natively compiled" to "natively-compiled".
The adverb "natively" modifies "compiled", and it is standard not
to hyphenate an adverb + adjective combination when the adverb ends
in -ly (e.g., "code that is natively compiled").

For example, note that we say "high-speed internet" but "highly
performant code".

* Makefile.in (dest):
* configure.ac (HAVE_NATIVE_COMP):
* doc/emacs/building.texi (Lisp Libraries):
* doc/lispref/compile.texi (Native Compilation)
(Native-Compilation Functions, Native-Compilation Variables):
* doc/lispref/functions.texi (What Is a Function, Declare Form):
* doc/lispref/loading.texi (How Programs Do Loading, Library Search):
* etc/NEWS:
* etc/NEWS.28:
* etc/NEWS.29:
* etc/NEWS.30:
* lisp/emacs-lisp/comp-common.el (native-comp-never-optimize-functions)
(comp-function-type-spec):
* lisp/emacs-lisp/comp-cstr.el:
* lisp/subr.el (locate-eln-file):
* src/comp.c (SETJMP_NAME, syms_of_comp):
* src/data.c (Fsubrp, Fnative_comp_function_p, Fsubr_native_lambda_list):
* src/lread.c (Fload):
* src/pdumper.c (dump_do_dump_relocation):
* test/src/comp-tests.el (lambda-return2): Avoid grammatically incorrect
variations on "natively compiled" and "native-compiled".  (Bug#56727)
2025-02-28 20:20:55 +01:00
Stefan Kangas
64edd5a5eb Don't use incf/decf in eldoc.el
* lisp/emacs-lisp/eldoc.el (eldoc--invoke-strategy): Don't use incf or
decf.  This is a :core package and supports Emacs 26.3.  (Bug#76604)
2025-02-28 02:30:27 +01:00
Stefan Kangas
b4d1061b82 Make define-global-minor-mode alias obsolete
* lisp/emacs-lisp/easy-mmode.el (define-global-minor-mode): Make alias
for old name obsolete, just in time for its 20th anniversary.
* test/lisp/emacs-lisp/lisp-mode-tests.el (test-font-lock-keywords):
* lisp/progmodes/subword.el (global-subword-mode)
(global-superword-mode): Don't use above obsolete name.
* lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression)
(lisp-fdefs): Remove syntax highlighting for obsolete name.
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload):
Add comment mentioning the obsolete status of above alias.
* doc/lispref/loading.texi (Autoload): Don't document obsolete name.
2025-02-26 06:37:52 +01:00
Po Lu
c5853892c5 Enable auto-revert-tests to pass on Android
* lisp/emacs-lisp/ert-x.el
(ert-remote-temporary-file-directory): Define to null-device on
Android.

* test/lisp/autorevert-tests.el
(auto-revert-test02-auto-revert-deleted-file): Provide for
situations where the watch descriptor is recreated by the
polling timer after a file notification is received.
2025-02-26 10:39:46 +08:00
Basil L. Contovounesios
02c830ba22 Fix ert-font-lock macro signatures
* doc/misc/ert.texi (Syntax Highlighting Tests):
* test/lisp/emacs-lisp/ert-font-lock-tests.el
(test-line-comment-p--emacs-lisp, test-line-comment-p--shell-script)
(test-line-comment-p--javascript, test-line-comment-p--python)
(test-line-comment-p--c, test-macro-test--correct-highlighting)
(test-macro-test--docstring, test-macro-test--failing)
(test-macro-test--file, test-macro-test--file-no-asserts)
(test-macro-test--file-failing): Reindent macro calls.
(with-temp-buffer-str-mode): Evaluate macro arguments left-to-right.
(ert-font-lock--wrap-begin-end): Use rx for more robust composition.
(test-line-comment-p--php): Require that php-mode is callable, not
already loaded.

* lisp/emacs-lisp/ert-font-lock.el (ert-font-lock-deftest)
(ert-font-lock-deftest-file): NAME is not followed by an empty list
like in ert-deftest, so the optional DOCSTRING is actually the
second argument.  Adapt calling convention in docstring, and debug,
doc-string, and indent properties accordingly (bug#76372).  Fix
docstring grammar, document MAJOR-MODE, and avoid referring to a
file name as a path.
2025-02-25 11:02:55 +01:00
Stefan Kangas
60b071e224 Make cl-gensym obsolete in favor of built-in gensym
* lisp/emacs-lisp/cl-macs.el (cl-gensym): Declare function
obsolete in favor of gensym, added in Emacs 26.1.  The only reason
for its existence is that it allows an integer argument, but
that's not really useful, so it's better to remove this complexity.
Ref: https://lists.gnu.org/r/emacs-devel/2017-09/msg00313.html
* doc/misc/cl.texi (Symbols, Creating Symbols, Efficiency Concerns)
(Obsolete Setf Customization): Don't document above obsolete function.
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause):
* lisp/emacs-lisp/edebug.el (edebug-make-form-wrapper):
* lisp/obsolete/cl.el (cl--function-convert, lexical-let):
* lisp/obsolete/thumbs.el (thumbs-temp-file):
* lisp/progmodes/eglot.el (eglot--lambda)
(eglot--when-live-buffer, eglot--when-buffer-window)
(eglot--collecting-xrefs, eglot--glob-parse):
* lisp/progmodes/flymake.el (flymake--run-backend):
* test/lisp/emacs-lisp/package-tests.el (with-package-test):
* test/lisp/progmodes/eglot-tests.el (eglot--guessing-contact):
* test/lisp/progmodes/elisp-mode-tests.el
(elisp-shorthand-read-buffer, elisp-shorthand-read-from-string): Prefer
plain gensym to cl-gensym in files that can depend on Emacs 26.1.
* lisp/jsonrpc.el (jsonrpc-lambda, jsonrpc-request): Prefer gensym to
cl-gensym only when defined, as this file supports Emacs 25.1
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-lib-test-gensym): Simplify
test as 'should' no longer uses cl-gensym.
2025-02-25 01:25:15 +01:00