Minor copyedits in internals.texi

* doc/lispref/internals.texi (Writing Emacs Primitives): Minor
copyedits.
This commit is contained in:
Stefan Kangas 2025-01-19 14:28:30 +01:00
parent 4726900fdc
commit 9878092d2b

View file

@ -1021,7 +1021,7 @@ comment. @xref{Documentation Basics}, for more details.
(@code{int} and @code{bool}), the name of the C variable is the name (@code{int} and @code{bool}), the name of the C variable is the name
of the Lisp variable with @code{-} replaced by @code{_}. When the of the Lisp variable with @code{-} replaced by @code{_}. When the
variable has type @code{Lisp_Object}, the convention is to also prefix variable has type @code{Lisp_Object}, the convention is to also prefix
the C variable name with @code{V}. i.e. the C variable name with @code{V}. This is an example:
@smallexample @smallexample
DEFVAR_INT ("my-int-variable", my_int_variable, DEFVAR_INT ("my-int-variable", my_int_variable,
@ -1038,7 +1038,6 @@ with @code{let}. In C sources, this is done by defining a
corresponding, constant symbol, and using @code{specbind}. By corresponding, constant symbol, and using @code{specbind}. By
convention, @code{Qmy_lisp_variable} corresponds to convention, @code{Qmy_lisp_variable} corresponds to
@code{Vmy_lisp_variable}; to define it, use the @code{DEFSYM} macro. @code{Vmy_lisp_variable}; to define it, use the @code{DEFSYM} macro.
i.e.
@smallexample @smallexample
DEFSYM (Qmy_lisp_variable, "my-lisp-variable"); DEFSYM (Qmy_lisp_variable, "my-lisp-variable");
@ -1050,17 +1049,17 @@ DEFSYM (Qmy_lisp_variable, "my-lisp-variable");
specbind (Qmy_lisp_variable, Qt); specbind (Qmy_lisp_variable, Qt);
@end smallexample @end smallexample
In Lisp symbols sometimes need to be quoted, to achieve the same In Lisp, symbols sometimes need to be quoted. To achieve the same
effect in C you again use the corresponding constant symbol effect in C, you again use the corresponding constant symbol
@code{Qmy_lisp_variable}. For example, when creating a buffer-local @code{Qmy_lisp_variable}. For example, when creating a buffer-local
variable (@pxref{Buffer-Local Variables}) in Lisp you would write: variable (@pxref{Buffer-Local Variables}) in Lisp, you would write:
@smallexample @smallexample
(make-variable-buffer-local 'my-lisp-variable) (make-variable-buffer-local 'my-lisp-variable)
@end smallexample @end smallexample
In C the corresponding code uses @code{Fmake_variable_buffer_local} in In C, the corresponding code uses @code{Fmake_variable_buffer_local} in
combination with @code{DEFSYM}, i.e. combination with @code{DEFSYM}:
@smallexample @smallexample
DEFSYM (Qmy_lisp_variable, "my-lisp-variable"); DEFSYM (Qmy_lisp_variable, "my-lisp-variable");