aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | Unbreak echoingDaniel Colascione2018-06-091-1/+5
| | | | | | | | * src/keyboard.c (read_key_sequence): Don't echo_truncate the first time.
* | Fix pointer misuse in JSON parserPaul Eggert2018-06-091-32/+28
| | | | | | | | | | | | | | | | | | * src/json.c (lisp_to_json_toplevel_1): Fix pointer misuse not caught by C type checking (json_t ** converted to void * where the program expected json_t *). Bug caught on Fedora 28 x86-64 via './configure CFLAGS="-g3 -O2 -fsanitize=address" CANNOT_DUMP=yes'. Avoid similar problems in the future by rewriting to use json_t * instead of json_t **.
* | Correctly set last_nonmenu_event when replayingDaniel Colascione2018-06-091-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | read_key_sequence can, in various circumstances, play back recorded events. Make sure that we set last_nonmenu_event as if we weren't replaying. Without this change, we leave last_nonmenu_event set to whatever it was before we started replaying, leading to spurious random keymap menu prompts appearing after reading terminal control sequences, the translation of which sometimes causes event replays. * src/keyboard.c: (grow_bool_vector): New function (read_key_sequence): Remember menu event history per-event.
* | Add debug facility for formatting in rr sessionsDaniel Colascione2018-06-092-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | The existing debug print commands don't work in rr, since they touch stderr. The new xfmt command just calls Fformat and doesn't touch the stdio streams. * src/.gdbinit: (xfmt): New GDB command. * src/print.c: (debug_format): New function.
* | Fix read buffer overrun on overflowed integersPaul Eggert2018-06-091-2/+2
| | | | | | | | | | | | | | * src/lread.c (read_integer): Fix off-by-1 buffer overrun introduced in 2018-04-17T23:23:16Z!eggert@cs.ucla.edu. The bug could occur when Emacs read radixed integers containing more than 100 digits. Bug caught by AddressSanitizer.
* | Make error checking for thread functions stricter.Philipp Stephani2018-06-092-23/+79
| | | | | | | | | | | | | | | | | | | | | | | | * src/systhread.c (sys_thread_create): Change return type to bool. Check for errors returned by pthread_attr_setstacksize and pthread_attr_destroy. (sys_mutex_init): Abort on errors. Enable mutex checks when checking is enabled. (sys_cond_init): Abort on errors. (sys_mutex_lock, sys_mutex_unlock, sys_cond_wait) (sys_cond_signal, sys_cond_broadcast, sys_cond_destroy): Check for errors in debug mode.
* | Remove AddressSanitizer bug workaroundPaul Eggert2018-06-082-6/+6
| | | | | | | | | | | | | | | | | | This workaround no longer appears to be needed. * src/alloc.c (USE_ALIGNED_ALLOC): Don’t leave undefined merely because ADDRESS_SANITIZER is defined, as that bug in -fsanitize=address appears to have been fixed. See: https://github.com/google/sanitizers/issues/337 * src/conf_post.h (vfork): Improve comment.
* | Fix formatting in the face filter changeDaniel Colascione2018-06-081-22/+31
| | | | | | | | | | | | * src/xfaces.c: (evaluate_face_filter,filter_face_ref) (merge_face_ref,syms_of_xfaces): Fix comments, formatting.
* | Port alignment verification to x86 --with-wide-intPaul Eggert2018-06-081-4/+4
| | | | | | | | | | | | | | | | | | Problem reported by Eli Zaretskii in: https://lists.gnu.org/r/emacs-devel/2018-06/msg00238.html * src/lisp.h (struct Lisp_Symbol, union vectorlike_header) (struct Lisp_Cons, struct Lisp_String): Do not check alignment if !USE_LSB_TAG, as alignment is needed only if we are tagging the low-order bits.
* | ; Tiny tpyo fixMichal Nazarewicz2018-06-081-1/+0
| | | | | | | | | | * src/xfaces.c (face-remapping-alist): remove an empty ‘(3)’ introduced in a docstring by mistake.
* | Add support for per-window face remappingDaniel Colascione2018-06-078-123/+286
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend face specifications to support the notion of filtering to a specific context and add a filter that limits a face specification to windows having a certain parameter. * src/xfaces.c: (evaluate_face_filter,filter_face_ref): New functions. (merge_face_ref): Ignore filtered face specifications. (Fx_list_fonts,get_lface_attributes,merge_face_vectors) (merge_named_face,merge_face_ref,merge_face_ref) (Finternal_merge_in_global_face,Fface_font,lookup_named_face) (lookup_basic_face,Fface_attributes_as_vector) (x_supports_face_attributes_p) (Fdisplay_supports_face_attributes_p,realize_named_face) (compute_char_face,face_at_buffer_position) (face_at_buffer_position,face_at_buffer_position) (face_at_buffer_position) (face_for_overlay_string,face_at_string_position,merge_faces): Pass window to face machinery. (syms_of_xfaces): Add :window and :filtered * src/xdisp.c (init_iterator, handle_face_prop) (handle_single_display_spec, merge_escape_glyph_face) (merge_glyphless_glyph_face, get_next_display_element) (next_element_from_display_vector, append_space_for_newline) (extend_face_to_end_of_line,highlight_trailing_whitespace) (maybe_produce_line_number) (display_line, calc_line_height_property): Pass window to face machinery. * src/term.c (tty_menu_activate): Adjust to new face core function signature. * src/msdos.c (XMenuActivate): Adjust to new face core function signature. * src/fringe.c (draw_fringe_bitmap_1, Fset_fringe_bitmap_face): Pass window to face machinery. * src/font.c (font_range, Finternal_char_font): Pass window to face machinery. * src/dispnew.c (spec_glyph_lookup_face): Pass window to face machinery. * src/dispextern.h: (lookup_named_face,lookup_basic_face) (lookup_derived_face,merge_faces): Add struct window arguments to prototypes.
* | Fit kill_buffer_xwidgets into 80Paul Eggert2018-06-071-10/+10
| | | | | | | | | | * src/xwidget.c (kill_buffer_xwidgets): Reindent and use C99 style to fit in 80 columns.
* | Minor cleanup of save_excursion_restorePaul Eggert2018-06-071-24/+17
| | | | | | | | | | * src/editfns.c (save_excursion_restore): Use clearer names for locals. Free earlier, removing the need for a label and goto.
* | New function record_unwind_protect_excursionPaul Eggert2018-06-077-9/+15
| | | | | | | | | | | | | | | | | | | | | | This simplifies callers a bit, and will simplify future changes. * src/eval.c (record_unwind_protect_excursion): New function. * src/buffer.c (Fkill_buffer): * src/bytecode.c (exec_byte_code): * src/editfns.c (Fsave_excursion, Freplace_buffer_contents): * src/lread.c (readevalloop, Feval_buffer): * src/window.c (scroll_command): Use it.
* | * src/.gdbinit: Omit soon-obsolete comment.Paul Eggert2018-06-071-3/+0
| |
* | Fix ftfont_open2 failure cleanupPaul Eggert2018-06-071-2/+5
| | | | | | | | | | * src/ftfont.c (ftfont_open2): Don’t increment counter if failing. Avoid use-after-free once the increment bug is fixed.
* | Don’t over-align if WIDE_EMACS_INTPaul Eggert2018-06-071-5/+11
| | | | | | | | | | | | | | * src/lisp.h (GCALIGNED_UNION): New macro. (struct Lisp_Symbol, union vectorlike_header) (struct Lisp_Cons, struct Lisp_String): Use it to avoid possible over-alignment if !USE_LSB_TAG.
* | Fix GC-related commentaryPaul Eggert2018-06-071-9/+12
| | | | | | | | | | | | | | * src/lisp.h: USE_STACK_LISP_OBJECTS is no longer experimental. Also, remove confusion about scope vs lifetime. And say that stack-allocated strings should not be given text properties.
* | Accept plists when serializing and parsing JSONJoão Távora2018-06-071-24/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/text.texi (Parsing JSON): Mention plist support. * src/json.c (lisp_to_json_toplevel_1): Serialize plists to json. (Fjson_serialize): Mention plists in docstring. (enum json_object_type): Add json_object_plist. (json_to_lisp): Parse JSON into plists. (json_parse_object_type): Consider plists. (Fjson_parse_string): Mention plists in docstring. (syms_of_json): New Qplist sym_of_json. (lisp_to_json): Update comment. * test/src/json-tests.el (json-serialize/object) (json-parse-string/object): New plist tests.
* | Merge from origin/emacs-26Glenn Morris2018-06-041-4/+26
|\ \ | |/ | | | | | | defd53a Set accessibility subroles for child frame (bug#31324) de6a876 Fix redefinition of child frames on NS
| * Set accessibility subroles for child frame (bug#31324)Alan Third2018-06-021-1/+15
| | | | | | | | | | | | | | ; Depends on patch in bug#31440. * src/nsterm.m (x_set_parent_frame): Set subrole depending on whether frame is a child or not.
| * Fix redefinition of child frames on NSAlan Third2018-06-021-4/+12
| | | | | | | | | | * src/nsterm.m (x_set_parent_frame): If the NSWindow has an existing parent frame, remove it.
* | Merge from origin/emacs-26Glenn Morris2018-06-021-1/+6
|\ \ | |/ | | | | | | | | | | | | 4cfe531 (origin/emacs-26) Improve ELisp documentation of 'clone-indir... 9089b02 Improve documentation of 'inhibit-message' 6107e12 Improve documentation of comment styles fb45125 Documentation improvements in newcomment.el 641c94c Imp[rove documentation of 'with-silent-modifications'
| * Improve documentation of 'inhibit-message'Eli Zaretskii2018-06-021-1/+6
| | | | | | | | | | * src/xdisp.c (syms_of_xdisp) <inhibit-message>: Warn against setting it non-nil globally. (Bug#31627)
| * Fix decoding of directories when "~" includes non-ASCII charsEli Zaretskii2018-06-021-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. (cherry picked from commit 3aab8626ba5080bb04d0fdae52d99c850a842a52)
| * Fix some problems in the Cairo buildAri Roponen2018-06-022-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) (cherry picked from commit 2d0eff42b8f1122e00f948759ed01a3be1a8c3fc)
| * Avoid infloops in font_open_entityEli Zaretskii2018-06-021-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) (cherry picked from commit e2879c1f837059335af89022b2a9ac9bc861e96d)
| * Fix C-p and C-n when wrap-prefix is too wideEli Zaretskii2018-06-021-1/+17
| | | | | | | | | | | | | | | | * src/xdisp.c (move_it_in_display_line_to): Avoid looping in previous/next-line when wrap-prefix is set to a too-wide stretch of whitespace. (Bug#30432) (cherry picked from commit 842b3d7412eaed6b2c9f90c3361abb4932ec0b1d)
| * Avoid redisplay problems with too wide wrap-prefixEli Zaretskii2018-06-021-1/+16
| | | | | | | | | | | | | | | | * src/xdisp.c (display_line): Avoid looping in redisplay when wrap-prefix is set to a too-wide stretch of whitespace. (Bug#30432) (cherry picked from commit 2a1fe08307402d6217d073f8ab7737750d253dd4)
| * Fix 'posn-at-point' when line numbers are displayedEli Zaretskii2018-06-021-0/+23
| | | | | | | | | | | | | | * src/xdisp.c (pos_visible_p): For the leftmost glyph, adjust the X coordinate due to line-number display. (Bug#30834) (cherry picked from commit 4a20174d7949028f66b18a92a75d6b74194242a8)
| * Another followup to fixing 'window-text-pixel-width'Eli Zaretskii2018-06-021-2/+7
| | | | | | | | | | | | | | * src/xdisp.c (Fwindow_text_pixel_size): Adjust the return value when we stop one buffer position short of TO. (Bug#30746) (cherry picked from commit 33cba5405c724566673cf023513bfb1faa963bea)
| * Fix mouse-set-point when line numbers are displayedEli Zaretskii2018-06-021-0/+1
| | | | | | | | | | | | | | * src/xdisp.c (move_it_to): Initialize the line_number_produced_p flag before iterating on a new line. (Bug#30818) (cherry picked from commit 5c585b8b994aad4e6844f8eed80bdfbb396e91bf)
| * * src/xdisp.c (Fwindow_text_pixel_size): Fix last change.Eli Zaretskii2018-06-021-3/+5
| | | | | | | | (cherry picked from commit 06911714ef66ea81380b1eda75a9f7cfbc9e0b65)
| * Fix 'window-text-pixel-size' when display properties are aroundEli Zaretskii2018-06-021-8/+37
| | | | | | | | | | | | | | | | * src/xdisp.c (Fwindow_text_pixel_size): Correct the result when there's a display property at the TO position, and the call to move_it_to overshoots. (Bug#30746) (cherry picked from commit 50e2c0fb5180a757d8d533518f68837ffe5909be)
| * Fix display of TABs in hscrolled windows with line numbersEli Zaretskii2018-06-023-11/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/dispextern.h (struct it): New members tab_offset and line_number_produced_p. * src/xdisp.c (display_line): Don't set row->x to a negative value if line numbers are being displayed. (Bug#30582) Reset the line_number_produced_p flag before laying out the glyph row. (x_produce_glyphs): Use the line_number_produced_p flag to decide whether to offset the X coordinate due to line-number display. Use the tab_offset member to restore the original TAB width for alignment purposes. (move_it_in_display_line_to): Don't produce line numbers when moving in hscrolled window to the left of first_visible_x. (maybe_produce_line_number): Set the line_number_produced_p flag. (Bug#30584) * src/term.c (produce_glyphs): Correct TAB width only when line_number_produced_p flag is set. (cherry picked from commit 1ac190553886ff20817d3dd218464e2fc6f9e42a)
| * Fix wait_reading_process_output wait_proc hangMatthias Dahl2018-06-022-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/process.c (read_process_output): Track bytes read from a process. (wait_reading_process_output): If called recursively through timers and/or process filters via accept-process-output, it is possible that the output of wait_proc has already been read by one of those recursive calls, leaving the original call hanging forever if no further output arrives through that fd and no timeout has been set. Fix that by using the process read accounting to keep track of how many bytes have been read and use that as a condition to break out of the infinite loop and return to the caller as well as to calculate the proper return value (if a wait_proc is given that is). * src/process.h (struct Lisp_Process): Add nbytes_read to track bytes read from a process. (cherry picked from commit 4ba32858d61eee16f17b51aca01c15211a0912f8)
| * Fix posn-at-point in Flycheck buffersEli Zaretskii2018-06-022-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/dispnew.c (buffer_posn_from_coords): Improve commentary. * src/xdisp.c (move_it_in_display_line_to): Don't exit the loop under truncate-lines if the glyph at TO_CHARPOS was not yet produced. This avoids bailing out too early when we are at TO_CHARPOS, but didn't yet produce glyphs for that buffer position, because the last call to PRODUCE_GLYPHS at this position was for an object other than the buffer. For further details, see http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00537.html. (cherry picked from commit c0154ac7c3423f68d8f3a2e85a756c9759219039)
* | Merge from origin/emacs-26Glenn Morris2018-06-021-1/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | 90bea37 ; * etc/PROBLEMS: Fix fvwm version number in last commit af82d1f * etc/PROBLEMS: Document stickyness problem with FVWM (Bug#31... 4a3aed2 Update Emacs Lisp Intro to match current behavior 21f2247 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emac... 3257085 Fix previous commit 6d23525 Fix typos in several manuals (Bug#31610) 9188291 Add detailed documentation about lock files e5471b2 Add commentary for subtle aspect of frame.el Conflicts: doc/lispintro/emacs-lisp-intro.texi
| * Add detailed documentation about lock filesRobert Pluim2018-06-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/files.texi (Interlocking): Point user at detailed file locking description in lisp reference manual. Add index entry for '.#' to improve disoverability of information about locking. * doc/lispref/files.texi (File Locks): Describe in detail what the form of the lock file is. Add index entry for '.#' to improve disoverability of information about locking. * src/filelock.c (create-lockfiles): Add cross reference to file locking in user manual and to 'lock-buffer'. Add string '.#' to help users find the doc string.
* | Merge from origin/emacs-26Glenn Morris2018-06-021-8/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | ca3f0a8 ; * etc/NEWS: Belated announcement of 2 changes made in Emacs... 99f92da Improve documentation of 'directory-files-and-attributes' df8649a * lisp/gnus/message.el (message-remove-header): Don't remove ... b682a7e ; * etc/NEWS: Add headings for Emacs 26.2 aa175a4 Adapt hexl-mode to native line-number display b8e7749 Fix example in Tramp manual f212fe5 Handle case where Xft is found but not XRender 186280f * doc/misc/tramp.texi (Frequently Asked Questions): Adapt zsh... 24ba633 Improve read-multiple-choice docstring (Bug#31628) Conflicts: etc/NEWS src/dired.c
| * Improve documentation of 'directory-files-and-attributes'Eli Zaretskii2018-06-011-1/+8
| | | | | | | | | | | | | | | | * doc/lispref/files.texi (Contents of Directories): Fix inaccurate description of the return value of directory-files-and-attributes. * src/dired.c (Fdirectory_files_and_attributes): Describe the function's value in more detail.
* | Minimally support Flymake in Emacs C sourcesJoão Távora2018-06-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | The check-syntax target is enabled the use of Flymake's "legacy" backend, flymake-proc-legacy-flymake in src/*.c. It works quite well with C sources. The green light for this change had already been given some time ago in https://lists.gnu.org/archive/html/emacs-devel/2017-10/msg00385.html * src/Makefile.in (check-syntax): New target. (.PHONY): Add check-syntax.
* | Fdirectory_files_and_attributes doc string clarificationLars Ingebrigtsen2018-05-311-0/+10
| | | | | | | | | | * src/dired.c (Fdirectory_files_and_attributes): Clarify what data is returned.
* | Work around GCC bug 81401Paul Eggert2018-05-301-1/+7
| | | | | | | | | | | | * src/xterm.c (x_draw_glyphless_glyph_string_foreground): Make the buffer a byte longer than it needs to be, if --enable-gcc-warnings.
* | Allow access to MS-Windows Registry from Lisp programsEli Zaretskii2018-05-293-0/+374
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32.c (g_b_init_reg_open_key_ex_w) (g_b_init_reg_query_value_ex_w) (g_b_init_expand_environment_strings_w): New init flags. (globals_of_w32): Initialize them at startup. (RegOpenKeyExW_Proc, RegQueryValueExW_Proc) (ExpandEnvironmentStringsW_Proc): New function typedefs. (reg_open_key_ex_w, reg_query_value_ex_w) (expand_environment_strings_w): New wrapper function. (w32_read_registry): New function. * src/w32fns.c (Fw32_read_registry) [WINDOWSNT]: New primitive. (syms_of_w32fns) [WINDOWSNT]: Defsubr it. DEFSYM "HKLM", "HKCU", etc. root keys. * etc/NEWS: Mention the new primitive.
* | Port .gdbinit to unsigned-pointer platformsPaul Eggert2018-05-261-1/+1
| | | | | | | | | | | | * src/.gdbinit (Lisp_Object_Printer.to_string): Don’t assume that GDB treats C pointers as signed integers. Problem found with GDB Fedora 8.1-15.fc28.
* | GNOME moved URLs for its active bug reportsPaul Eggert2018-05-264-6/+6
| | | | | | | | | | | | | | * src/emacs.c (main) [USE_GTK]: * src/gtkutil.c (xg_display_close): * src/xterm.c (x_connection_closed): Update GNOME bug report URLs.
* | Merge from origin/emacs-26Glenn Morris2018-05-251-1/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 07f8f9b (origin/emacs-26) ; * lisp/ldefs-boot.el: Update. 5cec2b0 * etc/HISTORY: Update for Emacs 26.1 release. 7c474e1 * etc/AUTHORS: Update. ddc7bea ; * ChangeLog.3: Update. 3557460 ; * admin/authors.el: Update. 2f44d2d Note caveat for backward regexp searching in docstring (Bug#3... 3145d08 Update backtrace in Emacs Lisp Intro 43a9c26 Move window-point in bibtex-search-entry 4bb2741 More fixes of Intro to Emacs Lisp c57c226 ; * doc/emacs/misc.texi (FFAP): Fix a typo. (Bug#31580) 0a51113 Add a footnote to Emacs Lisp Intro 5eabe4a ; * doc/emacs/msdos.texi (ls in Lisp): Fix a typo. (Bug#31575) d5e0ceb * lisp/help.el (with-help-window): Doc fix. (Bug#31574) e7952bd Fix some cross-references in emacs-lisp-intro.texi a897959 Minor copyedits in Emacs manual in macos.texi Conflicts: lisp/ldefs-boot.el
| * Note caveat for backward regexp searching in docstring (Bug#31584)Noam Postavsky2018-05-251-1/+4
| | | | | | | | | | | | | | * src/search.c (Fre_search_backward): Emphasize that backwards searches may give shorter than expected matches. * doc/lispref/searching.texi (Regexp Search): Add an anchor for re-search-backward to reference.
* | Honor print-charset-text-property value of nil (Bug#31376)Noam Postavsky2018-05-231-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/print.c (print_check_string_charset_prop): Move check for nil Vprint_charset_text_property from here... (print_prune_string_charset): ... to here. (syms_of_print) <print-charset-text-property>: Clarify that any non-boolean values are treated the same as `default'. * doc/lispref/streams.texi (Output Variables): Add print-prune-string-charset. * test/src/print-tests.el (print-charset-text-property-nil) (print-charset-text-property-default) (print-charset-text-property-t): New tests. (print-tests--prints-with-charset-p): New helper function.