Minor copyedits in internals.texi
* doc/lispref/internals.texi (Writing Emacs Primitives): Minor copyedits.
This commit is contained in:
parent
4726900fdc
commit
9878092d2b
1 changed files with 6 additions and 7 deletions
|
@ -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
|
||||
of the Lisp variable with @code{-} replaced by @code{_}. When the
|
||||
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
|
||||
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
|
||||
convention, @code{Qmy_lisp_variable} corresponds to
|
||||
@code{Vmy_lisp_variable}; to define it, use the @code{DEFSYM} macro.
|
||||
i.e.
|
||||
|
||||
@smallexample
|
||||
DEFSYM (Qmy_lisp_variable, "my-lisp-variable");
|
||||
|
@ -1050,17 +1049,17 @@ DEFSYM (Qmy_lisp_variable, "my-lisp-variable");
|
|||
specbind (Qmy_lisp_variable, Qt);
|
||||
@end smallexample
|
||||
|
||||
In Lisp symbols sometimes need to be quoted, to achieve the same
|
||||
effect in C you again use the corresponding constant symbol
|
||||
In Lisp, symbols sometimes need to be quoted. To achieve the same
|
||||
effect in C, you again use the corresponding constant symbol
|
||||
@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
|
||||
(make-variable-buffer-local 'my-lisp-variable)
|
||||
@end smallexample
|
||||
|
||||
In C the corresponding code uses @code{Fmake_variable_buffer_local} in
|
||||
combination with @code{DEFSYM}, i.e.
|
||||
In C, the corresponding code uses @code{Fmake_variable_buffer_local} in
|
||||
combination with @code{DEFSYM}:
|
||||
|
||||
@smallexample
|
||||
DEFSYM (Qmy_lisp_variable, "my-lisp-variable");
|
||||
|
|
Loading…
Add table
Reference in a new issue