-2014-03-31 Glenn Morris <rgm@gnu.org>
+ 2014-04-03 Ken Brown <kbrown@cornell.edu>
+
+ * configure.ac (EMACS_MANIFEST, UPDATE_MANIFEST): Leave these
+ variables empty on Cygwin. (Bug#17176)
+
+2014-04-03 Glenn Morris <rgm@gnu.org>
+
+ * make-dist: Further update AC_INIT regexp.
+
+2014-04-02 Glenn Morris <rgm@gnu.org>
* configure.ac: Make the final "Does Emacs use Gsettings" message
consistent with src/config.h.
+ 2014-04-05 Glenn Morris <rgm@gnu.org>
+
+ * trouble.texi (Checklist): Dribble files may contain passwords.
+
+ 2014-04-04 Glenn Morris <rgm@gnu.org>
+
+ * files.texi (Backup Names):
+ * arevert-xtra.texi (Supporting additional buffers):
+ Update for default values of some -function vars no longer being nil.
+ (Supporting additional buffers):
+ Update for buffer-stale-function also applying to file-buffers.
+
+2014-03-28 Glenn Morris <rgm@gnu.org>
+
+ * custom.texi (Terminal Init): Mention term-file-aliases.
+
+2014-03-26 Glenn Morris <rgm@gnu.org>
+
+ * ack.texi (Acknowledgments): Remove reference to obsolete file.
+
+2014-03-22 Glenn Morris <rgm@gnu.org>
+
+ * help.texi (Help Files): Update C-h g description.
+
2014-03-16 Dmitry Gutov <dgutov@yandex.ru>
* programs.texi (Matching): Update the missed spot. (Bug#17008)
-2014-03-25 Eli Zaretskii <eliz@gnu.org>
+ 2014-04-05 Glenn Morris <rgm@gnu.org>
+
+ * os.texi (Recording Input): Dribble files may contain passwords.
+
+ 2014-04-04 Glenn Morris <rgm@gnu.org>
+
+ * backups.texi (Making Backups, Reverting):
+ Update for default values of some -function vars no longer being nil.
+ (Reverting): Update for buffer-stale-function
+ also applying to file-buffers.
+
+2014-03-31 Daniel Colascione <dancol@dancol.org>
+
+ * minibuf.texi (Completion in Buffers): Discuss using lazy
+ completion tables for inline completion.
+
+2014-03-28 Glenn Morris <rgm@gnu.org>
+
+ * os.texi (Terminal-Specific): Mention term-file-aliases.
+
+2014-03-26 Eli Zaretskii <eliz@gnu.org>
* files.texi (Kinds of Files): Improve documentation of
file-symlink-p. (Bug#17073) Add cross-references.
+ 2014-04-07 João Távora <joaotavora@gmail.com>
+
+ * elec-pair.el:
+ (electric-pair--syntax-ppss): When inside comments parse from
+ comment beginning.
+ (electric-pair--balance-info): Fix typo in comment.
+ (electric-pair--in-unterminated-string-p): Delete.
+ (electric-pair--unbalanced-strings-p): New function.
+ (electric-pair-string-bound-function): New var.
+ (electric-pair-inhibit-if-helps-balance): Decide quote pairing
+ according to `electric-pair--in-unterminated-string-p'
+
+ 2014-04-07 João Távora <joaotavora@gmail.com>
+
+ * elec-pair.el (electric-pair-inhibit-if-helps-balance): Inhibit
+ quote pairing if point-max is inside an unterminated string.
+ (electric-pair--looking-at-unterminated-string-p):
+ Delete.
+ (electric-pair--in-unterminated-string-p): New function.
+
+ 2014-04-07 Glenn Morris <rgm@gnu.org>
+
+ * shell.el (shell-directory-tracker):
+ Go back to just ignoring failures. (Bug#17159)
+
+ 2014-04-06 João Távora <joaotavora@gmail.com>
+
+ Fix `electric-pair-delete-adjacent-pairs' in modes binding
+ backspace. (bug#16981)
+ * elec-pair.el (electric-pair-backward-delete-char): Delete.
+ (electric-pair-backward-delete-char-untabify): Delete.
+ (electric-pair-mode-map): Bind backspace to a menu item filtering
+ a new `electric-pair-delete-pair' command.
+ (electric-pair-delete-pair): New command.
+
+ 2014-04-06 João Távora <joaotavora@gmail.com>
+
+ * progmodes/python.el (python-electric-pair-string-delimiter): Fix
+ triple-quoting electricity. (Bug#17192)
+
+ 2014-04-06 João Távora <joaotavora@gmail.com>
+
+ * elec-pair.el (electric-pair-post-self-insert-function): Don't
+ skip whitespace when `electric-pair-text-pairs' and
+ `electric-pair-pairs' were used. syntax to
+ electric-pair--skip-whitespace. (Bug#17183)
+
+ 2014-04-06 Eli Zaretskii <eliz@gnu.org>
+
+ * leim/quail/ipa.el (ipa-x-sampa): Fix the character produced for
+ "<F>". (Bug#17199)
+
+ 2014-04-06 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * mpc.el (mpc--status-timer-run): Disable timer if not displayed.
+ (mpc--status-idle-timer-run): Use mpc--status-timer-run.
+
+ 2014-04-05 Glenn Morris <rgm@gnu.org>
+
+ * help.el (view-lossage): Doc tweak.
+
+ 2014-04-05 Matthias Dahl <ml_emacs-lists@binary-island.eu>
+
+ * faces.el (face-spec-recalc): Call make-face-x-resource-internal
+ only when inhibit-x-resources is nil, and do that earlier in the
+ function. Doc fix. (Bug#16694)
+ (face-spec-choose): Accept additional optional argument, whose
+ value is returned if no matching attributes are found.
+ (face-spec-recalc): Use the new optional argument when calling
+ face-spec-choose. (Bug#16378)
+ (make-face-x-resource-internal): Do nothing when
+ inhibit-x-resources is non-nil. Don't touch the default face if
+ reversed video is given--as was done in previous versions of Emacs.
+ (face-set-after-frame-default): Don't call
+ make-face-x-resource-internal here. (Bug#16434)
+
+ 2014-04-04 Tassilo Horn <tsdh@gnu.org>
+
+ * doc-view.el (doc-view-bookmark-jump):
+ Use `bookmark-after-jump-hook' to jump to the right page after the
+ buffer is shown in a window. (bug#16090)
+
+ 2014-04-04 Eli Zaretskii <eliz@gnu.org>
+
+ * international/characters.el (mirroring): Fix last change:
+ instead of loading uni-mirrored.el explicitly, do that implicitly
+ by creating the 'mirroring' uniprop table. This avoids announcing
+ the loading of uni-mirrored.el.
+
+ 2014-04-04 Glenn Morris <rgm@gnu.org>
+
+ * files.el (buffer-stale--default-function)
+ (buffer-stale-function, revert-buffer--default):
+ * autorevert.el (auto-revert-buffers): Doc tweaks.
+
+ 2014-04-03 Eli Zaretskii <eliz@gnu.org>
+
+ * international/characters.el: Preload uni-mirrored.el. (Bug#17169)
+
+ 2014-04-03 Glenn Morris <rgm@gnu.org>
+
+ * files.el (make-backup-file-name-function)
+ (make-backup-file-name, make-backup-file-name--default-function)
+ (make-backup-file-name-1, find-backup-file-name)
+ (revert-buffer-function, revert-buffer-insert-file-contents-function)
+ (buffer-stale--default-function, buffer-stale-function)
+ (before-revert-hook, after-revert-hook, revert-buffer-in-progress-p)
+ (revert-buffer, revert-buffer--default)
+ (revert-buffer-insert-file-contents--default-function):
+ Doc fixes related to defaults no longer being nil.
+ (make-backup-file-name-function): Bump :version.
+ Restore nil as a valid but deprecated custom type.
+
+ 2014-04-03 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * progmodes/perl-mode.el (perl-syntax-propertize-function): Handle $'
+ used as a variable (bug#17174).
+
+ 2014-04-02 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * progmodes/perl-mode.el (perl-indent-new-calculate):
+ Handle forward-sexp failure (bug#16985).
+ (perl-syntax-propertize-function): Add "foreach" and "for" statement
+ modifiers introducing expressions (bug#17116).
+
+2014-04-06 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * dired-aux.el (dired-file-set-difference): Use lexical-scoping.
+
+2014-04-05 Leo Liu <sdl.web@gmail.com>
+
+ * emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression):
+ Add define-compilation-mode.
+
+2014-04-04 João Távora <joaotavora@gmail.com>
+
+ * elec-pair.el (electric-pair--syntax-ppss): When inside comments
+ parse from comment beginning.
+ (electric-pair--balance-info): Fix typo in comment.
+ (electric-pair--in-unterminated-string-p): Delete.
+ (electric-pair--unbalanced-strings-p): New function.
+ (electric-pair-string-bound-function): New var.
+ (electric-pair-inhibit-if-helps-balance): Decide quote pairing
+ according to `electric-pair--in-unterminated-string-p'.
+
+2014-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * textmodes/reftex-parse.el (reftex--index-tags): Rename `index-tags'.
+ Move declaration before first use.
+ (reftex-move-to-next-arg): Silence compiler warning.
+
+2014-04-04 Joost Kremers <joostkremers@fastmail.fm> (tiny change)
+
+ * textmodes/reftex-toc.el (reftex-toc, reftex-re-enlarge):
+ Use `window-total-width' instead of `window-width'.
+
+2014-04-03 Daniel Colascione <dancol@dancol.org>
+
+ * subr.el (set-transient-map): Remove rms's workaround entirely;
+ use new `suspicious-object' subr to mark our lambda for closer
+ scrutiny during gc.
+
+2014-04-02 Richard Stallman <rms@gnu.org>
+
+ * subr.el (set-transient-map): Comment out previous change.
+
2014-04-02 Glenn Morris <rgm@gnu.org>
* menu-bar.el (menu-bar-file-menu):
(tty-color-approximate, tty-color-by-index, tty-color-values)
(tty-color-desc): Remove superfluous backslashes.
- 2014-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
-
- * electric.el (electric-newline-and-maybe-indent): New command.
- Bind it globally to C-j.
- (electric-indent-mode): Don't mess with the global map any more.
- Don't drop the post-self-insert-hook is some buffer is still using it
- (bug#16770).
- * bindings.el (global-map): Remove C-j binding.
-
- * emacs-lisp/nadvice.el (advice--make-docstring): Try harder to find
- the docstring of functions advised before dumping (bug#16993).
-
+ 2014-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * electric.el (electric-newline-and-maybe-indent): New command.
+ Bind it globally to C-j.
+ (electric-indent-mode): Don't mess with the global map any more.
+ Don't drop the post-self-insert-hook is some buffer is still using it
+ (bug#16770).
+
+ * bindings.el (global-map): Remove C-j binding.
+
+ * emacs-lisp/nadvice.el (advice--make-docstring): Try harder to find
+ the docstring of functions advised before dumping (bug#16993).
+
+2014-03-21 Glenn Morris <rgm@gnu.org>
+
+ * cus-start.el (history-length): Bump :version.
+
+ * Makefile.in ($(MH_E_DIR)/mh-loaddefs.el)
+ ($(TRAMP_DIR)/tramp-loaddefs.el, $(CAL_DIR)/cal-loaddefs.el)
+ ($(CAL_DIR)/diary-loaddefs.el, $(CAL_DIR)/hol-loaddefs.el):
+ Don't set `make-backup-files'.
+
+ * info.el (info--prettify-description): New function,
+ to give info-finder descriptions consistent case, punctuation.
+ (Info-finder-find-node): Use it. Sort packages.
+ Refer to "description" rather than "commentary".
+
+2014-03-21 Juanma Barranquero <lekktu@gmail.com>
+
+ * frameset.el (frameset--print-register): New function.
+ (frameset-to-register): Use it.
+
+2014-03-20 Juanma Barranquero <lekktu@gmail.com>
+
+ * progmodes/hideif.el (hif-string-to-number): New function.
+ (hif-tokenize): Use it to understand non-decimal floats.
+
+ * emacs-lisp/cl-extra.el (cl--map-overlays): Remove obsolete code.
+
+ * skeleton.el (skeleton-autowrap): Mark as obsolete. Doc fix.
+
2014-03-19 Stefan-W. Hahn <stefan.hahn@s-hahn.de> (tiny change)
* ps-print.el (ps-generate-postscript-with-faces):
+ 2014-04-07 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * lisp.h (struct Lisp_Symbol): New bitfield `pinned'.
+
+ * alloc.c: Keep track of symbols referenced from pure space (bug#17168).
+ (symbol_block_pinned): New var.
+ (Fmake_symbol): Initialize `pinned'.
+ (purecopy): New function, extracted from Fpurecopy. Mark symbols as
+ pinned and signal an error for un-purifiable objects.
+ (pure_cons): Use it.
+ (Fpurecopy): Use it, except for objects that can't be purified.
+ (mark_pinned_symbols): New function.
+ (Fgarbage_collect): Use it.
+ (gc_sweep): Remove hack made unnecessary.
+
+ 2014-04-05 Glenn Morris <rgm@gnu.org>
+
+ * keyboard.c (Fopen_dribble_file): Doc tweak.
+
+ 2014-04-04 Jan Djärv <jan.h.d@swipnet.se>
+
+ Backport from trunk.
+ * nsterm.m (updateFrameSize:): If waiting for the tool bar and tool
+ bar is zero height, just return (Bug#16976).
+ (initFrameFromEmacs:): Initialize wait_for_tool_bar.
+ * nsterm.h (EmacsView): Add wait_for_tool_bar.
+ * nsmenu.m (update_frame_tool_bar): Return early if view or toolbar
+ is nil. If waiting for toolbar to complete, force a redraw.
+ (free_frame_tool_bar): Set wait_for_tool_bar = NO (Bug#16976).
+
+ 2014-04-03 Ken Brown <kbrown@cornell.edu>
+
+ * Makefile.in (EMACS_MANIFEST): Update comment. (Bug#17176)
+
+2014-04-07 Paul Eggert <eggert@cs.ucla.edu>
+
+ * alloc.c: Simplify by removing use of HAVE_EXECINFO_H.
+ We have a substitute execinfo.h on hosts that lack it.
+ (suspicious_free_history): Make it EXTERNALLY_VISIBLE so it
+ isn't optimized away.
+
+2014-04-05 Paul Eggert <eggert@cs.ucla.edu>
+
+ Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'.
+ * alloc.c (memory_full):
+ * charset.c (syms_of_charset):
+ * doc.c (Fsnarf_documentation):
+ * emacs.c (main):
+ * font.c (BUILD_STYLE_TABLE):
+ * keyboard.c (make_lispy_event):
+ * profiler.c (setup_cpu_timer):
+ * xgselect.c (xg_select):
+ * xterm.c (record_event, STORE_KEYSYM_FOR_DEBUG):
+ Use ARRAYELTS.
+ * font.c (FONT_PROPERTY_TABLE_SIZE): Remove.
+ Replace the only use with ARRAYELTS (font_property_table).
+ * xfaces.c (DIM): Remove. All uses replaced by ARRAYELTS.
+
+2014-04-03 Daniel Colascione <dancol@dancol.org>
+
+ * xterm.c (x_term_init):
+ * xfns.c (best_xim_style):
+ * xfaces.c (Fdump_colors):
+ * w32fns.c (w32_default_color_map):
+ * w32.c (init_environment, N_ENV_VARS):
+ * unexcw.c (read_exe_header):
+ * term.c (term_get_fkeys_1):
+ * sysdep.c (init_baud_rate):
+ * nsterm.m (ns_convert_key):
+ * nsfns.m (get_geometry_from_preferences):
+ * msdos.c (dos_set_window_size, init_environment):
+ * macfont.m (mac_font_get_glyph_for_cid)
+ (macfont_store_descriptor_attributes)
+ (macfont_create_attributes_with_spec, mac_ctfont_get_glyph_for_cid):
+ * keyboard.c (command_loop_1, read_menu_command, make_lispy_event)
+ (NUM_MOD_NAMES, read_key_sequence_vs, Fcurrent_input_mode)
+ (syms_of_keyboard):
+ * image.c (xpm_str_to_color_key):
+ * fringe.c (MAX_STANDARD_FRINGE_BITMAPS):
+ * frame.c (x_set_frame_parameters):
+ * fileio.c (Ffile_selinux_context):
+ * emacs.c (sort_args):
+ * dosfns.c (msdos_stdcolor_name):
+ * dired.c (file_attributes):
+ * chartab.c (uniprop_decoder_count, uniprop_encode_count):
+ Change expressions of the form sizeof(arr) / sizeof(arr[0])
+ to ARRAYELTS (arr).
+
+2014-04-02 Daniel Colascione <dancol@dancol.org>
+
+ * data.c (Ffset): Abort if we're trying to set a function call to
+ a dead lisp object.
+
+ * lisp.h (ARRAYELTS): New macro.
+
+ * alloc.c: Include execinfo.h if available.
+ (SUSPICIOUS_OBJECT_CHECKING): New macro; define unconditionally.
+ (suspicious_free_record): New structure.
+ (suspicious_objects, suspicious_object_index)
+ (suspicious_free_history, suspicious_free_history_index):
+ New variables.
+ (find_suspicious_object_in_range, detect_suspicious_free)
+ (Fsuspicious_object): New functions.
+ (cleanup_vector): Call find_suspicious_object_in_range.
+
2014-04-02 Martin Rudalics <rudalics@gmx.at>
* xterm.c (x_new_font): Don't calculate non-toolkit scrollbar
\f
-/* Sweep: find all structures not marked, and free them. */
+NO_INLINE /* For better stack traces */
static void
-gc_sweep (void)
+sweep_conses (void)
{
- /* Remove or mark entries in weak hash tables.
- This must be done before any object is unmarked. */
- sweep_weak_hash_tables ();
-
- sweep_strings ();
- check_string_bytes (!noninteractive);
-
- /* Put all unmarked conses on free list. */
- {
- register struct cons_block *cblk;
- struct cons_block **cprev = &cons_block;
- register int lim = cons_block_index;
- EMACS_INT num_free = 0, num_used = 0;
+ register struct cons_block *cblk;
+ struct cons_block **cprev = &cons_block;
+ register int lim = cons_block_index;
+ EMACS_INT num_free = 0, num_used = 0;
- cons_free_list = 0;
+ cons_free_list = 0;
- for (cblk = cons_block; cblk; cblk = *cprev)
- {
- register int i = 0;
- int this_free = 0;
- int ilim = (lim + BITS_PER_INT - 1) / BITS_PER_INT;
+ for (cblk = cons_block; cblk; cblk = *cprev)
+ {
+ register int i = 0;
+ int this_free = 0;
+ int ilim = (lim + BITS_PER_INT - 1) / BITS_PER_INT;
- /* Scan the mark bits an int at a time. */
- for (i = 0; i < ilim; i++)
- {
- if (cblk->gcmarkbits[i] == -1)
- {
- /* Fast path - all cons cells for this int are marked. */
- cblk->gcmarkbits[i] = 0;
- num_used += BITS_PER_INT;
- }
- else
- {
- /* Some cons cells for this int are not marked.
- Find which ones, and free them. */
- int start, pos, stop;
-
- start = i * BITS_PER_INT;
- stop = lim - start;
- if (stop > BITS_PER_INT)
- stop = BITS_PER_INT;
- stop += start;
-
- for (pos = start; pos < stop; pos++)
- {
- if (!CONS_MARKED_P (&cblk->conses[pos]))
- {
- this_free++;
- cblk->conses[pos].u.chain = cons_free_list;
- cons_free_list = &cblk->conses[pos];
+ /* Scan the mark bits an int at a time. */
+ for (i = 0; i < ilim; i++)
+ {
+ if (cblk->gcmarkbits[i] == -1)
+ {
+ /* Fast path - all cons cells for this int are marked. */
+ cblk->gcmarkbits[i] = 0;
+ num_used += BITS_PER_INT;
+ }
+ else
+ {
+ /* Some cons cells for this int are not marked.
+ Find which ones, and free them. */
+ int start, pos, stop;
+
+ start = i * BITS_PER_INT;
+ stop = lim - start;
+ if (stop > BITS_PER_INT)
+ stop = BITS_PER_INT;
+ stop += start;
+
+ for (pos = start; pos < stop; pos++)
+ {
+ if (!CONS_MARKED_P (&cblk->conses[pos]))
+ {
+ this_free++;
+ cblk->conses[pos].u.chain = cons_free_list;
+ cons_free_list = &cblk->conses[pos];
#if GC_MARK_STACK
- cons_free_list->car = Vdead;
+ cons_free_list->car = Vdead;
#endif
- }
- else
- {
- num_used++;
- CONS_UNMARK (&cblk->conses[pos]);
- }
- }
- }
- }
+ }
+ else
+ {
+ num_used++;
+ CONS_UNMARK (&cblk->conses[pos]);
+ }
+ }
+ }
+ }
- lim = CONS_BLOCK_SIZE;
- /* If this block contains only free conses and we have already
- seen more than two blocks worth of free conses then deallocate
- this block. */
- if (this_free == CONS_BLOCK_SIZE && num_free > CONS_BLOCK_SIZE)
- {
- *cprev = cblk->next;
- /* Unhook from the free list. */
- cons_free_list = cblk->conses[0].u.chain;
- lisp_align_free (cblk);
- }
- else
- {
- num_free += this_free;
- cprev = &cblk->next;
- }
- }
- total_conses = num_used;
- total_free_conses = num_free;
- }
+ lim = CONS_BLOCK_SIZE;
+ /* If this block contains only free conses and we have already
+ seen more than two blocks worth of free conses then deallocate
+ this block. */
+ if (this_free == CONS_BLOCK_SIZE && num_free > CONS_BLOCK_SIZE)
+ {
+ *cprev = cblk->next;
+ /* Unhook from the free list. */
+ cons_free_list = cblk->conses[0].u.chain;
+ lisp_align_free (cblk);
+ }
+ else
+ {
+ num_free += this_free;
+ cprev = &cblk->next;
+ }
+ }
+ total_conses = num_used;
+ total_free_conses = num_free;
+}
- /* Put all unmarked floats on free list. */
- {
- register struct float_block *fblk;
- struct float_block **fprev = &float_block;
- register int lim = float_block_index;
- EMACS_INT num_free = 0, num_used = 0;
+NO_INLINE /* For better stack traces */
+static void
+sweep_floats (void)
+{
+ register struct float_block *fblk;
+ struct float_block **fprev = &float_block;
+ register int lim = float_block_index;
+ EMACS_INT num_free = 0, num_used = 0;
- float_free_list = 0;
+ float_free_list = 0;
- for (fblk = float_block; fblk; fblk = *fprev)
- {
- register int i;
- int this_free = 0;
- for (i = 0; i < lim; i++)
- if (!FLOAT_MARKED_P (&fblk->floats[i]))
- {
- this_free++;
- fblk->floats[i].u.chain = float_free_list;
- float_free_list = &fblk->floats[i];
- }
- else
- {
- num_used++;
- FLOAT_UNMARK (&fblk->floats[i]);
- }
- lim = FLOAT_BLOCK_SIZE;
- /* If this block contains only free floats and we have already
- seen more than two blocks worth of free floats then deallocate
- this block. */
- if (this_free == FLOAT_BLOCK_SIZE && num_free > FLOAT_BLOCK_SIZE)
- {
- *fprev = fblk->next;
- /* Unhook from the free list. */
- float_free_list = fblk->floats[0].u.chain;
- lisp_align_free (fblk);
- }
- else
- {
- num_free += this_free;
- fprev = &fblk->next;
- }
- }
- total_floats = num_used;
- total_free_floats = num_free;
- }
+ for (fblk = float_block; fblk; fblk = *fprev)
+ {
+ register int i;
+ int this_free = 0;
+ for (i = 0; i < lim; i++)
+ if (!FLOAT_MARKED_P (&fblk->floats[i]))
+ {
+ this_free++;
+ fblk->floats[i].u.chain = float_free_list;
+ float_free_list = &fblk->floats[i];
+ }
+ else
+ {
+ num_used++;
+ FLOAT_UNMARK (&fblk->floats[i]);
+ }
+ lim = FLOAT_BLOCK_SIZE;
+ /* If this block contains only free floats and we have already
+ seen more than two blocks worth of free floats then deallocate
+ this block. */
+ if (this_free == FLOAT_BLOCK_SIZE && num_free > FLOAT_BLOCK_SIZE)
+ {
+ *fprev = fblk->next;
+ /* Unhook from the free list. */
+ float_free_list = fblk->floats[0].u.chain;
+ lisp_align_free (fblk);
+ }
+ else
+ {
+ num_free += this_free;
+ fprev = &fblk->next;
+ }
+ }
+ total_floats = num_used;
+ total_free_floats = num_free;
+}
- /* Put all unmarked intervals on free list. */
- {
- register struct interval_block *iblk;
- struct interval_block **iprev = &interval_block;
- register int lim = interval_block_index;
- EMACS_INT num_free = 0, num_used = 0;
+NO_INLINE /* For better stack traces */
+static void
+sweep_intervals (void)
+{
+ register struct interval_block *iblk;
+ struct interval_block **iprev = &interval_block;
+ register int lim = interval_block_index;
+ EMACS_INT num_free = 0, num_used = 0;
- interval_free_list = 0;
+ interval_free_list = 0;
- for (iblk = interval_block; iblk; iblk = *iprev)
- {
- register int i;
- int this_free = 0;
+ for (iblk = interval_block; iblk; iblk = *iprev)
+ {
+ register int i;
+ int this_free = 0;
- for (i = 0; i < lim; i++)
- {
- if (!iblk->intervals[i].gcmarkbit)
- {
- set_interval_parent (&iblk->intervals[i], interval_free_list);
- interval_free_list = &iblk->intervals[i];
- this_free++;
- }
- else
- {
- num_used++;
- iblk->intervals[i].gcmarkbit = 0;
- }
- }
- lim = INTERVAL_BLOCK_SIZE;
- /* If this block contains only free intervals and we have already
- seen more than two blocks worth of free intervals then
- deallocate this block. */
- if (this_free == INTERVAL_BLOCK_SIZE && num_free > INTERVAL_BLOCK_SIZE)
- {
- *iprev = iblk->next;
- /* Unhook from the free list. */
- interval_free_list = INTERVAL_PARENT (&iblk->intervals[0]);
- lisp_free (iblk);
- }
- else
- {
- num_free += this_free;
- iprev = &iblk->next;
- }
- }
- total_intervals = num_used;
- total_free_intervals = num_free;
- }
+ for (i = 0; i < lim; i++)
+ {
+ if (!iblk->intervals[i].gcmarkbit)
+ {
+ set_interval_parent (&iblk->intervals[i], interval_free_list);
+ interval_free_list = &iblk->intervals[i];
+ this_free++;
+ }
+ else
+ {
+ num_used++;
+ iblk->intervals[i].gcmarkbit = 0;
+ }
+ }
+ lim = INTERVAL_BLOCK_SIZE;
+ /* If this block contains only free intervals and we have already
+ seen more than two blocks worth of free intervals then
+ deallocate this block. */
+ if (this_free == INTERVAL_BLOCK_SIZE && num_free > INTERVAL_BLOCK_SIZE)
+ {
+ *iprev = iblk->next;
+ /* Unhook from the free list. */
+ interval_free_list = INTERVAL_PARENT (&iblk->intervals[0]);
+ lisp_free (iblk);
+ }
+ else
+ {
+ num_free += this_free;
+ iprev = &iblk->next;
+ }
+ }
+ total_intervals = num_used;
+ total_free_intervals = num_free;
+}
- /* Put all unmarked symbols on free list. */
- {
- register struct symbol_block *sblk;
- struct symbol_block **sprev = &symbol_block;
- register int lim = symbol_block_index;
- EMACS_INT num_free = 0, num_used = 0;
+NO_INLINE /* For better stack traces */
+static void
+sweep_symbols (void)
+{
+ register struct symbol_block *sblk;
+ struct symbol_block **sprev = &symbol_block;
+ register int lim = symbol_block_index;
+ EMACS_INT num_free = 0, num_used = 0;
- symbol_free_list = NULL;
+ symbol_free_list = NULL;
- for (sblk = symbol_block; sblk; sblk = *sprev)
- {
- int this_free = 0;
- union aligned_Lisp_Symbol *sym = sblk->symbols;
- union aligned_Lisp_Symbol *end = sym + lim;
+ for (sblk = symbol_block; sblk; sblk = *sprev)
+ {
+ int this_free = 0;
+ union aligned_Lisp_Symbol *sym = sblk->symbols;
+ union aligned_Lisp_Symbol *end = sym + lim;
- for (; sym < end; ++sym)
- {
- if (!sym->s.gcmarkbit)
- {
- if (sym->s.redirect == SYMBOL_LOCALIZED)
- xfree (SYMBOL_BLV (&sym->s));
- sym->s.next = symbol_free_list;
- symbol_free_list = &sym->s;
+ for (; sym < end; ++sym)
+ {
- /* Check if the symbol was created during loadup. In such a case
- it might be pointed to by pure bytecode which we don't trace,
- so we conservatively assume that it is live. */
- bool pure_p = PURE_POINTER_P (XSTRING (sym->s.name));
-
- if (!sym->s.gcmarkbit && !pure_p)
++ if (!sym->s.gcmarkbit)
+ {
+ if (sym->s.redirect == SYMBOL_LOCALIZED)
+ xfree (SYMBOL_BLV (&sym->s));
+ sym->s.next = symbol_free_list;
+ symbol_free_list = &sym->s;
#if GC_MARK_STACK
- symbol_free_list->function = Vdead;
+ symbol_free_list->function = Vdead;
#endif
- ++this_free;
- }
- else
- {
- ++num_used;
- eassert (!STRING_MARKED_P (XSTRING (sym->s.name)));
- sym->s.gcmarkbit = 0;
- }
- }
+ ++this_free;
+ }
+ else
+ {
+ ++num_used;
- if (!pure_p)
- eassert (!STRING_MARKED_P (XSTRING (sym->s.name)));
+ sym->s.gcmarkbit = 0;
+ }
+ }
- lim = SYMBOL_BLOCK_SIZE;
- /* If this block contains only free symbols and we have already
- seen more than two blocks worth of free symbols then deallocate
- this block. */
- if (this_free == SYMBOL_BLOCK_SIZE && num_free > SYMBOL_BLOCK_SIZE)
- {
- *sprev = sblk->next;
- /* Unhook from the free list. */
- symbol_free_list = sblk->symbols[0].s.next;
- lisp_free (sblk);
- }
- else
- {
- num_free += this_free;
- sprev = &sblk->next;
- }
- }
- total_symbols = num_used;
- total_free_symbols = num_free;
- }
+ lim = SYMBOL_BLOCK_SIZE;
+ /* If this block contains only free symbols and we have already
+ seen more than two blocks worth of free symbols then deallocate
+ this block. */
+ if (this_free == SYMBOL_BLOCK_SIZE && num_free > SYMBOL_BLOCK_SIZE)
+ {
+ *sprev = sblk->next;
+ /* Unhook from the free list. */
+ symbol_free_list = sblk->symbols[0].s.next;
+ lisp_free (sblk);
+ }
+ else
+ {
+ num_free += this_free;
+ sprev = &sblk->next;
+ }
+ }
+ total_symbols = num_used;
+ total_free_symbols = num_free;
+}
- /* Put all unmarked misc's on free list.
- For a marker, first unchain it from the buffer it points into. */
- {
- register struct marker_block *mblk;
- struct marker_block **mprev = &marker_block;
- register int lim = marker_block_index;
- EMACS_INT num_free = 0, num_used = 0;
+NO_INLINE /* For better stack traces */
+static void
+sweep_misc (void)
+{
+ register struct marker_block *mblk;
+ struct marker_block **mprev = &marker_block;
+ register int lim = marker_block_index;
+ EMACS_INT num_free = 0, num_used = 0;
- marker_free_list = 0;
+ /* Put all unmarked misc's on free list. For a marker, first
+ unchain it from the buffer it points into. */
- for (mblk = marker_block; mblk; mblk = *mprev)
- {
- register int i;
- int this_free = 0;
+ marker_free_list = 0;
- for (i = 0; i < lim; i++)
- {
- if (!mblk->markers[i].m.u_any.gcmarkbit)
- {
- if (mblk->markers[i].m.u_any.type == Lisp_Misc_Marker)
- unchain_marker (&mblk->markers[i].m.u_marker);
- /* Set the type of the freed object to Lisp_Misc_Free.
- We could leave the type alone, since nobody checks it,
- but this might catch bugs faster. */
- mblk->markers[i].m.u_marker.type = Lisp_Misc_Free;
- mblk->markers[i].m.u_free.chain = marker_free_list;
- marker_free_list = &mblk->markers[i].m;
- this_free++;
- }
- else
- {
- num_used++;
- mblk->markers[i].m.u_any.gcmarkbit = 0;
- }
- }
- lim = MARKER_BLOCK_SIZE;
- /* If this block contains only free markers and we have already
- seen more than two blocks worth of free markers then deallocate
- this block. */
- if (this_free == MARKER_BLOCK_SIZE && num_free > MARKER_BLOCK_SIZE)
- {
- *mprev = mblk->next;
- /* Unhook from the free list. */
- marker_free_list = mblk->markers[0].m.u_free.chain;
- lisp_free (mblk);
- }
- else
- {
- num_free += this_free;
- mprev = &mblk->next;
- }
- }
+ for (mblk = marker_block; mblk; mblk = *mprev)
+ {
+ register int i;
+ int this_free = 0;
- total_markers = num_used;
- total_free_markers = num_free;
- }
+ for (i = 0; i < lim; i++)
+ {
+ if (!mblk->markers[i].m.u_any.gcmarkbit)
+ {
+ if (mblk->markers[i].m.u_any.type == Lisp_Misc_Marker)
+ unchain_marker (&mblk->markers[i].m.u_marker);
+ /* Set the type of the freed object to Lisp_Misc_Free.
+ We could leave the type alone, since nobody checks it,
+ but this might catch bugs faster. */
+ mblk->markers[i].m.u_marker.type = Lisp_Misc_Free;
+ mblk->markers[i].m.u_free.chain = marker_free_list;
+ marker_free_list = &mblk->markers[i].m;
+ this_free++;
+ }
+ else
+ {
+ num_used++;
+ mblk->markers[i].m.u_any.gcmarkbit = 0;
+ }
+ }
+ lim = MARKER_BLOCK_SIZE;
+ /* If this block contains only free markers and we have already
+ seen more than two blocks worth of free markers then deallocate
+ this block. */
+ if (this_free == MARKER_BLOCK_SIZE && num_free > MARKER_BLOCK_SIZE)
+ {
+ *mprev = mblk->next;
+ /* Unhook from the free list. */
+ marker_free_list = mblk->markers[0].m.u_free.chain;
+ lisp_free (mblk);
+ }
+ else
+ {
+ num_free += this_free;
+ mprev = &mblk->next;
+ }
+ }
- /* Free all unmarked buffers */
- {
- register struct buffer *buffer, **bprev = &all_buffers;
+ total_markers = num_used;
+ total_free_markers = num_free;
+}
- total_buffers = 0;
- for (buffer = all_buffers; buffer; buffer = *bprev)
- if (!VECTOR_MARKED_P (buffer))
- {
- *bprev = buffer->next;
- lisp_free (buffer);
- }
- else
- {
- VECTOR_UNMARK (buffer);
- /* Do not use buffer_(set|get)_intervals here. */
- buffer->text->intervals = balance_intervals (buffer->text->intervals);
- total_buffers++;
- bprev = &buffer->next;
- }
- }
+NO_INLINE /* For better stack traces */
+static void
+sweep_buffers (void)
+{
+ register struct buffer *buffer, **bprev = &all_buffers;
- sweep_vectors ();
- check_string_bytes (!noninteractive);
+ total_buffers = 0;
+ for (buffer = all_buffers; buffer; buffer = *bprev)
+ if (!VECTOR_MARKED_P (buffer))
+ {
+ *bprev = buffer->next;
+ lisp_free (buffer);
+ }
+ else
+ {
+ VECTOR_UNMARK (buffer);
+ /* Do not use buffer_(set|get)_intervals here. */
+ buffer->text->intervals = balance_intervals (buffer->text->intervals);
+ total_buffers++;
+ bprev = &buffer->next;
+ }
}
+/* Sweep: find all structures not marked, and free them. */
+static void
+gc_sweep (void)
+{
+ /* Remove or mark entries in weak hash tables.
+ This must be done before any object is unmarked. */
+ sweep_weak_hash_tables ();
+ sweep_strings ();
+ check_string_bytes (!noninteractive);
+ sweep_conses ();
+ sweep_floats ();
+ sweep_intervals ();
+ sweep_symbols ();
+ sweep_misc ();
+ sweep_buffers ();
+ sweep_vectors ();
+ check_string_bytes (!noninteractive);
+}
\f
/* Debugging aids. */
-2014-03-24 Barry O'Reilly <gundaetiapo@gmail.com>
+ 2014-04-07 João Távora <joaotavora@gmail.com>
+
+ * automated/electric-tests.el (define-electric-pair-test): Don't
+ overtest..
+ (inhibit-in-mismatched-string-inside-ruby-comments): New test.
+ (inhibit-in-mismatched-string-inside-c-comments): New test.
+
+ 2014-04-07 João Távora <joaotavora@gmail.com>
+
+ * automated/electric-tests.el (inhibit-if-strings-mismatched):
+ New test, change from `inhibit-only-of-next-is-mismatched'.
+
+ 2014-04-06 João Távora <joaotavora@gmail.com>
+
+ * automated/python-tests.el (python-triple-quote-pairing): New test.
+ (python-syntax-after-python-backspace): New test.
+
+ 2014-04-06 João Távora <joaotavora@gmail.com>
+
+ * automated/electric-tests.el (electric-pair-define-test-form):
+ More readable test docstrings.
+ (whitespace-skipping-for-quotes-not-ouside)
+ (whitespace-skipping-for-quotes-only-inside)
+ (whitespace-skipping-for-quotes-in-text-mode): New tests.
+
+2014-04-04 João Távora <joaotavora@gmail.com>
+
+ * automated/electric-tests.el (define-electric-pair-test): Don't
+ overtest..
+ (inhibit-in-mismatched-string-inside-ruby-comments): New test.
+ (inhibit-in-mismatched-string-inside-c-comments): New test.
+
+2014-04-02 João Távora <joaotavora@gmail.com>
+
+ * automated/electric-tests.el (inhibit-if-strings-mismatched):
+ New test, change from `inhibit-only-of-next-is-mismatched'.
+
+2014-03-26 Barry O'Reilly <gundaetiapo@gmail.com>
* automated/undo-tests.el (undo-test-marker-adjustment-nominal):
(undo-test-region-t-marker): New tests of marker adjustments.