[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/lexspaces 2d1e916 01/17: Add lexspaces.c
From: |
Andrea Corallo |
Subject: |
scratch/lexspaces 2d1e916 01/17: Add lexspaces.c |
Date: |
Fri, 8 May 2020 16:43:06 -0400 (EDT) |
branch: scratch/lexspaces
commit 2d1e9163e52eb9cae2e1b499674b29fedcdfd034
Author: Andrea Corallo <address@hidden>
Commit: Andrea Corallo <address@hidden>
Add lexspaces.c
---
src/Makefile.in | 2 +-
src/emacs.c | 1 +
src/lexspaces.c | 40 ++++++++++++++++++++++++++++++++++++++++
src/lisp.h | 3 +++
4 files changed, 45 insertions(+), 1 deletion(-)
diff --git a/src/Makefile.in b/src/Makefile.in
index 552dd2e..59050a0 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -410,7 +410,7 @@ base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o
$(XMENU_OBJ) window.o \
$(CM_OBJ) term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \
emacs.o keyboard.o macros.o keymap.o sysdep.o \
bignum.o buffer.o filelock.o insdel.o marker.o \
- minibuf.o fileio.o dired.o \
+ minibuf.o fileio.o dired.o lexspaces.o \
cmds.o casetab.o casefiddle.o indent.o search.o regex-emacs.o undo.o \
alloc.o pdumper.o data.o doc.o editfns.o callint.o \
eval.o floatfns.o fns.o font.o print.o lread.o $(MODULES_OBJ) \
diff --git a/src/emacs.c b/src/emacs.c
index ea9c4cd..a826a60 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1812,6 +1812,7 @@ Using an Emacs configured with --with-x-toolkit=lucid
does not have this problem
syms_of_indent ();
syms_of_insdel ();
/* syms_of_keymap (); */
+ syms_of_lexspaces ();
syms_of_macros ();
syms_of_marker ();
syms_of_minibuf ();
diff --git a/src/lexspaces.c b/src/lexspaces.c
new file mode 100644
index 0000000..ed15a50
--- /dev/null
+++ b/src/lexspaces.c
@@ -0,0 +1,40 @@
+/* Copyright (C) 2020 Free Software Foundation, Inc.
+
+Author: Andrea Corallo <address@hidden>
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include "lisp.h"
+
+DEFUN ("in-lexspace", Fin_lexspace, Sin_lexspace, 1, 1, 0,
+ doc: /* Set NAME as current lexspace. Create it in case. */)
+ (Lisp_Object name)
+{
+ CHECK_SYMBOL (name);
+ return name;
+}
+
+void
+syms_of_lexspaces (void)
+{
+ DEFSYM (Qel, "el");
+ DEFVAR_LISP ("current-lexspace-name", Vcurrent_lexspace_name,
+ doc: /* Internal use. */);
+ Vcurrent_lexspace_name = Qel;
+
+ defsubr (&Sin_lexspace);
+}
diff --git a/src/lisp.h b/src/lisp.h
index b4ac017..58ea559 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -4513,6 +4513,9 @@ extern Lisp_Object exec_byte_code (Lisp_Object,
Lisp_Object, Lisp_Object,
Lisp_Object, ptrdiff_t, Lisp_Object *);
extern Lisp_Object get_byte_code_arity (Lisp_Object);
+/* Defined in lexspaces.c. */
+extern void syms_of_lexspaces (void);
+
/* Defined in macros.c. */
extern void init_macros (void);
extern void syms_of_macros (void);
- branch scratch/lexspaces created (now e2f183c), Andrea Corallo, 2020/05/08
- scratch/lexspaces 67e28d9 02/17: Adding binding pseudovector, Andrea Corallo, 2020/05/08
- scratch/lexspaces 2d1e916 01/17: Add lexspaces.c,
Andrea Corallo <=
- scratch/lexspaces 64e442b 04/17: Add SYMBOL_FUNCTION accessor function, Andrea Corallo, 2020/05/08
- scratch/lexspaces 02d8ef2 05/17: Move symbol value into separate binding, Andrea Corallo, 2020/05/08
- scratch/lexspaces 3a57250 06/17: Add lexspace-make-from, Andrea Corallo, 2020/05/08
- scratch/lexspaces 7fecbf5 08/17: Add lexspace redirection, Andrea Corallo, 2020/05/08
- scratch/lexspaces 09821e3 03/17: Store symbol value into the binding, Andrea Corallo, 2020/05/08
- scratch/lexspaces 04ac507 14/17: Remove unnecessary assertion, Andrea Corallo, 2020/05/08
- scratch/lexspaces 00108a5 15/17: Fix sweep_symbols, Andrea Corallo, 2020/05/08
- scratch/lexspaces 295ac3d 07/17: Make in-lexspace do something, Andrea Corallo, 2020/05/08
- scratch/lexspaces 610552d 10/17: Add SYMBOL_FUNC_LEXSPACE, Andrea Corallo, 2020/05/08
- scratch/lexspaces 9091913 13/17: Rename lexspace-make-from -> lexspace-make, Andrea Corallo, 2020/05/08