aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Tweak exec-path in uninstalled caseGlenn Morris2015-04-201-2/+2
| | | | | * src/callproc.c (init_callproc): If running uninstalled, do not include eventual installation libexec directory in exec-path.
* Use bool for boolean in textprop.c, undo.cPaul Eggert2015-04-193-66/+61
| | | | | | | | | | | | | | | | * src/textprop.c (soft, hard): Now constants instead of macros. (validate_plist): Rewrite to avoid need for boolean local. (interval_has_all_properties, interval_has_some_properties) (interval_has_some_properties_list, add_properties) (remove_properties, get_char_property_and_overlay) (Fnext_single_char_property_change) (Fprevious_single_char_property_change, add_text_properties_1) (Fremove_text_properties, Fremove_list_of_text_properties) (copy_text_properties): * src/tparam.c (tparam1): * src/undo.c (record_change, record_property_change) (syms_of_undo): Use 'true' and 'false' for booleans.
* * src/widget.c (set_frame_size): Prefer 'int' to 'unsigned'Paul Eggert2015-04-191-9/+9
| | | | where either will do.
* Refactor low-level printing for simplicityPaul Eggert2015-04-193-271/+211
| | | | | | | | | | | | | | | | | | | * src/print.c (PRINTDECLARE): Remove. Move its contents into PRINTPREPARE; doable now that we assume C99. All callers changed. (PRINTCHAR): Remove, as it adds more mystery than clarity. All callers changed. (strout): Assume that caller computes length. All callers changed. (print_c_string): New function. (write_string, write_string_1): Compute length instead of asking the caller to compute it. All callers changed. (write_string): Simplify by using write_string_1. (write_string_1): Simplify by using print_c_string. (Fterpri): Compute default val more clearly. (Fprin1_to_string, print_object): Assume C99 to avoid unnecessary nesting. (print_object): Prefer print_c_string to multiple printchar, or to calling strout with -1 length. Coalesce into sprintf when this is easy.
* ; Convert ChangeLog history files to "Bug#NNNN"Paul Eggert2015-04-181-6/+6
|
* '[:graph:]' now excludes whitespace, not just ' 'Paul Eggert2015-04-152-10/+17
| | | | | | | | | * doc/lispref/searching.texi (Char Classes): * lisp/emacs-lisp/rx.el (rx): Document [:graph:] to be [:print:] sans whitespace (not sans space). * src/character.c (graphicp): Exclude all Unicode whitespace chars, not just space. * src/regex.c (ISGRAPH): Exclude U+00A0 (NO-BREAK SPACE).
* * src/lread.c (intern_1): Make sure we'd find the symbol we addStefan Monnier2015-04-152-3/+6
| | | | | | Fixes: debbugs:20334 * src/xfaces.c (resolve_face_name): Don't use `intern' with Lisp_Strings.
* Make [:graph:] act like [:print:] sans spacePaul Eggert2015-04-153-4/+17
| | | | | | | | | | | | | | | | | | In POSIX [[:print:]] is equivalent to [ [:graph:]], so change [:graph:] so that it matches everything that [:print:] does, except for space. * doc/lispref/searching.texi (Char Classes): * etc/NEWS: * lisp/emacs-lisp/rx.el (rx): Document [:graph:] to be [:print:] sans ' '. * src/character.c, src/character.h (graphicp): New function. * src/regex.c (ISGRAPH) [emacs]: Use it. (BIT_GRAPH): New macro. (BIT_PRINT): Increase to 0x200, to make room for BIT_GRAPH. (re_wctype_to_bit) [! WIDE_CHAR_SUPPORT]: Return BIT_GRAPH for RECC_GRAPH. (re_match_2_internal) [emacs]: Use ISGRAPH if BIT_GRAPH, and ISPRINT if BIT_PRINT.
* Make [:print:] support non-ASCII characters correctlyEli Zaretskii2015-04-143-3/+23
| | | | | | | | | | | | | | | | * src/regex.c (ISPRINT): Call 'printablep' for multibyte characters. (BIT_PRINT): New bit mask. (re_wctype_to_bit): Return BIT_PRINT for RECC_PRINT. * src/character.c (printablep): New function. * src/character.h (printablep): Add prototype. * lisp/emacs-lisp/rx.el (rx): Doc fix: document the new behavior of 'print', 'alnum', and 'alphabetic'. * doc/lispref/searching.texi (Char Classes): Document the new behavior of [:print:]. * etc/NEWS: Mention the new behavior of [:print:].
* Assume C89 offsetof in xterm.c, xlwmenu.cPaul Eggert2015-04-141-2/+2
| | | | | | * lwlib/xlwmenu.c (offset): * src/xterm.c (cvt_string_to_pixel_args): Use offsetof, not XtOffset.
* Assume C89 offsetof in widget.cPaul Eggert2015-04-141-4/+1
| | | | | * src/widget.c (XtOffset): Remove; no longer needed. (offset): Implement via offsetof instead of via pre-C89 XtOffset hack.
* Fix think-o in previous patchPaul Eggert2015-04-141-8/+10
| | | | | * src/window.c (count_windows, get_leaf_windows): Don't optimize count_windows incorrectly.
* Avoid some int overflows in window.cPaul Eggert2015-04-133-64/+56
| | | | | | | | | | | | | | | | | | | | | | * src/print.c (print_object): * src/window.c (sequence_number): * src/window.h (struct window.sequence_number): Don't assume window sequence number fits in int. * src/window.c (window_select_count): * src/window.h (struct window.use_time, window_select_count): Don't assume window use time fits in int. * src/window.c (Fsplit_window_internal): Don't assume user-supplied integer, or sum, fits in int. (Fset_window_configuration, count_windows, get_leaf_windows) (save_window_save, Fcurrent_window_configuration): Use ptrdiff_t for object counts. (Fset_window_configuration): Omit unused local 'n'. (count_windows): Simplify by writing in terms of get_leaf_windows. (get_leaf_windows): Don't store through FLAT if it's null. (extract_dimension): New static function. (set_window_margins, set_window_fringes, set_window_scroll_bars): Use it to avoid undefined behavior when converting user-supplied integer to 'int'.
* Collapse successive char deletions in the undo logStefan Monnier2015-04-133-41/+52
| | | | | | | | * src/cmds.c (remove_excessive_undo_boundaries): New function, extracted from Fself_insert_command. (Fdelete_char, Fself_insert_command): Use it. * src/fileio.c (Fmake_symbolic_link): Rename arg to `target'. * src/keyboard.c (syms_of_keyboard): `top-level' shouldn't be special.
* * src/*.c: Set deactivate_mark buffer-locallyStefan Monnier2015-04-132-2/+2
| | | | | | | | Fixes: debbugs:20260 * src/insdel.c (prepare_to_modify_buffer_1): * src/fileio.c (Finsert_file_contents): Set deactivate_mark buffer-locally.
* Use bool for boolean in window.cPaul Eggert2015-04-112-266/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/window.c: Omit unnecessary static function decls. (adjust_window_count, select_window, Fselect_window) (window_body_width, Fwindow_body_height, Fwindow_body_width) (set_window_hscroll, check_window_containing, Fwindow_at) (Fwindow_end, Fset_window_start, Fpos_visible_in_window_p) (unshow_buffer, replace_window, recombine_windows) (add_window_to_list, candidate_window_p, next_window) (Fnext_window, Fprevious_window, window_loop, check_all_windows) (Fget_buffer_window, Fdelete_other_windows_internal) (replace_buffer_in_windows_safely, set_window_buffer) (Fset_window_buffer, Fforce_window_update) (temp_output_buffer_show, make_parent_window) (window_resize_check, window_resize_apply, Fwindow_resize_apply) (resize_frame_windows, Fsplit_window_internal) (Fdelete_window_internal, grow_mini_window, shrink_mini_window) (Fresize_mini_window_internal, mark_window_cursors_off) (window_scroll, window_scroll_pixel_based) (window_scroll_line_based, scroll_command, Fscroll_other_window) (Fscroll_left, Fscroll_right, displayed_window_lines, Frecenter) (Fmove_to_window_line, Fset_window_configuration) (delete_all_child_windows, apply_window_adjustment) (set_window_fringes, set_window_scroll_bars) (Fset_window_vscroll, foreach_window, foreach_window_1) (compare_window_configurations, Fcompare_window_configurations): Prefer 'bool', 'true', and 'false' for booleans. * src/window.h (WINDOW_MODE_LINE_LINES) (WINDOW_HEADER_LINE_LINES): Omit unnecessary "!!" on bool value.
* Support GnuTLS v3.4 and later on MS-WindowsChris Zheng2015-04-111-0/+10
| | | | | | | | | | * src/gnutls.c (syms_of_gnutls) <libgnutls-version>: New DEFSYM. * lisp/term/w32-win.el (dynamic-library-alist): Determine which GnuTLS DLL to load according to value of libgnutls-version. Fixes: bug#20294 Copyright-paperwork-exempt: yes
* Respect more keyword args in `make-process'Daiki Ueno2015-04-111-2/+2
| | | | | * process.c (Fmake_process): Respect `:sentinel' and `:filter' keywords as documented.
* Fix problems found by --enable-gcc-warningsPaul Eggert2015-04-101-6/+5
| | | | | * src/process.c (create_process, Fmake_pipe_process) (Fmake_network_process): Omit unused locals.
* Add facility to collect stderr of async subprocessDaiki Ueno2015-04-114-15/+305
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32.h (register_aux_fd): New function declaration. * src/w32.c (register_aux_fd): New function. * src/process.h (struct Lisp_Process): New member stderrproc. * src/process.c (PIPECONN_P): New macro. (PIPECONN1_P): New macro. (Fdelete_process, Fprocess_status, Fset_process_buffer) (Fset_process_filter, Fset_process_sentinel, Fstop_process) (Fcontinue_process): Handle pipe process specially. (create_process): Respect p->stderrproc. (Fmake_pipe_process): New function. (Fmake_process): Add new keyword argument :stderr. (wait_reading_process_output): Specially handle a pipe process when it gets an EOF. (syms_of_process): Register Qpipe and Smake_pipe_process. * doc/lispref/processes.texi (Asynchronous Processes): Document `make-pipe-process' and `:stderr' keyword of `make-process'. * lisp/subr.el (start-process): Suggest to use `make-process' handle standard error separately. * test/automated/process-tests.el (process-test-stderr-buffer) (process-test-stderr-filter): New tests. * etc/NEWS: Mention new process type `pipe' and its usage with the `:stderr' keyword of `make-process'.
* Fix 'recenter' when visual-line-mode is turned onEli Zaretskii2015-04-101-10/+31
| | | | | | | | | | | | * src/window.c (Frecenter): Use the same code for GUI and TTY frames alike; use vmotion only for "initial" frames. This is because vmotion doesn't support visual-line-mode. Rewrite the 'iarg >= 0' case to use move_it_* functions instead of using vmotion, for the same reason. Fix the clipping of the argument value to support scroll-margin in all cases and avoid unwarranted recentering. Reported by Milan Stanojević <milanst@gmail.com> in http://lists.gnu.org/archive/html/help-gnu-emacs/2015-04/msg00092.html, which see.
* * src/eval.c (init_eval_once): Bump max_lisp_eval_depth to 800Eli Zaretskii2015-04-081-1/+1
| | | | Fixes: bug#17517
* Rename ChangeLogs for gitlog-to-changelogPaul Eggert2015-04-071-0/+0
| | | | | | | | | | | | | This patch was implemented via the following shell commands: find * -name ChangeLog | sed 's,.*,git mv & &.1, s, lisp/ChangeLog\.1$, lisp/ChangeLog.17, s, lisp/erc/ChangeLog\.1$, lisp/erc/ChangeLog.09, s, lisp/gnus/ChangeLog\.1$, lisp/gnus/ChangeLog.3, s, lisp/mh-e/ChangeLog\.1$, lisp/mh-e/ChangeLog.2, s, src/ChangeLog\.1$, src/ChangeLog.13,' | sh git commit -am"[this commit message]"
* src/w32proc.c: Fix typos in description of subprocess support.Eli Zaretskii2015-04-061-7/+7
|
* Avoid segfaults on MS-Windows when invoking subprocesses (Bug#20264)Koichi Arakawa2015-04-062-10/+17
| | | | | src/w32proc.c (w32_executable_type): Look for the DLL name in the correct section. This avoids segfaults with some executables.
* Close a timing hole in selections.Jan D2015-04-042-5/+32
| | | | | | | | | | | Fixes: debbugs:16737 * src/xselect.c (x_reply_selection_request) (receive_incremental_selection): Call set_property_change_object inside block_input. (wait_for_property_change): Move set property_change_reply(_object) outside of this function. (set_property_change_object): New function.
* Don't optimized away tool tip redraw, may lead to corrupted text.Jan D2015-04-032-5/+17
| | | | | * src/xterm.c (handle_one_xevent): Always redraw tool tips on MapNotify. Update tool tip frame sizes on ConfigureNotify.
* Avoid crashing with key-chord (Bug#20223)Eli Zaretskii2015-03-312-0/+17
| | | | | src/keyboard.c (read_key_sequence): Don't let this_single_command_key_start become negative.
* Merge from origin/emacs-24Paul Eggert2015-03-294-0/+149
|\ | | | | | | | | | | | | | | | | | | | | 4d2e7e1 Fixes: debbugs:19175 2e0cfcc Fix the preamble text of the DIR file we install (Bug#20213) 22ece83 src/w32proc.c: Describe in a comment w32 subprocess implementation. Conflicts: ChangeLog src/ChangeLog src/xterm.c
| * Fixes: debbugs:19175Jan D2015-03-293-1/+19
| | | | | | | | | | | | * gtkutil.c (xg_display_open): * xterm.c (x_display_ok, x_term_init): Block SIGIO when opening a display.
| * src/w32proc.c: Describe in a comment w32 subprocess implementation.Eli Zaretskii2015-03-281-0/+132
| |
| * Bump version to 24.5 for the release-candidateemacs-24.5-rc1Nicolas Petton2015-03-271-0/+4
| |
* | Merge from origin/emacs-24Paul Eggert2015-03-292-0/+7
|\ \ | |/ | | | | | | | | | | | | | | | | | | 5e0314f * smie.el (smie*ward-sexp-command): Don't pretend the arg is optional 13cf575 Don't round up scroll bar width with GTK3 (Bug#20182). 921dd0d * doc/lispref/objects.texi (Equality Predicates): Fix typo in example. Conflicts: doc/lispref/ChangeLog lisp/ChangeLog src/ChangeLog
| * Don't round up scroll bar width with GTK3 (Bug#20182).Martin Rudalics2015-03-252-0/+7
| | | | | | | | | | * gtkutil.c (update_theme_scrollbar_width): Don't round up scroll bar width with GTK3 (Bug#20182).
| * ChangeLog fixGlenn Morris2015-03-221-2/+2
| | | | | | | | | | No need to merge to trunk, since it corrects a backported entry that should not appear in trunk.
| * Backport 20156 fix (stack corruption)Jan D2015-03-222-2/+7
| | | | | | | | | | | | | | Fixes: debbugs:20156 * src/fontset.c (fontset_pattern_regexp): Backport: Replace + 1 with + 3 in alloca (tiny change)
* | Don't send bad SM messages.Jan D2015-03-282-24/+27
| | | | | | | | | | * xsmfns.c (smc_save_yourself_CB): Return if Vinvocation_name or user_login_name are not strings.
* | Fix blocking connections on MS-Windows (Bug#20159)Eli Zaretskii2015-03-282-1/+6
| | | | | | | | | | src/w32.c (sys_connect): Fix a mistake in previous commit that broke blocking connections.
* | Avoid some core dumps in X session managementPaul Eggert2015-03-272-24/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | Derived from a bug report by Nicolas Richard in: http://bugs.gnu.org/20191#20 * xsmfns.c (smc_save_yourself_CB): Don't dump core if invocation-name is not a string. Initialize user-login-name if it is not already initialized, and don't dump core if it is not a string. (create_client_leader_window): Don't dump core if x-resource-name and x-resource-class are not both strings. (x_session_initialize): Don't dump core if x-session-previous-id, invocation-directory, and invocation-name are not strings.
* | Port user-login-name initialization to Qnil == 0Paul Eggert2015-03-272-2/+8
| | | | | | | | | | | | * editfns.c (Fuser_login_name, Fuser_real_login_name) (syms_of_editfns): Don't rely on all-bits-zero being an Elisp integer, as this is no longer true now that Qnil == 0.
* | Assume !BROKEN_NON_BLOCKING_CONNECTPaul Eggert2015-03-272-18/+18
| | | | | | | | | | | | | | | | From a suggestion by Eli Zaretskii in: http://lists.gnu.org/archive/html/emacs-devel/2015-03/msg00824.html * process.c (NON_BLOCKING_CONNECT): Simplify by assuming that BROKEN_NON_BLOCKING_CONNECT is not defined. (SELECT_CAN_DO_WRITE_MASK): Remove, and assume it's now true.
* | Fix crashes when restoring sub-char-tables from desktop fileEli Zaretskii2015-03-272-2/+10
| | | | | | | | | | | | | | | | src/lread.c (substitute_object_recurse): For sub-char-tables, start the recursive SUBSTITUTE loop from index of 2, to skip the non-Lisp members of the sub-char-table. See the discussion at http://lists.gnu.org/archive/html/emacs-devel/2015-03/msg00520.html for the details.
* | Fix the bug number of previous commit: should be bug #20159.Eli Zaretskii2015-03-271-1/+1
| |
* | Support non-blocking connect on MS-Windows (Bug#20207)Eli Zaretskii2015-03-274-22/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on ideas from Kim F. Storm <storm@cua.dk>, see http://lists.gnu.org/archive/html/emacs-devel/2006-12/msg00873.html. src/w32proc.c (reader_thread): If the FILE_CONNECT flag is set, call '_sys_wait_connect'. If it returns STATUS_CONNECT_FAILED, exit the thread with code 2. (sys_select): Support 'wfds' in addition to 'rfds'. If a descriptor in 'wfds' has its bit set, but the corresponding fd_info member doesn't have its FILE_CONNECT flag set, ignore the descriptor. Otherwise, acknowledge a successful non-blocking connect by resetting the FILE_CONNECT flag and setting cp->status to STATUS_READ_ACKNOWLEDGED. src/w32.h (STATUS_CONNECT_FAILED): New enumeration value. (struct _child_process): New member 'errcode'. (FILE_CONNECT): New flag. (_sys_wait_connect): Add prototype. src/w32.c (pfn_WSAEnumNetworkEvents): New function pointer. (init_winsock): Load WSAEnumNetworkEvents from winsock DLL. (set_errno): Map WSAEWOULDBLOCK and WSAENOTCONN. (sys_connect): Support non-blocking 'connect' calls by setting the FILE_CONNECT flag in the fd_info member and returning EINPROGRESS. (_sys_read_ahead): Add debug message if this function is called for a descriptor that waits for a non-blocking connect to complete. (_sys_wait_connect): New function. (sys_read): Support STATUS_CONNECT_FAILED. Return the error code recorded by _sys_wait_connect when the non-blocking connect failed. Don't call WSAGetLastError before a call to set_errno had a chance to use its value, since WSAGetLastError clears the last error. nt/inc/ms-w32.h (BROKEN_NON_BLOCKING_CONNECT): Don't define.
* | `save-excursion' does not save&restore the mark any moreStefan Monnier2015-03-252-46/+14
| | | | | | | | | | | | | | | | | | | | * src/editfns.c (save_excursion_save): Don't save the mark. (save_excursion_restore): Don't restore the mark. (Fsave_excursion): Fix docstring accordingly. * doc/lispintro/emacs-lisp-intro.texi: * doc/lispref/positions.texi (Excursions, Narrowing): `save-excursion' does not save&restore the mark any more.
* | Fix minor ldexp issuesPaul Eggert2015-03-242-5/+12
| | | | | | | | | | | | | | * doc/lispref/numbers.texi (Float Basics): Improve ldexp documentation. * src/floatfns.c (Fldexp): Require 2 args. Avoid undefined behavior if the exponent is out of 'int' range. Improve documentation. Fixes: bug#20185
* | Make process-running-child-p return foreground process group IDDaniel Colascione2015-03-242-3/+11
| | | | | | | | | | | | | | * etc/NEWS: Mention change to `process-running-child-p`. * src/process.c (Fprocess_running_child_p): Return number identifier of the foreground process group if we know it.
* | Minor refactoring of new Fmake_process codePaul Eggert2015-03-232-36/+38
| | | | | | | | | | * process.c (Fmake_process): Refactor to avoid call to Flength, to avoid cast to 'char **', and to reduce indenting and reuse of locals.
* | Generalize start-process with keyword argsDaiki Ueno2015-03-232-43/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/process.c (Fmake_process): New function. (create_process, create_pty): Check p->pty_flag instead of Vprocess_connection_type. (syms_of_process): Register QCcommand, QCconnection_type, Qpty, Qpipe, and Smake_process. Unregister Sstart_process. * lisp/subr.el (start-process): New function, ported from the C implementation. * doc/lispref/processes.texi (Asynchronous Processes): Mention `make-process'. * etc/NEWS: Mention `make-process'.
* | Fixes: debbugs:20156Jan D2015-03-222-1/+6
| | | | | | | | | | * src/fontset.c (fontset_pattern_regexp): Replace + 1 with + 3 for regexsize.