New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mid-July rollup #227
Mid-July rollup #227
Commits on Jun 17, 2017
-
Improve documentation of replace-buffer-contents
* etc/NEWS (replace-buffer-contents): Fix formatting. * src/editfns.c (Freplace_buffer_contents): Doc fix.
-
emacs-module.h: Create emacs_env_26
This was part of the original design of the module API (https://lists.gnu.org/archive/html/emacs-devel/2015-02/msg00960.html), but I didn't take it into account when adding the should_quit function. Instead of duplicating the environment fields or using the C preprocessor, use configure to build emacs-module.h. * configure.ac: Expand emacs-module.h template.
-
This (and my previous patch) incorporate: 2017-06-17 diffseq: port to GCC 7 with --enable-gcc-warnings 2017-06-15 gettext-h: Update comment * lib/diffseq.h: Copy from gnulib.
-
Commits on Jun 18, 2017
-
* src/Makefile.in (clean): Do not remove emacs-module.h.in. (bootstrap-clean): Remove emacs-module.h.
Commits on Jun 19, 2017
-
Don't try to eval local variables in Gnus article
* lisp/gnus/mm-view.el (mm-display-inline-fontify): Disable local vars.
-
* lisp/simple.el (current-line): New function. * test/list/simple-tests.el: Add tests for current-line.
-
Revert "Add current-line in simple.el"
This reverts commit ae98cdf.
-
Don't put deleted packages in the trash (bug#14967)
* lisp/emacs-lisp/package.el (package-delete): Don't pay attention to delete-by-moving-to-trash. ; * etc/NEWS: Mention this.
-
Avoid a custom-variable-type error (bug#27363)
* lisp/cus-edit.el (custom-variable-type): Avoid an error due to plist-put becoming stricter of late.
Commits on Jun 20, 2017
-
autogen.sh: try to check for tool being present but broken
* autogen.sh (get_version): Check return status of "--version". (check_version): Try to distinguish between a missing tool and a broken one. (Bug#27288)
-
-
kill-matching-buffers to optionally not confirm
* lisp/files.el (kill-matching-buffers): Add option to not confirm killing. (Bug#27286)
-
; * lisp/eshell/em-basic.el: Fix commentary.
This file has never provided any such "version" command.
-
Bind enable-local-variables to nil globally (fix dbe3e41)
* lisp/gnus/mm-view.el (mm-display-inline-fontify): Bind enable-local-variables to nil globally instead of making it buffer-local; remove let-bind of local-enable-local-variables. cf. <b4mtw3bbfp5.fsf@jpl.org> in the emacs-devel list.
-
Revert "Don't bind org-agenda key to an anonymous function"
This reverts commit 49c0ff2.
-
Delete old Date header in a simple way
* lisp/gnus/gnus-art.el (article-date-ut): Don't rely on text prop when searching the old Date header boundary in order to delete it.
-
Simplify autogen.sh version checking
* autogen.sh (get_version): Simplify and make more reliable by using expr rather than echo | sed. Check exit status of program. Run program in subshell in case it cannot be executed. (check_version): Check exit status of command rather than its output. Check return status of get_version.
-
Fix crash when built by GNU Gold linker on x86
Problem reported by Andrés Musetti (Bug#27248). * src/widget.c (emacsFrameClassRec): Do not initialize superclass here. (emacsFrameClass): Now a function (which initializes the superclass) instead of a variable. All uses changed.
-
Remove
:options' from
css-electric-keys'* lisp/textmodes/css-mode.el (css-electric-keys): Remove `:options` since it just duplicates the default value.
Commits on Jun 21, 2017
-
Mark prolog indent variables as safe (bug#27369)
* lisp/progmodes/prolog.el (prolog-indent-width) (prolog-left-indent-regexp, prolog-paren-indent-p) (prolog-paren-indent): Add :safe property.
-
-
Keep order of completion candidates (Bug#25995, Bug#24676)
* lisp/minibuffer.el (completion-pcm--filename-try-filter) (completion-pcm--all-completions): Use nreverse to undo the reversing caused by using push in the loop.
-
Make gnus-article-date-user work
* lisp/gnus/gnus-art.el (article-date-ut): Work for unfolded multi-line Date header. (article-transform-date): Refactor; add header name if it is missing in user-defined date line. (article-date-user): Fix name of date type.
-
Fix temacs hybrid_malloc core dump
Without this patch, ./temacs would dump core sometimes on Fedora 25 x86-64. The problem was that the hybrid allocator assumed that all pointers into bss_sbrk_buffer are allocated via gmalloc. This assumption is not true on Fedora, because the standard memory allocator calls gdefault_morecore, which means its blocks are interleaved with our blocks. Usually the code happened to work, because our data structures agreed with the glibc data structures, but this was merely luck due to a shared pedigree, and as glibc mutates our luck has run out. * src/gmalloc.c (ALLOCATED_BEFORE_DUMPING) [HYBRID_MALLOC]: Remove; no longer needed. (BLOCK): Use unsigned division, as that does the right thing near zero. (register_heapinfo, __malloc_internal_nolock, __free_internal_nolock) (_realloc_internal_nolock): Big blocks now have type -1, not 0, as 0 now means the block is not ours. (morecore_nolock): Omit now-unnecessary casts to size_t. (allocated_via_gmalloc) [HYBRID_MALLOC]: New function. (hybrid_free, hybrid_realloc) [HYBRID_MALLOC]: Use it, to avoid calling the wrong free or realloc function in some cases.
-
Remove malloc_find_address relic
* src/gmalloc.c (register_heapinfo, _malloc_internal_nolock): Omit unnecessary initialization.
Commits on Jun 22, 2017
-
Limit insert-file-contents to MAX_ALLOCA
* src/fileio.c (READ_BUF_SIZE): Don’t allocate more than MAX_ALLOCA bytes in a single stack array.
-
Limit bidi_find_bracket_pairs to MAX_ALLOCA
* src/bidi.c (MAX_BPA_STACK): Now a constant, not a macro. Shrink it to allow for the two struct bidi_it objects in the same frame. (PUSH_BPA_STACK): Avoid integer overflow with enormous bidi cache. (bidi_find_bracket_pairs): Use compile-time check instead of runtime.
-
Limit style_format to MAX_ALLOCA
* src/editfns.c (styled_format): Subtract initial buffer size from sa_avail, since it is nontrivial.
-
Short-circuit substitutions for some simple types.
Values that don't contain other values cannot be circular, so checking for circular objects is a waste of cycles. * src/lread.c (substitute_object_recurse): If the subtree being examined is a symbol, number, or property-less string, just return it.
Ken Raeburn committedJun 22, 2017 -
* src/lread.c (read1): After reading an object using the "#n=" syntax, if the read object is a cons cell, instead of recursively substituting the placeholder with the new object, mutate the placeholder cons cell itself to have the correct car and cdr values.
-
* configure.ac: Check for getc_unlocked. * src/charset.c (read_hex, load_charset_map_from_file): Use getc_unlocked instead of getc. (getc_unlocked) [!HAVE_GETC_UNLOCKED]: Fall back to getc. * src/lread.c (readbyte_from_file, Fget_file_char, read1, getc_unlocked): Likewise.
Ken Raeburn committedJun 22, 2017 -
Replace read_objects assoc list with two hash tables.
For larger input files with lots of shared data structures, an association list is too slow. * src/lread.c (read_objects_map, read_objects_completed): New variables, replacing read_objects. (readevalloop): Initialize them with hash tables before starting a top-level read, if they're not already empty hash tables, and reset them to Qnil afterwards if something was added to the hash tables. (read_internal_start): Likewise. (read1): Store first the placeholder and later the newly read object into read_objects_map under the specified object number. If the new object can contain a reference to itself, store it in read_objects_completed. (substitute_objects_recurse): Check read_objects_completed instead of read_objects for the known possibly-recursive objects. (syms_of_lread): Update initializations.
Ken Raeburn committedJun 22, 2017 -
Create less garbage to collect while reading symbols.
* src/lread.c (read1): When interning a symbol, only create a new string object for the name if we're going to use it for a new symbol object.
Ken Raeburn committedJun 22, 2017 -
Merge several Lisp reader speedups.
Ken Raeburn committedJun 22, 2017 -
Fix make_hash_table calls in lread.c
* src/lread.c (readevalloop, read_internal_start): Fix make_hash_table calls to make build succeed.
Martin Rudalics committedJun 22, 2017 -
Do not hard code A1 cell reference, as it may be renamed.
* lisp/ses.el (ses-recalculate-all): `A1' -> `(ses-cell-symbol 0 0)'
Vincent Belaïche committedJun 22, 2017 -
Add Org schemas.xml contents to Emacs schemas.xml
Entries from the Org version of schemas.xml have been added to the Emacs version of schemas.xml.
Rasmus committedJun 22, 2017 -
; Fix ORG-NEWS formatting in previous commit
Rasmus committedJun 22, 2017 -
* lisp/descr-text.el (describe-char): Avoid string-*-multibyte
Avoid string-to-multibyte and string-as-unibyte. Don't make *Help* unibyte just because the char was in a unibyte buffer.
-
unidata: don’t check special casing in unidata-check (bug#26656)
* admin/unidata/unidata-gen.el (unidata-check): Do not test special casing mapping of characters since that mapping is not constructed from the unidata.txt file. Also, check for integer decoder and cons char earlier so that less unnecessary processing is performed.
-
Use unlocked stdio more systematically
This can improve performance significantly on stdio-bottlenecked code. E.g., make-docfile is 3x faster on my Fedora 25 x86-64 desktop. * admin/merge-gnulib (GNULIB_MODULES): Add unlocked-io. * lib-src/ebrowse.c, lib-src/emacsclient.c, lib-src/etags.c: * lib-src/hexl.c, lib-src/make-docfile.c, lib-src/movemail.c: * lib-src/profile.c, lib-src/update-game-score.c: Include unlocked-io.h instead of stdio.h, since these programs are single-threaded. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib/unlocked-io.h, m4/unlocked-io.m4: New files, copied from Gnulib. * src/charset.c, src/cm.c, src/emacs.c, src/image.c, src/keyboard.c: * src/lread.c, src/term.c: Include sysstdio.h, possibly instead of stdio.h, to define the unlocked functions if the system does not provide them. * src/charset.c, src/lread.c (getc_unlocked): Remove, since sysstdio.h now defines it if needed. * src/cm.c (cmputc, cmcheckmagic): * src/dispnew.c (update_frame, update_frame_with_menu) (update_frame_1, Fsend_string_to_terminal, Fding, bitch_at_user): * src/emacs.c (main, Fdump_emacs): * src/fileio.c (Fdo_auto_save, Fset_binary_mode): * src/image.c (slurp_file, png_read_from_file, png_load_body) (our_stdio_fill_input_buffer): * src/keyboard.c (record_char, kbd_buffer_get_event, handle_interrupt): * src/lread.c (readbyte_from_file): * src/minibuf.c (read_minibuf_noninteractive): * src/print.c (printchar_to_stream, strout) (Fredirect_debugging_output): * src/sysdep.c (reset_sys_modes, procfs_ttyname) (procfs_get_total_memory): * src/term.c (tty_ring_bell, tty_send_additional_strings) (tty_set_terminal_modes, tty_reset_terminal_modes) (tty_update_end, tty_clear_end_of_line, tty_write_glyphs) (tty_write_glyphs_with_face, tty_insert_glyphs) (tty_menu_activate): * src/xfaces.c (Fx_load_color_file): Use unlocked stdio when it should be safe. * src/sysstdio.h (clearerr_unlocked, feof_unlocked, ferror_unlocked) (fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked) (fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked) (putc_unlocked, putchar_unloced): Provide substitutes if not declared.
-
Remove getc_unlocked configure-time check
* configure.ac (getc_unlocked): Remove check, as unlocked-io now does this for us.
Commits on Jun 23, 2017
-
Synchronize with the "emacs-sync" branch from Org
Rasmus committedJun 23, 2017 -
Rasmus committed
Jun 23, 2017 -
Fix symbol relocation when the relocated cell is renamed.
* lisp/ses.el (ses-sym-rowcol): Check that the renamed cell hashmap has been instantiated before getting data from it. When editing several spreadsheets, and you have spreadsheet #1 with a cell named `foo', and no renamed cell in spreadsheet #2, then if you make a formula with `foo' in spreadsheet #2, not doing this check will make an error. (ses-cell-set-formula): Robustify versus incorrect cell references given in the user provided formula. An explicit error message is provided after the action when the user gives an incorrect cell reference, but the formula edition is not changed. This means that if the incorrect reference is to a cell that is created someday, then this new cell will not have the edited cell in its reference list. Fixing this can still be done by editing again the first cell formula. (ses-relocate-symbol): Do not create symbol of referred-to cell when this is a renamed cell.
Vincent Belaïche committedJun 23, 2017 -
Fix display of indicate-empty-lines when line numbers are displayed
* src/xdisp.c (row_text_area_empty): New function. (display_line): Call row_text_area_empty to verify that a glyph row's text area is devoid of any glyphs that came from a buffer or a string. This fixes a bug with empty-lines indication disappearing when line numbers or line-prefix are displayed. (display_line): Delete the argument FORCE; all callers changed. Remove the condition for actually producing the glyphs for the line number, as even if the number didn't change we need to produce empty space.
-
Fix background color beyond EOB and cursor display
* src/xdisp.c: (maybe_produce_line_number): Use the default face for background of the blank glyphs in the line-number area which are drawn beyond EOB. (display_line): Reset the glyph row's displays_text_p flag only on empty lines that don't display line numbers. This fixes cursor display beyond EOB. Fix the bidi information in the glyphs produced for line numbers. Set the avoid_cursor_p flag of glyphs produced for line numbers.
-
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Vincent Belaïche committedJun 23, 2017
Commits on Jun 24, 2017
-
Fix display of line numbers with fonts larger than the default
* src/xdisp.c (maybe_produce_line_number): Update the metrics in IT, not in IT->glyph_row, since the latter gets overwritten in display_line. Fixes display of line numbers when the font used for them is larger than that of the default face.
-
Fix problems with line-number updates in Follow mode
* src/xdisp.c (redisplay_window): If forced window-start requires to move a window's point, and the window is under relative line-number display, force another round of redisplay to update the relative line numbers. This fixes follow-mode "redisplay" of its window group. * lisp/frame.el: Add display-line-numbers to the list of variables that should trigger redisplay of the current buffer.
-
-
Fix tab stops when line numbers are displayed
* src/xdisp.c (x_produce_glyphs): * src/term.c (produce_glyphs): Adjust tab stops for the horizontal space taken by the line-number display.
-
* etc/NEWS: * src/xdisp.c (syms_of_xdisp, maybe_produce_line_number): * lisp/cus-start.el: Rename display-line-width to display-line-number-width.
-
Change display of current line in relative mode
* src/xdisp.c (maybe_produce_line_number): In relative mode display the current line number as its absolute value, not as zero.
-
Support a separate face for displaying the current line's number
* lisp/faces.el (line-number-current-line): New face. * src/xdisp.c (syms_of_xdisp) <line-number-current-line>: New symbol. (try_window_id, try_cursor_movement): Disable these optimizations when the line-number-current-line face is different from line-number face. (maybe_produce_line_number): Display the current line in the line-number-current-line face, if it's different from line-number.
-
-
Allow Lisp program to disable line-number display for specific lines
* etc/NEWS: Update the documentation. * src/xdisp.c (syms_of_xdisp) <display-line-numbers-disable>: New symbol. (should_produce_line_number): New function. (display_line): Use should_produce_line_number to determine whether a line number should be produced for each glyph row.
-
Don't change byte-compile-delete-errors at runtime (Bug#27340)
* lisp/emacs-lisp/eieio-core.el: Confine `cl-declaim' calls to compile time.
-
Partial fix of hscroll of truncated lines with line numbers
* src/xdisp.c (x_produce_glyphs, hscroll_window_tree): Adjust hscroll calculations to line-number display. * src/term.c (produce_glyphs): Adjust tab stop to window's hscroll. These two changes fix horizontal scrolling when line numbers are displayed. But there's still a bug: the horizontal shift of lines that begin with a TAB is different from the rest. * src/xdisp.c (move_it_in_display_line_to): Call should_produce_line_number to determine whether a line number should be produced for this screen line.
-
Move additional hscrolling code into a suitable 'if'
* src/xdisp.c (hscroll_window_tree): Make additional calculations regarding glyphs produced for line numbers conditional on line-number display.
-
-
Commits on Jun 25, 2017
-
Adjust lm-verify to accept current notices
Problem reported by Mike Kupfer in: http://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00512.html * lisp/emacs-lisp/lisp-mnt.el (lm-crack-copyright): Do not require later lines in a copyright notice to have more indentation than earlier lines.
-
Provide additional support for child frames
Provide mouse dragging and resizing of frames. Allow resizing frames proportionally. Provide additional functionality for child frames. Minor bug fixes. * lisp/frame.el (frame-border-width, frame-pixel-width) (frame-pixel-height): Alias to `frame-internal-border-width', `frame-native-width' and `frame-native-height'. (frame-inner-width, frame-inner-height, frame-outer-width) (frame-outer-height): New functions. * lisp/minibuffer.el (completion-auto-help): Fix typo. * lisp/mouse.el (mouse-drag-line, mouse-drag-mode-line) (mouse-drag-header-line): Allow moving a frame by dragging the mode line of its bottommost window (on a minibuffer-less frame) or the header line of its topmost window. (mouse-drag-vertical-line): Mention argument in doc-string. (mouse-resize-frame, mouse-drag-frame, mouse-drag-left-edge) (mouse-drag-top-left-corner, mouse-drag-top-edge) (mouse-drag-top-right-corner, mouse-drag-right-edge) (mouse-drag-bottom-right-corner, mouse-drag-bottom-edge) (mouse-drag-bottom-left-corner): New functions for resizing a frame by dragging its internal border together with corresponding key bindings. * lisp/tooltip.el (tooltip-frame-parameters): Add 'no-special-glyphs' to default parameters and update version tag. * lisp/window.el (frame-auto-hide-function): Add choice to make frame invisible and update version tag. (window--delete): Handle 'auto-hide-function' frame parameter. (window--maybe-raise-frame): Respect 'no-focus-on-map' and 'no-accept-focus' frame parameters. (display-buffer--action-function-custom-type): Add `display-buffer-in-child-frame'. (display-buffer): Mention `display-buffer-in-child-frame' in doc-string. (display-buffer-in-child-frame): New action function for `display-buffer'. (window--sanitize-margin): Return zero when MARGIN cannot be sanitized. (fit-frame-to-buffer): Major rewrite to handle child frames and 'fit-frame-to-buffer-sizes' and 'fit-frame-to-buffer-margins' frame parameters. (window-largest-empty-rectangle--maximums-1) (window-largest-empty-rectangle--maximums) (window-largest-empty-rectangle--disjoint-maximums) (window-largest-empty-rectangle): New functions. * src/dispextern.h (WINDOW_WANTS_MODELINE_P) (WINDOW_WANTS_HEADER_LINE_P): Remove. Functionality is now provided by corresponding functions window_wants_modeline and window_wants_header_line in window.c. Adjust users. * src/dispnew.c (adjust_glyph_matrix) (buffer_posn_from_coords): Use window_wants_modeline and window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and WINDOW_WANTS_HEADER_LINE_P. * src/frame.c (keep_ratio): New function. (adjust_frame_size): Call keep_ratio for each of F's child frames. (make_frame): Initialize no_special_glyphs slot. (frame_internal_border_part): New function. (Fframe_pixel_width, Fframe_pixel_height, Fborder_width): Rename to Fframe_native_width, Fframe_native_height mand Fframe_internal_border_width. (frame_parm_table): Add Qno_special_glyphs entry. (frame_float_type): New enumeration type. (frame_float): New function to handle frame size and position ratios. (x_set_frame_parameters): Handle size and position ratios. (x_set_no_special_glyphs): New function (x_figure_window_size): Handle size and position ratios. (syms_of_frame): Add Qdisplay_monitor_attributes_list, Qno_special_glyphs, Qframe_edges, Qkeep_ratio, Qwidth_only, Qheight_only, Qleft_only and Qtop_only. * src/frame.h (internal_border_part): New enumeration type. (struct frame): New slot no_special_glyphs. (FRAME_NO_SPECIAL_GLYPHS): New macro. * src/gtkutil.c (xg_frame_restack): Return immediately for GTK versions before 2.18.0. * src/keyboard.c (internal_border_parts): New array constant. (make_lispy_position): For frames with border dragging enabled return internal border part. (syms_of_keyboard): New symbols Qdrag_internal_border, Qleft_edge, Qtop_left_corner, Qtop_edge, Qtop_right_corner, Qright_edge, Qbottom_right_corner, Qbottom_edge and Qbottom_left_corner. * src/minibuf.c (read_minibuf_unwind): When exiting the minibuffer deal with frames that have the 'minibuffer-exit' parameter set. (syms_of_minibuf): New symbol Qminibuffer_exit. * src/nsfns.m (frame_parm_handler): Add entry for x_set_no_special_glyphs. (Fx_create_frame): Handle 'no-special-glyphs' parameter. Intitialize new cursor types for dragging frame borders. * src/nsterm.h (struct ns_output): Add new cursor types for dragging frame borders. * src/w32fns.c (w32_frame_parm_handlers): Add entry for x_set_no_special_glyphs. (Fx_create_frame): Handle 'no-special-glyphs' parameter. Intitialize new cursor types for dragging frame borders. * src/w32term.h (struct w32_output): Add new cursor types for dragging frame borders. * src/window.c (coordinates_in_window) (Fwindow_line_height, window_internal_height): Use window_wants_modeline and window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and WINDOW_WANTS_HEADER_LINE_P. (Fwindow_lines_pixel_dimensions): New function. (window_parameter): New function. (Fwindow_parameter): Call window_parameter. (window_wants_mode_line, window_wants_header_line): New functions replacing the macros WINDOW_WANTS_MODELINE_P and WINDOW_WANTS_HEADER_LINE_P from dispextern.h. (syms_of_window): New symbols Qmode_line_format and Qheader_line_format. * src/window.h: Reorganize and re-comment macros. Use window_wants_modeline and window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and WINDOW_WANTS_HEADER_LINE_P. (MINI_NON_ONLY_WINDOW_P, MINI_ONLY_WINDOW_P): Minor rewrite. (WINDOW_BUFFER): New macro. (WINDOW_BOX_LEFT_EDGE_COL, WINDOW_BOX_RIGHT_EDGE_COL): Remove. * src/xdisp.c (window_text_bottom_y, window_box_height) (window_box, start_display) (compute_window_start_on_continuation_line) (try_cursor_movement, redisplay_window) (try_window_reusing_current_matrix, try_window_id) (display_line, expose_window): Use window_wants_modeline and window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and WINDOW_WANTS_HEADER_LINE_P. (pos_visible_p, display_mode_lines): Respect W's 'mode-line-format' and 'header-line-format' window parameters. (init_iterator): Use window_wants_modeline and window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and WINDOW_WANTS_HEADER_LINE_P. For tip frames respect no_special_glyphs value. (note_mouse_highlight): Set frame border cursors when on internal border. (x_draw_right_divider, x_draw_bottom_divider): Try to improve drawing of window dividers. * src/xfns.c (mouse_cursor): Add entries for border parts. (mouse_cursor_types): Add entries for cursor types to drag frame borders. (INSTALL_CURSOR): Add entries for new cursor types to drag frame borders. (Fx_create_frame): Handle 'no-special-glyphs' parameter. (x_frame_parm_handlers): Add entry for x_set_no_special_glyphs. (Vx_window_left_edge_shape, Vx_window_top_left_corner_shape) (Vx_window_top_edge_shape, Vx_window_top_right_corner_shape) (Vx_window_right_edge_shape) (Vx_window_bottom_right_corner_shape) (Vx_window_bottom_edge_shape) (Vx_window_bottom_left_corner_shape): New variables. (x_frame_restack): Call xg_frame_restack only for GTK versions starting with 2.18.0. * src/xterm.c (x_free_frame_resources): Remove new cursors for dragging frame borders. * src/xterm.h (struct x_output): Add new cursor types for dragging frame borders. * doc/lispref/display.texi (Size of Displayed Text): Document `window-lines-pixel-dimensions'. * doc/lispref/elisp.texi (Top): Add entry for "Mouse Dragging Parameters". * doc/lispref/frames.texi (Frame Size): Replace frame-pixel-width/-height by frame-native-width/-height. Add frame-inner-width/-height and frame-outer-width/-height docs. (Position Parameters): Describe specifying position as ratios. Clarify remark about positions relative to bottom/ridge display edge. (Size Parameters): Describe specifying sizes as ratios. Describe 'fit-frame-to-buffer-margins' and 'fit-frame-to-buffer-sizes' parameters. (Layout Parameters): Describe 'no-special-glyphs' parameter. (Frame Interaction Parameters): Describe 'auto-hide-function', 'minibuffer-exit' and 'keep-ratio' parameters. (Mouse Dragging Parameters): New section describing 'drag-internal-border', 'drag-with-header-line', 'drag-with-mode-line', 'snap-width', 'top-visible' and 'bottom-visible' parameters. (Management Parameters): Mention that `override-redirect' has no effect on MS Windows. (Font and Color Parameters): Mention child frames for `alpha' parameter. (Child Frames): Rewrite section with description and cross references to new frame parameters added. * doc/lispref/modes.texi (Mode Line Basics): Mention 'mode-line-format' and 'header-line-format' window parameters. * doc/lispref/windows.texi (Resizing Windows): Mention effect of `fit-frame-to-buffer-margins' for child frames. (Display Action Functions): New action function `display-buffer-in-child-frame'. (Quitting Windows): Mention `make-frame-invisible' as optional value of `frame-auto-hide-function' and `auto-hide-function' frame paameter. (Coordinates and Windows): Describe new function `window-largest-empty-rectangle'. (Window Parameters): Describe new parameters 'mode-line-format' and 'header-line-format'. Index all window parameters described in this section.
Martin Rudalics committedJun 25, 2017 -
Make CC Mode load cl-lib rather than cl in Emacs 26.
* lisp/progmodes/cc-cmds.el (c-declaration-limits): Remove unused local variable. * lisp/progmodes/cc-defs.el (c--mapcan-status): Remove. (c--cl-library): New variable. (Top level): Amend the form which requires library cl or cl-lib. (c--mapcan, c--set-difference, c--intersection, c--macroexpand-all) (c--delete-duplicate): Amend to use c--cl-library instead of c--mapcan-status. * lisp/progmodes/cc-engine.el (c-syntactic-skip-backward) (c-back-over-compound-identifier): Remove unused local variables. * lisp/progmodes/cc-fonts.el (c-font-lock-declarations): Remove an unused local variable. * lisp/progmodes/cc-langs.el (Top level): Amend to use c--cl-library instead of c--mapcan-status. * lisp/progmodes/cc-styles.el (Top level): Add a cc-bytecomp-defun to try to silence a compiler warning.
Alan Mackenzie committedJun 25, 2017 -
Fix line number display for overlay/display strings with newlines
* src/xdisp.c (maybe_produce_line_number): Fix the condition for producing space glyphs instead of a line number to include the case of display strings and overlays.
-
* lisp/subr.el (setq-local): Add debug declaration (Bug#27408).
Copyright-paperwork-exempt: yes
-
Fix Android 6/7 problems in Tramp
* lisp/net/tramp-adb.el (tramp-adb-ls-toolbox-regexp): Fix link part. (tramp-adb-handle-directory-files-and-attributes) (tramp-adb-handle-file-name-all-completions): Insert "." and ".." only when needed. (tramp-adb-get-ls-command): Force one column output for toybox.
-
Allow to disable display of line numbers beyond EOB
* src/buffer.c (disable_line_numbers_overlay_at_eob): New function. * src/lisp.h (disable_line_numbers_overlay_at_eob): Add prototype. * src/xdisp.c (should_produce_line_number): When at ZV, call disable_line_numbers_overlay_at_eob to determine whether line numbers should be displayed beyond ZV.
-
-
Port recent frame changes to GCC 7
* src/frame.c (keep_ratio): New arg P. Caller changed. Since it is non-null, it avoids a GCC 7 warning that FRAME_PARENT_FRAME might return null. This also avoids a run-time test.
-
Parenthesize frame.h macro definitions
* src/frame.h (FRAME_TOOL_BAR_POSITION) (FRAME_VERTICAL_SCROLL_BAR_TYPE, FRAME_HAS_VERTICAL_SCROLL_BARS) (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT) (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT) (FRAME_OVERRIDE_REDIRECT, FRAME_UNDECORATED, FRAME_PARENT_FRAME) (FRAME_SKIP_TASKBAR, FRAME_NO_FOCUS_ON_MAP) (FRAME_NO_ACCEPT_FOCUS, FRAME_NO_SPECIAL_GLYPHS, FRAME_Z_GROUP) (FRAME_Z_GROUP_NONE, FRAME_Z_GROUP_ABOVE, FRAME_Z_GROUP_BELOW) (FRAME_HAS_HORIZONTAL_SCROLL_BARS): Parenthesize macro definiens to allow arbitrary expression arguments.
-
Omit null-pointer test in intervals.h FRAME
* src/intervals.h (ROOT_INTERVAL_P, ONLY_INTERVAL_P) (INTERVAL_LAST_POS): Omit unnecessary parens. (LENGTH): Omit test for null pointer. The argument is never null. The unnecessary test causes GCC 7.1.0 to assume that the argument might be null, and therefore to issue false alarms when the argument is dereferenced in other expressions.
-
* lisp/progmodes/cc-fonts.el: Remove/mark unused vars
(c-font-lock-declarators): Remove unused vars `id-end', `paren-depth', and `brackets-after-id'. (c-font-lock-objc-methods): Mark unused args.
Commits on Jun 26, 2017
-
* lisp/dired.el (dired-re-maybe-mark, dired-map-over-marks) (dired-mark, dired-desktop-buffer-misc-data) * lisp/dired-aux.el (dired-do-create-files, dired-do-create-files-regexp) (dired-create-files-non-directory, dired-insert-subdir-validate) (dired-alist-sort, dired-do-shell-command): Don't quote lambda forms.
-
Use #' instead of (function ...)
* lisp/dired-aux.el (dired-do-chxxx, dired-clean-directory) (dired-mark-confirm, dired-query, dired-byte-compile) (dired-load, dired-update-file-line, dired-after-subdir-garbage) (dired-relist-file, dired-rename-subdir, dired-do-create-files) (dired-mark-read-file-name, dired-do-copy, dired-do-symlink) (dired-do-hardlink, dired-do-rename, dired-do-rename-regexp) (dired-do-copy-regexp, dired-do-hardlink-regexp) (dired-do-symlink-regexp, dired-create-files-non-directory) (dired-upcase, dired-downcase) * lisp/dired.el (dired-mode, dired-copy-filename-as-kill) (dired-internal-do-deletions, dired-internal-do-deletions): Prefer #' instead of (function ...).
-
Prefer
when' instead of 1-branch
if'* lisp/dired-aux.el (dired-do-shell-command): Store condition value in local variable ok. Use `when' instead of 1-branch `if'.
-
Fix bug in handling GnuPG's TRUST_MARGINAL status
* lisp/epg.el (epg--status-TRUST_MARGINAL): Change symbol `marginal' to `good'.
-
Update IT's metrics while simulating display
* src/xdisp.c (maybe_produce_line_number): Update IT's metrics also when glyph_row is NULL. This is important for move_it_* functions.
-
Initial support for visually-relative line numbers
Works very slowly. * src/xdisp.c (display_count_lines_visually): New function. (maybe_produce_line_number): Support 'visual' mode of line-number display. * src/xdisp.c (maybe_produce_line_number): Update IT's metrics also when glyph_row is NULL. This is important for move_it_* functions. (syms_of_xdisp) <display-line-number-width>: Now buffer-local. (try_window_id, redisplay_window, try_cursor_movement): For 'visual' line-number display, disable the same redisplay optimizations as for 'relative'. * lisp/cus-start.el (standard): Add new value for the customization form of display-line-numbers.
Commits on Jun 27, 2017
-
Avoid segfaults when some display vector is an empty string
* src/xdisp.c (next_element_from_display_vector): Don't try accessing the dpvec[] array if its size is zero. (Bug#27504)
-
Support default-text-properties
* src/xdisp.c (should_produce_line_number): Call get-char-property at ZV as well, to support default-text-properties.
Commits on Jun 28, 2017
-
Don't read eshell/which output from *Help* buffer (Bug#26894)
* lisp/help-fns.el (help-fns--analyse-function) (help-fns-function-description-header): New functions, extracted from describe-function-1. (describe-function-1): Use them. * lisp/eshell/esh-cmd.el (eshell/which): Use `help-fns-function-description-header' instead of `describe-function-1'.
-
Make tcl-auto-fill-mode obsolete (Bug#10772)
* lisp/progmodes/tcl.el (tcl-auto-fill-mode): Declare obsolete. * etc/NEWS: Announce it.
-
Replace with dolist some uses of while
* lisp/calc/calc-units.el (calc-permanent-units): (math-compare-unit-names, math-simplify-units-quotient): (math-build-units-table-buffer): Use dolist to replace extra bindings and some while loops.
-
Don't assume url structs are vectors (Bug#27333)
* lisp/url/url-history.el (url-history-update-url): Use `url-p' instead of `vectorp'.
-
* lisp/url/url-history.el: Use lexical-binding
(url-completion-function): Mark as obsolete. Mark unused args accordingly.
Commits on Jun 29, 2017
-
Improve timer handling when Tramp accepts output
* lisp/net/tramp-compat.el: Avoid compiler warning. * lisp/net/tramp-sh.el (tramp-sh-file-name-handler): Remove lock machinery. * lisp/net/tramp.el (tramp-locked, tramp-locker): Move up. (tramp-file-name-handler): Add lock machinery from `tramp-sh-file-name-handler'. Allow timers to run. (tramp-accept-process-output): Remove nasty workaround. Suppress timers. * test/lisp/net/tramp-tests.el (shell-command-sentinel): Suppress run in tests. (tramp--instrument-test-case-p): New defvar. (tramp--instrument-test-case): Use it in order to allow nested calls. (tramp--test-message, tramp--test-backtrace): New defsubst, will be used for occasional test instrumentation. (tramp-test00-availability, tramp-test31-vc-registered): Use them. (tramp-test28-shell-command) (tramp--test-shell-command-to-string-asynchronously): Suppress nasty messages. Don't overwrite sentinel. (tramp-test36-asynchronous-requests): Rewrite major parts. Expect :passed.
-
* src/xdisp.c (maybe_produce_line_number): Fix bug that caused line numbers to be displayed in empty lines beyond ZV. (x_produce_glyphs): Start fixing TAB display in truncated lines.
-
Operate on frame list instead of printed backtrace
* lisp/emacs-lisp/debug.el (debugger-insert-backtrace): New function, prints the given backtrace frames. (debugger-setup-buffer): Use it instead of editing the backtrace buffer text.
-
Improve ert backtrace recording
Change ert to use the new `backtrace-frames' function instead of collecting frames one by one with `backtrace-frame'. Additionally, collect frames starting from `signal' instead the somewhat arbitrary "6 from the bottom". Skipping 6 frames would skip the expression that actually caused the signal that triggered the debugger. Possibly 6 was chosen because in the case of a failed test, the triggering frame is an `ert-fail' call, which is not so interesting. But in case of a test throwing an error, this drops the `error' call which is too much. * lisp/emacs-lisp/debug.el (debugger-make-xrefs): Remove. * lisp/emacs-lisp/ert.el (ert--make-xrefs-region): Bring in relevant code from `debugger-make-xrefs'. (ert--print-backtrace): Add DO-XREFS parameter, delegate to `debugger-insert-backtrace'. (ert--run-test-debugger): Record the backtrace frames starting from the instigating `signal' call. (ert-run-tests-batch): Pass nil for `ert--print-backtrace's new DO-XREFS parameter. (ert-results-pop-to-backtrace-for-test-at-point): Pass t as DO-XREFS to `ert--print-backtrace' and remove call to `debugger-make-xrefs'. * test/lisp/emacs-lisp/ert-tests.el (ert-test-record-backtrace): Check the backtrace list instead of comparing its string representation. Expect `signal' to be the first frame.
-
Escape control characters in backtraces (Bug#6991)
* src/print.c (syms_of_print): Add new variable, print-escape-control-characters. (print_object): Print control characters with octal escape codes when print-escape-control-characters is true. * lisp/subr.el (backtrace): * lisp/emacs-lisp/debug.el (debugger-setup-buffer): Bind `print-escape-control-characters' to t.
-
Don't redundantly cl-print arglist in function docstring again
* lisp/emacs-lisp/cl-print.el (cl-print-object): Don't print arglist part of docstring. * test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-1): Update test accordingly.
-
Hide byte code in backtraces (Bug#6991)
* lisp/emacs-lisp/debug.el (debugger-print-function): New defcustom, defaulting to `cl-print'. (debugger-insert-backtrace, debugger-setup-buffer): Use it instead of `prin1'. * etc/NEWS: Announce it.
-
Escape NUL bytes in X selections (Bug#6991)
* lisp/term/w32-win.el (w32--set-selection): * lisp/select.el (xselect--encode-string): Replace NUL bytes with "\0". * doc/emacs/killing.texi: Document new behavior. * etc/NEWS (times): Announce it.
-
Commits on Jun 30, 2017
-
Fix TAB display when the line-number face uses a smaller/larger font
* src/dispextern.h (struct it): New member lnum_pixel_width. * src/xdisp.c (maybe_produce_line_number): Compute the width of the line-number display in pixels. (x_produce_glyphs): Use it->lnum_pixel_width instead of a kludge that used it->lnum_width and made assumptions about pixel width.
-
Fix hscrolling with line numbers on TTY frames
* src/xdisp.c (hscroll_window_tree): Correct the X offset calculations on TTY frames. * src/term.c (produce_glyphs): Use it->lnum_pixel_width instead of a kludge using it->lnum_width.
-
Speed up the visual-mode relative line numbers
* src/xdisp.c (display_count_lines_visually): Introduce a shortcut: if a relative line number was already calculated for this iterator object, just increase it instead of the expensive call to move_it_to. Argument list changed to pass a pointer to the iterator object. (maybe_produce_line_number): Adjust for change in signature of display_count_lines_visually. Record the relative line number and the corresponding byte position in the iterator object also in the 'visual' mode.
-
Support displaying zero as the number of the current line
* src/xdisp.c (syms_of_xdisp) <display-line-numbers-current-absolute>: New variable. <display-line-numbers>: Doc fix. (maybe_produce_line_number): Support nil value of display-line-numbers-current-absolute. * lisp/cus-start.el (standard): Add customization form for display-line-numbers-current-absolute. * etc/NEWS: Document recently introduced features.
-
Add documentation for display-line-numbers
* doc/emacs/custom.texi (Init Rebinding): * doc/emacs/modes.texi (Minor Modes): Remove references to linum-mode. * doc/emacs/display.texi (Display Custom): Describe the line-number display. (Optional Mode Line): Fix the index entry to not conflict with that in "Display Custom". * doc/emacs/basic.texi (Position Info): Add cross-reference to "Display Custom", for line-number display. * src/xdisp.c (syms_of_xdisp): <display-line-numbers>: Mention display-line-numbers-disable in the doc string. * lisp/cus-start.el (standard): Fix lst change.
-
* doc/misc/tramp.texi (Android shell setup): Show default file name. Structure section. * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.3.2". * test/lisp/net/tramp-tests.el (tramp-test-temporary-file-directory): Offer home directory for mock method if it doesn't exist.
-
Fix relative-number display with non-nil display-line-number-width
* src/xdisp.c (maybe_produce_line_number): Don't treat a zero value of display-line-number-width as acceptable. Handle the case of 'relative' with display-line-number-width non-nil and smaller than the absolute line number requires. Reported by Alex <agrambot@gmail.com>.
-
Improve documentation of faces related to display-line-numbers
* lisp/faces.el (line-number, line-number-current-line): Warn against using non-monospaced fonts.
Commits on Jul 1, 2017
-
* lisp/emacs-lisp/cl-extra.el (cl--random-state): New defstruct
(cl--random-state, cl--random-time): Move from cl-lib.el. (cl-random): Use struct accessors. (cl-random-state-p): Remove, provided by the defstruct. (cl-make-random-state): Rewrite to struct constructor.
-
Avoid slow redisplay under 'visual' mode of line numbers
* src/xdisp.c (display_count_lines_visually): Avoid very slow redisplay when this function is invoked very far from point. Reported by Alex <agrambot@gmail.com>.
-
-
-
src/nsterm.h (ns_select): Compiler doesn't like sigmask being const. (ns_run_loop_break) [HAVE_PTHREAD]: New function. src/nsterm.m (ns_select): Call thread_select from within ns_select. (ns_run_loop_break) [HAVE_PTHREAD]: New function. (ns_send_appdefined): Don't wait for main thread when sending app defined event. src/process.c (wait_reading_process_output): Call thread_select from within ns_select. src/systhread.c (sys_cond_broadcast) [HAVE_NS]: Break ns_select out of its event loop using ns_run_loop_break.
-
Improve display of tabs with line numbers
* src/xdisp.c (x_produce_glyphs): Improve calculation of next tab stop in hscrolled lines. Prevent aborts in compute_line_metrics.
-
Refactor key describing commands
* lisp/help.el (help-read-key-sequence, help--analyze-key): New functions, extracted from `describe-key' and `describe-key-briefly'. (describe-key, describe-key-briefly): Use them.
-
Ignore mouse-movement for describe-key-briefly (Bug#12204)
* lisp/help.el (help-read-key-sequence): Add optional argument ot ignore `mouse-movement' events. (describe-key-briefly): Use it. * doc/emacs/help.texi (Key Help): * etc/NEWS: Mention that mouse movement is ignored.
-
Make C++ digit separators work. Amend the handling of single quotes g…
…enerally Single quotes, even in strings and comments, are now marked with the "punctuation" syntax-table property, except where they are validly bounding a character literal. They are font locked with font-lock-warning-face except where they are valid. This is done in C, C++, ObjC, and Java Modes. * lisp/progmodes/cc-defs.el (c-clear-char-property-with-value-on-char-function) (c-clear-char-property-with-value-on-char, c-put-char-properties-on-char): New functions/macros. * lisp/progmodes/cc-fonts.el (c-font-lock-invalid-single-quotes): New function. (c-basic-matchers-before): invoke c-font-lock-invalid-single-quotes. * lisp/progmodes/cc-langs.el (c-get-state-before-change-functions): Remove c-before-after-change-digit-quote from wherever it occurs. Insert c-parse-quotes-before-change into the entries for the languages where it is needed. (c-before-font-lock-functions): Remove c-before-after-change-digit-quote from wherever it occurs. Insert c-parse-quotes-after-change into the entries for the languages which need it. (c-has-quoted-numbers): New lang-defconst/-defvar. * lisp/progmodes/cc-mode.el (c-before-after-change-digit-quote): Remove. (c-maybe-quoted-number-head, c-maybe-quoted-number-tail) (c-maybe-quoted-number): New defconsts. (c-quoted-number-head-before-point, c-quoted-number-tail-after-point) (c-quoted-number-straddling-point, c-parse-quotes-before-change) (c-parse-quotes-after-change): New functions.
Alan Mackenzie committedJul 1, 2017 -
Minor copyedits of manuals regarding bidi conformance
* doc/emacs/mule.texi (Bidirectional Editing): * doc/lispref/display.texi (Bidirectional Display): Update the bidi conformance text.
-
* src/emacs-module.h.in (emacs_funcall_exit): Lose trailing comma. C++98 doesn't allow trailing commas in enumerations.
-
Also mark module init function as noexcept if possible
* src/emacs-module.h.in (emacs_module_init): Mark as noexcept if possible.
-
Commits on Jul 2, 2017
-
Let test summary go through even if some logs were not generated
* lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit): Check for existence of log files before reading.
-
-
* lisp/autorevert.el (auto-revert-find-file-function): New defun. (find-file-hook): Use it. (Bug#27502) (auto-revert-remove-current-buffer): New defun. (auto-revert-mode, auto-revert-buffers): Use it.
-
-
Adapt Lisp reference to reader changes
The reader now warns about some unescaped character literals, but still allows them for compatibility reasons. Slightly adapt the manual to forbid them officially. * doc/lispref/objects.texi (Basic Char Syntax): Document that backslashes are now required before some characters.
-
Remove FIXME comments about sentinel values
These FIXMEs can't be addressed because they would require breaking changes to the module API. Furthermore, other module functions don't return sentinel values as well, so users generally have to call non_local_exit_check anyway. * src/emacs-module.c (module_set_user_ptr) (module_set_user_finalizer, module_vec_set, module_vec_size): Remove FIXME comments.
-
Fix bug in yesterday's CC Mode commit.
* lisp/progmodes/cc-mode.el (c-quoted-number-head-before-point): Check a search has succeded before using the match data. (c-quoted-number-head-before-point, c-quoted-number-head-after-point): Specify that the position of the extremity of the head or tail is in the match data.
Alan Mackenzie committedJul 2, 2017 -
Extend dired-do-shell-command substitutions
Substitute "`?`" inside command with the current file name. See details in: https://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00618.html * lisp/dired-aux.el (dired-quark-subst-regexp, dired-star-subst-regexp): Mark as obsolete. (dired-isolated-string-re): New defun. (dired--star-or-qmark-p): New predicate. (dired-do-shell-command): Use dired--star-or-qmark-p. Substitute "`?`" with the current file name. * doc/emacs/dired.texi (Shell Commands in Dired): Update manual. ; * etc/NEWS: Mention it.
-
Ask confirmation for all suspicious wildcards
* lisp/dired-aux.el (dired-do-shell-command): Check that all the wildcards are right. Otherwise, ask for confirmation (Bug#27496).
-
Avoid off-by-one errors in column C-n/C-p calculations
* src/indent.c (Fvertical_motion): Help C-n/C-p estimate correctly the width used up by line numbers by looking near the window-start point.
-
Electric quotes: Improve support for Markdown mode (Bug#24709)
Introduce a new user option 'electric-quote-context-sensitive'. If non-nil, have ' insert an opening quote if sensible. Also introduce a new variable 'electric-quote-code-faces'. Major modes such as 'markdown-mode' can add faces to this list to treat text as inline code and disable electric quoting. * lisp/electric.el (electric-quote-context-sensitive): New user option. (electric-quote-code-faces): New variable. (electric-quote-post-self-insert-function): Treat ' as ` if desired and applicable; disable electric quoting for given faces. * test/lisp/electric-tests.el (electric-quote-opening-single) (electric-quote-closing-single, electric-quote-opening-double) (electric-quote-closing-double) (electric-quote-context-sensitive-backtick) (electric-quote-context-sensitive-bob-single) (electric-quote-context-sensitive-bob-double) (electric-quote-context-sensitive-bol-single) (electric-quote-context-sensitive-bol-double) (electric-quote-context-sensitive-after-space-single) (electric-quote-context-sensitive-after-space-double) (electric-quote-context-sensitive-after-letter-single) (electric-quote-context-sensitive-after-letter-double) (electric-quote-context-sensitive-after-paren-single) (electric-quote-context-sensitive-after-paren-double) (electric-quote-markdown-in-text) (electric-quote-markdown-in-code): New unit tests.
-
* lisp/emacs-lisp/cl-print.el (cl-print-compiled-button): t by default.
* lisp/emacs-lisp/debug.el (debugger-insert-backtrace): * lisp/help-fns.el (describe-variable): No need to let-bind `cl-print-compiled-button' to t anymore.
-
Make eww-search-words prompt for query if nothing selected
* lisp/net/eww.el (eww-search-words): Make eww-search-words prompt the user for a search query if the region is inactive or if the region is just whitespace. Copyright-paperwork-exempt: yes
-
Split shr-copy-url dwim behavior into separate functions (Bug#26826)
* lisp/net/shr.el (shr-url-at-point, shr-probe-url) (shr-probe-and-copy-url, shr-maybe-probe-and-copy-url): New functions, split out from `shr-copy-url'. (shr-copy-url): Only copy the url, don't fetch it. (shr-map): Bind 'w' and 'u' to `shr-maybe-probe-and-copy-url', which has the same behavior as the old `shr-copy-url'. * etc/NEWS: Announce changes.
Commits on Jul 3, 2017
-
dired-do-shell-command: Fix check for wildcards
* lisp/dired-aux.el (dired-do-shell-command): Replace just '?', '*' and '`?' i.e., keep the whitespaces. * test/lisp/dired-aux-tests.el (dired-test-bug27496): Add test.
-
-
-
-
* test/Makefile.in: Remove instrumentation for tramp-tests. * test/lisp/net/tramp-tests.el (tramp-test36-asynchronous-requests): Remove instrumentation. Wrap with a timeout. Give hydra another timer value. Set `default-directory' in timer.
-
-
Add absolute optional parameter to line-number-at-pos (Bug#26417)
* lisp/simple.el (line-number-at-pos): Add a second optional argument 'absolute'. * test/list/simple-tests.el: Add tests for 'line-number-at-pos'.
-
Fix and simplify ansi escape detection (Bug#21381)
* lisp/ansi-color.el (ansi-color-regexp, ansi-color-drop-regexp): Remove. (ansi-color-control-seq-regexp): New constant, matches all escape sequences. (ansi-color-filter-apply, ansi-color-apply) (ansi-color-filter-region, ansi-color-apply-on-region): Use it instead of matching color sequences separately from ignored sequences. Differentiate color sequences simply by checking the last character.
-
Let ansi-color overlay hooks work in eshell (Bug#27407)
* lisp/ansi-color.el (ansi-color-make-extent): Add `ansi-color-freeze-overlay' to `insert-behind-hooks' as well. * lisp/eshell/esh-mode.el (eshell-output-filter): Let-bind `inhibit-modification-hooks' to nil while inserting the string.
-
Reset ansi escape context before printing eshell prompt (Bug#27407)
* lisp/eshell/em-prompt.el (eshell-emit-prompt): Reset `ansi-color-context-region'.
-
(Re-)activate remote tests of filenotify-tests.el
* test/lisp/filenotify-tests.el (file-notify-test-remote-temporary-file-directory): Declare default host for mock method. Offer home directory for mock method if it doesn't exist. (file-notify-test09-watched-file-in-watched-dir-remote): Remove, it doesn't work reliably.
-
Avoid errors in vertical-motion when buffer is narrowed
* src/indent.c (Fvertical_motion): If need to start from window-start, and it is outside of the accessible portion, temporarily widen the buffer. This avoids errors in evil-mode. Reported by James Nguyen <james@jojojames.com>.
-
Offer non-aligned indentation in lists in js-mode (Bug#27503)
* lisp/progmodes/js.el (js--proper-indentation): New customization option 'js-indent-align-list-continuation'. Affects argument lists as well as arrays and object properties. * test/manual/indent/js-indent-align-list-continuation-nil.js: Test the change.
-
Use hook instead of face list to inhibit electric quoting
This is more flexible and doesn't couple electric quoting to font locking. Give that 'electric-quote-code-faces' was just introduced, remove it without formal deprecation. * lisp/electric.el (electric-quote-inhibit-functions): New abnormal hook variable. (electric-quote-post-self-insert-function): Run the hook. Remove use of old 'electric-quote-code-faces' variable. * test/lisp/electric-tests.el (electric-quote-markdown-in-text) (electric-quote-markdown-in-code): Adapt unit tests.
-
; Remove unused text properties in test
* test/lisp/electric-tests.el (electric-quote-markdown-in-code): Remove now-unused text properties.
Commits on Jul 4, 2017
-
Fix display of current line number in visual mode
* src/xdisp.c (maybe_produce_line_number): Fix visual-mode display of current line when line-number-current-line face was customized. Reported by Filipe Silva <filipe.silva@gmail.com>.
Commits on Jul 5, 2017
-
Fix infloop in uncomment-region-default (Bug#27112)
When `comment-continue' has only blanks, `comment-padright' produces a regexp that matches the empty string, so `uncomment-region-default' will loop infinitely. * lisp/newcomment.el (comment-padright): Only return a regexp if STR has nonblank characters.
-
Mention `ffap-url-unwrap-local' in find-file-at-point's docstring (Bu…
…g#27564) * lisp/ffap.el (find-file-at-point): Mention `ffap-url-unwrap-local' and `ffap-url-unwrap-remote'.
-
* lisp/progmodes/cc-mode.el: Mark unused arguments
(c-parse-quotes-before-change, c-parse-quotes-after-change): Remove unused vars.
-
-
* lisp/progmodes/cc-guess.el: Remove unused var
(c-guess-view-reorder-offsets-alist-in-style): Remove redundantly bound and computed variable `guessed-syntactic-symbols'.
-
* lisp/progmodes/cc-cmds.el: Remove unused vars
(c-syntactic-context): Declare as dynbound. (c-beginning-of-defun, c-end-of-defun): Remove unused var `start'.
-
* lisp/progmodes/cc-engine.el: Mark unused args
(c-beginning-of-statement-1, c-guess-basic-syntax): Remove unused var c-in-literal-cache. (c-debug-sws-msg): Silence byte-compiler, even if we don't use the arg. (c-append-to-state-cache): Remove unused var `bra+1s'. (c-remove-stale-state-cache): Remove unused var `pps-point-state'. (c-invalidate-state-cache-1): Remove unused var `pa'. (c-forward-decl-or-cast-1): Change comments so they don't look like outline headers. (c-restricted-<>-arglists, c-parse-and-markup-<>-arglists): Declare before first use. (c-forward-decl-or-cast-1): Remove unused var `backup-kwd-sym'. (c-backward-over-enum-header): Remove unused var `up-sexp-pos'.
-
* lisp/progmodes/cc-langs.el: Mark unused args
(c-primary-expr-regexp): Remove unused vars ambiguous-prefix-ops and unambiguous-prefix-ops.
-
-
* lisp/progmodes/cc-defs.el (lookup-syntax-properties): Move ...
... before first use
-
-
-
-
-
-
* lisp/net/tramp.el (tramp-file-name-handler): Don't trigger timers. * test/lisp/net/tramp-tests.el (tramp-test36-asynchronous-requests): Trigger timers. (tramp-test37-recursive-load, tramp-test38-remote-load-path): Set `default-directory' to a trustworthy value.
-
Small fix for bug-reference.el
* lisp/progmodes/bug-reference.el (bug-reference-bug-regexp): Autoload safety property. (Bug#27481)
-
Commits on Jul 6, 2017
-
I have some further changes in mind that would also need to disable the -Woverride-init warnings. In practice these warnings seem to be more trouble than they’re worth, so disable them in the cc command line. * configure.ac: Disable -Woverride-init here ... * src/bytecode.c: ... rather than here.
-
Convert hex digits more systematically
This makes the code a bit smaller and presumably faster, as it substitutes a single lookup for conditional jumps. * src/character.c (hexdigit): New constant. (syms_of_character) [HEXDIGIT_IS_CONST]: Initialize it. * src/character.h (HEXDIGIT_CONST, HEXDIGIT_IS_CONST): New macros. (hexdigit): New decl. (char_hexdigit): New inline function. * src/charset.c: Do not include c-ctype.h. * src/charset.c (read_hex): * src/editfns.c (styled_format): * src/image.c (xbm_scan): * src/lread.c (read_escape): * src/regex.c (ISXDIGIT) [emacs]: Use char_hexdigit insted of doing it by hand.
-
Check for integer overflow in xbm images
* src/image.c (XBM_TK_OVERFLOW): New constant. (xbm_scan): Check for integer overflow instead of relying on undefined behavior. Check that octal digits are actually octal.
-
Allow comment-indent-functions to specify exact indentation (Bug#385)
* lisp/newcomment.el (comment-choose-indent): Interpret a cons of two integers as indicating a range of acceptable indentation. (comment-indent): Don't apply `comment-inline-offset', `comment-choose-indent' already does that. (comment-indent-function): * doc/emacs/programs.texi (Options for Comments): Document new acceptable return values. * etc/NEWS: Announce it.
-
Don't put whitespace between open paren and comment in Lisp modes (Bu…
…g#19740) * lisp/emacs-lisp/lisp-mode.el (lisp-comment-indent): If current line's code ends in open paren, set comment indentation exactly to column following it. (lisp-mode-variables): Set `comment-indent-function' to `lisp-comment-indent'.
-
* lisp/org/org-table.el (org-table-sort-lines): Fix misspelling in prompt. * lisp/org/ox-ascii.el (org-ascii--describe-datum): Fix misspelling in call to org-element-lineage.
-
Fix lisp-comment-indent for single-semicolon case
* lisp/emacs-lisp/lisp-mode.el (lisp-comment-indent): Only check for open paren if we're looking at multiple comment characters. * test/lisp/emacs-lisp/lisp-mode-tests.el (lisp-comment-indent-1) (lisp-comment-indent-2): New tests.
-
Implement line numbers that disregard narrowing
* src/xdisp.c (display_count_lines_logically): New function, counts line numbers disregarding narrowing. Suggested by Andy Moreton <andrewjmoreton@gmail.com>. (maybe_produce_line_number): Call display_count_lines_logically instead of display_count_lines. Adapt BEGV, ZV, etc. to display-line-numbers-widen. (syms_of_xdisp) <display-line-numbers-widen>: New buffer-local variable. * lisp/cus-start.el (standard): Provide a customization form for display-line-numbers-widen. * lisp/frame.el: Add display-line-numbers-widen, display-line-numbers-current-absolute, and display-line-number-width to the list of variables that should trigger redisplay of the current buffer. * doc/emacs/display.texi (Display Custom): Document display-line-numbers-widen.
-
Don't skip epg tests (Bug#23561)
* test/lisp/epg-tests.el (with-epg-tests): Ignore REQUIRE-PASSPHRASE parameter, since we supply the passphrase via pinentry-program for all GPG versions (as of 2017-02-28 "Fix epg-tests with dummy-pinentry program (Bug#23619)"). (epg-tests-program-alist-for-passphrase-callback): Remove.
Commits on Jul 7, 2017
-
Convert more uses of looking-at to following-char
More followup to Karl Fogel's commit a84da83. * lisp/dired-aux.el (dired-add-entry, dired-subdir-hidden-p): * lisp/dired-x.el (dired-mark-unmarked-files, dired-mark-sexp): * lisp/help-fns.el (doc-file-to-man, doc-file-to-info): * lisp/proced.el (proced-toggle-marks): * lisp/progmodes/f90.el (f90-indent-line): * lisp/ses.el (ses-load): * lisp/tar-mode.el (tar-expunge): Replace instances of looking-at with char comparisons using following-char.
-
Remove Vwindow_text_change_functions and related code
Vwindow_text_change_functions had been provided for implementing line numbers but apparently was never functional or in use. * src/xdisp.c (redisplay_window): Remove handling of Vwindow_text_change_functions. (syms_of_xdisp): Remove Qwindow_text_change_functions. (Vwindow_text_change_functions): Remove variable. * doc/lispref/hooks.texi (Standard Hooks): Remove entry for `window-text-change-functions'.
Martin Rudalics committedJul 7, 2017 -
Fix vertical-motion across the place where line-number width changes
* src/indent.c (line_number_display_width): New function, refactored from line-number width calculations in vertical-motion. (Fvertical_motion): Call line_number_display_width when the width of line-number display is needed. (Fline_number_display_width): New defun. (syms_of_indent): Defsubr it. * doc/lispref/display.texi (Size of Displayed Text): Document line-number-display-width. * etc/NEWS: Mention line-number-display-width. * lisp/simple.el (last--line-number-width): New internal variable. (line-move-visual): Use it to adjust temporary-goal-column when line-number display changes its width.
-
Exclude blank columns from value of line-number-display-width
* src/indent.c (Fline_number_display_width): Don't add 2 to the number of columns we return, to make this consistent with display-line-number-width.
-
Fix several todo-mode bugs found while debugging bug#27609
* lisp/calendar/todo-mode.el (todo-toggle-mark-item): Calculate current category only once. (todo-mark-category): Update number of marked items to avoid spurious duplication in todo-categories-with-marks alist and corruption of the todo-categories alist. Handle empty line when there are no todo items and done items are shown. (todo-set-item-priority): Make noop if called from todo-raise-item-priority or todo-lower-item-priority when point is on a done todo item or an empty line. (todo-move-item): Use markers instead of integer positions to correctly handle deleting the now moved items from the source category (without markers an infinite loop arises when moving marked item to a preceding category). (todo-unarchive-items): Put point on the (first) restored done item, instead of leaving it at the end of the done items separator string. (todo-revert-buffer): Ensure buffer remains read-only after reverting.
Stephen Berman committedJul 7, 2017 -
todo-mode.el: Fix handling of hidden item headers (bug#27609)
* lisp/calendar/todo-mode.el (todo--item-headers-hidden): New variable. (todo-toggle-item-header): Use it. Make this command a noop if the file has no items. (todo-move-item, todo-item-done): Instead of concatenating the items to move into one string, make a list of them to facilitate handling hidden headers. Adjust insertion accordingly. (todo-archive-done-item): Handle hidden headers in archive file. (todo-unarchive-items): Handle hidden headers in todo file. (todo-backward-item): Use todo--item-headers-hidden and handle moving backward work when item date-time headers are hidden. (todo-remove-item): Delete date-time header overlay. (todo-get-overlay, todo-insert-with-overlays): Make them work with hidden date-time headers. (todo-modes-set-2): Make todo--item-headers-hidden buffer local.
Stephen Berman committedJul 7, 2017 -
* test/lisp/calendar/todo-mode-tests.el (with-todo-test): Declare an Edebug spec. Restore pre-test-run state of test files. (todo-test--show, todo-test--move-item) (todo-test--insert-item): New functions. (todo-test-get-archive): Remove, as subsumed by todo-test--show. Adjust all callers. (todo-test--is-current-buffer): Rename from todo-test-is-current-buffer and adjust uses. (todo-test-item-highlighting): Use todo-test--show. (todo-test-revert-buffer01, todo-test-revert-buffer02) (todo-test-raise-lower-priority) (todo-test-todo-mark-unmark-category, todo-test-move-item01) (todo-test-move-item02, todo-test-move-item03) (todo-test-move-item04, todo-test-move-item05) (todo-test-toggle-item-header01) (todo-test-toggle-item-header02) (todo-test-toggle-item-header03) (todo-test-toggle-item-header04) (todo-test-toggle-item-header05) (todo-test-toggle-item-header06) (todo-test-toggle-item-header07): New tests. * test/lisp/calendar/todo-mode-resources/todo-test-1.toda: * test/lisp/calendar/todo-mode-resources/todo-test-1.todo: Modify to accommodate new tests.
Stephen Berman committedJul 7, 2017 -
Commits on Jul 8, 2017
-
Fix ungetc bug when reading an encoding error
* src/lread.c (readchar, read_emacs_mule_char): Fix off-by-one error when reading an encoding error from a file, e.g., a symbol in an .elc file whose name is "\360\220\200\360".
-
Avoid ungetc when loading charset maps from files
* src/charset.c (read_hex): New args LOOKAHEAD and TERMINATOR, replacing the old EOF. All callers changed. This avoids the need to call ungetc.
-
Fix more ungetc bugs with encoding errors
* src/lread.c (infile): New variable, replacing ... (instream): ... this. All uses changed. (readbyte_from_stdio): New function, which deals with lookahead. (readbyte_from_file, Fget_file_char): Use it. (Fget_file_char): When misused, signal an error instead of relying on undefined behavior. (close_infile_unwind): New function. (Fload): Use it. (readevalloop): 2nd arg is now struct infile *, not FILE *. All callers changed. (read1): Handle lookahead when copying doc strings with encoding errors.
-
Support display of line numbers natively
This merges branch 'line-numbers'. * src/buffer.c (disable_line_numbers_overlay_at_eob): New function. * src/lisp.h (disable_line_numbers_overlay_at_eob): Add prototype. * src/dispextern.h (struct it): New members pt_lnum, lnum, lnum_bytepos, lnum_width, and lnum_pixel_width. * src/indent.c (line_number_display_width): New function, refactored from line-number width calculations in vertical-motion. (Fvertical_motion): Call line_number_display_width when the width of line-number display is needed. (Fline_number_display_width): New defun. (syms_of_indent): Defsubr it. * src/indent.c (Fvertical_motion): Help C-n/C-p estimate correctly the width used up by line numbers by looking near the window-start point. If window-start is outside of the accessible portion, temporarily widen the buffer. * src/term.c (produce_glyphs): Adjust tab stops for the horizontal space taken by the line-number display. * src/xdisp.c (display_count_lines_logically) (display_count_lines_visually, maybe_produce_line_number) (should_produce_line_number, row_text_area_empty): New functions. (try_window_reusing_current_matrix): Don't use this method when display-line-numbers is in effect. (try_window_id, try_cursor_movement): Disable these optimizations when the line-number-current-line face is different from line-number face and for relative line numbers. (try_window_id, redisplay_window, try_cursor_movement): For visual line-number display, disable the same redisplay optimizations as for relative. (x_produce_glyphs): Adjust tab stops for the horizontal space taken by the line-number display. (hscroll_window_tree): Adjust hscroll calculations to line-number display. (DISP_INFINITY): Renamed from INFINITY to avoid clashes with math.h; all users changed. (set_cursor_from_row): Fix calculation of cursor X coordinate in R2L rows with display-produced glyphs at the beginning. (display_line): Use should_produce_line_number to determine whether a line number should be produced for each glyph row, and maybe_produce_line_number to produce line numbers. Don't display line numbers in the minibuffer and in tooltip frames. Call row_text_area_empty to verify that a glyph row's text area is devoid of any glyphs that came from a buffer or a string. This fixes a bug with empty-lines indication disappearing when line numbers or line-prefix are displayed. (syms_of_xdisp) <display-line-numbers, display-line-numbers-widen> <display-line-number-width>: New buffer-local variables. <display-line-numbers-current-absolute>: New variable. * lisp/cus-start.el (standard): Provide customization forms for display-line-numbers and its sub-features. * lisp/faces.el (line-number, line-number-current-line): New faces. * lisp/frame.el: Add display-line-numbers, display-line-numbers-widen, display-line-numbers-current-absolute, and display-line-number-width to the list of variables that should trigger redisplay of the current buffer. * lisp/menu-bar.el (menu-bar-showhide-menu): Add menu-bar item to turn display-line-numbers on and off. (toggle-display-line-numbers): New function. * lisp/simple.el (last--line-number-width): New internal variable. (line-move-visual): Use it to adjust temporary-goal-column when line-number display changes its width. * doc/emacs/basic.texi (Position Info): Add cross-reference to "Display Custom", for line-number display. * doc/emacs/custom.texi (Init Rebinding): * doc/emacs/modes.texi (Minor Modes): Remove references to linum-mode. * doc/emacs/display.texi (Display Custom): Describe the line-number display. * doc/lispref/display.texi (Size of Displayed Text): Document line-number-display-width. * etc/NEWS: Document display-line-numbers and its customizations.
-
Commentary enhancement in frame.el
* lisp/frame.el: Explain how to test whether a variable needs to be added to the list of those which are watched for buffer redisplay.
-
Avoid compiler warnings in xdisp.c debugging code
* src/xdisp.c (dump_glyph, dump_glyph_row, Fdump_glyph_matrix): Use pD directives for ptrdiff_t values instead of pI, to avoid compilation warnings on 64-bit hosts. (Bug#27597)
-
Support '=' in Scheme and Lisp tags in 'etags'
* lib-src/etags.c (get_lispy_tag): New function. (L_getit, Scheme_functions): Use get_lispy_tag (Bug#5624). * test/manual/etags/CTAGS.good: * test/manual/etags/ETAGS.good_1: * test/manual/etags/ETAGS.good_2: * test/manual/etags/ETAGS.good_3: * test/manual/etags/ETAGS.good_4: * test/manual/etags/ETAGS.good_5: * test/manual/etags/ETAGS.good_6: * test/manual/etags/Makefile: * test/manual/etags/el-src/TAGTEST.EL: Update tests. * test/manual/etags/scm-src/test.scm: New tests for Scheme.
-
Update Unicode data and files to Unicode 10.0
* admin/notes/unicode: * admin/unidata/README: * admin/unidata/BidiBrackets.txt: * admin/unidata/BidiMirroring.txt: * admin/unidata/Blocks.txt: * admin/unidata/IVD_Sequences.txt: * admin/unidata/NormalizationTest.txt: * admin/unidata/SpecialCasing.txt: * admin/unidata/UnicodeData.txt: * lisp/international/characters.el: * lisp/international/fontset.el (script-representative-chars): * lisp/international/mule-cmds.el (ucs-names): Update per Unicode 10.0.
-
Capitalize the menu entry for display-line-numbers
* lisp/menu-bar.el (menu-bar-showhide-menu): Capitalize menu item for display-line-numbers. Suggested by Martin Rudalics <rudalics@gmx.at>.
-
Module assertions: check for garbage collections
It's technically possible to write a user pointer finalizer that calls into Emacs module functions. This would be disastrous because it would allow arbitrary Lisp code to run during garbage collection. Therefore extend the module assertions to check for this case. * src/emacs-module.c (module_assert_thread): Also check whether a garbage collection is in progress. * test/data/emacs-module/mod-test.c (invalid_finalizer) (Fmod_test_invalid_finalizer): New test module functions. (emacs_module_init): Register new test function. * test/src/emacs-module-tests.el (module--test-assertion) (module--with-temp-directory): New helper macros. (module--test-assertions--load-non-live-object): Rename existing unit test, use helper macros. (module--test-assertions--call-emacs-from-gc): New unit test.
-
-
Semi-automate the procedure for updating UCS normalize test bad lines
* test/lisp/international/ucs-normalize-tests.el: Remove incorrect commentary describing a manual procedure for producing the updated failing lines, it did not actually work. Replace it with pointer to new function which prints the updated values. (ucs-normalize-tests--rule1-holds-p): Renamed from ucs-normalize-tests--invariants-hold-p. (ucs-normalize-tests--rule2-holds-p): Renamed from ucs-normalize-tests--invariants-rule2-hold-p. (ucs-normalize-tests--rule1-failing-for-partX): Renamed from ucs-normalize-tests--invariants-failing-for-part. (ucs-normalize-tests--rule1-failing-for-lines): Renamed from ucs-normalize-tests--invariants-failing-for-lines. (ucs-normalize-tests--part2-rule1-failed-lines): New variable. (ucs-normalize-part2): Set it. (ucs-normalize-part1): Always run through to end of test before checking for failures. (ucs-normalize-tests--insert-failing-lines) (ucs-normalize-check-failing-lines): New functions, used to update the *--failing-lines-part* variables.
-
Update failing lines for UCS normalize tests
* test/lisp/international/ucs-normalize-tests.el (ucs-normalize-tests--failing-lines-part2): Update for new admin/unidata/NormalizationTest.txt version.
-
Optimize UCS normalization tests
Brings the the time for `ucs-normalize-part1' from 200s down to 130s. * test/lisp/international/ucs-normalize-tests.el (ucs-normalize-tests--parse-column): Use character instead of string of length 1 for terminator. Convert return value into string since all callers need that form anyway. (ucs-normalize-tests--normalization-equal-p): Rename from ucs-normalize-tests--normalize. Use dedicated buffer instead of messing with narrowing. Take string to compare against and insert it into buffer so that compare-buffer-substrings can be used instead of allocating a new string from buffer contents. (ucs-normalize-tests--normalization-chareq-p): New macro, specialized for comparing single character. (ucs-normalize-tests--rule1-holds-p) (ucs-normalize-tests--rule2-holds-p): Turn into defsubst. (ucs-normalize-tests--rule1-failing-for-partX): Use `eq' instead of `='.
-
Commits on Jul 9, 2017
-
Add realgud faces faces to whiteboard...
Adjust wheatgrass to use underline for enabled/disabled breakpoints
-
Define internal_border_parts for window systems only (Bug#27615)
* src/keyboard.c: (internal_border_parts): Define only when HAVE_WINDOW_SYSTEM is enabled. (Bug#27615)
-
-
Speed up display of line numbers for very large buffers
* src/xdisp.c (maybe_produce_line_number): Speed up line counting using values cached by mode-line display of line numbers. (Bug#27622)
-
-
Improve indexing of VC-related stuff in the Emacs manual
* doc/emacs/maintaining.texi (Version Control): Add a "VC" index entry. (Bug#27627)
-
Avoid compilation warning in files.el
* lisp/files.el (auto-save-visited-file-name): Avoid obsoletion warning due to its use in auto-save-visited-mode.
-
Avoid crashes on MS-Windows starting 64-bit .NET executables
* src/w32proc.c (w32_executable_type): Don't assume that the import directory in a DLL will always be non-NULL. (Bug#27527) Copyright-paperwork-exempt: yes
-
Refactor 'electric-quote-mode'
* lisp/electric.el (electric-quote-post-self-insert-function): Remove local variable 'start', which was misnamed and only used once.
-
Remove pointless code in 'electric-quote-mode'
* lisp/electric.el (electric-quote-post-self-insert-function): Remove pointless form.
-
Further improve electric quote support for Markdown (Bug#24709)
Markdown sets both 'comment-start' and 'comment-use-syntax' to non-nil values. Therefore 'electric-quote-mode' recognized it as a programming mode. Fix this by first checking whether the current major mode is derived from 'text-mode'. * lisp/electric.el (electric-quote-post-self-insert-function): Treat 'text-mode' as stronger signal than comment syntax. * test/lisp/electric-tests.el (electric-quote-markdown-in-text) (electric-quote-markdown-in-code): Adapt unit tests.
-
Fix bug in module_free_global_ref (Bug#27587)
* src/emacs-module.c (module_free_global_ref): Actually remove entry from hash table. Copyright-paperwork-exempt: yes
-
* src/emacs-module.c (module_free_global_ref): Re-add assertion that the reference count is zero. This assertion was removed in commit 8afaa13, but it's not included in the test performed by XFASTINT before, because the previous reference count could have been zero already in the case of a buggy implementation. This assertion might have detected Bug#27587.
-
Minor simplification of module_free_global_ref
* src/emacs-module.c (module_free_global_ref): Remove unused variable 'hashcode'. Inline variable 'value' that's only used once.
-
Fix core dump in substitute-object-in-subtree
Without this fix, (substitute-object-in-subtree #0=(#0# 'a) 'a) would dump core, since the C code would recurse indefinitely through the infinite structure. This patch adds an argument to the function, and renames it to lread--substitute-object-in-subtree as the function is not general-purpose and should not be relied on by outside code. See Bug#23660. * src/intervals.c (traverse_intervals_noorder): ARG is now void *, not Lisp_Object, so that callers need not cons unnecessarily. All callers changed. Also, remove related #if-0 code that was “temporary” in the early 1990s and has not been compilable for some time. * src/lread.c (struct subst): New type, for substitution closure data. (seen_list): Remove this static var, as this info is now part of struct subst. All uses removed. (Flread__substitute_object_in_subtree): Rename from Fsubstitute_object_in_subtree, and give it a 3rd arg so that it doesn’t dump core when called from the top level with an already-cyclic structure. All callers changed. (SUBSTITUTE): Remove. All callers expanded and then simplified. (substitute_object_recurse): Take a single argument SUBST rather than a pair OBJECT and PLACEHOLDER, so that its address can be passed around as part of a closure; this avoids the need for an AUTO_CONS call. All callers changed. If the COMPLETED component is t, treat every subobject as potentially circular. (substitute_in_interval): Take a struct subst * rather than a Lisp_Object, for the closure data. All callers changed. * test/src/lread-tests.el (lread-lread--substitute-object-in-subtree): New test, to check that the core dump does not reoccur.
-
Fix failing module tests on GNU/Linux
* test/src/emacs-module-tests.el (module--test-assertions--load-non-live-object) (module--test-assertions--call-emacs-from-gc): Avoid test failures due to backtraces.
Commits on Jul 10, 2017
-
Add Quick Start Guide to Tramp manual
* doc/misc/tramp.texi: Use consequently "@value{tramp}" and "MS Windows". (Quick Start Guide): New node. * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.3.3-pre".
-
Use `with-demoted-errors' in Tramp
* lisp/net/tramp.el (tramp-with-demoted-errors): New defmacro. * lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered): Use it.
Commits on Jul 11, 2017
-
Add an optional testfn parameter to assoc
* src/fns.c (assoc): New optional testfn parameter used for comparison when provided. * test/src/fns-tests.el (test-assoc-testfn): Add tests for the new 'testfn' parameter. * src/buffer.c: * src/coding.c: * src/dbusbind.c: * src/font.c: * src/fontset.c: * src/gfilenotify.c: * src/image.c: * src/keymap.c: * src/process.c: * src/w32fns.c: * src/w32font.c: * src/w32notify.c: * src/w32term.c: * src/xdisp.c: * src/xfont.c: Add a third argument to Fassoc calls. * etc/NEWS: * doc/lispref/lists.texi: Document the new 'testfn' parameter.
-
Improve documentation of display-line-numbers
* src/xdisp.c (syms_of_xdisp) <display-line-numbers>: Improve the doc string. Suggested by Alex <agrambot@gmail.com>.
-
Use fixed-pitch font for display-line-numbers
* lisp/faces.el (line-number): Use a fixed-pitch font by default, even if the default face uses a variable-pitch font. Reported by James Cloos <cloos@jhcloos.com>.
Commits on Jul 12, 2017
-
-
Avoid assertion violations in close_infile_unwind
* src/lread.c (close_infile_unwind): A temporary band-aid solution for bug#27642: allow 'infile' be NULL.
-
Minor tweaks of new line number display variables
* src/xdisp.c (Vdisplay_line_numbers): Tweak doc-string. (Vdisplay_line_number_width): Rename to Vdisplay_line_numbers_width. (maybe_produce_line_number): Comply with above rename. * lisp/cus-start.el (standard): * lisp/frame.el (top-level): * etc/NEWS: Comply with renaming of `display-line-number-width' to `display-line-numbers-width'.
Martin Rudalics committedJul 12, 2017 -
CC Mode: create and use c-set-keymap-parent.
* lisp/progmodes/cc-defs.el (c-set-keymap-parent): New macro. * lisp/progmodes/cc-mode.el (top-level): Remove cc-bytecomp-defun for set-keymap-parents. (c-make-inherited-keymap): Use c-set-keymap-parent in place of inline code.
Alan Mackenzie committedJul 12, 2017 -
Make prog-mode-map the parent of c-mode-base-map. Fixes bug #26658.
* lisp/progmodes/cc-mode.el (top level): Make prog-mode-map the parent of c-mode-base-map if possible.
-
Fix some bugs in c-defun-name. This fixes bug #25623.
* lisp/progmodes/cc-cmds.el (c-defun-name): Fix some bugs to do with structs, etc.
Alan Mackenzie committedJul 12, 2017
Commits on Jul 13, 2017
-
-
Add tests for SES, and fix one more cell renaming bug.
* lisp/ses.el (ses-relocate-all): In case of insertion, do not relocate value for named cells as they keep the same symbol. (ses-rename-cell): Set new cell name symbol to cell value --- do not rely on recalculating. Push cells with updated data --- cell name, cell reference list, or cell formula --- to deferred write list. * test/lisp/ses-tests.el: New file, with 7 tests for SES.
Vincent Belaïche committedJul 13, 2017 -
C++ Mode. Fix anomaly occurring when a ">" is deleted then reinserted.
This fontification anomaly happened because after deleting the ">", c-forward-<>-arglist parses the preceding identifier as a putative type but stores it in c-found-types before it becomes clear it is not an unambiguous type. c-forward-<>-arglist fails, leaving the spurious type id in c-found-types. Fix this by "binding" c-found-types "to itself" in c-forward-<>-arglist, and restoring the original value when that function call fails. * lisp/progmodes/cc-engine.el (c-copy-found-types): New function. (c-forward-<>-arglist): Record the original value of c-found-types at the beginning of the function, and restore it at the end on failure. * lisp/progmodes/cc-mode.el (c-unfind-coalesced-tokens): Rewrite more accurately.
Alan Mackenzie committedJul 13, 2017 -
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Vincent Belaïche committedJul 13, 2017
Commits on Jul 14, 2017
-
This incorporates: 2017-07-13 Improve cross-compilation guesses for native Windows 2017-07-11 More systematic m4 quoting and indentation 2017-07-10 Make sure $host and $host_os are defined when used 2017-07-03 stdioext: Port to OpenVMS 2017-06-24 xalloc-oversized: port to icc * doc/misc/texinfo.tex, lib/fpending.c, lib/stdio-impl.h: * lib/xalloc-oversized.h, m4/dirfd.m4, m4/gettimeofday.m4: * m4/lstat.m4, m4/mktime.m4, m4/pselect.m4, m4/putenv.m4: * m4/stdint.m4, m4/strtoimax.m4, m4/utimes.m4: Copy from Gnulib.
-
Revert "Use fixed-pitch font for display-line-numbers"
This reverts commit d014a5e. * lisp/faces.el (line-number): Don't use a fixed-pitch font, by popular demand. For relevant discussions, see http://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00433.html http://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00445.html
-
-
-
-