| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
* lisp/emacs-lisp/subr-x.el (hash-table-keys, hash-table-values):
Omit the reversal of the returned list. It is not ordered anyway.
* test/lisp/emacs-lisp/subr-x-tests.el
(subr-x--hash-table-keys-and-values): New test.
|
|
|
|
|
| |
* lisp/emacs-lisp/byte-run.el (byte-run--set-doc-string)
(byte-run--set-indent): Don't quote numbers (bug#48145).
|
|
|
|
|
|
|
| |
* lisp/emacs-lisp/byte-run.el (byte-run--set-obsolete): The `when'
is a string (or nil), so don't quote it (bug#48145).
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--print-form):
Adjust folding.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Doc strings, `declare` and `interactive` forms must appear in that
order and at most once each. Complain if they don't, instead of
silently ignoring the problem (bug#55905).
* lisp/emacs-lisp/byte-run.el (byte-run--parse-body)
(byte-run--parse-declarations): New.
(defmacro, defun): Check for declaration well-formedness as
described above. Clarify doc strings. Refactor some common code.
* test/lisp/emacs-lisp/bytecomp-resources/fun-attr-warn.el:
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-fun-attr-warn):
New test.
|
|
|
|
|
| |
* lisp/emacs-lisp/package.el (package-recompile): Delete all .elc
files under the package directory.
|
|
|
|
|
|
|
| |
* doc/emacs/package.texi (Package Installation): Document them.
* lisp/emacs-lisp/package.el (package-recompile):
(package-recompile-all): New commands (bug#27253).
|
|
|
|
|
|
|
|
|
| |
* lisp/emacs-lisp/bindat.el (bindat--pack-strz): Explicitly write a
null byte after packing a variable-length string to ensure proper
termination when packing to a pre-allocated string.
* doc/lispref/processes.texi (Bindat Types): Update documentation.
* test/lisp/emacs-lisp/bindat-tests.el (bindat-test--str-strz-prealloc):
Update tests.
|
|
|
|
|
| |
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--parse-file):
Fix autoloads scanning from packages.
|
|
|
|
|
|
|
|
| |
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker)
(byte-optimize-let-form, byte-optimize-letX):
* lisp/emacs-lisp/bytecomp.el (byte-compile-unwind-protect):
Simplify source optimisation and codegen code that can now rely on
normalised let/let* and unwind-protect forms.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make cconv work for dynamically bound code and always run it.
This allows later stages to benefit from transformations and
normalisations in cconv.
* lisp/emacs-lisp/bytecomp.el (byte-compile-preprocess): Always run
cconv.
* lisp/emacs-lisp/cconv.el (cconv--analyze-function)
(cconv-analyze-form): In dynbound code, treat all variable bindings
as dynamic (lambda, let, let* and condition-case).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Early normalisation of setq during macroexpand-all allows later
stages, cconv, byte-opt and codegen, to be simplified and duplicated
checks to be eliminated.
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all):
Normalise all setq forms to a sequence of (setq VAR EXPR).
Emit warnings if necessary.
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyze-form):
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
* lisp/emacs-lisp/bytecomp.el (byte-compile-setq):
Simplify.
* test/lisp/emacs-lisp/bytecomp-tests.el: Adapt and add tests.
* test/lisp/emacs-lisp/bytecomp-resources/warn-variable-setq-nonvariable.el;
* test/lisp/emacs-lisp/bytecomp-resources/warn-variable-setq-odd.el:
New files.
|
|
|
|
|
| |
* lisp/emacs-lisp/debug.el (debug): Don't clear the contents of
the buffer on `q' (bug#55863).
|
| |
|
|
|
|
|
|
| |
* lisp/emacs-lisp/bindat.el (strz): Signal an error if a null byte is
encountered while packing a string to a variable-length strz field.
* test/lisp/emacs-lisp/bindat-tests.el (strz): Add tests (bug#55938).
|
|
|
|
|
|
| |
* lisp/emacs-lisp/package.el (package-menu-filter-by-archive):
Filter by package name instead of by regexp, so that if the user
types "gnu", they won't get "nongnu", too (bug#55919).
|
|
|
|
|
|
|
|
| |
* lisp/emacs-lisp/bindat.el (str) (strz): Signal an error if the user
attempts to pack a multibyte string containing characters other than
ASCII and `eight-bit' characters (bug#55897).
* doc/lispref/processes.texi (Bindat Types): Update documentation.
* test/lisp/emacs-lisp/bindat-tests.el (str) (strz): Add tests.
|
| |
|
|
|
|
|
|
|
|
| |
For discussion, see:
https://lists.gnu.org/r/emacs-devel/2022-06/msg00567.html
* lisp/emacs-lisp/cl-macs.el (cl-deftype-satisfies): Include process
as a type, to avoid cl-typep complaining about process objects.
|
|
|
|
|
|
| |
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Always
generate an output file if we have EXTRA-DATA. This fixes package
installation of packages with no ;;;###autoload forms.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/emacs-lisp/bindat.el (bindat--type) <uint>: Add `le` optional arg.
(bindat--type) <uintr>: Delete method.
(uintr): Re-define as a bindat-macro instead.
(bindat-type): Update docstring accordingly.
(bindat--primitives): Update.
(sint): Simplify.
* doc/lispref/processes.texi (Bindat Types): Update `uint`, add `sint`,
and remove `uintr`.
* test/lisp/emacs-lisp/bindat-tests.el (data-bindat-spec): Use the new
`le` arg of `uint` instead of `uintr`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 30ec4a7347b2944818c6fc469ae871374ce7caa4 is incorrect -- the
length computation logic uses a simple nilness test, not `numberp'.
The `numberp' case is just an optimization if `len' is a literal
number; it does not affect the behavior.
Revert that commit, add some comments to help future readers avoid the
same mistake, and update the pack logic to use the same optimization
as the length computation for consistency.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/emacs-lisp/ert-x.el (tramp-methods)
(tramp-default-host-alist): Declare.
(ert-remote-temporary-file-directory): New defconst.
* test/README: Mention dnd-tests.el.
* test/lisp/autorevert-tests.el
(auto-revert-test-remote-temporary-file-directory): Remove.
Replace all uses by `ert-remote-temporary-file-directory'.
* test/lisp/dnd-tests.el (ert-x): Require.
(dnd-tests-temporary-file-directory): Remove. Replace all uses by
`ert-remote-temporary-file-directory'.
* test/lisp/filenotify-tests.el
(file-notify-test-remote-temporary-file-directory): Remove.
Replace all uses by `ert-remote-temporary-file-directory'.
* test/lisp/shadowfile-tests.el (ert-x): Require.
(shadow-test-remote-temporary-file-directory): Remove. Replace
all uses by `ert-remote-temporary-file-directory'.
* test/lisp/net/tramp-tests.el: Don't require ert.
(ert-remote-temporary-file-directory): Define if it doesn't exist.
(tramp-test-temporary-file-directory): Remove. Replace all uses
by `ert-remote-temporary-file-directory'.
|
|
|
|
|
|
|
|
| |
* lisp/emacs-lisp/bytecomp.el (byte-compile--reify-function):
Don't transpose doc string and interactive spec, which must come
in this order.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-function-attributes): New test.
|
|
|
|
|
|
| |
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric): Fix
the name that's recorded in the file -- this is only used by
loaddefs-gen now, I think.
|
|
|
|
|
|
|
|
|
| |
* lisp/emacs-lisp/find-func.el (find-function-advised-original): Look
at the actual function definition rather than
`advice--symbol-function` which sometimes returns only the advice.
* test/lisp/emacs-lisp/find-func-tests.el
(find-func-tests--find-library-verbose): Add test.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`cl-typep` has used a heuristic that if there's a `<foo>-p` function,
then <foo> can be used as a type. This made sense in the past where
most types were not officially declared to be (cl-)types, but nowadays
this just encourages abuses such as using `cl-typecase` with
"types" like `fbound`. It's also a problem for EIEIO objects, where
for historical reasons `<foo>-p` tests if the object is of type
exactly `<foo>` whereas (cl-typep OBJ <foo>) should instead test
if OBJ is a *subtype* of `<foo>`.
So we change `cl-typep` to emit a warning whenever this "-p" heuristic
is used, to discourage abuses, encourage the use of explicit
`cl-deftype` declarations, and try and detect some misuses of
`<foo>-p` for EIEIO objects.
* lisp/emacs-lisp/eieio.el (defclass): Define as type not only at
run-time but also for the current compilation unit.
* lisp/emacs-lisp/eieio-core.el (class, eieio-object): Define as types.
* lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Don't abuse the
"-p" heuristic.
* lisp/emacs-lisp/cl-macs.el (cl-deftype-satisfies):
Add entries for frames, windows, markers, and overlays.
(cl-typep): Emit a warning when using a predicate that is not known to
correspond to a type.
* lisp/files.el (file-relative-name): Fix error that can trigger if
there's an(other) error between loading `files.el` and loading
`minibuffer.el`.
|
|
|
|
| |
* lisp/emacs-lisp/syntax.el (syntax-ppss): Clarify doc string.
|
|
|
|
|
|
| |
* lisp/emacs-lisp/loaddefs-gen.el (generated-autoload-file)
(generated-autoload-load-name): Move the remaining two autoload.el
variables used by loaddefs-gen.el from autoload.el.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/url/url-cookie.el (url-cookie-write-file):
* lisp/international/titdic-cnv.el (tit-process-header)
(miscdic-convert):
* lisp/international/ja-dic-cnv.el (skkdic-convert):
* lisp/international/emoji.el (emoji--generate-file):
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric):
* admin/unidata/unidata-gen.el (unidata-gen-file)
(unidata-gen-charprop): Adjust callers.
* lisp/emacs-lisp/generate-lisp-file.el: Renamed from
generate-file.el. Also rename some keyword parameters and require
a generator function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/url/url-cookie.el (url-cookie-write-file):
* lisp/international/titdic-cnv.el (tit-process-header):
* lisp/international/ja-dic-cnv.el (skkdic-convert):
* lisp/international/emoji.el (emoji--generate-file):
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric)
* admin/unidata/unidata-gen.el (unidata-gen-file)
(unidata-gen-charprop): Use the new functions.
* lisp/emacs-lisp/generate-file.el: New file to provide
convenience functions for generated files. It's not always
trivial to know which parts of the trailer that has to be
obfuscated to avoid not getting byte-compiled etc, and some parts
of the headers/trailers are usually forgotten when hand-coding
these.
|
|
|
|
|
|
|
|
| |
* doc/lispref/files.texi (Contents of Directories): Document it.
* lisp/files.el (file-expand-wildcards): Extend to allow regexps.
* lisp/emacs-lisp/shortdoc.el (file): Expand the
file-expand-wildcards example.
|
|
|
|
|
|
| |
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--parse-file):
Ensure that we don't have an autoload cookie on the first column
inside a string.
|
|
|
|
|
|
| |
* lisp/emacs-lisp/shortdoc.el (string): Each example section is
supposed to contain only examples of using the function in
question (as policed by the FAILED shortdoc-examples test).
|
|
|
|
|
| |
* lisp/emacs-lisp/lisp.el (raise-sexp): Fix the key binding syntax
in the doc string.
|
|
|
|
|
| |
* lisp/emacs-lisp/lisp.el (raise-sexp): Try to explain what the
command does (bug#55788).
|
|
|
|
|
| |
* lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): The package name bit
in ###;;;foo-autoload may be missing, so do a lax match (bug#55784).
|
|
|
|
|
| |
* lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): Add a face to \\= doc
string escapes (bug#55783).
|
| |
|
|
|
|
|
| |
* lisp/emacs-lisp/bytecomp.el (byte-compile-docstring-style-warn):
Remove warning for "Unicode quotes" for now (bug#55780).
|
|
|
|
|
|
| |
* lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine): Use
the more general lisp-mode-autoload-regexp instead of
generate-autoload-cookie (i.e., also match ;;;###tramp-autoload).
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/Makefile.in ($(lisp)/loaddefs.el): Use the new function.
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Pass in
whether to inhibit a partial build (to make the code more general).
(loaddefs-generate--emacs-batch): Add a new function specially for
the Emacs build that has the special rules needed. (This also
fixes out-of-tree builds.)
loaddefs-generate-batch can be used in general for packages etc.
(loaddefs-generate-batch): Remove the special code for Emacs builds.
|
|
|
|
|
| |
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Make file
update comparisons faster.
|
|\ |
|
| |
| |
| |
| |
| | |
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Only do the
updating logic if we're really updating.
|
| |
| |
| |
| |
| |
| | |
This reverts commit 28358db93007456a1e0a6d9118823d4ddea4ba39.
This has been fixed in a different way.
|
| |
| |
| |
| |
| |
| | |
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Do a
complete build more often to avoid problems with going from old
loaddefs.el files to new ones.
|
| |
| |
| |
| |
| | |
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Prevent
one kind of string match error.
|
| |
| |
| |
| |
| |
| |
| | |
* lisp/emacs-lisp/bindat.el (strz): Fix (wrong-type-argument
number-or-marker-p nil) error when unpacking a strz with
unspecified (variable) length.
* test/lisp/emacs-lisp/bindat-tests.el (strz): Mark test as passing.
|