aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | Use switch on pseudovector types; plus cleanups along the wayStefan Monnier2017-03-124-80/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/lisp.h (PSEUDOVECTOR_TYPE): New function, extracted from mark_object. (PSEUDOVECTOR_TYPEP): Change type of `code'. * src/alloc.c (sweep_vectors): Remove out-of-date assertion. (mark_object): Use PSEUDOVECTOR_TYPE. * src/data.c (Ftype_of): Use switch on pvec type. * src/print.c (print_object): Use switch on pvec type. * lisp/emacs-lisp/cl-generic.el (cl--generic-typeof-types): Add recently added types.
* | Install update-game-score only on requestPaul Eggert2017-03-121-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most distributions do not install update-game-score properly due to setuid/setgid complications, so install it only when the installer specifies a user or group (Bug#25895). * .gitattributes: Remove lib-src/update-game-score.exe.manifest. * Makefile.in (gameuser, gamegroup, use_gamedir, PATH_GAME): New vars. (epaths-force): Use PATH_GAME. (uninstall): Remove snake-scores and tetris-scores only if shared. * configure.ac: Default --with-gameuser to 'no'. (UPDATE_MANIFEST): Remove. * etc/NEWS: Mention this. * lib-src/Makefile.in (UPDATE_MANIFEST): Remove. (use_gamedir): New macro. (UTILITIES): Remove update-game-score unless use_gamedir. (SCRIPTS): Remove $(UPDATE_MANIFEST). ($(DESTDIR)${archlibdir}): Install game directory program and data only if use_gamedir. * lib-src/update-game-score.exe.manifest: Remove, as update-game-score is no longer installed on MS-Windows. * lisp/play/gamegrid.el (gamegrid-add-score-with-update-game-score): Use auxiliary program only if setuid or setgid. * make-dist: Do not distribute update-game-score.exe.manifest. * src/callproc.c (init_callproc): Set Vshared_game_score_directory based on PATH_GAME, not DOS_NT. (syms_of_callproc): Remove unnecessary initialization of Vshared_game_score_directory.
* | Avoid aborts/assertion violations due to 'vim-empty-lines-mode'Eli Zaretskii2017-03-111-0/+8
| | | | | | | | | | | | | | | | | | * src/xdisp.c (handle_single_display_spec): If position to be restored after processing the display property comes from an overlay, protect against that overlay's end point being outside of the narrowed region. Reported by Filipe Silva <filipe.silva@gmail.com> in http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00176.html.
* | Tweak X toolkit code to pacify modern GCCPaul Eggert2017-03-104-36/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lwlib/lwlib-Xaw.c, lwlib/lwlib-Xm.c, lwlib/lwlib.c: Don’t include <stdlib.h>, since this code now calls emacs_abort rather than abort. * lwlib/lwlib-Xaw.c (make_dialog, xaw_generic_callback) (wm_delete_window): * lwlib/lwlib-Xm.c (make_menu_in_widget, do_call): * lwlib/lwlib.c (instantiate_widget_instance, lw_make_widget): * lwlib/xlwmenu.c (abort_gracefully, draw_separator) (separator_height, XlwMenuInitialize): Use emacs_abort, not abort. Without this change, some calls to ‘abort’ were invalid, as stdlib.h was not always included. * src/widget.c (resources, emacsFrameClassRec): * src/xfns.c (x_window) [USE_X_TOOLKIT]: * src/xmenu.c (create_and_show_popup_menu) [USE_X_TOOLKIT]: * src/xterm.c (emacs_options) [USE_X_TOOLKIT}: (x_term_init) [USE_X_TOOLKIT]: Cast string constants to char * to pacify --enable-gcc-warnings.
* | * src/data.c (arithcompare): Add comments.Paul Eggert2017-03-081-4/+18
| |
* | * data.c (minmax_driver): Use CHECK_NUMBER_OR_FLOAT_COERCE_MARKER.Andreas Schwab2017-03-081-1/+4
| | | | | | | | (Fmax, Fmin): Restore documentation.
* | * data.c (cons_to_unsigned, cons_to_signed, Fstring_to_number): ReorderAndreas Schwab2017-03-081-6/+6
| | | | | | | | comparisons that are written backward.
* | min and max should not return markersPaul Eggert2017-03-071-2/+2
| | | | | | | | | | | | | | | | | | Problem reported by Glenn Morris in: http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00147.html * src/data.c (minmax_driver): Convert any marker result to an integer, since some callers assume this. * test/src/data-tests.el (data-tests-max, data-tests-min): Test for this.
* | Add missing timeout value in ns_selectAlan Third2017-03-081-1/+7
| | | | | | | | | | * src/nsterm.m (ns_select): Set timeout to distant future when relying on fd_handler's timeout.
* | Remove isnan hack for Solaris 10 gcc 3.4.3Paul Eggert2017-03-072-9/+11
| | | | | | | | | | | | | | This seems to have been a false alarm (Bug#26018). * src/data.c (isnan): * src/floatfns.c (isfinite, isnan): Use standard implementation if available.
* | Define copysign on all platformsPaul Eggert2017-03-071-5/+9
| | | | | | | | | | | | | | * configure.ac (copysign): Remove test. * src/floatfns.c (signbit): New macro, if not already defined. (Fcopysign): Use it instead of copysign. (Fcopysign, syms_of_floatfns): Define the function on all platforms.
* | Revert "Replace ldefs-boot with a much smaller file"Phillip Lord2017-03-074-34/+1
| | | | | | | | | | | | | | | | | | | | | | This reverts commit c27b645956a11fab1dd8fa189254d525390958f5. This commit has been reverted because the new mechanism was too sensitive to changes in the lisp source, generation of new ldefs-boot files was platform specific and resulted in warnings about undefined variables. See also 11436e2890d.
* | Revert "Speed generation of ldefs-boot-auto"Phillip Lord2017-03-071-23/+2
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 7b5e1c8238ef961fd3305b1dce053b9bced684ba. This commit has been reverted because the new mechanism was too sensitive to changes in the lisp source, generation of new ldefs-boot files was platform specific and resulted in warnings about undefined variables. See also 11436e2890d.
* | min and max now return one of their argumentsPaul Eggert2017-03-061-23/+20
| | | | | | | | | | | | | | | | | | * doc/lispref/numbers.texi (Comparison of Numbers): * etc/NEWS: Document this. * src/data.c (Amax, Amin): Remove constants. All uses removed. (minmax_driver): New function. (Fmax, Fmin): Use it instead of arith_driver. * test/src/data-tests.el (data-tests-max, data-tests-min): New tests.
* | Remove NSEvent loop from ns_select (bug#25265)Alan Third2017-03-061-40/+36
| | | | | | | | | | * src/nsterm.m (ns_select): Remove event processing loop and replace with simple test for a new event.
* | A better fix for bug#25845Eli Zaretskii2017-03-065-64/+34
| | | | | | | | | | | | | | | | | | * src/xdisp.c (font_for_underline_metrics): New function. * src/dispextern.h: Add its prototype. * src/xterm.c (x_draw_glyph_string): * src/w32term.c (x_draw_glyph_string): * src/nsterm.m (ns_draw_text_decoration): Call it. This avoids having identical code 3 times in 3 different files.
* | ffloor etc. now accept only floatsPaul Eggert2017-03-051-6/+10
| | | | | | | | | | | | | | * etc/NEWS: Say why. * src/floatfns.c (Ffceiling, Fffloor, Ffround, Fftruncate): Require arg to be float. * test/src/floatfns-tests.el (fround-fixnum): Check this.
* | ; Spelling fixesPaul Eggert2017-03-051-1/+1
| |
* | Fix display of cursor on underlined textEli Zaretskii2017-03-053-17/+79
| | | | | | | | | | | | | | | | | | * src/nsterm.m (ns_draw_text_decoration): * src/xterm.c (x_draw_glyph_string): * src/w32term.c (x_draw_glyph_string): Compute the position and thickness of the underline by looking for the first glyph of the run of underlined glyphs that includes the glyph string we are drawing. (Bug#25845)
* | Compare and round more carefullyPaul Eggert2017-03-044-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * etc/NEWS: Document this. * src/data.c (store_symval_forwarding): * src/sound.c (parse_sound): Do not botch NaN comparison. * src/data.c (cons_to_unsigned, cons_to_signed): Signal an error if a floating-point arg is not integral. * src/data.c (cons_to_unsigned, cons_to_signed): * src/fileio.c (file_offset): Use simpler overflow check. * src/dbusbind.c (xd_extract_signed, xd_extract_unsigned): Avoid rounding error in overflow check. (Fcar_less_than_car): Use arithcompare directly. * test/src/charset-tests.el: New file.
* | Fewer rounding errors with (format "%f" fixnum)Paul Eggert2017-03-041-13/+43
| | | | | | | | | | | | | | * etc/NEWS: Document this. * src/editfns.c (styled_format): When formatting integers via a floating-point format, use long double instead of double conversion, if long double’s extra precision might help.
* | * src/floatfns.c (Fftruncate): Simplify via emacs_trunc.Paul Eggert2017-03-041-4/+1
| |
* | * src/editfns.c (styled_format): Omit unnecessary code for "%0d" etc.Paul Eggert2017-03-041-4/+3
| |
* | * src/editfns.c (styled_format): Omit unnecessary code.Paul Eggert2017-03-031-1/+1
| |
* | logb now works correctly on large integersPaul Eggert2017-03-032-14/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Avoid duplicating characters recorded in macrosEli Zaretskii2017-03-031-1/+1
| | | | | | | | | | * src/keyboard.c (record_char): Don't store in macro definitions characters that came from executing a macro. (Bug#25860)
* | Restore XFLOATINT but with restricted argsPaul Eggert2017-03-0210-44/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Remove XFLOATINTPaul Eggert2017-03-028-30/+28
| | | | | | | | | | | | * 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.
* | Fix rounding errors in <, =, etc.Paul Eggert2017-03-022-41/+59
| | | | | | | | | | | | | | | | | | | | * 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.
* | Fix display of mouse-highlight produced by overlapping overlaysEli Zaretskii2017-03-022-12/+45
| | | | | | | | | | | | | | | | | | | | | | * 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)
* | Fix display of strike-through text in variable-height linesEli Zaretskii2017-03-023-10/+37
| | | | | | | | | | | | | | | | * 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)
* | Don't call x_net_wm_state for scroll bar windows (Bug#24963, Bug#25887)Martin Rudalics2017-03-021-2/+4
| | | | | | | | | | | | * src/xterm.c (handle_one_xevent): For ConfigureNotify events don't call x_net_wm_state when the window is a scroll bar window. (Bug#24963, Bug#25887)
* | Fix rounding error in ‘ceiling’ etc.Paul Eggert2017-03-013-46/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | * src/fns.c (Fbuffer_hash): Doc fix.Leo Liu2017-03-011-2/+1
| |
* | Speed generation of ldefs-boot-autoPhillip Lord2017-02-281-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | * src/xdisp.c (overlay_arrows_changed_p): Fix return value and docStefan Monnier2017-02-281-2/+8
| | | | | | | | (update_overlay_arrows): Skip non-markers.
* | ; * src/w32fns.c (w32_wnd_proc): Adjust comment.Ken Brown2017-02-281-1/+5
| |
* | Try to avoid hang when logging out of MS-WindowsKen Brown2017-02-281-12/+18
| | | | | | | | | | | | | | | | | | * 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)
* | * src/xdisp.c (overlay_arrows_changed_p): Fix last change.Stefan Monnier2017-02-271-2/+7
| |
* | Remove a few unused C functionsPaul Eggert2017-02-265-70/+4
| | | | | | | | | | | | | | | | | | * src/eval.c (let_shadows_global_binding_p): * src/print.c (write_string): * src/systhread.c (sys_mutex_destroy, sys_thread_equal): Remove. * src/print.c (write_string): Rename from write_string_1. All uses changed.
* | Avoid segfault in overlay_arrows_changed_pEli Zaretskii2017-02-261-2/+4
| | | | | | | | | | * src/xdisp.c (overlay_arrows_changed_p): Fix recent change to avoid a segfault.
* | Fix display of before- and after-strings at invisible textEli Zaretskii2017-02-261-3/+8
| | | | | | | | | | | | | | * 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)
* | Avoid leaving garbage on screen when using 'raise' display propertyEli Zaretskii2017-02-251-0/+10
| | | | | | | | | | | | | | * 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)
* | Fix scrolling with partial line corner case (Bug#25792)Noam Postavsky2017-02-241-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Minor redisplay optimisationsStefan Monnier2017-02-232-10/+11
| | | | | | | | | | | | | | | | * 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.
* | * lisp/emacs-lisp/cl-print.el: New fileStefan Monnier2017-02-231-10/+22
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/nadvice.el (advice--where): New function. (advice--make-docstring): Use it. * src/print.c (print_number_index): Don't declare here any more. (Fprint_preprocess): New function. * test/lisp/emacs-lisp/cl-print-tests.el: New file.
* | Support read syntax for circular objects in Edebug (Bug#23660)Gemini Lasswell2017-02-231-5/+7
| | | | | | | | | | | | | | | | | | | | | | * 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.
* | Merge from gnulibPaul Eggert2017-02-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | This incorporates: 2017-02-16 xbinary-io: rename from xsetmode 2017-02-15 xsetmode: new module * lib-src/etags.c (main): * lib-src/hexl.c (main): * src/emacs.c (main) [MSDOS]: Prefer set_binary_mode to the obsolescent SET_BINARY. * lib/binary-io.c, lib/binary-io.h: Copy from gnulib.
* | Avoid quitting inside a critical section on MS-WindowsEli Zaretskii2017-02-232-0/+51
| | | | | | | | | | | | | | | | | | | | * 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)
* | Minor weak hash table performance tweaksPaul Eggert2017-02-211-5/+3
| | | | | | | | | | | | | | | | * 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.