]>
git.eshelyaron.com Git - emacs.git/log
Gerd Möllmann [Sat, 22 Oct 2022 13:21:40 +0000 (15:21 +0200)]
Fixes in package functions
* lisp/emacs-lisp/pkg.el (pkg-stringify-names): De-duplicate names.
(delete-package): Unregister package.
Gerd Möllmann [Sat, 22 Oct 2022 13:20:46 +0000 (15:20 +0200)]
Improve Lisp interface on the C side of packages
* src/pkg.c (Fpackage_percent_set_name): Allow nil as name.
(Fpackage_percent_register): Return the package.
Gerd Möllmann [Sat, 22 Oct 2022 11:06:57 +0000 (13:06 +0200)]
Expose package-%register to Lisp
* src/pkg.c (Fpackage_percent_register): New DEFUN.
(syms_of_pkg): defsubr it.
Gerd Möllmann [Sat, 22 Oct 2022 10:50:56 +0000 (12:50 +0200)]
Mark module--test-assertions--call-emacs-from-gc unstable
This test succeeds for me with --enable-checking and fails otherwise
with a segfault. See also comment there.
* test/src/emacs-module-tests.el
(module--test-assertions--call-emacs-from-gc): Mark unstable
if feature symbol-packages is present.
Gerd Möllmann [Sat, 22 Oct 2022 10:35:55 +0000 (12:35 +0200)]
Remove an invalid eassert
* src/pkg.c (pkg_emacs_intern): Don't assert that symbol names
can never start with a colon.
Stefan Kangas [Sat, 22 Oct 2022 09:48:20 +0000 (11:48 +0200)]
Add tests for packagep and package-name
* test/src/pkg-tests.el (pkg-tests-packagep)
(pkg-tests-package-name): New tests.
(pkg-tests-list-all-packages): Expand test.
Stefan Kangas [Fri, 21 Oct 2022 06:13:25 +0000 (08:13 +0200)]
Fix cl-intern/cl-unintern tests
* test/src/pkg-tests.el (pkg-tests-cl-intern)
(pkg-tests-cl-unintern): Fix tests.
Stefan Kangas [Fri, 21 Oct 2022 06:12:59 +0000 (08:12 +0200)]
* src/lisp.h (pkg_error): Fix GCC warning in declaration.
Gerd Möllmann [Sat, 22 Oct 2022 07:26:07 +0000 (09:26 +0200)]
Fix priting of :1
* src/print.c (print_symbol_name, print_symbol): Don't check for
symbol names looking like a number when we have already printed a
package prefix.
* test/src/editfns-tests.el (format-%s-keywords): Test for :1.
Gerd Möllmann [Sat, 22 Oct 2022 06:48:02 +0000 (08:48 +0200)]
Make format %s for keywords compatible
* src/editfns.c (styled_format): Use LISP_SYMBOL_NAME.
Gerd Möllmann [Sat, 22 Oct 2022 06:29:48 +0000 (08:29 +0200)]
Add test for format %s with keywords
* test/src/editfns-tests.el (format-%s-keywords): New test.
Gerd Möllmann [Fri, 21 Oct 2022 15:35:56 +0000 (17:35 +0200)]
Make lisp/progmodes/elisp-mode-tests succeed
Shorthands are not supported with packages. Add :expected-result
accordingly.
* test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-read-buffer):
(elisp-shorthand-read-from-string):
(elisp-shorthand-load-a-file):
(elisp-shorthand-byte-compile-a-file):
(elisp-shorthand-completion-at-point):
(elisp-shorthand-escape):
(elisp-dont-shadow-punctuation-only-symbols): Expect to fail
if (featurep 'symbol-packages).
Gerd Möllmann [Fri, 21 Oct 2022 15:19:12 +0000 (17:19 +0200)]
Provide 'symbol-packages'
* src/pkg.c (init_pkg_once): DEFSYM Qsymbol_packages.
(syms_of_pkg): Fprovide it.
Gerd Möllmann [Fri, 21 Oct 2022 14:57:20 +0000 (16:57 +0200)]
Fixes for minibuf-tests
This was a remnant of a time when I made obarrays packages.
* src/minibuf.c (Ftry_completion): Handle case collection being obarray.
(Fall_completions): Same.
(Ftest_completion): And same again.
Gerd Möllmann [Fri, 21 Oct 2022 14:14:48 +0000 (16:14 +0200)]
Fixes for obarray-tests
* src/pkg.c (pkg_emacs_unintern): Take args, and return a value
consistent with traditional unintern.
Gerd Möllmann [Fri, 21 Oct 2022 11:55:06 +0000 (13:55 +0200)]
Fix printing of empty keywords
* src/print.c (print_symbol): Don't print ## for keywords with
empty symbol name.
Gerd Möllmann [Fri, 21 Oct 2022 11:32:55 +0000 (13:32 +0200)]
print-tests failure for esoteric symbols
* src/print.c (print_symbol_name): Fix printing of symbols that
look like numbers.
Gerd Möllmann [Fri, 21 Oct 2022 11:23:06 +0000 (13:23 +0200)]
print-test fixes
* src/print.c (print_symbol): Fix printing of empty symbol names
to be compatible.
Gerd Möllmann [Fri, 21 Oct 2022 04:14:52 +0000 (06:14 +0200)]
Work on Lisp interface
Gerd Möllmann [Thu, 20 Oct 2022 17:04:11 +0000 (19:04 +0200)]
Handle keywords in image specs
* src/image.c (parse_image_spec): Don't assume that keywords have
a ':' in their symbol name.
Gerd Möllmann [Thu, 20 Oct 2022 17:03:17 +0000 (19:03 +0200)]
Remove a call to pkg_break
Gerd Möllmann [Thu, 20 Oct 2022 13:38:39 +0000 (15:38 +0200)]
Add pkg_set_status and Lisp defun for it
Gerd Möllmann [Thu, 20 Oct 2022 12:38:21 +0000 (14:38 +0200)]
Fix completion for new symbol table layout
Gerd Möllmann [Thu, 20 Oct 2022 12:18:39 +0000 (14:18 +0200)]
De-duplicate packages for mapatoms
Gerd Möllmann [Thu, 20 Oct 2022 11:06:46 +0000 (13:06 +0200)]
Introduce PACKAGE_NAMEX
PACKAGE_NAME Is already taken :-(.
Gerd Möllmann [Thu, 20 Oct 2022 10:29:17 +0000 (12:29 +0200)]
Some cleanup in pkg.c and lisp.h
Gerd Möllmann [Thu, 20 Oct 2022 09:25:43 +0000 (11:25 +0200)]
Intrdduce pkg_find_symbol
Gerd Möllmann [Thu, 20 Oct 2022 08:21:55 +0000 (10:21 +0200)]
Print package prefixes right
Gerd Möllmann [Thu, 20 Oct 2022 08:21:34 +0000 (10:21 +0200)]
Remove Lisp_Symbol::external
Gerd Möllmann [Thu, 20 Oct 2022 07:19:17 +0000 (09:19 +0200)]
Remove unused function prototype from lisp.h
Gerd Möllmann [Thu, 20 Oct 2022 07:15:20 +0000 (09:15 +0200)]
Change package symbol table layout
The symbol table now stored symbol as key, and symbol
status (:internal, :external) as values.
Quite some changes due to that.
Gerd Möllmann [Wed, 19 Oct 2022 15:00:35 +0000 (17:00 +0200)]
Fix some warnings
Gerd Möllmann [Wed, 19 Oct 2022 14:39:05 +0000 (16:39 +0200)]
hash_remove_from_table returns bool
* src/fns.c (hash_remove_from_table): Return true if something was
deleted.
* src/lisp.h: Change declaration.
Gerd Möllmann [Wed, 19 Oct 2022 14:34:50 +0000 (16:34 +0200)]
Fix intern-soft
* src/pkg.c (conflicting_package): Remove unused function.
(pkg_emacs_intern_soft): If checking a symbol, return non-nil only if
we found exactly that symbol.
Gerd Möllmann [Wed, 19 Oct 2022 14:34:20 +0000 (16:34 +0200)]
Fix missing ')'
Gerd Möllmann [Wed, 19 Oct 2022 14:15:08 +0000 (16:15 +0200)]
Restore obarray.el to return vectors
Gerd Möllmann [Wed, 19 Oct 2022 05:17:33 +0000 (07:17 +0200)]
New predefined hash table test for string-equal
* src/fns.c (cmpfn_string_equal): New.
(hashfn_string_equal): New.
(hashtest_string_equal): New.
(Fmake_hash_table): Recognize test type Qstring_equal.
(syms_of_fns): DEFSYM Qstring_qual.
Gerd Möllmann [Tue, 18 Oct 2022 16:31:58 +0000 (18:31 +0200)]
Move more package stuff to Lisp
Gerd Möllmann [Tue, 18 Oct 2022 14:49:47 +0000 (16:49 +0200)]
Move make-package to Lisp
* lisp/emacs-lisp/pkg.el: Implement make-package.
* lisp/obarray.el (obarray-make): Use make-%package.
* src/pkg.c: Various changes to move make-package to Lisp.
Gerd Möllmann [Tue, 18 Oct 2022 13:09:26 +0000 (15:09 +0200)]
Make faces work with keywords not having : in symbol names
* src/xfaces.c (set_lface_from_font): Use LISP_SYMBOL_NAME.
(merge_face_vectors): Use LISP_SYMBOL_NAME.
(merge_face_ref): Use SYMBOL_KEYWORD_P instead of checking ':'.
(gui_supports_face_attributes_p): Use LISP_SYMBOL_NAME.
Gerd Möllmann [Tue, 18 Oct 2022 13:07:47 +0000 (15:07 +0200)]
Add amcros for keyword symbols
* src/lisp.h (SYMBOL_KEYWORD_P): Returns true if symbol is a keyword.
(LISP_SYMBOL_NAME): Basically the same as Fsymbol_name, a shortcut.
* src/data.c (Fsymbol_name): Use SYMBOL_KEYWORD_P.
* src/pkg.c (pkg_intern_keyword): Use SYMBOL_KEYWORD_P.
Gerd Möllmann [Tue, 18 Oct 2022 12:36:01 +0000 (14:36 +0200)]
Make internals of Lisp_Package visible to Lisp
Done to be able to do as much as possible from Lisp.
* src/lisp.h (Lisp_Package): Rename used_packages to use_list.
* src/pkg.c: Rename used_packages to use_list.
(Fpackage_percent_name): (Fpackage_percent_set_name):
(Fpackage_percent_nicknames):
(Fpackage_percent_set_nicknames):
(Fpackage_percent_use_list):
(Fpackage_percent_set_use_list):
(Fpackage_percent_shadowing_symbols):
(Fpackage_percent_set_shadowing_symbols):
(Fpackage_percent_symbols): New functions for getting and setting
internals of Lisp_Package.
(syms_of_pkg): defsubr them.
Gerd Möllmann [Tue, 18 Oct 2022 11:21:20 +0000 (13:21 +0200)]
Work on defpackage
Gerd Möllmann [Tue, 18 Oct 2022 10:49:33 +0000 (12:49 +0200)]
Increase default symbol-table sizes
* src/pkg.c (Fpackage_symbols): New function.
(syms_of_pkg): defsubr it.
(init_pkg_once): Up symbol table sizes.
Gerd Möllmann [Tue, 18 Oct 2022 10:33:35 +0000 (12:33 +0200)]
DEFVAR some variables
* src/lisp.h: Remove extern declarations for some vars.
* src/pkg.c (syms_of_pkg): DEFVAR_LISP_NOPRO some variables.
*package*, *package-registry*, *emacs-package*,
*keyword-package*, package-prefixes
Gerd Möllmann [Tue, 18 Oct 2022 07:52:41 +0000 (09:52 +0200)]
Support specifying package size
Gerd Möllmann [Tue, 18 Oct 2022 06:55:11 +0000 (08:55 +0200)]
Revert some unimportant changes
Gerd Möllmann [Tue, 18 Oct 2022 06:35:41 +0000 (08:35 +0200)]
Partially revert "Remove obarrays"
Gerd Möllmann [Tue, 18 Oct 2022 06:31:44 +0000 (08:31 +0200)]
More scribbling
Gerd Möllmann [Tue, 18 Oct 2022 06:31:19 +0000 (08:31 +0200)]
Revert "Dpn't assume symbol-name of keywords starts with colon"
This reverts commit
bb6b5db2b7af3f1aaf8866d4dd6ce944d10244f8 .
Gerd Möllmann [Tue, 18 Oct 2022 06:28:28 +0000 (08:28 +0200)]
Add cö-symbol-name
Gerd Möllmann [Tue, 18 Oct 2022 06:28:13 +0000 (08:28 +0200)]
Revert "Use make-package instead of make-vector"
This reverts commit
072e89afa119c0e35321edfb8bc0dfff89b6960d .
Gerd Möllmann [Tue, 18 Oct 2022 05:59:29 +0000 (07:59 +0200)]
Fix printing uninterned symbols
Gerd Möllmann [Tue, 18 Oct 2022 05:58:45 +0000 (07:58 +0200)]
symbol-name returning ':' for keywords
* src/data.c (Fsymbol_name): Return a name starting with ':' for
keywords.
Gerd Möllmann [Mon, 17 Oct 2022 13:24:35 +0000 (15:24 +0200)]
Recognize vectors as obarrays
* lisp/obarray.el (obarray-make): Ignore parameter.
(obarray-size): Ignore parameter.
(obarrayp): Accept vectors.
Gerd Möllmann [Mon, 17 Oct 2022 13:24:21 +0000 (15:24 +0200)]
Fix printing symbols
Gerd Möllmann [Mon, 17 Oct 2022 10:49:33 +0000 (12:49 +0200)]
Fake obarrays
Gerd Möllmann [Mon, 17 Oct 2022 09:29:56 +0000 (11:29 +0200)]
Fix printing of confusing symbol names
Gerd Möllmann [Mon, 17 Oct 2022 08:12:35 +0000 (10:12 +0200)]
Merge remote-tracking branch 'origin/master' into pkg
Gerd Möllmann [Mon, 17 Oct 2022 08:12:07 +0000 (10:12 +0200)]
More scribbling
Gerd Möllmann [Mon, 17 Oct 2022 08:05:50 +0000 (10:05 +0200)]
Allow intern with ":xyz" again
Gerd Möllmann [Sun, 16 Oct 2022 14:35:56 +0000 (16:35 +0200)]
Handle packages in completion
* lisp/minibuffer.el (completion-table-with-context): Add packagep
case.
* src/minibuf.c (Ftry_completion, Fall_completions),
Ftest_completion): Take into account that predicate functions used
with packages are the same that were used for obarrays.
Gerd Möllmann [Sun, 16 Oct 2022 12:13:54 +0000 (14:13 +0200)]
Some scribbling
Gerd Möllmann [Sun, 16 Oct 2022 12:10:13 +0000 (14:10 +0200)]
intern-soft with ':' trick
* src/lread.c (Fintern): Move everything to pkg.c
* src/pkg.c (pkg_emacs_intern): Handle ':' in symbol names.
(pkg_emacs_intern_soft): Ditto.
Gerd Möllmann [Sun, 16 Oct 2022 07:25:01 +0000 (09:25 +0200)]
Mapatoms differently
Also, assume that in some cases, (intern ":xy") means that old code
wants to intern a keyword.
Gerd Möllmann [Sun, 16 Oct 2022 06:01:58 +0000 (08:01 +0200)]
Workaround for something Stefan missed
See comment there for an explanation.
* src/alloc.c (xmake_pure_vector): Former make_pure_vector.
(init_vectors): Use it to allocate zero_vecgtor.
Stefan Monnier [Fri, 1 Jul 2022 18:36:49 +0000 (14:36 -0400)]
src/alloc.c: Remove all uses of `pure_alloc`
First step of removal of the purespace: stop using it.
The more delicate parts are the handling of 0-length strings and
vectors which we used to allocate in purespace but now need to be
allocated elsewhere, but the existing code makes us work harder to
allocate them in the normal way.
* src/alloc.c: Remove all uses of `pure_alloc`.
(init_strings): Alloc empty strings in the normal heap.
(init_vectors): Allocate the zero_vector in the normal heap.
(make_pure_string, make_pure_c_string, pure_cons): Rewrite to create
normal heap objects.
(find_string_data_in_pure, make_pure_float, make_pure_bignum)
(make_pure_vector, purecopy_hash_table): Delete functions.
(purecopy): Return without purecopying.
Gerd Möllmann [Sat, 15 Oct 2022 13:44:05 +0000 (15:44 +0200)]
Use build_pure_c_string
* src/pkg.c (init_pkg_once): Use build_pure_c_string instead of
build_string.
Gerd Möllmann [Sat, 15 Oct 2022 13:10:36 +0000 (15:10 +0200)]
Consider shorthands out of scope
* lisp/loadup.el ("emacs-lisp/shorthands"): Comment out.
Gerd Möllmann [Sat, 15 Oct 2022 12:16:27 +0000 (14:16 +0200)]
Blabla
* src/lread.c (Fintern): Remove comment.
* src/pkg.c (pkg_emacs_intern_soft): Don't assume *package* if
a vector was passed in for a package. Assert instead elsewhere.
Gerd Möllmann [Sat, 15 Oct 2022 12:14:57 +0000 (14:14 +0200)]
Dpn't assume symbol-name of keywords starts with colon
* lisp/emacs-lisp/cl-seq.el (cl--parsing-keywords):
Don't substring the keyword symbol name.
Gerd Möllmann [Sat, 15 Oct 2022 12:13:56 +0000 (14:13 +0200)]
Use make-package instead of make-vector
* lisp/cedet/semantic/lex.el (semantic-lex-make-type-table):
Don't use obarray functionality.
Gerd Möllmann [Sat, 15 Oct 2022 11:03:58 +0000 (13:03 +0200)]
Remove Lisp_Symbol::next pointer
* src/lisp.h (struct Lisp_Symbol): Remvoe next field.
(next_free_symbol, set_next_free_symbol): New.
(set_symbol_next): Remove.
* src/alloc.c (init_symbol): symbol_free_list done differently.
* src/pdumper.c (dump_symbol): Don't dump Lisp_Symbol::next.
Gerd Möllmann [Sat, 15 Oct 2022 11:03:31 +0000 (13:03 +0200)]
Remove obarrays
* lisp/emacs-lisp/eldoc.el (eldoc-message-commands): Make a package
instead of an obarray-vector.
* src/doc.c (Fsnarf_documentation): Don't use oblookup.
* src/eval.c (Fsignal): Debuggin helper code.
* src/font.c (font_intern_prop): Don't use oblookup.
* src/lisp.h (intern_c_string): Delete inline function, use the one
in fread.c.
* src/lread.c: Remove everything realted to obarray, except Vobarray,
which is now set to Vemacs_package.
* src/minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
Accept packages.
* src/pkg.c: Adapted to other changes.
Gerd Möllmann [Fri, 14 Oct 2022 14:21:03 +0000 (16:21 +0200)]
Use packages instead of obarrays in obarray.el
Gerd Möllmann [Fri, 14 Oct 2022 13:46:22 +0000 (15:46 +0200)]
Initialize package system earlier
Gerd Möllmann [Fri, 14 Oct 2022 11:15:24 +0000 (13:15 +0200)]
Mapping over symbols in a package, mapatoms
Gerd Möllmann [Fri, 14 Oct 2022 10:57:45 +0000 (12:57 +0200)]
Don't register packages in make-package
Gerd Möllmann [Fri, 14 Oct 2022 08:51:50 +0000 (10:51 +0200)]
Remove Lisp_Symbol::interned
Gerd Möllmann [Thu, 13 Oct 2022 13:18:50 +0000 (15:18 +0200)]
Can now pdumg withput warnings from cl-defstruct
Gerd Möllmann [Thu, 13 Oct 2022 11:38:18 +0000 (13:38 +0200)]
Revert the escaping of symbol names in lisp files
Gerd Möllmann [Thu, 13 Oct 2022 11:17:29 +0000 (13:17 +0200)]
Can now pdump
Gerd Möllmann [Wed, 12 Oct 2022 13:45:56 +0000 (15:45 +0200)]
More symbol reading
Gerd Möllmann [Wed, 12 Oct 2022 11:53:07 +0000 (13:53 +0200)]
Intern keywords differently
Instead of something like (intern (format ":%s" ...)) do
(intern (format "%s" :keyword). Likewise in C.
Gerd Möllmann [Tue, 11 Oct 2022 11:17:03 +0000 (13:17 +0200)]
And more fixes
Gerd Möllmann [Mon, 10 Oct 2022 13:13:20 +0000 (15:13 +0200)]
Fixing stuff
Gerd Möllmann [Mon, 10 Oct 2022 12:07:51 +0000 (14:07 +0200)]
Check for keywords differently
Gerd Möllmann [Mon, 10 Oct 2022 12:05:14 +0000 (14:05 +0200)]
Read symbols differently
Gerd Möllmann [Mon, 10 Oct 2022 12:03:18 +0000 (14:03 +0200)]
More stuff in pkg.c
Gerd Möllmann [Mon, 10 Oct 2022 12:02:26 +0000 (14:02 +0200)]
Print symbols differently
Gerd Möllmann [Mon, 10 Oct 2022 12:01:19 +0000 (14:01 +0200)]
Don't fix symbols here
Gerd Möllmann [Mon, 10 Oct 2022 11:58:31 +0000 (13:58 +0200)]
Don't use symbols that look package-qualified
Gerd Möllmann [Mon, 10 Oct 2022 11:52:26 +0000 (13:52 +0200)]
Add xprint command
Gerd Möllmann [Wed, 5 Oct 2022 14:15:20 +0000 (16:15 +0200)]
Basic functionality for packages
Lisp packages exist and can be dumped and loaded. Two standard
packages "emacs" and "keyword". Some package functions and variables
of CLHS.
Symbols have a package slot. Built-in symbols before loaodup get
packages emacs or keyword.
Dumping and loading.
Some tests.
* src/pkg.c: New file for Lisp packages.
* src/Makefile.in (base_obj): Add pkg.c.
* test/src/pkg-tests.el: New file.
* src/lisp.h: Add Lisp_Package.
* etc/emacs_lldb.py: Add Lisp_Package.
* src/data.c (Ftype_of): Handle packages.
(syms_of_data): Add Qpackage.
* src/emacs.c (main): Initialize pkg.c, fix built-in symbols.
* src/fns.c (check_hash_table, get_key_arg): Make externally visible.
* src/pdumper.c (dump_vectorlike): Handle packages.
* src/print.c: Print packages, print symbols with packages.
Manuel Giraud [Thu, 6 Oct 2022 14:03:34 +0000 (16:03 +0200)]
; * lisp/battery.el (battery-bsd-apm): No need for `executable-find'.
Arash Esbati [Thu, 6 Oct 2022 17:45:44 +0000 (19:45 +0200)]
Pass correct environment name to `reftex-label'
* lisp/textmodes/tex-mode.el (latex-block-body-alist): Pass
"figure" to `reftex-label' when inserting a figure float.
(bug#58329)
Lars Ingebrigtsen [Thu, 6 Oct 2022 12:56:47 +0000 (14:56 +0200)]
etc/NEWS: Fix typo in seq-keep entry.
Justus Winter [Wed, 5 Oct 2022 10:36:39 +0000 (12:36 +0200)]
Replace aging OpenPGP artifacts in gnus' mml-sec tests.
This replaces the old OpenPGPv4 keys that are used in the test suite
with more modern OpenPGPv4 keys.
Having old cryptographic artifacts in the test suite presents a
problem once the old algorithms are rejected by contemporary
implementations (bug#58301).
Justus Winter [Fri, 16 Sep 2022 10:24:26 +0000 (12:24 +0200)]
Replace aging OpenPGP artifacts in the package-resources tests.
This replaces the old OpenPGPv4 key that is used in the test suite
with a more modern OpenPGPv4 key. The key is the Alice key from
https://datatracker.ietf.org/doc/draft-bre-openpgp-samples/. All
cryptographic artifacts in the test suite are updated accordingly.
Having old cryptographic artifacts in the test suite presents a
problem once the old algorithms are rejected by contemporary
implementations.
Justus Winter [Fri, 16 Sep 2022 10:24:14 +0000 (12:24 +0200)]
Replace aging OpenPGP artifacts in the epg tests.
This replaces the old OpenPGPv4 key that is used in the test suite
with a more modern OpenPGPv4 key. The key is the Alice key from
https://datatracker.ietf.org/doc/draft-bre-openpgp-samples/. All
cryptographic artifacts in the test suite are updated accordingly.
Having old cryptographic artifacts in the test suite presents a
problem once the old algorithms are rejected by contemporary
implementations.