Paul Eggert [Fri, 3 Mar 2017 17:17:51 +0000 (09:17 -0800)]
logb now works correctly on large integers
* admin/merge-gnulib (GNULIB_MODULES): Add count-leading-zeros.
* etc/NEWS: Document the change.
* lib/count-leading-zeros.c, lib/count-leading-zeros.h:
* m4/count-leading-zeros.m4: New files, copied from Gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* src/floatfns.c: Include count-leading-zeros.h.
(Flogb): Do not convert fixnum to float before taking the log,
as the rounding error can cause the answer to be off by 1.
* src/lisp.h (EMACS_UINT_WIDTH): New constant.
* test/src/floatfns-tests.el (logb-extreme-fixnum): New test.
Paul Eggert [Fri, 3 Mar 2017 16:45:10 +0000 (08:45 -0800)]
Merge from gnulib
This incorporates:
2017-02-25 maintainer-makefile: Fix AC_PROG_SED with autoconf cache.
2017-02-24 ftoastr: port to -Wdouble-promotion
* lib/ftoastr.c, m4/gnulib-common.m4: Copy from gnulib.
Eli Zaretskii [Fri, 3 Mar 2017 14:05:02 +0000 (16:05 +0200)]
Fix color component calculations in color.el
* lisp/color.el (color-name-to-rgb): Use 16 bits per color component.
(color-rgb-to-hex): Accept an optional argument
DIGITS-PER-COMPONENT, defaulting to 4, and format the hexadecimal
notation either for 8 or 16 bits per component. (Bug#25890)
* lisp/net/shr-color.el (shr-color->hexadecimal): Call
color-rgb-to-hex with the optional argument of 2, to match color
processing on the Web.
Noam Postavsky [Fri, 3 Mar 2017 03:37:03 +0000 (22:37 -0500)]
Switch pp.el to lexical binding
Additionally, do some minor code cleanup.
* lisp/emacs-lisp/pp.el: Set lexical-binding.
(pp-buffer): Use skip-syntax-forward.
(pp-eval-expression): Use push.
(pp-last-sexp): Use with-syntax-table.
* test/lisp/emacs-lisp/pp-tests.el: New tests.
Rolf Ade [Sun, 5 Feb 2017 18:46:24 +0000 (19:46 +0100)]
sql-mode w/ sqlite: In-memory database
Enable the usage of an in-memory database. Prior to this, sql-mode w/
sqlite could only be used with file databases.
* list/progmodes/sql.el (sql-get-login-ext): Don't expand an empty
file name provided by the user, but call sub-process sqlite with that,
in which case it uses an in-memory database.
Allen Li [Thu, 2 Mar 2017 12:56:53 +0000 (07:56 -0500)]
Stop abbrev-prefix-mark from adding extra newline (Bug#25767)
`abbrev--before-point' does not adjust `pos' to account for when it
deletes the "-" left by abbrev-prefix-mark. Therefore, when
`abbrev-before-point' goes to restore point, it moves point one
character too far forward.
* lisp/abbrev.el (abbrev--before-point): Adjust pos when deleting "-".
Paul Eggert [Thu, 2 Mar 2017 21:48:47 +0000 (13:48 -0800)]
Restore XFLOATINT but with restricted args
Turn instances of extract_float into XFLOAT_DATA when possible,
and to a resurrected XFLOATINT when the arg is a number.
The resurrected XFLOATINT is more like XFLOAT and XINT in
that is valid only if its arg is a number. This clarifies
the ways in which floats can be extracted at the C level.
* src/editfns.c (styled_format):
* src/floatfns.c (extract_float, Fexpt):
Use XFLOATINT rather than open-coding it.
* src/fns.c (internal_equal):
* src/image.c (imagemagick_load_image):
* src/xdisp.c (resize_mini_window):
Prefer XFLOAT_DATA to extract_float on values known to be floats.
* src/frame.c (x_set_screen_gamma):
* src/frame.h (NUMVAL):
* src/image.c (x_edge_detection, compute_image_size):
* src/lread.c (read_filtered_event):
* src/window.c (Fset_window_vscroll):
* src/xdisp.c (handle_single_display_spec, try_scrolling)
(redisplay_window, calc_pixel_width_or_height, x_produce_glyphs)
(on_hot_spot_p):
Prefer XFLOATINT to extract_float on values known to be numbers.
* src/lisp.h (XFLOATINT): Bring back this function, except
it now assumes its argument is a number.
Glenn Morris [Thu, 2 Mar 2017 20:40:15 +0000 (15:40 -0500)]
Ert commands to error if no test at point (bug#25931)
* lisp/emacs-lisp/ert.el (ert-results-mode-menu):
Deactivate some items if no test at point.
(ert--results-test-at-point-no-redefinition):
Add option to signal an error rather than return nil.
(ert-results-pop-to-backtrace-for-test-at-point)
(ert-results-pop-to-messages-for-test-at-point)
(ert-results-pop-to-should-forms-for-test-at-point)
(ert-results-describe-test-at-point): Error if no test at point.
Paul Eggert [Thu, 2 Mar 2017 17:21:19 +0000 (09:21 -0800)]
Remove XFLOATINT
* src/lisp.h (XFLOATINT): Remove this alias for extract_float.
All callers changed to use extract_float.
* src/frame.h (NUMVAL): Now an inline function, not a macro.
Paul Eggert [Thu, 2 Mar 2017 17:11:11 +0000 (09:11 -0800)]
Fix rounding errors in <, =, etc.
* etc/NEWS: Document this.
* src/bytecode.c (exec_byte_code):
* src/data.c (arithcompare):
Do not lose information when comparing floats to integers.
* test/src/data-tests.el (data-tests-=, data-tests-<)
(data-tests->, data-tests-<=, data-tests->=):
Test this.
Eli Zaretskii [Thu, 2 Mar 2017 15:46:25 +0000 (17:46 +0200)]
Fix display of mouse-highlight produced by overlapping overlays
* src/xfaces.c (face_at_buffer_position): If called to find the
mouse-face, only consider the highest-priority source for that
face, and ignore the rest. Previously, all the mouse-face
definitions at POS were merged in that case.
* src/xdisp.c (note_mouse_highlight): Record the overlay that
specifies mouse-face _after_ clearing the info about the previous
overlay, so as not to clear the information about the just-recorded
overlay. (Bug#25906)
Eli Zaretskii [Thu, 2 Mar 2017 15:37:18 +0000 (17:37 +0200)]
Fix display of strike-through text in variable-height lines
* src/nsterm.m (ns_draw_text_decoration):
* src/xterm.c (x_draw_glyph_string):
* src/w32term.c (x_draw_glyph_string): Fix calculation of the
strike-through y-coordinate for a glyph row which is taller than
the strike-through text. (Bug#25907)
Katsumi Yamaoka [Thu, 2 Mar 2017 07:55:57 +0000 (07:55 +0000)]
Don't add debbugs address to message body (bug#25896)
* lisp/gnus/gnus-group.el (gnus-read-ephemeral-bug-group):
Don't add debbugs address to message body (bug#25896), and
don't add it to message header either if it already exists.
Stefan Monnier [Thu, 2 Mar 2017 07:23:45 +0000 (02:23 -0500)]
* lisp/cedet/semantic/db-global.el: Make dynbind use explicit
(semanticdb--ih): Declare.
(semanticdb-enable-gnu-global-databases): Use it instead of `ih'.
(semanticdb-enable-gnu-global-in-buffer, semanticdb-get-database-tables)
(semanticdb-find-tags-for-completion-method): Silence compiler warning.
Glenn Morris [Wed, 1 Mar 2017 21:53:08 +0000 (16:53 -0500)]
Fix for coding-system completion (bug#23670)
* lisp/international/mule.el (read-buffer-file-coding-system):
Ensure that completion-pcm--delim-wild-regex is enclosed in parens,
so that completion-pcm--pattern->regex can append "*?".
Paul Eggert [Wed, 1 Mar 2017 20:29:37 +0000 (12:29 -0800)]
Fix rounding error in ‘ceiling’ etc.
Without this fix, (ceiling most-negative-fixnum -1.0) returns
most-negative-fixnum instead of correctly signaling range-error,
and similarly for floor, round, and truncate.
* configure.ac (trunc): Add a check, since Gnulib’s doc says
‘trunc’ is missing from MSVC 9. The Gnulib doc says ‘trunc’ is
also missing from some other older operating systems like Solaris
9 which I know we don’t care about any more, so MSVC is the only
reason to worry about ‘trunc’ here.
* src/editfns.c (styled_format): Formatting a float with %c is now an
error. The old code did not work in general, because FIXNUM_OVERFLOW_P
had rounding errors. Besides, the "if (FLOATP (...))" was in there
only as a result of my misunderstanding old code that I introduced
2011. Although %d etc. is sometimes used on floats that represent
huge UIDs or PIDs etc. that do not fit in fixnums, this cannot
happen with characters.
* src/floatfns.c (rounding_driver): Rework to do the right thing
when the intermediate result equals 2.305843009213694e+18, i.e.,
is exactly 1 greater than MOST_POSITIVE_FIXNUM on a 64-bit host.
Simplify so that only one section of code checks for overflow,
rather than two.
(double_identity): Remove. All uses changed to ...
(emacs_trunc): ... this new function. Add replacement for
platforms that lack ‘trunc’.
* src/lisp.h (FIXNUM_OVERFLOW_P, make_fixnum_or_float):
Make it clear that the arg cannot be floating point.
* test/src/editfns-tests.el (format-c-float): New test.
* test/src/floatfns-tests.el: New file, to test for this bug.
Eric Abrahamsen [Thu, 23 Feb 2017 01:26:11 +0000 (17:26 -0800)]
Don't use mapconcat with chars in gnus registry marks (Bug#25839)
* lisp/gnus/gnus-registry.el (gnus-registry-article-marks-to-chars):
Instead, use a plain concat, which will create a string out of a list
of characters.
Noam Postavsky [Wed, 22 Feb 2017 01:46:15 +0000 (20:46 -0500)]
Fix epg-tests with dummy-pinentry program (Bug#23619)
* test/data/epg/dummy-pinentry: New file.
* test/lisp/epg-tests.el (with-epg-tests): Add it to gpg-agent.conf
when a passphrase is required. Add debug declaration. Set
GPG_AGENT_INFO non-destructively.
Phillip Lord [Mon, 27 Feb 2017 21:23:35 +0000 (21:23 +0000)]
Speed generation of ldefs-boot-auto
Previously, generation of ldefs-boot-auto required at least one full
bootstrap and, in extreme cases, two. Now, from build system, it
requires the same time as taken to dump Emacs.
* Makefile.in: Remove all calls, pass to src.
* admin/ldefs-clean.el: Update for changed messages.
* lisp/Makefile.in (compile-first-delete): Add.
* lisp/ldefs-boot-auto.el: Update.
* src/Makefile.in (generate-ldefs-boot): Add.
Phillip Lord [Fri, 20 Jan 2017 15:13:27 +0000 (15:13 +0000)]
Remove conditional includes from bootstrap
Previously, bootstrap-emacs includes optional functionality, depending
on the platform which is not needed for bootstrap function. As a
result, bootstrap-emacs contains different functions in different
circumstances. If ldefs-boot-auto.el is generated, then loaded
functions will not be added to ldefs-boot-auto.el, although they may be
required during some builds. With this change, bootstrap-emacs should
always behave the same way and, therefore, require the same autoloads.
* lisp/loadup.el: No longer load optional includes during bootstrap
dumping.
* lisp/ldefs-boot-auto.el: Regenerate.
* lisp/ldefs-boot-manual.el: Add two autoloads.
Ken Brown [Tue, 28 Feb 2017 16:25:00 +0000 (11:25 -0500)]
Try to avoid hang when logging out of MS-Windows
* src/w32term.c (x_update_window_begin, x_update_window_end)
(my_show_window, my_set_window_pos, my_set_focus)
(my_set_foreground_window, my_destroy_window)
(my_bring_window_to_top, x_iconify_frame): Replace calls to
SendMessage by calls to SendMessageTimeout with a 6-second
timeout. (Bug#25875)
Stefan Monnier [Tue, 28 Feb 2017 16:11:01 +0000 (11:11 -0500)]
* doc/misc/eieio.texi: Update to account for the cl-generic facilities
(Quick Start, Class Options, Generics): Adjust names for cl-generic.
(Methods): Document cl-defmethod.
Explain in more detail the order in which the various
methods are executed. Document the conditions under which a method
is redefined. Remove reference to `eieio-generic-call-arglst`.
Don't document the precise return value of cl-next-method-p.
(Static Methods): Adjust to use `subclass` specializer.
(Method Invocation): Use cl-call-next-method and drop mention of :primary.
(Signal Handling, Signals): Adjust names and args for cl-generic; add
cl-no-primary-method.
(CLOS compatibility, Wish List): Adjust to new featureset.
Juri Linkov [Mon, 27 Feb 2017 22:50:57 +0000 (00:50 +0200)]
Put text properties on query-replace separator string instead of "\0"
* lisp/replace.el (query-replace--split-string):
Split at a substring instead of just character.
(query-replace-read-from): Put text properties on the
separator string instead of "\0". (Bug#25482)
Tino Calancha [Mon, 27 Feb 2017 07:32:10 +0000 (16:32 +0900)]
Prevent for consing in cl-mapc and cl-mapl
* lisp/emacs-lisp/cl-extra.el (cl--mapcar-many): Add optional arg ACC;
If non-nil, accumulate values in the result (Bug#25826).
(cl-mapc): Do computations inside function instead of call cl-map.
(cl-mapl): Do computations inside function instead of call cl-maplist.
* lisp/emacs-lisp/cl-lib.el (mapcar): Add autoload cookie.
Call cl--mapcar-many with non-nil 3rd argument.
* test/lisp/emacs-lisp/cl-extra-tests.el (cl-extra-test-map)
(cl-extra-test-mapc, cl-extra-test-mapcar, cl-extra-test-mapl)
(cl-extra-test-maplist): New tests.
Tino Calancha [Mon, 27 Feb 2017 07:26:06 +0000 (16:26 +0900)]
Choose the right target dir on dired operations
Prevent from changing the input target dir
when dired-dwim-target is non-nil (Bug#25609).
* lisp/dired-aux.el (dired-do-create-files):
If dired-dwim-target is non-nil, then bind 'default' to nil.
* test/lisp/dired-tests.el (dired-test-bug25609): Add test.
Noam Postavsky [Thu, 23 Feb 2017 02:48:29 +0000 (21:48 -0500)]
Don't record eshell/clear "command" in history (Bug#25838)
`eshell/clear' is implemented by sending a series of blank lines,
which is not a useful thing to have in the history.
* lisp/eshell/em-hist.el (eshell-input-filter-default): Use
`string-blank-p' which does check for newlines (even though newlines
have comment-end syntax, not whitespace syntax class).
* lisp/eshell/esh-mode.el (eshell/clear): Remove
`eshell-add-to-history' from `eshell-input-filter-functions' while
sending the blank lines. This change is needed to solve the bug if
the user customizes `eshell-input-filter' to something that doesn't
filter newlines.
Noam Postavsky [Thu, 23 Feb 2017 02:12:41 +0000 (21:12 -0500)]
Don't call package--ensure-init-file if initialized during startup
* lisp/emacs-lisp/package.el (package-initialize): Check
`after-init-time' rather than `load-file-name' to decide if
`package--ensure-init-file' should be called. Depending on
`load-file-name' will fail if the user calls `pacakge-initialize' in
file which is loaded from the init file (Bug#24643, Bug#25819).
Eli Zaretskii [Sun, 26 Feb 2017 15:56:13 +0000 (17:56 +0200)]
Fix display of before- and after-strings at invisible text
* src/xdisp.c (next_overlay_string): Don't raise the
ignore_overlay_strings_at_pos_p flag if the iterator is already
set to continue at a buffer position different from the one
where the overlay strings we just processed were loaded. (Bug#25856)
Tom Tromey [Sat, 25 Feb 2017 17:27:48 +0000 (10:27 -0700)]
Use font-lock-doc-face in js-mode
Bug#25858:
* lisp/progmodes/js.el (js-font-lock-syntactic-face-function): New
defun.
(js-mode): Use it.
* test/lisp/progmodes/js-tests.el (js-mode-doc-comment-face): New
test.
Noam Postavsky [Wed, 22 Feb 2017 21:56:14 +0000 (16:56 -0500)]
Don't use IP 0.0.0.0 for package test server (Bug#22582)
* test/lisp/emacs-lisp/package-resources/package-test-server.py: Set
'server_address' when port number is given on the command line. Print
IP and port number as a URL, and flush it after printing.
* test/lisp/emacs-lisp/package-tests.el:
(package-test-update-archives-async): Grab the whole URL from server
output.
Eli Zaretskii [Sat, 25 Feb 2017 11:40:23 +0000 (13:40 +0200)]
Avoid leaving garbage on screen when using 'raise' display property
* src/xdisp.c (display_line): Reset voffset value of the iterator
when it hits ZV, to avoid "inheriting" it to glyph rows past ZV,
which then leaves stuff on screen that needs to be cleared by
redisplay. (Bug#25855)
* lib-src/emacsclient.c (print_help_and_exit, longopts)
(decode_options, main): Implement new option --suppress-output / -u to
suppress printing of eval-results.
* doc/emacs/misc.texi (emacsclient Options): Document the new
"--suppress-output/-u" options.
* etc/NEWS: Mention the new options.
Noam Postavsky [Mon, 20 Feb 2017 18:34:39 +0000 (13:34 -0500)]
Fix scrolling with partial line corner case (Bug#25792)
Also fix up the scrolling tests so that they don't make so many
assumptions about the current window configuration.
* src/xdisp.c (try_window): Take partial line height into account when
comparing cursor position against scroll margin.
* test/manual/scroll-tests.el (scroll-tests-with-buffer-window): Add
HEIGHT argument, to allow setting up window with exact height and
partial line.
(scroll-tests-display-buffer-with-height): New display-buffer action
function.
(scroll-tests-scroll-margin-over-max):
(scroll-tests--scroll-margin-whole-window): Pass HEIGHT to
`scroll-tests--scroll-margin-whole-window'.
(scroll-tests-conservative-show-trailing-whitespace): New test.
(scroll-tests-scroll-margin-negative): Fix line counting.
(scroll-tests--point-in-middle-of-window-p): Set window height
properly.
Stefan Monnier [Fri, 24 Feb 2017 03:39:53 +0000 (22:39 -0500)]
Use cl-print for Edebug and EIEIO
* lisp/emacs-lisp/edebug.el (edebug-prin1-to-string): Use cl-print.
(edebug-prin1, edebug-print): Remove.
* lisp/emacs-lisp/eieio.el (object-print): Declare obsolete.
(cl-print-object): Add a method for EIEIO objects.
(eieio-edebug-prin1-to-string): Delete.
(edebug-prin1-to-string): Don't advise any more.
Stefan Monnier [Fri, 24 Feb 2017 02:17:04 +0000 (21:17 -0500)]
Minor redisplay optimisations
* src/frame.c (Ficonify_frame): No need to redisplay everything.
* src/xdisp.c (overlay_arrows_changed_p): Add `set_redisplay' argument.
(redisplay_internal): Use it to avoid redisplaying everything.
(try_window_id): Use it keep the same behavior as before.
Gemini Lasswell [Fri, 17 Feb 2017 06:08:03 +0000 (22:08 -0800)]
Support read syntax for circular objects in Edebug (Bug#23660)
* lisp/emacs-lisp/edebug.el (edebug-read-special): New name
for edebug-read-function. Handle the read syntax for circular
objects.
(edebug-read-objects): New variable.
(edebug-read-and-maybe-wrap-form1): Reset edebug-read-objects.
* src/lread.c (Fsubstitute_object_in_subtree): Make
substitute_object_in_subtree into a Lisp primitive.
Mark Oteiza [Thu, 23 Feb 2017 18:14:44 +0000 (13:14 -0500)]
Declare dun-line and dun-line-list
Previously, there were free variables 'line' and 'line-list'.
* lisp/play/dunnet.el (dun-line, dun-line-list): New variables.
(dun-press, dun-vparse, dun-parse2, dun-unix-parse, dun-batch-parse):
(dun-batch-parse2, dun-batch-loop, dun-batch-dos-interface):
(dun-batch-unix-interface): Use them.
Paul Eggert [Thu, 23 Feb 2017 16:58:39 +0000 (08:58 -0800)]
hexl: handle large files and I/O errors
* lib-src/hexl.c: Include inttypes.h, for PRIxMAX etc.
Do not include ctype.h, as the code no longer uses isdigit.
(DEFAULT_GROUPING, un_flag, iso_flag, group_by): Now local to ‘main’.
(DEFAULT_BASE, endian): Remove; was not really used.
(usage): Remove; now done by ‘main’, as that’s simpler.
(progname): Now static.
(output_error, hexchar): New functions.
(main): Use them. Simplify. Remove "-oct", "-big-endian", and
"-little-endian" options, as they did not work and were not used.
Use SET_BINARY only on stdin, and fopen with "rb" otherwise.
Use SET_BINARY only once on stdout.
Do not assume file offsets fit in ‘long’.
If an I/O error occurs, report it and exit with nonzero status.
Eli Zaretskii [Thu, 23 Feb 2017 16:15:05 +0000 (18:15 +0200)]
Avoid quitting inside a critical section on MS-Windows
* src/w32uniscribe.c (uniscribe_list_family):
* src/w32font.c (w32font_list_family, w32font_text_extents)
(w32font_list_internal, w32font_match_internal)
(list_all_matching_fonts): Prevent quitting while these functions
cons lists of fonts, to avoid leaving the critical section taken
by the main thread, which will then cause any other thread
attempting to enter the critical section to hang. (Bug#25279)
remove entries whose car can't be returned by type-of.
(cl--generic-all-builtin-types): New var.
(cl-generic-generalizers): Use it to avoid requiring
extra entries in cl--generic-typeof-types.
Noam Postavsky [Wed, 22 Feb 2017 02:31:24 +0000 (21:31 -0500)]
Find macro binding for symbol-bound macros too (Bug#6848)
There are 2 ways to bind a macro: with global-set-key or
kmacro-bind-to-key. The former binds a key to a symbol, while the
latter binds to a lambda. In 2010-03-03 "Fix keyboard macro key
lookup (Bug#5481)", `insert-kbd-macro' was fixed to detect the lambda
case, but broke the symbol case.
* lisp/macros.el (insert-kbd-macro): Also check for bindings of
MACRONAME.
Paul Eggert [Tue, 21 Feb 2017 23:31:29 +0000 (15:31 -0800)]
Minor weak hash table performance tweaks
* src/fns.c (make_hash_table): Omit unnecessary assignment to
h->next_weak when the hash table is not weak.
(copy_hash_table): Put the copy next to the original in the
weak_hash_tables list, as this should have better locality
when scanning the weak hash tables.
Paul Eggert [Tue, 21 Feb 2017 23:31:29 +0000 (15:31 -0800)]
Use float instead of Lisp_Object for rehash_size
* src/alloc.c (purecopy_hash_table):
* src/fns.c (maybe_resize_hash_table, Fmake_hash_table):
(Fhash_table_rehash_size):
* src/lisp.h (struct Lisp_Hash_Table.rehash_size):
The rehash_size member of struct Lisp_Hash_Table is now a
float, not a Lisp_Object.
* src/alloc.c (purecopy_hash_table): Assign members in order.
* src/fns.c (make_hash_table): Use EMACS_INT for size and
float for rehash_size, instead of Lisp_Object for both.
All callers changed.
* src/lisp.h (DEFAULT_REHASH_SIZE): Now float, not double,
and 1 smaller.
* src/print.c (print_object): Simplify by calling
Fhash_table_rehash_size and Fhash_table_rehash_threshold.
Avoid unnecessary NILP.
Paul Eggert [Tue, 21 Feb 2017 23:31:29 +0000 (15:31 -0800)]
Use ptrdiff_t instead of Lisp_Object for collision
* src/alloc.c (purecopy_hash_table): Assign, don’t purecopy.
* src/fns.c (set_hash_next_slot, set_hash_index_slot): Hash index
arg is now ptrdiff_t index (or -1 if empty), not Lisp_Object
integer (or Qnil if empty). All callers changed.
(larger_vecalloc): New static function.
(larger_vector): Use it.
(HASH_NEXT, HASH_INDEX): Move here from lisp.h. Return ptrdiff_t
index (or -1) not Lisp_Object integer (or Qnil). All callers changed.
* src/fns.c (make_hash_table, maybe_resize_hash_table, hash_lookup)
(hash_put, hash_remove_from_table, hash_clear, sweep_weak_table):
* src/profiler.c (evict_lower_half, record_backtrace):
-1, not nil, is now the convention for end of collision list.
* src/fns.c (maybe_resize_hash_table): Avoid double-initialization
of the free list. Reallocate H->next last, in case other
reallocations exhaust memory.
* src/lisp.h (struct Lisp_Hash_Table): ‘next_free’ is now
ptrdiff_t, not Lisp_Object. Adjust commentary for ‘next’ and
‘index’, which no longer contain nil.
(HASH_NEXT, HASH_INDEX): Move to src/fns.c.
Paul Eggert [Tue, 21 Feb 2017 23:31:29 +0000 (15:31 -0800)]
Hash table threshold is now float, not double
Change default from 0.8 to 0.8125 so it fits in float without
rounding glitches.
* doc/lispref/hash.texi (Creating Hash):
* doc/lispref/objects.texi (Hash Table Type):
* etc/NEWS:
Document change.
* src/fns.c (make_hash_table, maybe_resize_hash_table)
(Fmake_hash_table): Threshold is now float, not double.
Be consistent about how this is rounded.
* src/lisp.h (struct Lisp_Hash_Table.rehash_threshold):
Change back to float, now that the other code rounds consistently.
(DEFAULT_REHASH_THRESHOLD): Now float 0.8125 instead of double 0.8.
Juri Linkov [Tue, 21 Feb 2017 23:22:18 +0000 (01:22 +0200)]
Avoid flicker in lazy-highlight by doing all updates without redisplay.
* lisp/isearch.el (lazy-highlight-max-at-a-time):
Change default value from 20 to nil to not trigger redisplay
between updating iterations.
(lazy-highlight-cleanup): New arg ‘procrastinate’ to not remove
overlays when non-nil.
(isearch-lazy-highlight-new-loop): Call lazy-highlight-cleanup
with non-nil second arg when the search string is not empty.
Run timer with isearch-lazy-highlight-start instead of
isearch-lazy-highlight-update.
(isearch-lazy-highlight-start): New function. (Bug#25751)