Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
efb15f96
Commit
efb15f96
authored
Sep 13, 2006
by
Richard M. Stallman
Browse files
(print_string): When printcharfun is t,
copy string contents and call strout on the copy.
parent
4c0240d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
5 deletions
+37
-5
src/ChangeLog
src/ChangeLog
+10
-0
src/print.c
src/print.c
+27
-5
No files found.
src/ChangeLog
View file @
efb15f96
2006-09-13 Richard Stallman <rms@gnu.org>
* print.c (print_string): When printcharfun is t,
copy string contents and call strout on the copy.
* keyboard.c (read_char): If end_time specified, don't put the
event into this_command_keys.
(read_key_sequence): If Voverriding_terminal_local_map is specified,
don't check Voverriding_local_map at all.
2006-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
* textprop.c (Fnext_property_change, Fnext_single_property_change)
...
...
src/print.c
View file @
efb15f96
...
...
@@ -364,7 +364,10 @@ printchar (ch, fun)
print_buffer. PRINTCHARFUN t means output to the echo area or to
stdout if non-interactive. If neither nil nor t, call Lisp
function PRINTCHARFUN for each character printed. MULTIBYTE
non-zero means PTR contains multibyte characters. */
non-zero means PTR contains multibyte characters.
In the case where PRINTCHARFUN is nil, it is safe for PTR to point
to data in a Lisp string. Otherwise that is not safe. */
static
void
strout
(
ptr
,
size
,
size_byte
,
printcharfun
,
multibyte
)
...
...
@@ -497,10 +500,29 @@ print_string (string, printcharfun)
else
chars
=
SBYTES
(
string
);
/* strout is safe for output to a frame (echo area) or to print_buffer. */
strout
(
SDATA
(
string
),
chars
,
SBYTES
(
string
),
printcharfun
,
STRING_MULTIBYTE
(
string
));
if
(
EQ
(
printcharfun
,
Qt
))
{
/* Output to echo area. */
int
nbytes
=
SBYTES
(
string
);
char
*
buffer
;
/* Copy the string contents so that relocation of STRING by
GC does not cause trouble. */
USE_SAFE_ALLOCA
;
SAFE_ALLOCA
(
buffer
,
char
*
,
nbytes
);
bcopy
(
SDATA
(
string
),
buffer
,
nbytes
);
strout
(
buffer
,
chars
,
SBYTES
(
string
),
printcharfun
,
STRING_MULTIBYTE
(
string
));
SAFE_FREE
();
}
else
/* No need to copy, since output to print_buffer can't GC. */
strout
(
SDATA
(
string
),
chars
,
SBYTES
(
string
),
printcharfun
,
STRING_MULTIBYTE
(
string
));
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment