aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Avoid MinGW64 compilation warning in w32.cEli Zaretskii2017-09-161-0/+4
| | | | * src/w32.c (sys_strerror): Provide a prototype for MinGW64.
* ; * src/data.c (minmax_driver): Fix last change.Eli Zaretskii2017-09-161-1/+1
|
* Fix MS-Windows build broken by recent changes in lcms.cEli Zaretskii2017-09-161-10/+20
| | | | | | | | | | | * src/lcms.c [WINDOWSNT]: Define types for cmsWhitePointFromTemp and cmsxyY2XYZ function pointers. (init_lcms_functions) [WINDOWSNT]: Load cmsWhitePointFromTemp and cmsxyY2XYZ from liblcms2. (cmsWhitePointFromTemp, cmsxyY2XYZ) [WINDOWSNT]: Redirect to the corresponding function pointers. (Flcms_temp_to_white_point): Minor stylistic changes. Doc fix. (syms_of_lcms2): Defsubr Slcms_temp_to_white_point.
* Avoid GCC 7 compilation warning in data.cEli Zaretskii2017-09-161-1/+1
| | | | | | * src/data.c (minmax_driver): Use UNINIT to avoid compilation warnings. Reported by Fabrice Popineau <fabrice.popineau@centralesupelec.fr>.
* Add lcms-temp->white-point and initial testsMark Oteiza2017-09-151-0/+28
| | | | | * src/lcms.c (lcms-temp->white-point): New function. * test/src/lcms-tests.el: New file.
* One more attempt to avoid GCC 7 warnings in dispnew.cEli Zaretskii2017-09-151-1/+1
| | | | | | * src/dispnew.c (adjust_glyph_matrix): Use eassume instead of eassert, to avoid compilation warnings about NULL pointer dereferences.
* Fix color-distance docstringMark Oteiza2017-09-151-2/+9
| | | | | | | Also feed the translated color to the metric argument. * src/xfaces.c (color-distance): Reword docstring to be more helpful. Avoid duplicating effort in lcms2 by passing the translated 16 bit RGB instead of the function's color arguments.
* Avoid crashes due to invalid error forms from sentinels/filtersEli Zaretskii2017-09-151-0/+4
| | | | | * src/process.c (exec_sentinel_error_handler): Make sure the error form passed to cmd_error_internal is a cons cell. (Bug#28430)
* Avoid compilation warnings with GCC 7 on MS-WindowsEli Zaretskii2017-09-154-8/+11
| | | | | | | | | | | | * src/w32term.c (w32_setup_relief_color, construct_mouse_click) (w32_read_socket): Initialize variables to shut up bogus compilation warnings from GCC 7. * src/unexw32.c (COPY_CHUNK, COPY_PROC_CHUNK): Cast to DWORD_PTR to avoid compiler warnings about printing signed values using %x format spec. * src/dispnew.c (adjust_glyph_matrix): Add eassert to avoid compiler warning about possible NULL pointer dereference. * src/lisp.h (pI): Tweak the definition some more for MinGW64.
* Define gnutls_rnd for WINDOWSNT and HAVE_GNUTLS3 case onlyMartin Rudalics2017-09-151-1/+1
| | | | | * src/fns.c (gnutls_rnd): Define for WINDOWSNT and HAVE_GNUTLS3 case only to avoid unused macros warning otherwise.
* In w32heap.c bump up DUMPED_HEAP_SIZEMartin Rudalics2017-09-151-1/+1
| | | | | * src/w32heap.c (DUMPED_HEAP_SIZE): Bump up DUMPED_HEAP_SIZE to 13*1024*1024 for 32-bit non-wide-integer builds.
* Avoid 64-bit compilation warnings in unexw32.cEli Zaretskii2017-09-141-7/+13
| | | | | | * src/unexw32.c (pDWP): New macro. (COPY_CHUNK, COPY_PROC_CHUNK): Declare 'count' as DWORD_PTR. Use pDWP for printing values that can be either 32-bit or 64-bit wide.
* Fix warnings about formats in printf-like functions on MS-WindowsEli Zaretskii2017-09-142-3/+30
| | | | | | | | | | | * src/lisp.h (pI) [__MINGW32__]: Provide definition that will hopefully DTRT with both MinGW64 and mingw.org's MinGW. See http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00171.html for the details. * src/conf_post.h (PRINTF_ARCHETYPE) [MINGW_W64]: Separate definition specific to MinGW64. (PRINTF_ARCHETYPE) [__MINGW32__]: For mingw.org's MinGW, use __mingw_printf__ in ANSI-compatible mode.
* Support lcms2 in MS-Windows buildsEli Zaretskii2017-09-142-0/+85
| | | | | | | | | | | | | | | | | | | | | | * lisp/term/w32-win.el (dynamic-library-alist): Include association for the lcms2 library. * src/lcms.c [WINDOWSNT]: Include windows.h and w32.h. Use DEF_DLL_FN to define pointers to dynamically loaded lcms2 functions. (cmsCIE2000DeltaE, cmsCIECAM02Init, cmsCIECAM02Forward) (cmsCIECAM02Done): New macros. (init_lcms_functions, Flcms2_available_p): New functions. (Flcms_cie_de2000, Flcms_cam02_ucs) [WINDOWSNT]: Call init_lcms_functions. (syms_of_lcms2): Defsubr lcms2-available-p. * src/w32fns.c (syms_of_w32fns): DEFSYM Qlcms2. * configure.ac: Include lcms2 in the final report and in emacs_config_features. * nt/INSTALL: * nt/INSTALL.W64: Update with the information about lcms2 library.
* Port renameat_noreplace to openSUSE 12.3Paul Eggert2017-09-141-1/+1
| | | | | | | Problem reported by M. Nomiya in: http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00363.html * src/sysdep.c (renameat_noreplace): Call renameat2 only if CYGWIN.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-13178-201/+200
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Provide an lcms2 featureMark Oteiza2017-09-131-0/+2
| | | | * src/lcms.c (syms_of_lcms2): Provide "lcms2".
* Add lcms2 interfaceMark Oteiza2017-09-135-7/+205
| | | | | | | | | | configure.ac: Add boilerplate for configuring and detecting liblcms2. etc/NEWS: Mention new configure option and color-distance change. src/Makefile.in: Add references to lcms.c and liblcms. src/emacs.c: Define lcms2 symbols. src/lcms.c: New file. src/lisp.h: Add declaration for lcms2. src/xfaces.c: Add optional METRIC argument.
* Fix macOS compatibility versions for vibrant dark theme (bug#28415)Alan Third2017-09-111-9/+9
| | | | | * src/nsterm.m (ns_set_appearance, EmacsView::initFrameFromEmacs): Change macOS compatibility from 10.9 to 10.10.
* Fix race with rename-file etc. with dir NEWNAMEPaul Eggert2017-09-101-28/+27
| | | | | | | | | | | | | | | | | | | | This changes the behavior of rename-file etc. slightly. The old behavior mostly disagreed with the documentation, and had a race condition bug that could allow attackers to modify victims' write-protected directories (Bug#27986). * doc/lispref/files.texi (Changing Files): Document that in rename-file etc., NEWFILE is special if it is a directory name. * etc/NEWS: Document the change in behavior. * src/fileio.c (directory_like): Remove. All uses removed. (expand_cp_target): Test only whether NEWNAME is a directory name, not whether it is currently a directory. This avoids a race. (Fcopy_file, Frename_file, Fadd_name_to_file, Fmake_symbolic_link): Document behavior if NEWNAME is a directory name. (Frename_file): Simplify now that the destdir behavior occurs only when NEWNAME is a directory name. * test/lisp/net/tramp-tests.el (tramp-test11-copy-file) (tramp-test12-rename-file, tramp--test-check-files): Adjust tests to match new behavior.
* Implement renameat_noreplace on recent CygwinKen Brown2017-09-101-0/+6
| | | | | | * src/sysdep.c [CYGWIN]: Include cygwin/fs.h. (renameat_noreplace) [RENAME_NOREPLACE]: Use renameat2. (Bug#27986)
* Remove more compilation warnings in MinGW64 buildEli Zaretskii2017-09-093-0/+11
| | | | | | | | * src/w32.c (faccessat, map_w32_filename): * src/w32fns.c (w32_wnd_proc): * src/w32term.c (w32_horizontal_scroll_bar_handle_click) (w32_scroll_bar_handle_click): Use FALLTHROUGH to avoid compiler warnings with GCC 7 and later.
* Improve --enable-gcc-warnings for MinGW64Paul Eggert2017-09-095-7/+24
| | | | | | | | | | | | | | | | This partially reverts my 2016-05-30 patch. Apparently MinGW64 still requires pacifications that GCC 7.1.1 x86-64 (Fedora 26) does not. Also, pacify tparam.c, which isn’t used on Fedora. * lib-src/etags.c (process_file_name, TeX_commands): * src/buffer.c (fix_overlays_before): * src/data.c (Fmake_variable_buffer_local, cons_to_unsigned) (cons_to_signed): * src/editfns.c (Ftranslate_region_internal): Prefer UNINIT to some stray value, as this simplifies code-reading later. * src/eval.c (CACHEABLE): New macro. (internal_lisp_condition_case): Use it. * src/tparam.c (tparam1): Use FALLTHROUGH to pacify GCC.
* Fix compilation warnings in MinGW64 build using GCC 7Eli Zaretskii2017-09-0910-16/+17
| | | | | | | | | | | | | | | | | | | | | | | Reported by Richard Copley <rcopley@gmail.com>. * src/w32heap.c (init_heap): Declare enable_lfh only for mingw.org's MinGW build. * src/w32console.c (w32con_write_glyphs): * src/unexw32.c (get_section_info, COPY_CHUNK, unexec): Fix some mismatches of data type vs format spec. * src/w32fns.c (compute_tip_xy): * src/w32proc.c (stop_timer_thread): * src/w32notify.c (remove_watch): * src/eval.c (internal_lisp_condition_case): * src/editfns.c (Ftranslate_region_internal): * src/data.c (Fmake_variable_buffer_local, cons_to_unsigned) (cons_to_signed): * src/buffer.c (fix_overlays_before): Initialize variables to avoid compiler warnings. * lib-src/etags.c (TeX_commands, process_file_name): Initialize variables to avoid compilation warnings.
* Avoid infloop when scrolling under scroll-preserve-screen-positionEli Zaretskii2017-09-091-0/+5
| | | | | | * src/window.c (window_scroll_pixel_based): If screen position is to be preserved, make sure its recorded Y coordinate is outside the scroll margin. (Bug#28342)
* Fix line-pixel-height for lines of variable heightEli Zaretskii2017-09-081-0/+4
| | | | | | * src/xdisp.c (Fline_pixel_height): Start moving from the beginning of the screen line, to capture the full metrics of the line. (Bug#28391)
* Avoid compiler warnings on MS-Windows with GCC 6 and 7Eli Zaretskii2017-09-083-4/+4
| | | | | | | | | | | | | | * src/w32font.c (SUBRANGE): Use unsigned arithmetic for bit-shifting, to avoid compiler warnings. (w32font_text_extents): Tell GCC NGLYPHS is non-negative, to avoid a warning. For details of the warning, see http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00093.html. * src/term.c (keys) [WINDOWSNT]: Don't define, as it is not used in that build. * src/sound.c (sound_perror): Ifdef away on WINDOWSNT, as this function is not used in that build. * configure.ac: Disable -Wsuggest-attribute=format on MS-Windows.
* Fix 'directory-file-name' on DOS_NT systems as wellEli Zaretskii2017-09-081-1/+1
| | | | | | | | | | * src/fileio.c (directory_file_name) [DOS_NT]: Fix the DOS_NT case to be consistent with last change. * test/src/fileio-tests.el (fileio-tests--odd-symlink-chars): Disable on MS-Windows. (fileio-tests--directory-file-name-dos-nt) (fileio-tests--file-name-as-directory-dos-nt): New tests.
* Fix bug: (directory-file-name "///") returned "//"Paul Eggert2017-09-071-7/+8
| | | | | | | * src/fileio.c (directory_file_name): For "///" and longer, return "/", not "//", as per POSIX. * test/src/fileio-tests.el (fileio-tests--directory-file-name) (fileio-tests--file-name-as-directory): New tests.
* Set frame size to actual requested size (bug#18215)Alan Third2017-09-071-2/+2
| | | | | * src/nsterm.m (x_set_window_size): Don't use FRAME_TEXT_TO_PIXEL_WIDTH or FRAME_TEXT_TO_PIXEL_HEIGHT.
* Revert "Force screen update after drawing cursor glyph (bug#23774)"Alan Third2017-09-051-10/+1
| | | | | | This reverts commit 1b492fa5456e2b6face8d0856f11d17e432693b0. See bug#28358
* Avoid losing Ctrl-C keystrokes in compilation mode on MS-WindowsEli Zaretskii2017-09-051-0/+9
| | | | | * src/w32proc.c (sys_kill): Preserve the up/down state of the Ctrl key across the simulated Ctrl-C keystroke. (Bug#28348)
* * src/image.c (Fimagemagick_types): Doc fix.Andreas Schwab2017-09-051-1/+1
|
* Revert recent float→double Motif changePaul Eggert2017-09-041-33/+25
| | | | | | | | | | | Problem reported by Martin Rudalics in: http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00014.html * src/xterm.c (xm_scroll_callback, xaw_jump_callback) (x_set_toolkit_scroll_bar_thumb) (x_set_toolkit_horizontal_scroll_bar_thumb): Go back to using ‘float’ temporaries rather than ‘double’. Although quite possibly this masks an underlying bug, we lack time to look into that now.
* Force screen update after drawing cursor glyph (bug#23774)Alan Third2017-09-031-1/+10
| | | | | * src/nsterm.m (ns_draw_window_cursor): Force a screen update after drawing the glyph over the cursor.
* In delete_frame do not delete terminal for any toolkit buildMartin Rudalics2017-09-031-2/+6
| | | | | | * src/frame.c (delete_frame): Neither delete terminal for non-GTK toolkit builds (Bug#5802, Bug#21509, Bug#23499, Bug#27816).
* Improve error messages for improper plists (Bug#27726)Philipp Stephani2017-09-021-4/+5
| | | | | | | | | | | | * src/fns.c (Fplist_put, Flax_plist_get, Flax_plist_put) (Fplist_member, syms_of_fns): Use ‘plistp’ as pseudo-predicate for improper plists instead of ‘listp.’ * test/src/fns-tests.el (plist-get/odd-number-of-elements) (lax-plist-get/odd-number-of-elements) (plist-put/odd-number-of-elements) (lax-plist-put/odd-number-of-elements) (plist-member/improper-list): Add unit tests.
* * src/fileio.c (Fexpand_file_name): Doc fix. (Bug#27982)Eli Zaretskii2017-09-021-1/+3
|
* Remove unneeded version checks (bug#28222)Alan Third2017-08-312-8/+2
| | | | | | | * src/macfont.h (CGContextSetFontSmoothingStyle): Remove version check. * src/macfont.m (macfont_draw): Remove version check, and test for existence of CGContextSetFontSmoothingStyle.
* In xterm.c fix some recently introduced compiler warningsMartin Rudalics2017-08-311-4/+5
| | | | | | * src/xterm.c (xaw_jump_callback) (x_set_toolkit_scroll_bar_thumb): Fix some recently introduced -Wdouble-promotion warnings.
* Restrict fix of Bug#24963 and Bug#25887 to GTK buildsMartin Rudalics2017-08-311-2/+4
| | | | | | * src/xterm.c (handle_one_xevent): Restrict earlier fix of Bug#24963 and Bug#25887 to avoid that a non-GTK Emacs won't react to state changes received via ConfigureNotify.
* Preserve display's foreground color when clearing internal borders (Bug#28278)Martin Rudalics2017-08-301-5/+6
| | | | | * src/xterm.c (x_after_update_window_line): Preserve display's foreground color when clearing internal borders (Bug#28278).
* Make garbage collection more conservativePaul Eggert2017-08-291-132/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for a pointer anywhere within the object, as opposed to just the start of the object. This is needed for gcc -Os -flto on x86-64 (Bug#28213). This change means that the garbage collector is more conservative, and will incorrectly keep objects that it does not need to, but that is better than incorrectly discarding objects that should be kept. * src/alloc.c (ADVANCE, VINDEX): Now functions, not macros; this is easier to debug. (setup_on_free_list): Rename from SETUP_ON_FREE_LIST. Now a function with two args, not a macro with three. All callers changed. (live_string_holding, live_cons_holding, live_symbol_holding) (live_misc_holding, live_vector_holding, live_buffer_holding): New functions, which check for any object containing the addressed byte, not just for an object at the given address. (live_string_p, live_cons_p, live_symbol_p, live_misc_p) (live_vector_p, live_buffer_p): Redefine in terms of the new functions. (live_float_p): Refactor slightly to match the new functions. (mark_maybe_object, mark_maybe_pointer): Use the new functions. Don’t bother checking mark bits, as mark_object already does that, and omitting the checks here simplifies the code. Although mark_maybe_object can continue to insist that tagged pointers still address the start of the object, mark_maybe_pointer now is more conservative and checks for pointers anywhere into an object.
* Improve stack-top heuristicPaul Eggert2017-08-291-5/+15
| | | | | | | | | | | | | | This is needed for gcc -Os -flto on x86-64; otherwise, GC misses part of the stack when scanning for heap roots, causing Emacs to crash later (Bug#28213). The problem is that Emacs's hack for getting an address near the stack top does not work when link-time optimization moves stack variables around. * configure.ac (HAVE___BUILTIN_FRAME_ADDRESS): New macro. * lib-src/make-docfile.c (DEFUN_noinline): New constant. (write_globals, scan_c_stream): Support noinline. * src/alloc.c (NEAR_STACK_TOP): New macro. (SET_STACK_TOP_ADDRESS): Use it. (flush_stack_call_func, Fgarbage_collect): Now noinline.
* Align stack bottom properly.Paul Eggert2017-08-291-2/+5
| | | | | | This is needed for gcc -Os -flto on x86-64 (Bug#28213). * src/emacs.c (main): Align stack-bottom variable as a pointer, since mark_memory requires this.
* Avoid spinning waiting for git-gui.exe on WindowsEli Zaretskii2017-08-291-5/+10
| | | | | | * src/w32proc.c (waitpid): If GetExitCodeProcess returns STILL_ACTIVE, and we were called with WNOHANG, pretend that the process exited. (Bug#28268)
* Fix cross macOS version building (bug#28222)Alan Third2017-08-292-1/+11
| | | | | | * src/macfont.h (CGContextSetFontSmoothingStyle): Function declaration. * src/macfont.m (macfont_draw): Limit new code to macOS 10.8 and up.
* Enable thin font smoothing in macOS (bug#28222)Ben Bonfil2017-08-292-0/+10
| | | | | | | * src/nsterm.m (syms_of_nsterm): Define var ns-use-thin-smoothing. * src/macfont.m (macfont_draw): Use font smoothing. Copyright-paperwork-exempt: yes
* Avoid aborting in 'waitpid' on MS-WindowsEli Zaretskii2017-08-291-1/+5
| | | | | * src/w32proc.c (waitpid): Don't allow quitting if called with WNOHANG in OPTIONS. (Bug#28268)
* Simplify remove_slash_colonPaul Eggert2017-08-281-1/+1
| | | | | * src/process.c (remove_slash_colon): Simplify and avoid a special case for "/:" by itself.