]>
git.eshelyaron.com Git - emacs.git/log
Gerd Möllmann [Tue, 25 Oct 2022 07:31:58 +0000 (09:31 +0200)]
Fix warnings in pkg.el
Gerd Möllmann [Tue, 25 Oct 2022 06:50:11 +0000 (08:50 +0200)]
Reset symbol home packages
* lisp/emacs-lisp/pkg.el (delete-package): Set the package of
symbols whose home package is the deleted package to nil.
* test/src/pkg-tests.el (pkg-tests-delete-package):
(pkg-tests-use-package): Modify because we don't have export yet.
Gerd Möllmann [Tue, 25 Oct 2022 06:48:21 +0000 (08:48 +0200)]
lkjlkj
* src/pkg.c (pkg_find_symbol): Simplify.
(Fpackage_percent_set_name): Prevent changing the name of standard
packages.
(Fpackage_percent_set_symbol_package): Allow nil for packages.
Gerd Möllmann [Tue, 25 Oct 2022 06:44:58 +0000 (08:44 +0200)]
Print symbols habing a deleted home package
This can't happen in normal circumstances, but it might while
working on the package implementation itself.
* src/print.c (print_symbol): Handle symbol-packages that are
deleted, that is have a nil home package.
* src/lisp.h (PACKAGE_USE_LIST): New macro.
Gerd Möllmann [Mon, 24 Oct 2022 16:37:37 +0000 (18:37 +0200)]
Fix error with ImageMagick
* src/image.c (imagemagick_filename_hint): Don't assume QCformat
is available.
Gerd Möllmann [Mon, 24 Oct 2022 13:39:05 +0000 (15:39 +0200)]
shodow
* lisp/emacs-lisp/pkg.el (package-shadowing-symbols): Implement.
(shadow): Implement.
* src/pkg.c (Fpackage_percent_set_symbol_package): New function.
(syms_of_pkg): defsubr it.
* test/src/pkg-tests.el (pkg-tests-use-package): Fix byte compiler
warning.
Gerd Möllmann [Mon, 24 Oct 2022 11:32:20 +0000 (13:32 +0200)]
do-symbols, do-external-symbols, do-all-symbols
* lisp/emacs-lisp/pkg.el (do-symbols): New macro.
(do-external-symbols): New macro.
(do-all-symbols): New macro.
Gerd Möllmann [Mon, 24 Oct 2022 08:59:13 +0000 (10:59 +0200)]
Prepare for testing find-symbol
* src/pkg.c (pkg_find_symbol1): Remove.
(pkg_find_symbol): Lookup symbols differently.
* lisp/emacs-lisp/pkg.el: Prepare for find-symbol tests.
* test/src/pkg-tests.el (pkg-tests-use-package): New.
Gerd Möllmann [Sun, 23 Oct 2022 11:21:25 +0000 (13:21 +0200)]
More work on Lisp and tests
Gerd Möllmann [Sun, 23 Oct 2022 10:21:55 +0000 (12:21 +0200)]
Ongoing work on the Lisp side and tests
Gerd Möllmann [Sun, 23 Oct 2022 08:25:33 +0000 (10:25 +0200)]
Uncomment tests after fixing bug#58714
Gerd Möllmann [Sun, 23 Oct 2022 08:14:10 +0000 (10:14 +0200)]
Fix &key parameters called without arguments (bug#58714)
* lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Check for missing
argument.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments): New test.
Gerd Möllmann [Sun, 23 Oct 2022 07:40:44 +0000 (09:40 +0200)]
One more place with ":..." in C strings
* src/font.c (font_unparse_fcname): Use LISP_SYMBOL_NAME.
(font_filter_properties): Use LISP_SYMBOL_NAME.
Gerd Möllmann [Sun, 23 Oct 2022 07:21:30 +0000 (09:21 +0200)]
Fix error opening Gnus gmail imap connection
The error is caused by comparing names of (possibly) keyword symbols
with a table of symbols names containing ":" for symbol names.
* src/process.c (set_socket_option): Use LISP_SYMBOL_NAME.
Gerd Möllmann [Sat, 22 Oct 2022 13:23:30 +0000 (15:23 +0200)]
Fix some pkg-tests
Don't define tests that consist of should nil only. Don't assume
packages are registered by make-package.
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