aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | Work around GCC bug with function attributesPaul Eggert2018-05-221-1/+1
| | | | | | | | | | | | * src/alloc.c (PNTR_ADD): Put attributes after ‘static’ and before returned type. Problem reported by Eli Zaretskii in: https://lists.gnu.org/r/emacs-devel/2018-05/msg00559.html
* | Fix failed assertion when load-force-doc-stringsPaul Eggert2018-05-221-1/+3
| | | | | | | | | | | | | | Problem reported by Philipp Stephani (Bug#31556). * src/lread.c (read_vector): When load_force_doc_strings, check for byte code vectors that are invalid because they are too short. * test/src/lread-tests.el (lread-invalid-bytecodes): New test.
* | Minor tweaks to recent fix for Bug#31545Paul Eggert2018-05-221-24/+11
| | | | | | | | | | | | | | | | * src/xwidget.c (webkit_javascript_finished_cb) (Fxwidget_webkit_execute_script): Use intptr_t to avoid warnings in the (unlikely) event that ptrdiff_t and void * differ in width. (save_script_callback): Simplify by using xlispdstrdup and larger_vector.
* | * src/xwidget.c (Fxwidget_webkit_goto_uri): Encode uri.Andreas Schwab2018-05-221-0/+1
| |
* | Make xwidget-webkit-execute-script safe against GC (Bug#31545)Andreas Schwab2018-05-212-27/+75
| | | | | | | | | | | | | | | | | | | | | | * src/xwidget.h (struct xwidget): Add script_callbacks. * src/xwidget.c (save_script_callback): New function. (Fxwidget_webkit_execute_script): Use it. Encode script before passing to execution engine. Always use a callback. (webkit_javascript_finished_cb): Deallocate script. (kill_buffer_xwidgets): Deallocate remaining scripts. (Fxwidget_webkit_zoom): Doc fix. (Fxwidget_resize): Doc fix.
* | * src/alloc.c: Fix comment.Paul Eggert2018-05-181-2/+2
| |
* | Port to GCC 8 -fsanitize=undefinedPaul Eggert2018-05-183-9/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In GCC 8, gcc -fsanitize=undefined flags the undefined behavior that Emacs relies on in its XPNTR and XSYMBOL low-level functions. Disable undefined sanitization in these functions. Although this disabling doesn’t suffice if DEFINE_KEY_OPS_AS_MACROS is true, it works for -fsanitize=undefined -DINLINING=0, which is good enough. * src/alloc.c (macro_PNTR_ADD): New macro. (PNTR_ADD): New function and macro. The function disables -fsanitize=undefined. (macro_XPNTR): Use it. * src/conf_post.h (ATTRIBUTE_NO_SANITIZE_UNDEFINED): New macro. * src/lisp.h (XSYMBOL): Disable -fsanitize=undefined.
* | Fix decoding of directories when "~" includes non-ASCII charsEli Zaretskii2018-05-181-15/+60
| | | | | | | | | | | | | | | | | | | | | | * src/fileio.c (Fexpand_file_name): Don't build multibyte strings from unibyte non-ASCII strings when NAME and DEFAULT_DIRECTORY have different multibyteness, as this adds bytes to the byte sequence, and in some situations, e.g., when the home directory includes non-ASCII characters, can fail file APIs. (Bug#30755) * lisp/startup.el (normal-top-level): Make sure default-directory is set to a multibyte string when decoded on MS-Windows.
* | Merge from origin/emacs-26Glenn Morris2018-05-152-9/+13
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | b98cf9c ; Fix a typo in the Emacs manual 700fcd7 * doc/emacs/help.texi: Fix paren typo. c9c0e40 More minor changes in shell-related nodes of Emacs manual e6bf19c Fix inaccuracies in "Shell Ring" node of Emacs manual 087681b8 Improve documentation of kmacro commands and variables. be2e8cb * doc/man/emacs.1.in: Document --fg-daemon and --bg-daemon. 1d9e66a Don't check non-X frames for z order (Bug#31373) 7dc028e Check NSWindow is actually a frame Conflicts: src/nsfns.m
| * Don't check non-X frames for z order (Bug#31373)Noam Postavsky2018-05-071-6/+10
| | | | | | | | | | * src/xfns.c (x_frame_list_z_order): Only use frames with `output_method' set to `output_x_window'.
| * Check NSWindow is actually a frameAlan Third2018-05-071-1/+2
| | | | | | | | | | * src/nsfns.m (Fns_frame_list_z_order): Check NSWindow is an instance of EmacsView before treating it as one.
* | Rewrite scroll-other-window-down in C (bug#30207)Basil L. Contovounesios2018-05-101-40/+45
| | | | | | | | | | | | | | | | | | | | * lisp/window.el (scroll-other-window-down): Move to src/window.c as Fscroll_other_window_down. * src/window.c (scroll_command): Generalise for arbitrary windows. (Fscroll_up, Fscroll_down): Use scroll_command with selected_window. (Fscroll_other_window, Fscroll_other_window_down): Rewrite in terms of scroll_command. (syms_of_window): Add Sscroll_other_window_down.
* | Improve documentation for "other window" scrollingBasil L. Contovounesios2018-05-101-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/windows.texi (Other Window): * doc/lispref/windows.texi (Textual Scrolling): Document scroll-other-window-down. * doc/lispref/minibuf.texi (Minibuffer Misc): Cross-reference minibuffer-scroll-window with Textual Scrolling. * src/window.c (Fother_window_for_scrolling): Clarify how "other window" is determined in docstring. (Fscroll_other_window): Simplify docstring, pointing to that of Fother_window_for_scrolling. (bug#30207)
* | Limit "other window" scrolling to current terminalBasil L. Contovounesios2018-05-101-7/+3
| | | | | | | | | | * src/window.c (Fother_window_for_scrolling): Limit next-window search to visible frames on the current terminal. (bug#30207)
* | Merge from origin/emacs-26Glenn Morris2018-05-071-5/+7
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | 1d732d6 (origin/emacs-26) Fix gud-statement for pdb 91a68b5 ; * msdos/INSTALL: Add info about GCC versions. 7ddcc9a Document 'custom-group' 58f9e15 A minor addition to etc/DEBUG 4590414 Avoid errors in ispell.el when Enchant returns empty extra chars d0d75f9 Make 'ispell-initialize-spellchecker-hook' work again b90ce66 Handle selected_window change in prepare_menu_bars (Bug#31312) 79ad0b3 ; * INSTALL: Fix Emacs version number. (Bug#31358) 91de88b Fix report-emacs-bug via mailclient on MS-Windows f4b5ff2 Port collation tests to glibc 2.27
| * Handle selected_window change in prepare_menu_bars (Bug#31312)Noam Postavsky2018-05-031-5/+7
| | | | | | | | | | * src/xdisp.c (redisplay_internal): Check selected_window after calling prepare_menu_bars, since it can call lisp hooks.
| * Port --enable-gcc-warnings to GCC 8Paul Eggert2018-04-303-3/+3
| | | | | | | | | | | | | | | | | | | | | | Backport from master. * lib-src/emacsclient.c (fail): Do not dereference a null pointer. * src/frame.c (delete_frame): Add a decl with UNINIT to work around GCC bug 85563. * src/menu.h (finish_menu_items): Do not use attribute const. * src/regex.c (analyze_first): Use FALLTHROUGH, not a comment.
* | Fix cairo scrolling for side-by-side windowsAri Roponen2018-05-061-2/+3
| | | | | | | | | | * src/xterm.c (x_scroll_run) [USE_CAIRO]: Fix scrolling for side-by-side split windows. (Bug#31288)
* | Fix some problems in the Cairo buildAri Roponen2018-05-052-42/+83
| | | | | | | | | | | | | | | | | | | | | | * src/xterm.c (x_begin_cr_clip): Create image surface. (x_update_end) [USE_CAIRO]: Remove GTK3-specific code. (x_scroll_run) [USE_CAIRO]: Implement scrolling. * src/image.c (lookup_rgb_color) [USE_CAIRO]: Support Cairo. (jpeg_load_body) [USE_CAIRO]: Support Cairo. Use USE_CAIRO instead of CAIRO for #ifdef's. (imagemagick_load_image) [USE_CAIRO]: Support Cairo. (Bug#31288)
* | Avoid infloops in font_open_entityEli Zaretskii2018-05-051-0/+3
| | | | | | | | | | | | | | | | * src/font.c (font_open_entity): Fail after 15 iterations through the loop that looks for a font whose average_width and height are both positive. This avoids infinite loops for fonts that, e.g., report average_width of zero for any possible size we try. (Bug#31316)
* | More porting to GCC 8 of --enable-gcc-warningsPaul Eggert2018-05-031-0/+5
| | | | | | | | | | | | | | | | * lwlib/lwlib-Xaw.h (xaw_update_one_value, xaw_popup_menu): * lwlib/lwlib-Xlw.h (xlw_update_one_value, xlw_pop_instance): * lwlib/lwlib.h (lw_allow_resizing, lw_set_main_areas) [!USE_MOTIF]: No longer const. * src/emacs-module.c: Ignore -Wcast-function-type.
* | Fix off-by-one history pruning (bug#31211)Basil L. Contovounesios2018-05-022-60/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/subr.el (add-to-history): Clarify docstring. Protect against negative history-length and unnecessary variable modification, as per read_minibuf. * lisp/ido.el (ido-record-command): * lisp/international/mule-cmds.el (deactivate-input-method): (set-language-environment-input-method): * lisp/isearch.el (isearch-done): * lisp/minibuffer.el (read-file-name-default): * lisp/net/eww.el (eww-save-history): * lisp/simple.el (edit-and-eval-command, repeat-complex-command): (command-execute, kill-new, push-mark): * src/callint.c (Fcall_interactively): * src/minibuf.c (read_minibuf): Delegate to add-to-history. * test/lisp/simple-tests.el (command-execute-prune-command-history): * test/src/callint-tests.el (call-interactively-prune-command-history): New tests.
* | Port --enable-gcc-warnings to GCC 8Paul Eggert2018-04-286-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Do not use GCC 8’s new -Wcast-align flag. * lib-src/ebrowse.c (xmalloc): * lib-src/emacsclient.c (xmalloc, xstrdup): * lib-src/etags.c (xmalloc): * lib-src/make-docfile.c (xmalloc): * lib-src/movemail.c (xmalloc): * src/dispnew.c (new_glyph_pool): * src/regex.c (xmalloc): * src/term.c (tty_menu_create): * src/tparam.h (tparam): Use ATTRIBUTE_MALLOC. Also see GCC bug 85562. * lib-src/emacsclient.c (fail): Do not dereference a null pointer. * src/frame.c (delete_frame): Add a decl with UNINIT to work around GCC bug 85563. * src/menu.h (finish_menu_items): Do not use attribute const. * src/regex.c (analyze_first): Use FALLTHROUGH, not a comment.
* | * src/fns.c (Fstring_distance): Minor code reformatting.Eli Zaretskii2018-04-281-5/+8
| |
* | Fix documentation and tests for 'string-distance'Eli Zaretskii2018-04-281-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | * src/fns.c (Fstring_distance): Doc fix. * doc/lispref/strings.texi (Text Comparison): Document 'string-distance'. * etc/NEWS: Fix wording and mark as documented in the manuals. * test/src/fns-tests.el (test-string-distance): Move from subr-tests.el and rename.
* | New function 'string-distance'Chen Bin2018-04-281-0/+62
| | | | | | | | | | | | | | | | | | * src/fns.c (Fstring_distance): New primitive. (syms_of_fns): Defsubr it. * test/lisp/subr-tests.el (subr-tests--string-distance): New test. * etc/NEWS: Mention 'string-distance'.
* | Don’t set print-escape-newlines in the minibufferPaul Eggert2018-04-252-9/+0
| | | | | | | | | | | | | | | | | | | | This appears to be an unnecessary and possibly-confusing revenant from ancient code (Bug#31251). See thread containing: https://lists.gnu.org/r/emacs-devel/2018-04/msg00654.html * src/minibuf.c (read_minibuf): Do not set print-escape-newlines. * src/print.c (syms_of_print): Do not defsym print-escape-newlines or print-escape-control-characters, as these symbols are not used in C code.
* | * src/minibuf.c (read_minibuf): Add a FIXME comment.Paul Eggert2018-04-241-0/+4
| |
* | Fix recent change in lread.cEli Zaretskii2018-04-231-1/+1
| | | | | | | | | | * src/lread.c (openp): Avoid assertion violations in XCDR when PATH is nil. (Bug#31229)
* | Merge from origin/emacs-26Glenn Morris2018-04-201-0/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5de608f (origin/emacs-26) Update the documentation of 'perform-replace' 06245b6 * etc/NEWS: Another fix for the last change (noted by Juri Li... 8f6293c Fix use of @key in Texinfo manuals f4c9894 Improve documentation of actual arglist ce0e253 ; * etc/NEWS: Improve last change as proposed by Phil Sainty b89ff0e Don't assume term-current-row cache is valid (Bug#31193) 326a296 ; * etc/NEWS: Mention 'display-buffer-in-major-side-window' c... 3bdc9a1 Fix flyspell-auto-correct-previous-word broken by recent change a539eb5 * test/src/lread-tests.el (lread-test-bug-31186): New test. 3fa472b Fix undefined behaviour while looking for lexical-binding fil... 4341aac Minor wording improvement in "Bookmarks" Conflicts: test/src/lread-tests.el
| * Fix undefined behaviour while looking for lexical-binding file variable (bug ↵Andreas Schwab2018-04-171-0/+2
| | | | | | | | | | | | | | 31186) * src/lread.c (lisp_file_lexically_bound_p): Reset beg_end_state before reading variable or value.
* | Tweak mark_object to avoid a conditional branchPaul Eggert2018-04-181-7/+2
| | | | | | | | | | * src/alloc.c (LAST_MARKED_SIZE): Now an enum. Make it a power of 2. (mark_object): Take advantage of the power of 2.
* | Tell user about read-integer-overflow-as-floatPaul Eggert2018-04-181-1/+6
| | | | | | | | | | | | * src/lread.c (string_to_number): Suggest read-integer-overflow-as-float in signal message. Suggested by Stefan Monnier (Bug#31118#58).
* | Fix signal for large integers with valid syntaxPaul Eggert2018-04-171-9/+10
| | | | | | | | | | | | * src/lread.c (read_integer): If a radixed integer has valid syntax but is waayyy too large, signal overflow instead of invalid syntax. * test/src/lread-tests.el (lread-long-hex-integer): New test.
* | Avoid undefined behavior in 'defvar' (Bug#31072)Philipp Stephani2018-04-151-0/+2
| | | | | | | | | | * src/eval.c (Fdefvar): Check that first argument is a symbol. * test/src/eval-tests.el (defvar/bug31072): New unit test.
* | * src/lread.c (openp): Add a comment before the now-obscure loop.Lars Ingebrigtsen2018-04-151-0/+2
| |
* | Indent after transforming for loop into do/whileLars Ingebrigtsen2018-04-141-177/+176
| |
* | Make call-process work if exec-path is nilLars Ingebrigtsen2018-04-141-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/lread.c (openp): If exec-path is nil, no files would be found to execute (bug#30564). Test cases: (let ((exec-path ())) (call-process "/bin/ls" nil (current-buffer))) This would previously fail, but now works. (let ((exec-path '("/bin/"))) (call-process "ls" nil (current-buffer))) This worked, and still works.
* | (libxml-parse-html-region): Make DISCARD-COMMENTS obsoleteLars Ingebrigtsen2018-04-141-10/+4
| | | | | | | | | | | | | | | | | | * lisp/subr.el (libxml-parse-xml-region) (libxml-parse-html-region): Make DISCARD-COMMENTS obsolete. * src/xml.c (Flibxml_parse_html_region) (Flibxml_parse_xml_region): Don't mention DISCARD-COMMENTS, since it's now no longer part of the advertised signature (bug#27178).
* | Make DISCARD-COMMENTS in `libxml-parse-{html,xml}-region' obsoleteLars Ingebrigtsen2018-04-141-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/text.texi (Parsing HTML/XML): Mention that discard-comments is obsolete. * lisp/xml.el (xml-remove-comments): New function (bug#27178). * src/xml.c (Flibxml_parse_html_region): Clarify what DISCARD-COMMENTS actually does, and say that the parameter is obsolete. (Flibxml_parse_xml_region): Ditto.
* | Merge from origin/emacs-26Glenn Morris2018-04-141-0/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5a6bb01 (origin/emacs-26) Fix building etc/DOC in the MSDOS port 274c979 * lisp/select.el (gui-get-selection): Doc fix. ad731b0 ; * doc/lispref/display.texi (Temporary Displays): Fix typos. f1450e9 Complete documentation of syntax flags by adding `c' 6bdcaec Fix typos and minor wording issues in ELisp manual febac27 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emac... 6c2e21e Avoid segfault in processes of type 'pipe' 60e10c5 Remove repetitions in documentation strings 208e752 * lisp/image.el (image-load-path): Doc fix. 92e0fd8 ; * etc/NEWS: Remove a FIXME. (Bug#31122) Conflicts: etc/NEWS
| * Avoid segfault in processes of type 'pipe'Eli Zaretskii2018-04-131-0/+4
| | | | | | | | | | | | * src/process.c (Fmake_pipe_process): Set up the decoding and encoding buffers. For the details, see http://lists.gnu.org/archive/html/emacs-devel/2018-04/msg00295.html.
* | Merge from origin/emacs-26Glenn Morris2018-04-101-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | c267421 (tag: emacs-26.1-rc1, origin/emacs-26) ; * ChangeLog.3: Update. aa77415 * etc/AUTHORS: Regenerate. c8ffca5 * lisp/files.el (kept-new-versions): Improve documentation st... 3a798f6 Fix a minor mistake in the ELisp manual 6afa868 ; * src/dispextern.h (struct it): Fix a typo in a comment. 5659b2f * lisp/files.el (find-file-literally): Doc fix. 9b24a79 Fix typos in doc strings
| * ; * src/dispextern.h (struct it): Fix a typo in a comment.Eli Zaretskii2018-04-071-1/+1
| |
* | Document that 'make-process' mixes the output streamsPhilipp Stephani2018-04-071-1/+2
| | | | | | | | | | | | | | | | * doc/lispref/processes.texi (Asynchronous Processes): * src/process.c (Fmake_process): Document that standard error is mixed with standard output if STDERR is nil. * test/src/process-tests.el (make-process/mix-stderr): New unit test.
* | Improve GC+Cairo workaroundPaul Eggert2018-04-043-8/+20
| | | | | | | | | | | | | | Suggested by Eli Zaretskii (Bug#20890#31). * src/font.h (font_data_structures_may_be_ill_formed): New function. * src/ftfont.c (ftfont_close): * src/ftcrfont.c (ftcrfont_close): Use it.
* | Pacify GCC when --enable-profilingPaul Eggert2018-04-034-15/+12
| | | | | | | | | | | | | | * src/conf_post.h (PROFILING): Undef if not on a platform that supports it. Simplify uses accordingly. * src/emacs.c (etext) [PROFILING]: Declare at top level to avoid GCC warning.
* | ; * src/ftfont.c (ftfont_spec_pattern): Fix whitespace.Eli Zaretskii2018-04-031-1/+1
| |
* | Work around GC+Cairo bugPaul Eggert2018-04-031-0/+6
| | | | | | | | | | | | Workaround suggested by Robert Pluim (Bug#20890#13). * src/ftfont.c (ftfont_close) [USE_CAIRO]: Do nothing if GC is in progress.
* | Port FC_COLOR change to older fontconfigPaul Eggert2018-04-031-1/+1
| | | | | | | | | | | | | | Problem reported by John ff in: https://lists.gnu.org/r/emacs-devel/2018-04/msg00058.html * src/ftfont.c (ftfont_spec_pattern) [!FC_COLOR]: Don’t use FC_COLOR on older fontconfigs that don’t have it.