aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Don’t assume -g3 in .gdbinitPaul Eggert2017-08-281-2/+15
| | | | | * src/.gdbinit (EMACS_INT_WIDTH, USE_LSB_TAG): Use reasonable defaults if not in the symbol table.
* Fix previous xterm.h change for non-gtk buildsGlenn Morris2017-08-271-0/+2
| | | | * src/xterm.h (GTK_CHECK_VERSION) [!USE_GTK]: Define it.
* Fix GdkSettings-related deprecation warningsPhilipp Stephani2017-08-271-0/+6
| | | | | | * src/gtkutil.c (xg_initialize): Don’t set deprecated and ignored gtk-menu-bar-accel setting in new versions of GTK+. Use g_object_set instead of deprecated gtk_settngs_set_string_property otherwise.
* Always use gtk_window_move in new versionsPhilipp Stephani2017-08-272-1/+8
| | | | | | | | | | | * src/gtkutil.c (my_log_handler): Don’t define in new versions of GTK+. (xg_set_geometry): Always use gtk_window_move in new versions of GTK+. * src/xterm.c (syms_of_xterm): Document that x-gtk-use-window-move is ignored. * lisp/subr.el (x-gtk-use-window-move): Make obsolete.
* Remove use of a deprecated GTK+ function in new versionsPhilipp Stephani2017-08-271-0/+4
| | | | | * src/gtkutil.c (xg_make_tool_item): Use gtk_widget_set_focus_on_click if available
* Stop using deprecated GdkScreen monitor functions in newer GDKPhilipp Stephani2017-08-271-3/+30
| | | | | * src/xfns.c (Fx_display_monitor_attributes_list): Use GdkMonitor objects instead of the deprecated GdkScreen functions in GDK 3.22+
* Use GdkSeat in new GDK versionsPhilipp Stephani2017-08-271-0/+5
| | | | | * src/gtkutil.c (xg_event_is_for_scrollbar): Use GdkSeat instead of GdkDeviceManager in GDK 3.20+
* * src/xterm.c (XTflash): Don’t use gdk_cairo_create in GDK 3.22+Philipp Stephani2017-08-271-0/+11
|
* Remove call of deprecated GDK functionPhilipp Stephani2017-08-271-7/+12
| | | | | * src/xterm.h (XSync): Don’t call gdk_window_process_all_updates in GDK 3.22 or later.
* Do not munge contents of local symbolic linksPaul Eggert2017-08-261-19/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | This lets Emacs deal with arbitrary local symlinks without mishandling their contents (Bug#28156). For example, (progn (shell-command "ln -fs '~' 'x'") (rename-file "x" "/tmp/x")) now consistently creates a symbolic link from '/tmp/x' to '~'. Formerly, it did that only if the working directory was on the same filesystem as /tmp; otherwise, it expanded the '~' to the user's home directory. * lisp/dired.el (dired-get-filename): Use files--name-absolute-system-p instead of rolling our own code. * lisp/files.el (files--name-absolute-system-p): New function. (file-truename, file-chase-links): Use it to avoid mishandling symlink contents that begin with ~. (copy-directory, move-file-to-trash): Use concat rather than expand-file-name, to avoid mishandling symlink contents that begin with ~. * src/fileio.c (Fmake_symbolic_link): Do not expand leading "~" in the target unless interactive. Strip leading "/:" if interactive. (emacs_readlinkat): Do not prepend "/:" to the link target if it starts with "/" and contains ":" before NUL. * test/src/fileio-tests.el (try-link): Rename from try-char, and accept a string instead of a char. All uses changed. (fileio-tests--symlink-failure): Also test leading ~, and "/:", to test the new behavior.
* Improve doc for file-name-absolute-p.Paul Eggert2017-08-261-2/+2
|
* Fix file-attributes race on GNU hostsPaul Eggert2017-08-253-25/+67
| | | | | | | | | | | | | * doc/lispref/files.texi (File Attributes): Document file-attributes atomicity. * etc/NEWS: Document the fix. * src/dired.c (file_attributes): New args DIRNAME and FILENAME, for diagnostics. All callers changed. On platforms like GNU/Linux that support O_PATH, fix a race condition in file-attributes and similar functions, so that these functions do not return nonsense if a directory entry is replaced while getting its attributes. On non-GNU platforms, do a better (though not perfect) job of detecting the race, and return nil if detected.
* Simplify expand_and_dir_to_filePaul Eggert2017-08-253-59/+30
| | | | | | * src/fileio.c (expand_and_dir_to_file): Simplify by omitting 2nd argument, since in practice it always has the default value. All callers changed. Prefer C99 style decls in nearby code.
* ; * src/w32.c (faccessat): Fix last change. (Bug#28207)Eli Zaretskii2017-08-251-1/+1
|
* Fix file-name completion on network sharesEli Zaretskii2017-08-251-1/+3
| | | | | * src/w32.c (faccessat): Don't assume that F_OK is non-zero. (Bug#28207)
* Prefer ‘double’ for FP temps in xterm.cPaul Eggert2017-08-241-23/+29
| | | | | | | * src/xterm.c (xm_scroll_callback, xaw_jump_callback) (x_set_toolkit_scroll_bar_thumb) (x_set_toolkit_horizontal_scroll_bar_thumb): Prefer ‘double’ to ‘float’ for individual local floating-point temporaries.
* Minor improvements for tramp-interrupt-process, documentationMichael Albinus2017-08-241-2/+2
| | | | | | | | | | | | | * doc/lispref/processes.texi (Signals to Processes): * etc/NEWS: Document interrupt-process-functions. * lisp/net/tramp.el (tramp-interrupt-process): Test also for `process-live-p'. * src/process.c (Vinterrupt_process_functions): Fix docstring. * test/lisp/net/tramp-tests.el (tramp-test28-interrupt-process): Extend test.
* Fix a comment whitespace typo.Reuben Thomas2017-08-231-1/+1
| | | | | src/fileio.c: A double space was added after "..", used in a code example. Make it a single space.