[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pkg aaf12c12b6 32/76: Some scribbling
From: |
Gerd Moellmann |
Subject: |
pkg aaf12c12b6 32/76: Some scribbling |
Date: |
Fri, 21 Oct 2022 00:16:11 -0400 (EDT) |
branch: pkg
commit aaf12c12b637dadf48aa5d76d76e045e4fd75a81
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>
Some scribbling
---
admin/cl-packages.org | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 116 insertions(+)
diff --git a/admin/cl-packages.org b/admin/cl-packages.org
new file mode 100644
index 0000000000..4e97bf0a8a
--- /dev/null
+++ b/admin/cl-packages.org
@@ -0,0 +1,116 @@
+# -*- mode: org; eval: (auto-fill-mode 1); org-indent-mode: 1; -*-
+#+STARTUP: show3levels
+
+* Common Lisp Packages for Emacs
+
+This is an experimental implementation of CL packages for Emacs. It
+builds and runs successfully under macOS 12.6.
+
+There are two packages defined at present. The keyword package, named
+"keyword" or "" contains keywords, the Emacs package, with name
+"emacs" contains all other symbols.
+
+Please see a description of the CL package system for what you can do
+with it. Not everything might yet be implemented.
+
+And bugs, for sure, and so on...
+
+** Implementation notes
+
+*** No pure space support
+The branch contains a patch by Stefan Monnier that makes it no longer
+use pure space. I didn't want to deal with pure space.
+Note that a small fix in init_vectors is needed for making Stefan's
+patch work.
+
+*** New type Lisp_Package, changes in Lisp_Symbol
+There is a new Lisp data type Lisp_Package defined in lisp.h.
+
+Struct Lisp_Symbol has lost its interned flag and its next pointer.
+All symbols now have a package. Uninterned symbols have a nil
+package. Keywords have the keyword package. Other symbols currently
+are in the Emacs package.
+
+*** Obarrays removed
+Obarrays have been removed completely, except for the variable
+Vobarray which is now set to the Emacs package.
+
+obarray.el has been changed to use packages. Some places in lisp/
+using make-vector for an obarray were changed to use make-package.
+
+*** Keywords
+Keywords are symbols in the keyword package, which has the nickname
+"". Keywords no longer contain the colon as part of their symbol name.
+
+Old:
+
+#+begin_src
+(symbol-name :hansi)
+ -> ":hansi"
+#+end_src
+
+New:
+#+begin_src
+(symbol-name :hansi)
+ -> "hansi"
+(symbol-package :hansi
+ -> <PACKAEG "keyword">
+#+end_src
+
+A workaround for existing code that does something like
+
+#+begin_src
+(intern ":hansi")
+#+end_src
+
+is currently implemented and produces a keyword as it did before. The
+preferred way is to
+
+#+begin_src
+(intern "hansi" :keyword)
+(intern "hansi" "KEYWORD")
+#+end_src
+
+or something.
+
+*** Predefined packages
+
+The packages with names "emacs" and "keyword" are defined in
+init_pkg_once as Vemacs_package and Vkeyword_package. This is called
+directly after init_alloc, which means that the package system is
+ready to use in C code from the start.
+
+The initialization in init_pkg_once includes defining built-in symbols
+(defined with DEFSYM etc, so these are also ready to use.
+
+The variable *package* is found in Vearmuffs_package and default to
+the Emacs package.
+
+*** Reader
+
+The variable 'package-prefixes' determines if the reader will
+interpret a colon in a symbol name part of a package prefix or not.
+Default is nil.
+
+With package-prefix nil
+
+
+
+Use a file-local package-prefix to enable it.
+
+*** Printer
+
+The printer prints package prefixes if necessary, which is the case if
+*package* is different from a symbol's package.
+
+With package-prefixes nil:
+#+begin_src
+ 'GUI:hansi
+ -> 'GUI:hansi
+#+end_src
+
+Without:
+#+begin_src
+ 'GUI:hansi
+ -> unknown package GUI
+#+end_src
- pkg 072e89afa1 23/76: Use make-package instead of make-vector, (continued)
- pkg 072e89afa1 23/76: Use make-package instead of make-vector, Gerd Moellmann, 2022/10/21
- pkg f6b80ef5a5 25/76: Blabla, Gerd Moellmann, 2022/10/21
- pkg 2ed1ac6639 09/76: Fixing stuff, Gerd Moellmann, 2022/10/21
- pkg 1d02e7a48b 02/76: Add xprint command, Gerd Moellmann, 2022/10/21
- pkg a3f99fde48 22/76: Remove Lisp_Symbol::next pointer, Gerd Moellmann, 2022/10/21
- pkg 2518bc249c 39/76: Fix printing symbols, Gerd Moellmann, 2022/10/21
- pkg bbb2609103 40/76: Recognize vectors as obarrays, Gerd Moellmann, 2022/10/21
- pkg 76d59f8a03 60/76: Fix missing ')', Gerd Moellmann, 2022/10/21
- pkg 73b617eaa9 64/76: Change package symbol table layout, Gerd Moellmann, 2022/10/21
- pkg 0976c09890 37/76: Fix printing of confusing symbol names, Gerd Moellmann, 2022/10/21
- pkg aaf12c12b6 32/76: Some scribbling,
Gerd Moellmann <=
- pkg 963de7cafe 35/76: More scribbling, Gerd Moellmann, 2022/10/21
- pkg 90c070fec6 59/76: Restore obarray.el to return vectors, Gerd Moellmann, 2022/10/21
- pkg 74da61ff09 74/76: Remove a call to pkg_break, Gerd Moellmann, 2022/10/21
- pkg cc6095482b 73/76: Add pkg_set_status and Lisp defun for it, Gerd Moellmann, 2022/10/21
- pkg 7acb6c5ca1 68/76: Intrdduce pkg_find_symbol, Gerd Moellmann, 2022/10/21
- pkg 55cef2c78c 69/76: Some cleanup in pkg.c and lisp.h, Gerd Moellmann, 2022/10/21
- pkg df1e4c1e51 34/76: Allow intern with ":xyz" again, Gerd Moellmann, 2022/10/21
- pkg 513f5a0b90 21/76: Remove obarrays, Gerd Moellmann, 2022/10/21
- pkg 051a17f540 63/76: Fix some warnings, Gerd Moellmann, 2022/10/21
- pkg 0f4b419fa3 65/76: Remove unused function prototype from lisp.h, Gerd Moellmann, 2022/10/21