aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix visual-order cursor movement when lines are truncatedEli Zaretskii2015-07-181-21/+10
| | | | | | | | * src/xdisp.c (Fmove_point_visually): When lines are truncated, simulate display in a window of infinite width, to allow move_it_* functions reach positions outside of normal window dimensions. Remove code that tried to handle a subset of these situations by manual iteration of buffer text. (Bug#17777)
* Fix scrolling backwards on TTY frames under scroll-conservativelyEli Zaretskii2015-07-181-1/+1
| | | | | * src/xdisp.c (move_it_vertically_backward): Fix off-by-one error in moving backwards on TTY frames. (Bug#21080)
* Fix hang with large yanks This should fix the bug fixed by MikePaul Eggert2015-07-174-12/+2
| | | | | | | | | | | | | | | | | | | | Crowe's patch in: https://lists.gnu.org/archive/html/emacs-devel/2015-07/msg00106.html A problem in this area has been reported by several users; see Bug#16737, Bug#17101, Bug#17026, Bug#17172, Bug#19320, Bug#20283. This fix differs from Mike Crowe's patch in that it should avoid a race condition that could lose SIGIO signals. ignore_sigio dates back to the 1980s when some platforms couldn't block signals, and could only ignore them, which led to races when signals arrived while being ignored. We shouldn't have to worry about those old platforms now. * src/dispextern.h, src/sysdep.c (ignore_sigio): Remove. * src/emacs.c (shut_down_emacs): Don't call ignore_sigio; unrequest_sigio should suffice. * src/keyboard.c (kbd_buffer_store_buffered_event): Use unrequest_sigio, not ignore_sigio. (kbd_buffer_get_event): Call request_sigio when getting the ball rolling again.
* Better heuristic for C stack overflowPaul Eggert2015-07-163-37/+63
| | | | | | | | | | | | | | | | Improve the heuristic for distinguishing stack overflows from other SIGSEGV causes (Bug#21004). Corinna Vinschen explained that the getrlimit method wasn't portable to Cygwin; see: https://www.cygwin.com/ml/cygwin/2015-07/msg00092.html Corinna suggested pthread_getattr_np but this also has problems. Instead, replace the low-level system stuff with a simple heuristic based on known good stack addresses. * src/eval.c, src/lisp.h (near_C_stack_top): New function. * src/sysdep.c: Don't include <sys/resource.h>. (stack_direction): Remove. All uses removed. (stack_overflow): New function. (handle_sigsegv): Use it instead of incorrect getrlimit heuristic. Make SEGV fatal in non-main threads.
* Port to stricter C99Paul Eggert2015-07-141-2/+2
| | | | | * src/keyboard.h (kbd_buffer_store_event_hold): Don't return a void expression.
* Clear gcprolist etc. after stack overflowPaul Eggert2015-07-142-2/+2
| | | | | | | | After stack overflow, command_loop calls init_eval, and this needs to clear gcprolist and byte_stack_list (Bug#20996). * src/alloc.c (init_alloc): Move gcprolist and byte_stack_list initialization from here ... * src/eval.c (init_eval): ... to here.
* Avoid deprecated enums in mac-ct font backend driverYAMAMOTO Mitsuharu2015-07-131-5/+15
| | | | | | * src/macfont.m (mac_font_copy_default_descriptors_for_language) (mac_ctfont_get_advance_width_for_glyph) (mac_ctfont_get_bounding_rect_for_glyph): Avoid deprecated enums.
* Cache font family in mac-ct font backend driverYAMAMOTO Mitsuharu2015-07-131-35/+166
| | | | | | | | | | | | | | | * src/macfont.m (macfont_family_cache): New variable. (syms_of_macfont): Initialize it. (macfont_available_families_cache): New variable. (macfont_invalidate_family_cache, macfont_get_family_cache_if_present) (macfont_set_family_cache, macfont_invalidate_available_families_cache) (macfont_handle_font_change_notification) (macfont_init_font_change_handler) (macfont_copy_available_families_cache): New functions. (macfont_create_family_with_symbol): Use font family caches. (macfont_list, macfont_list_family): Use macfont_copy_available_families_cache instead of mac_font_create_available_families.
* * src/w32heap.c (DUMPED_HEAP_SIZE): Bump to 20MB.Andy Moreton2015-07-101-1/+1
| | | | Copyright-paperwork-exempt: yes
* * src/macfont.m (macfont_list): Ignore font families lacking font descriptors.YAMAMOTO Mitsuharu2015-07-101-1/+1
|
* Have `x-show-tip' handle `right' and `bottom' frame parameters.Martin Rudalics2015-07-073-31/+67
| | | | | | | * src/nsfns.m (compute_tip_xy, Fx_show_tip) * src/w32fns.c (compute_tip_xy, Fx_show_tip) * src/xfns.c (compute_tip_xy, Fx_show_tip): Allow aligning tooltips also via `right' and `bottom' frame parameters.
* * src/sysdep.c (handle_sigsegv) [CYGWIN]: Increase STACK_DANGER_ZONEKen Brown2015-07-061-0/+7
|
* * src/emacs.c (main): Don't increase the stack size on CygwinKen Brown2015-07-061-5/+8
|
* ; Spelling fixesPaul Eggert2015-07-051-1/+1
|
* Avoid duplicate calls to current_timespecPaul Eggert2015-07-051-15/+29
| | | | | * src/process.c (wait_reading_process_output): Cache current_timespec results as long as we're not waiting.
* Avoid returning early reading process output due to SIGIOIan Kelling2015-07-051-2/+8
| | | | | | * src/process.c (wait_reading_process_output): Extend the behavior of not breaking due to not finding output when a timer has lowered the timeout to include when SIGIO lowers the timeout.
* Don't return as fast reading any process outputIan Kelling2015-07-051-23/+43
| | | | | | | * src/process.c (wait_reading_process_output): The patch for Bug#17647 returns too fast sometimes when reading from any processes. Revert part of it, and limit the timeout more sensibly (Bug#20978).
* Refactor timeouts in wait_reading_process_outputIan Kelling2015-07-051-67/+42
| | | | | | * src/process.c (wait_reading_process_output): Simplify timeouts with an enum. Remove a redundant condition. (Bug#20978)
* ; Rename local var nsecs to adaptive_nsecsIan Kelling2015-07-051-6/+6
| | | | | | * src/process.c (wait_reading_process_output): Rename inner nsecs to adaptive_nsecs. There is already an nsecs, and this function is confusing enough (Bug#20978).
* ; Rename local var to match function nameIan Kelling2015-07-051-12/+13
| | | | | | | * src/process.c (wait_reading_process_output, status_notify): Previously the function wait_reading_process_input was renamed to the more logical wait_reading_process_output. Make its local variables consistent with that change (Bug#20978).
* Remove ADAPTIVE_READ_BUFFERING ifdefIan Kelling2015-07-051-25/+0
| | | | | | | | | | * src/process.c (make-process, make-pipe-process, deactivate_process) (wait_reading_process_output, read_process_output, send_process) (init_process_emacs): ifdef ADAPTIVE_READ_BUFFERING was originally added in case there was an operating system in which it was not useful. That was 11 years ago and it hasn't happened. Make development easier by not considering the effect of changes on a theoretical OS where this is disabled (Bug#20978).
* ; Minor cleanup of wait_reading_process_outputIan Kelling2015-07-051-5/+2
| | | | | * src/process.c (wait_reading_process_output): Simplify logic. Fix DOS version comments (Bug#20978).
* accept-process-output fixIan Kelling2015-07-051-1/+2
| | | | | This is a followon to the fix for Bug#17647 (Bug#20976). * src/process.c (status_notify): Fix too high return in some cases.
* Fix mouse pointer on w32 when a menu is activeEli Zaretskii2015-07-041-1/+3
| | | | | | * src/w32fns.c (w32_wnd_proc): Don't change the mouse pointer shape while a menu is in use. This started happening since we now send WM_EMACS_SHOWCURSOR messages when the mouse moves.
* Fix processing of alpha parameter for Windows tip frames (Bug#17344)Martin Rudalics2015-07-041-2/+3
| | | | | * src/w32fns.c (x_create_tip_frame): Fix processing alpha parameter. (Bug#17344)
* ;* src/bidi.c (bpa_stack_entry): Update commentary for Unicode 8.0.Eli Zaretskii2015-07-021-1/+1
|
* Be more tolerant to fonts named "Foobar-12"Eli Zaretskii2015-07-011-4/+6
| | | | | | | | | | | * src/frame.c (x_set_font): If font_spec_from_name returns nil, don't barf; instead, request a new fontset to be generated. This avoids unnecessarily rejecting fonts named against XLFD rules. See http://lists.gnu.org/archive/html/help-emacs-windows/2015-06/msg00001.html, for the description of the original problem. * lisp/faces.el (set-face-attribute): Don't be fooled too easily by a hyphen in a font's name.
* Fix value of posn-at-pont in R2L linesEli Zaretskii2015-07-011-3/+8
| | | | | | * src/keyboard.c (Fposn_at_x_y, Fposn_at_point): Allow X pixel coordinate of -1, for a newline in a right-to-left line that overflowed into the left fringe.
* Spelling fixesPaul Eggert2015-06-301-1/+1
|
* In strings, prefer plain ` and ' to \` and \'Paul Eggert2015-06-302-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * lisp/allout.el (allout-insert-listified): * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): * lisp/ls-lisp.el (ls-lisp-UCA-like-collation) (ls-lisp-string-lessp): * lisp/menu-bar.el (menu-bar-open): * lisp/obsolete/otodo-mode.el (todo-top-priorities): * lisp/progmodes/compile.el (compile): * lisp/progmodes/etags.el (tags-loop-scan): * lisp/progmodes/make-mode.el (makefile-browser-insert-continuation): * lisp/subr.el (posn-actual-col-row): * lisp/term/pc-win.el (x-list-fonts): * lisp/textmodes/texinfmt.el (texinfmt-version): * lisp/textmodes/texnfo-upd.el (texinfo-master-menu): * lisp/time.el (display-time-world-list): * lisp/tmm.el (tmm-menubar): * src/buffer.c (syms_of_buffer): * src/fileio.c (syms_of_fileio): Omit unnecessary and confusing backslash before quote. * lisp/erc/erc.el (erc-cmd-LASTLOG): * lisp/progmodes/flymake.el (flymake-fix-file-name): * lisp/progmodes/vhdl-mode.el (vhdl-in-extended-identifier-p): Fix string that was intended to escape a backslash and not a quote.
* ; * src/doc.c: Add a 'coding' cookie.Eli Zaretskii2015-06-301-1/+1
|
* Make sure sleep-for always delays for as long as it's toldEli Zaretskii2015-06-301-2/+10
| | | | | | * src/dispnew.c (Fsleep_for): Call wait_reading_process_output in a loop, to ensure we always wait exactly the required amount of time. (Bug#15990)
* Fix pointer signedness glitchPaul Eggert2015-06-301-1/+1
| | | | * src/font.c (font_load_for_lface): Use SSDATA, not SDATA.
* Don't block changes in mouse pointer inside 'track-mouse'Eli Zaretskii2015-06-301-1/+3
| | | | | | | | | | | | | | | | | * etc/NEWS: * doc/lispref/frames.texi (Mouse Tracking): Document the special effect of setting 'track-mouse' to 'dragging'. * lisp/textmodes/artist.el (artist-mouse-draw-continously): * lisp/ruler-mode.el (ruler-mode-mouse-drag-any-column-iteration): * lisp/mouse-drag.el (mouse-drag-throw): * lisp/mouse.el (mouse-drag-line): Set 'track-mouse' to 'dragging' to avoid changes in the shape of the mouse pointer. * src/xdisp.c (define_frame_cursor1): Don't change the mouse pointer shape when do_mouse_tracking has the value of 'dragging', not just any non-nil value. (Bug#20934) (syms_of_xdisp): DEFSYM 'dragging'.
* Allow font names that end in "-NN", where NN is a numberEli Zaretskii2015-06-291-0/+32
| | | | | | | * src/font.c (font_load_for_lface): If the font-spec didn't match any available fonts, try again without interpreting trailing "-NN" as the font size. For the description of the original problem, see http://lists.gnu.org/archive/html/help-emacs-windows/2015-06/msg00001.html
* .gdbinit followup to changes in !USE_LSB_TAGEli Zaretskii2015-06-291-3/+0
| | | | | * src/.gdbinit (xgetsym): Don't left-shift $ptr even under !USE_LSB_TAG, as Emacs no longer does.
* ; * src/w32proc.c (w32_executable_type): Fix a typo in a comment.Eli Zaretskii2015-06-281-1/+1
|
* Add a new function w32-application-typeEli Zaretskii2015-06-271-15/+89
| | | | | * src/w32proc.c (Fw32_application_type): New function. ; * etc/NEWS: Mention w32-application-type.
* Avoid error in TLS connections due to incorrect formatEli Zaretskii2015-06-271-1/+1
| | | | | | * src/gnutls.c (Fgnutls_boot): Use the %x conversion specifier in the call to 'error', instead of the unsupported %u. Reported by lo2net <fangtao0901@gmail.com>. (Bug#20908)
* Fix invisible mouse pointers on Windows.Eli Zaretskii2015-06-262-12/+27
| | | | | | | | | * src/w32fns.c: Include windowsx.h. (w32_wnd_proc): If the mouse moved and the mouse pointer is invisible, make it visible again even when the main (Lisp) thread is busy. * src/w32term.c (w32_toggle_invisible_pointer): Rather then garbaging the frame have the input thread call SetCursor.
* Provide invisible mouse pointers on Windows. (Bug#6105) (Bug#12922)Martin Rudalics2015-06-262-7/+41
| | | | | | | | | | * src/w32fns.c (w32_wnd_proc): Handle f->pointer_invisible for WM_SETCURSOR and WM_EMACS_SETCURSOR cases. * src/w32term.c (w32_hide_hourglass): Handle f->pointer_invisible. (w32_toggle_invisible_pointer): New function. (w32_create_terminal): Add w32_toggle_invisible_pointer as toggle_invisible_pointer_hook for this terminal.
* Fix submake dependency bug with .h filesPaul Eggert2015-06-251-1/+1
| | | | | | | * src/Makefile.in ($(libsrc)/make-docfile$(EXEEXT)): Depend on $(lib)/libgnu.a, so that we build $(lib)/*/*.h before the submake in $(libsrc) would spin off a subsubmake for $(lib) in parallel with our submake for $(lib) (Bug#20894).
* Translate undisplayable ‘ to `Paul Eggert2015-06-251-3/+3
| | | | | | | | | * doc/lispref/help.texi (Keys in Documentation): * lisp/international/mule-cmds.el (set-locale-environment): * lisp/term/w32console.el (terminal-init-w32console): * src/doc.c (Fsubstitute_command_keys, Vhelp_quote_translation): If ‘ is not displayable, transliterate it to `, not to '. See: http://lists.gnu.org/archive/html/emacs-devel/2015-06/msg00542.html
* Fix C99 incompatibilities in Cairo codePaul Eggert2015-06-252-2/+2
| | | | | | * src/image.c (xpm_load) [USE_CAIRO]: * src/xterm.c (x_cr_accumulate_data) [USE_CAIRO]: Fix pointer signedness problem.
* Get ‘./configure; make -C src emacs’ to workPaul Eggert2015-06-241-1/+1
| | | | | | Without this fix, lib/fcntl.h isn't built in time (Bug#20894). * lib-src/Makefile.in (../lib/libgnu.a): * src/Makefile.in ($(lib)/libgnu.a): Build all, not libgnu.a.
* Fix GC bugs --with-wide-int and Qnil == 0Paul Eggert2015-06-242-58/+12
| | | | | | | | | | | | | | | | | | | | | | | | Use the same alignment for the !USE_LSB_TAG case as for the more-typical USE_LSB_TAG case. The attempt to support arbitrary alignments with !USE_LSB_TAG had subtle bugs in garbage collection once we changed the representation of symbols so that Qnil == 0. Problem reported by Eli Zaretskii (Bug#20862). * src/alloc.c (XMALLOC_HEADER_ALIGNMENT) [XMALLOC_OVERRUN_CHECK]: * src/alloc.c (vector_alignment, union aligned_Lisp_Symbol) (union aligned_Lisp_Misc, maybe_lisp_pointer, pure_alloc): Use same alignment for !USE_LSB_TAG as for USE_LSB_TAG. * src/alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): Remove. This optimization in the !USE_LSB_TAG case is no longer valid when symbols are represented via offsets. Change the only use to assume that pointers might hide in objects. * src/lisp.h (alignas) [!USE_LSB_TAG]: Require support in this case, too. (TAG_SYMOFFSET, XSYMBOL) [!USE_LSB_TAG]: Do not shift the offset. This is OK, because the !USE_LSB_TAG case now applies only when Lisp_Object is wider than void *, so there's no longer any need to shift the offset. Not shifting the offset means that symbol representations have the same alignment as pointers, which the GC assumes.
* * src/keyboard.h (kbd_buffer_store_event_hold): Remove unused local.Paul Eggert2015-06-231-1/+0
|
* Port selection info fix to clangPaul Eggert2015-06-231-1/+2
| | | | | * src/keyboard.h (kbd_buffer_store_event_hold): Don't assume C11 semantics for alignof (Bug#20756).
* Fix bug that munged selection infoPaul Eggert2015-06-236-122/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some optimizing C compilers, copying a structure did not copy the padding bytes between elements, and the type punning between struct input_data and struct selection_input_data did not work. Change the C code to use a proper union type instead. Problem reported by YAMAMOTO Mitsuharu (Bug#20756). * src/keyboard.c (kbd_buffer, kbd_fetch_ptr, kbd_store_ptr) (readable_events, discard_mouse_events, kbd_buffer_events_waiting) (kbd_buffer_get_event, process_special_events, stuff_buffered_input) (mark_kboards): Use union buffered_input_event, not struct input_event. (clear_event, deliver_input_available_signal, process_special_events): Remove unnecessary forward decls. (kbd_buffer_store_buffered_event): New function, mostly just the old kbd_buffer_store_event_hold, except its argument is of type union buffered_input_event, not struct input_event. (kbd_buffer_unget_event): Define only if HAVE_X11, since it's not needed otherwise. Argument is now of type struct selection_input_event *, not struct input_event *. All callers changed. (clear_event): Arg is now of type union buffered_input_event *, not struct input_event *. All callers changed. * src/keyboard.h [HAVE_X11]: Include "xterm.h". (union buffered_input_event): New type. (kbd_buffer_store_event_hold): Now an inline function, defined here. * src/termhooks.h (EVENT_KIND_WIDTH): New constant. (struct input_event): Use it. * src/xselect.c (struct selection_event_queue): Make elements be of type struct selection_input_event, not struct input_event. (selection_input_event_equal): New static function. (x_queue_event): Use it. (x_queue_event, x_decline_selection_request) (x_selection_current_request, x_reply_selection_request) (x_handle_selection_request, x_handle_selection_clear) (x_handle_selection_event): Use struct selection_input_event, not struct input_event. All callers changed. (x_convert_selection): Omit unused first arg. All callers changed. (Fx_disown_selection_internal): Omit unnecessary union. * src/xterm.c (handle_one_xevent): Use new union buffered_input_event rather than rolling our own equivalent. Prefer sie.kind when setting up that kind of structure. Call kbd_buffer_store_buffered_event, not kbd_buffer_store_event_hold. * src/xterm.h (struct selection_input_event: Use EVENT_KIND_WIDTH. (SELECTION_EVENT_DISPLAY, SELECTION_EVENT_DPYINFO) (SELECTION_EVENT_REQUESTOR, SELECTION_EVENT_SELECTION) (SELECTION_EVENT_TARGET, SELECTION_EVENT_PROPERTY) (SELECTION_EVENT_TIME, x_handle_selection_event): Arg is now of type struct selection_input_event *) not struct input_event *. All callers changed.
* Check for an input event before showing a dialog box. (Bug#20813)Glenn Morris2015-06-231-1/+1
| | | | | | * lisp/subr.el (y-or-n-p): * src/fns.c (Fyes_or_no_p): Check last-input-event as well as last-nonmenu-event.