]> git.eshelyaron.com Git - emacs.git/commitdiff
Add lexspaces.c
authorAndrea Corallo <akrl@sdf.org>
Thu, 7 May 2020 21:48:10 +0000 (22:48 +0100)
committerAndrea Corallo <akrl@sdf.org>
Fri, 8 May 2020 13:30:12 +0000 (14:30 +0100)
src/Makefile.in
src/emacs.c
src/lexspaces.c [new file with mode: 0644]
src/lisp.h

index 552dd2e50aeb52070ab9ebd0b57461a0ec0fca9e..59050a01384d0f550ef35276339a8a72890d27ec 100644 (file)
@@ -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) \
index ea9c4cd79dc348ef9b7c65d8cd4bd5cc0b403a01..a826a60adcffe667c081d25bdff007506fdaac0e 100644 (file)
@@ -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 (file)
index 0000000..ed15a50
--- /dev/null
@@ -0,0 +1,40 @@
+/* Copyright (C) 2020 Free Software Foundation, Inc.
+
+Author: Andrea Corallo <akrl@sdf.org>
+
+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);
+}
index b4ac017dcf50927f246b5dab76e68f87aa83f815..58ea559b281ad265cad25eb11794e68d11409bc0 100644 (file)
@@ -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);