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
0f936def
Commit
0f936def
authored
Nov 07, 1996
by
Richard M. Stallman
Browse files
(Fgarbage_collect): Use Vhistory_length for truncating Vcommand_history.
parent
9abbd165
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
src/alloc.c
src/alloc.c
+9
-4
No files found.
src/alloc.c
View file @
0f936def
...
...
@@ -48,6 +48,8 @@ extern char *sbrk ();
extern __malloc_size_t _bytes_used;
extern int __malloc_extra_blocks;
extern Lisp_Object Vhistory_length;
#define max(A,B) ((A) > (B) ? (A) : (B))
#define min(A,B) ((A) < (B) ? (A) : (B))
...
...
@@ -1497,10 +1499,13 @@ Garbage collection happens automatically if you cons more than\n\
if (garbage_collection_messages)
message1_nolog ("Garbage collecting...");
/* Don't keep command history around forever */
tem = Fnthcdr (make_number (30), Vcommand_history);
if (CONSP (tem))
XCONS (tem)->cdr = Qnil;
/* Don't keep command history around forever. */
if (NUMBERP (Vhistory_length) && XINT (Vhistory_length) > 0)
{
tem = Fnthcdr (Vhistory_length, Vcommand_history);
if (CONSP (tem))
XCONS (tem)->cdr = Qnil;
}
/* Likewise for undo information. */
{
...
...
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