summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
...
* | (debug): Don't `kill-emacs` upon exit when in batch modeStefan Monnier2025-03-061-37/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | Rewrite cl--parsing-keywords using backtickStefan Kangas2025-03-061-19/+15
| | | | | | | | | | * lisp/emacs-lisp/cl-seq.el (cl--parsing-keywords): Rewrite using backtick.
* | Remove more redundant 'cl-' prefixesStefan Kangas2025-03-061-10/+10
| | | | | | | | | | | | * 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.
* | New user option checkdoc-arguments-missing-flagStefan Kangas2025-03-061-9/+9
| | | | | | | | | | | | | | | | * 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.
* | (pp-fill): Fix bug#76715Stefan Monnier2025-03-051-1/+8
| | | | | | | | | | * 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.
* | Merge from savannah/emacs-30Po Lu2025-03-051-2/+4
|\| | | | | | | | | | | | | 121371a7064 Move java/incrementing-version-code to AndroidManifest.xm... 8099dc6e3ae Provide an Android version code derived from the Emacs ve... 59fcb2aa1b2 ; * lisp/register.el (register-use-preview): Doc fix (bug... 0383937a701 ; Improve documentation of 'shortdoc'
| * ; Improve documentation of 'shortdoc'Eli Zaretskii2025-03-041-2/+4
| | | | | | | | | | * lisp/emacs-lisp/shortdoc.el (shortdoc-display-group): Fix doc string and wording of prompt. (Bug#76723)
* | Make byte-compile-cond-use-jump-table obsoleteStefan Kangas2025-03-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Clean up 'cl-' prefixes for local variablesStefan Kangas2025-03-054-668/+670
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Avoid rare warning when byte-compiling cl-loaddefs.elStefan Kangas2025-03-041-2/+2
| | | | | | | | | | | | * lisp/emacs-lisp/cl-extra.el: Add autoloaded declare-function to avoid rare byte-compilation warning. Problem reported by Eli Zaretskii <eliz@gnu.org>.
* | Merge from savannah/emacs-30Po Lu2025-03-042-2/+7
|\| | | | | | | | | | | | | | | 7dcf9b71e6f ; Don't document package-x.el a5fd518d524 ; Document spurious warnings on macOS 15 625ed68aeaa Fix the use of xref-window-local-history together with Xr... 80917727676 completing-read-multiple: Fix support for ":" as separator 38cc36a3753 ; Improve docstring of cl-check-type
| * completing-read-multiple: Fix support for ":" as separatorDmitry Gutov2025-03-021-1/+3
| | | | | | | | | | * lisp/emacs-lisp/crm.el (completing-read-multiple): Do not search for separators inside the prompt (bug#76461).
| * ; Improve docstring of cl-check-typeStefan Kangas2025-03-021-1/+4
| | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-check-type): Improve docstring.
* | (advice--make-nadvice-docstring): RenameStefan Monnier2025-03-031-4/+8
| | | | | | | | | | | | * lisp/emacs-lisp/nadvice.el (advice--make-nadvice-docstring): Rename from `nadvice--make-docstring`, to stick to the `advice-` namespace. Update all callers.
* | Replace anonymous lambda timers with named functionsMatthew Bauer2025-03-041-7/+9
| | | | | | | | | | | | | | | | | | | | * 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)
* | Don't accept strings in package-(install|upgrade)Stefan Kangas2025-03-041-12/+9
| | | | | | | | | | | | * 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)
* | ; Add Maintainer header to loaddefs-gen.elStefan Kangas2025-03-021-0/+1
| |
* | Make package-install accept a string as wellStefan Kangas2025-03-021-2/+7
| | | | | | | | | | | | | | | | | | * 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.
* | Merge from origin/emacs-30Eli Zaretskii2025-03-012-37/+36
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f88dc0f2f9d ; Fix documentation of 'buffer-text-pixel-size' 734986349fd ; Minor Android documentation improvements a90da899034 ; Fix up emacs-lisp-mode docstring 58c7acb5554 ; Fix completion-fail-discreetly docstring typo. 02c830ba22b Fix ert-font-lock macro signatures 0c6b8643aec Fix a typo in 'window_text_pixel_size' 8a8c25eaccd ; Add Rudolf Schlatte to authors.el 94c0ea39a5a * doc/misc/efaq.texi (New in Emacs 30): Fix typo. (Bug#7... 0be5f9115ec ; * etc/images/README (Files): Add an entry for last-page... 63adf9dcf53 ; Reflow some cl-lib docstrings 99253f79703 ; * etc/TODO: New section "Make it easier to contribute". # Conflicts: # lisp/emacs-lisp/cl-macs.el
| * Fix ert-font-lock macro signaturesBasil L. Contovounesios2025-02-251-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| * ; Reflow some cl-lib docstringsStefan Kangas2025-02-241-14/+16
| | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-flet, cl-labels): Reflow docstrings.
| * Upgrade out-of-date VC package dependenciesJoseph Turner2025-02-231-1/+1
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc-install-dependencies): Pass the specified package version when checking if a package is installed. (Bug#73781) (cherry picked from commit 71a4670a9fa238f920ce88b938f703b605ad2f48)
* | Make '(setf (process-get ...) VAL)' return VALStefan Kangas2025-03-011-1/+1
| | | | | | | | | | * lisp/emacs-lisp/gv.el (process-get): Return only the last value when set as a generalized variable. (Bug#76643)
* | (internal--c-header-file-path): Move to ffap.elStefan Monnier2025-02-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | ; Grammar fixes for "native-compiled"Stefan Kangas2025-02-282-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | Don't use incf/decf in eldoc.elStefan Kangas2025-02-281-3/+3
| | | | | | | | | | * 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)
* | Make define-global-minor-mode alias obsoleteStefan Kangas2025-02-263-20/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Enable auto-revert-tests to pass on AndroidPo Lu2025-02-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | * 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.
* | Make cl-gensym obsolete in favor of built-in gensymStefan Kangas2025-02-252-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Use cl-with-gensyms in a few more casesStefan Kangas2025-02-252-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/cl.texi (Macro Bindings): * lisp/emacs-lisp/comp.el (comp--with-sp): * lisp/emacs-lisp/subr-x.el (with-buffer-unmodified-if-unchanged): * lisp/eshell/em-extpipe.el (eshell-extpipe--or-with-catch): * lisp/international/mule-cmds.el (with-locale-environment): * lisp/kmacro.el (kmacro-menu--marks-exist-p): * test/lisp/emacs-lisp/cl-extra-tests.el (cl-lib-test-remprop): * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-deduplicate): * test/lisp/emacs-lisp/ert-tests.el (ert-test-special-operator-p): * test/lisp/kmacro-tests.el (kmacro-tests-should-insert) (kmacro-tests-should-match-message): * test/lisp/replace-tests.el (replace-tests-with-undo): Use cl-with-gensyms instead of bare gensym call.
* | Make cl-declare obsoleteStefan Kangas2025-02-241-0/+1
| | | | | | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-declare): Make obsolete. * doc/misc/cl.texi (Declarations): Don't document above obsolete macro. (Bug#63288)
* | Move buffer related functions from ert-x.el to ert.elStefan Kangas2025-02-242-160/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/ert-x.el (ert--text-button) (ert--format-test-buffer-name, ert--test-buffers) (ert--test-buffer-button, ert--test-buffer-button-action) (ert--call-with-test-buffer, ert-with-test-buffer) (ert-with-buffer-selected, ert-kill-all-test-buffers) (ert-call-with-buffer-renamed, ert-buffer-string-reindented): Move from here... * lisp/emacs-lisp/ert.el (ert--text-button) (ert--format-test-buffer-name, ert--test-buffers) (ert--test-buffer-button, ert--test-buffer-button-action) (ert--call-with-test-buffer, ert-with-test-buffer) (ert-kill-all-test-buffers, ert-with-buffer-selected) (ert-call-with-buffer-renamed, ert-with-buffer-renamed): ...to here. * doc/misc/ert.texi (Helpers for Buffers): Break out new section... (Helper Functions): ...from here. * lisp/emacs-lisp/ert-x.el (ert-with-test-buffer-selected): Move obsolete definition to the end of the file. * test/lisp/emacs-lisp/ert-x-tests.el (ert--hash-table-to-alist, ert-test-test-buffers) (ert-test-with-buffer-selected/current) (ert-test-with-buffer-selected/selected) (ert-test-with-buffer-selected/nil-buffer) (ert-test-with-buffer-selected/modification-hooks) (ert-test-with-buffer-selected/read-only) (ert-test-with-buffer-selected/return-value) (ert-test-with-test-buffer-selected/modification-hooks) (ert-test-with-test-buffer-selected/read-only) (ert-test-with-test-buffer-selected/return-value) (ert-test-with-test-buffer-selected/buffer-name): Move tests from here... * test/lisp/emacs-lisp/ert-tests.el (ert--hash-table-to-alist, ert-test-test-buffers) (ert-test-with-buffer-selected/current) (ert-test-with-buffer-selected/selected) (ert-test-with-buffer-selected/nil-buffer) (ert-test-with-buffer-selected/modification-hooks) (ert-test-with-buffer-selected/read-only) (ert-test-with-buffer-selected/return-value) (ert-test-with-test-buffer-selected/selected) (ert-test-with-test-buffer-selected/modification-hooks) (ert-test-with-test-buffer-selected/read-only) (ert-test-with-test-buffer-selected/return-value) (ert-test-with-test-buffer-selected/buffer-name): ...to here. * test/lisp/progmodes/hideshow-tests.el (ert-x): * test/lisp/simple-tests.el (ert-x): * test/lisp/whitespace-tests.el (ert-x): Don't require.
* | ; Delete outdated comment from ert-x.elStefan Kangas2025-02-241-1/+1
| |
* | Support selecting buffer in ert-with-test-bufferStefan Kangas2025-02-241-14/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/ert-x.el (ert-with-test-buffer): Add new keyword argument :selected to make the buffer current and selected. (ert-with-test-buffer-selected): Make obsolete and redefine in terms of ert-with-test-buffer. * doc/misc/ert.texi (Helper Functions): Document above new :selected keyword argument, and remove documentation of ert-with-test-buffer-selected. * test/lisp/emacs-lisp/ert-x-tests.el (ert-test-with-test-buffer-selected/selected) (ert-test-with-test-buffer-selected/modification-hooks) (ert-test-with-test-buffer-selected/read-only) (ert-test-with-test-buffer-selected/return-value) (ert-test-with-test-buffer-selected/buffer-name): * test/lisp/progmodes/hideshow-tests.el (hideshow-tests-with-temp-buffer-selected): * test/lisp/simple-tests.el (kill-whole-line-invisible) (kill-whole-line-read-only, kill-whole-line-after-other-kill) (kill-whole-line-buffer-boundaries) (kill-whole-line-line-boundaries): * test/lisp/whitespace-tests.el (whitespace-tests--with-test-buffer, whitespace-tests--global): Use ert-with-test-buffer instead of ert-with-test-buffer-selected.
* | Use cl-with-gensyms in ert-with-message-captureStefan Kangas2025-02-241-3/+1
| | | | | | | | | | * lisp/emacs-lisp/ert-x.el (ert-with-message-capture): Use cl-with-gensyms.
* | Upgrade out-of-date VC package dependenciesJoseph Turner2025-02-231-1/+1
| | | | | | | | | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc-install-dependencies): Pass the specified package version when checking if a package is installed. (Bug#73781)
* | ; * lisp/emacs-lisp/cond-star.el (cond*): Fix whitespace.Eli Zaretskii2025-02-231-1/+1
| |
* | ; Delete out-of-date comment in float-sup.elStefan Kangas2025-02-231-1/+0
| | | | | | | | * lisp/emacs-lisp/float-sup.el: Delete out-of-date comment.
* | Prefer incf to cl-incf in emacs-lisp/*.elStefan Kangas2025-02-2325-97/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/backtrace.el (backtrace--print-func-and-args): * lisp/emacs-lisp/bindat.el (bindat--type): * lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): * lisp/emacs-lisp/chart.el (chart-file-count): * lisp/emacs-lisp/cl-extra.el (cl-parse-integer, cl--print-table): * lisp/emacs-lisp/cl-generic.el (cl--defmethod-doc-pos): * lisp/emacs-lisp/cl-indent.el (common-lisp-loop-part-indentation) (common-lisp-indent-function-1, lisp-indent-defmethod): * lisp/emacs-lisp/cl-lib.el (cl--set-substring): * lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause): * lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): * lisp/emacs-lisp/cl-print.el (cl-print--cons-tail) (cl-print--vector-contents, cl-print--struct-contents) (cl-print--string-props): * lisp/emacs-lisp/cl-seq.el (cl-substitute): * lisp/emacs-lisp/comp-cstr.el (comp--range-union) (comp--range-intersection): * lisp/emacs-lisp/comp.el (comp-vec-append, comp--gen-counter) (comp--op-case, comp--limplify-lap-inst, comp--limplify-block) (comp--limplify-function, comp--maybe-add-vmvar, comp--fwprop*): * lisp/emacs-lisp/edebug.el (edebug--called-interactively-skip): * lisp/emacs-lisp/eldoc.el (eldoc--invoke-strategy): * lisp/emacs-lisp/elp.el (elp--make-wrapper): * lisp/emacs-lisp/ert-x.el (ert-kill-all-test-buffers): * lisp/emacs-lisp/ert.el (ert--stats-set-test-and-result) (ert-write-junit-test-summary-report): * lisp/emacs-lisp/memory-report.el (memory-report--symbol-plist) (memory-report--object-size-1): * lisp/emacs-lisp/oclosure.el (oclosure--index-table) (oclosure--define-functions): * lisp/emacs-lisp/package.el (package-menu--perform-transaction): * lisp/emacs-lisp/smie.el (smie-set-prec2tab, smie-prec2->grammar) (smie-config--guess, smie-config--guess-1): * lisp/emacs-lisp/syntax.el (syntax-propertize-rules) (syntax-ppss--update-stats): * lisp/emacs-lisp/track-changes.el (track-changes--after): Prefer incf to cl-incf.
* | Prefer decf to cl-decfStefan Kangas2025-02-239-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/auth-source-pass.el (auth-source-pass--find-match-many): * lisp/calendar/time-date.el (decoded-time-add) (decoded-time--alter-month, decoded-time--alter-day): * lisp/dired.el (dired--move-to-next-line): * lisp/dom.el (dom-pp): * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): * lisp/emacs-lisp/cl-print.el (cl-print-to-string-with-limit): * lisp/emacs-lisp/cl-seq.el (cl-fill, cl-replace, cl-substitute): * lisp/emacs-lisp/comp-cstr.el (comp--range-union) (comp--range-intersection): * lisp/emacs-lisp/comp.el (comp-vec-prepend, comp--emit-narg-prologue): * lisp/emacs-lisp/edebug.el (edebug--strip-instrumentation): * lisp/emacs-lisp/eldoc.el (eldoc--invoke-strategy): * lisp/emacs-lisp/pp.el (pp--format-definition): * lisp/emacs-lisp/smie.el (smie-config--guess-1): * lisp/eshell/esh-io.el (eshell-close-handle, eshell-set-output-handle): * lisp/gnus/gnus-async.el (gnus-async-prefetch-article): * lisp/gnus/gnus-group.el (gnus-group-mark-group) (gnus-group-yank-group): * lisp/gnus/gnus-salt.el (gnus-tree-forward-line): * lisp/gnus/gnus-score.el (gnus-decay-scores): * lisp/gnus/gnus-srvr.el (gnus-browse-toggle-subscription-at-point): * lisp/gnus/gnus-sum.el (gnus-build-sparse-threads, gnus-parent-headers) (gnus-update-marks, gnus-summary-work-articles) (gnus-summary-refer-parent-article, gnus-summary-next-thread) (gnus-read-header, gnus-summary-insert-new-articles): * lisp/gnus/gnus-topic.el (gnus-topic-forward-topic): * lisp/gnus/gnus.el (gnus-short-group-name): * lisp/gnus/message.el (message-remove-first-header) (message-shorten-references, message-insert-screenshot): * lisp/gnus/mm-url.el (mm-url-insert): * lisp/gnus/nnselect.el (nnselect-push-info): * lisp/ibuffer.el (ibuffer-backward-line, ibuffer-forward-line) (ibuffer-map-lines): * lisp/icomplete.el (icomplete--render-vertical): * lisp/image/image-dired-external.el (image-dired-create-thumb-1): * lisp/image/image-dired.el (image-dired-delete-char): * lisp/mail/ietf-drums-date.el (ietf-drums-date--tokenize-string): * lisp/mh-e/mh-utils.el (mh-sub-folders-parse): * lisp/minibuffer.el (minibuffer-completion-help): * lisp/mpc.el (mpc-cmd-move, mpc-songpointer-refresh-hairy): * lisp/net/eww.el (eww-process-text-input): * lisp/net/pop3.el (pop3-wait-for-messages, pop3-uidl-stat) (pop3-uidl-dele): * lisp/net/shr-color.el (shr-color-hue-to-rgb): * lisp/play/5x5.el (5x5-up, 5x5-left): * lisp/play/decipher.el (decipher-read-alphabet, decipher--digram-total) (decipher-analyze-buffer): * lisp/play/hanoi.el (hanoi-insert-ring, hanoi-move-ring): * lisp/profiler.el (profiler-format-number) (profiler-calltree-build-unified): * lisp/progmodes/antlr-mode.el (antlr-next-rule, antlr-indent-line): * lisp/progmodes/c-ts-common.el (c-ts-common-statement-offset): * lisp/progmodes/ebrowse.el (ebrowse-cyclic-display-next/previous-member-list): * lisp/progmodes/hideif.el (hif-backward-comment): * lisp/progmodes/js.el (js-beginning-of-defun, js-end-of-defun) (js-ts--syntax-propertize): * lisp/progmodes/typescript-ts-mode.el (tsx-ts--syntax-propertize-captures): * lisp/rect.el (rectangle--*-char): * lisp/term.el (term-emulate-terminal): * lisp/textmodes/reftex-cite.el (reftex-do-citation): * lisp/textmodes/reftex-index.el (reftex-index-next-phrase): * lisp/textmodes/reftex-parse.el (reftex-init-section-numbers): * lisp/textmodes/reftex-sel.el (reftex-select-unmark): * lisp/textmodes/reftex.el (reftex-silence-toc-markers): * lisp/treesit.el (treesit-navigate-thing): * lisp/vc/diff-mode.el (diff-sanity-check-context-hunk-half, (diff-sanity-check-hunk): * lisp/vc/pcvs-util.el (cvs-first): * lisp/vc/smerge-mode.el (smerge-get-current): * lisp/vc/vc-hg.el (vc-hg--glob-to-pcre): * test/lisp/net/socks-tests.el (socks-tests-perform-hello-world-http-request): * test/src/buffer-tests.el (test-overlay-randomly): Prefer decf to cl-defc in all code where we can.
* | New macros incf and decfStefan Kangas2025-02-233-24/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-lib.el (cl-incf, cl-decf): Move macros from here... * lisp/emacs-lisp/gv.el (incf, decf): ...to here. Make old names into aliases, documented as deprecated. * lisp/obsolete/cl.el: Don't alias incf and decf. * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-test-incf) (cl-lib-test-decf): Move tests from here... * test/lisp/emacs-lisp/gv-tests.el (gv-incf, gv-decf): ...to here. * doc/lispref/numbers.texi (Arithmetic Operations): * lisp/emacs-lisp/shortdoc.el (number): Document incf and decf. * doc/lispref/variables.texi (Multisession Variables): * doc/misc/cl.texi (Organization, Modify Macros, Modify Macros) (Modify Macros, Macro Bindings, For Clauses, Property Lists) (Structures, Efficiency Concerns, Obsolete Setf Customization): Delete cl-incf and cl-decf documentation, moving any relevant parts to lispref. Delete some parts that seem to primarily regard implementation details that do not warrant inclusion in lispref. Update all examples to use incf/decf.
* | Fix bug where VC packages were missing summariesPhilip Kaludercic2025-02-221-1/+5
| | | | | | | | | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc--generate-description-file): Run the heuristic to determine the package summary if the current description is just the default package summary. (Bug#76065)
* | ; Fix typosStefan Kangas2025-02-222-2/+2
| |
* | New user option checkdoc-allow-quoting-nil-and-tStefan Kangas2025-02-211-11/+20
| | | | | | | | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-allow-quoting-nil-and-t): New user option that allows turning off the warning for having nil and t in quotes. (checkdoc-this-string-valid-engine): Use above new option.
* | Remove duplicate information from some completing-read-multiple promptsJuri Linkov2025-02-201-3/+3
| | | | | | | | | | | | | | | | | | * lisp/info.el (info-finder): * lisp/emacs-lisp/package.el (package-isolate) (package-menu-filter-by-archive, package-menu-filter-by-keyword): Remove mentions of comma separator from the prompts since now 'completing-read-multiple' shows this information by the default format (bug#76028).
* | Make cl-locally obsoleteStefan Kangas2025-02-181-4/+2
| | | | | | | | | | | | * doc/misc/cl.texi (Declarations): Don't document cl-locally. * lisp/emacs-lisp/cl-macs.el (cl-locally): Make into obsolete function alias for progn.
* | merging with my changes in cond-star.el.Richard Stallman2025-02-1718-63/+87
|\ \
| * | Prefer plusp/minusp to cl-plusp/cl-minuspStefan Kangas2025-02-172-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/dired.el (dired--move-to-next-line): * lisp/emacs-lisp/ert.el (ert-run-tests-batch, ert-face-for-stats): * lisp/emacs-lisp/pp.el (pp--format-definition): * lisp/gnus/gnus-icalendar.el (gnus-icalendar-event--org-timestamp): * lisp/ibuffer.el (ibuffer-compile-format, ibuffer--format-title) (ibuffer--format-summary): * lisp/image-mode.el (image-transform-set-percent): * lisp/international/emoji.el (emoji--list-generate, emoji--read-emoji): * lisp/progmodes/ebrowse.el (ebrowse-set-tree-indentation) (ebrowse-set-member-buffer-column-width) (ebrowse-cyclic-display-next/previous-member-list) (ebrowse-draw-member-short-fn) (ebrowse-switch-member-buffer-to-sibling-class, ebrowse-push-position): * lisp/textmodes/dns-mode.el (dns-mode-reverse-and-expand-ipv6): * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--not-writable-directory) (bytecomp-tests--dest-mountpoint) (bytecomp-tests--target-file-no-directory): * test/lisp/emacs-lisp/cl-seq-tests.el (cl-member-if-test) (cl-member-if-not-test, cl-assoc-if-not-test, cl-rassoc-if-test) (cl-rassoc-if-not-test): * test/src/emacs-module-tests.el (mod-test-add-nanosecond/valid): Prefer plusp and minusp to cl-plusp and cl-minusp.
| * | New functions plusp and minuspStefan Kangas2025-02-172-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-lib.el (cl-plusp, cl-minusp): Move from here... * lisp/subr.el (plusp, minusp): ...to here. Make old names into aliases, documented as deprecated. Add type declarations. Change from defsubst to regular functions with compiler macros. * lisp/obsolete/cl.el: Don't alias plusp and minusp. * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-test-plusp) (cl-lib-test-minusp): Move tests from here... * test/lisp/subr-tests.el (subr-test-plusp, subr-test-minusp): ...to here. * doc/lispref/numbers.texi (Predicates on Numbers): Document plusp and minusp. * doc/misc/cl.texi (Predicates on Numbers): Delete cl-plusp and cl-minusp. * lisp/emacs-lisp/shortdoc.el (number): Document plusp and minusp instead of cl-plusp and cl-minusp.
| * | Fix compilation errors due to insufficient compiler safety (bug#63288)Pip Cet2025-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default safety level is 1. Restoring the default safety level to 1 after it was temporarily 0 should reset byte-compile-delete-errors to nil, its default level. Failing to do that resulted in miscompilation of code in highly-parallel builds. * lisp/emacs-lisp/cl-macs.el (cl--do-proclaim): Change 'byte-compile-delete-errors' to become t only at 'safety' level 0, not levels 1 or 2.