1. 25 Jun, 2017 5 commits
    • Michael Albinus's avatar
      Fix Android 6/7 problems in Tramp · 68e03d1e
      Michael Albinus authored
      * lisp/net/tramp-adb.el (tramp-adb-ls-toolbox-regexp): Fix link part.
      (tramp-adb-handle-file-name-all-completions): Insert "."  and
      ".." only when needed.
      (tramp-adb-get-ls-command): Force one column output for toybox.
    • Stefan-W. Hahn's avatar
      * lisp/subr.el (setq-local): Add debug declaration (Bug#27408). · 51e8e77d
      Stefan-W. Hahn authored
      Copyright-paperwork-exempt: yes
    • Alan Mackenzie's avatar
      Make CC Mode load cl-lib rather than cl in Emacs 26. · b0042b76
      Alan Mackenzie authored
      * lisp/progmodes/cc-cmds.el (c-declaration-limits): Remove unused local
      * 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
      * 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.
    • Martin Rudalics's avatar
      Provide additional support for child frames · 1886246f
      Martin Rudalics authored
      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
      * 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): Mention `display-buffer-in-child-frame' in
      (display-buffer-in-child-frame): New action function for
      (window--sanitize-margin): Return zero when MARGIN cannot be
      (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): 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
      * src/frame.c (keep_ratio): New function.
      (adjust_frame_size): Call keep_ratio for each of F's child
      (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
      (frame_parm_table): Add Qno_special_glyphs entry.
      (frame_float_type): New enumeration type.
      (frame_float): New function to handle frame size and position
      (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
      * 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
      (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
      (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
      (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
      * src/window.h: Reorganize and re-comment macros.  Use
      window_wants_modeline and window_wants_header_line instead of
      (WINDOW_BUFFER): New macro.
      * src/xdisp.c (window_text_bottom_y, window_box_height)
      (window_box, start_display)
      (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
      (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
      (Vx_window_left_edge_shape, Vx_window_top_left_corner_shape)
      (Vx_window_top_edge_shape, Vx_window_top_right_corner_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
      * doc/lispref/elisp.texi (Top): Add entry for "Mouse Dragging
      * 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
      (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'
      (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
      (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 Parameters): Describe new parameters 'mode-line-format'
      and 'header-line-format'.  Index all window parameters described
      in this section.
    • Paul Eggert's avatar
      Adjust lm-verify to accept current notices · 43147137
      Paul Eggert authored
      Problem reported by Mike Kupfer in:
      * 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.
  2. 24 Jun, 2017 2 commits
  3. 23 Jun, 2017 2 commits
    • Vincent Belaïche's avatar
    • Vincent Belaïche's avatar
      Fix symbol relocation when the relocated cell is renamed. · eebb9783
      Vincent Belaïche authored
      * 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.
  4. 22 Jun, 2017 16 commits
    • Paul Eggert's avatar
      Remove getc_unlocked configure-time check · dfe73cb0
      Paul Eggert authored
      * configure.ac (getc_unlocked): Remove check, as unlocked-io now
      does this for us.
    • Paul Eggert's avatar
      Use unlocked stdio more systematically · f6ef15cf
      Paul Eggert authored
      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
      * 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)
      * 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)
      * src/sysdep.c (reset_sys_modes, procfs_ttyname)
      * 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)
      * 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.
    • Glenn Morris's avatar
    • Michal Nazarewicz's avatar
      unidata: don’t check special casing in unidata-check (bug#26656) · 21132e26
      Michal Nazarewicz authored
      * 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.
    • Stefan Monnier's avatar
      * lisp/descr-text.el (describe-char): Avoid string-*-multibyte · 0ee2e853
      Stefan Monnier authored
      Avoid string-to-multibyte and string-as-unibyte.
      Don't make *Help* unibyte just because the char was in a unibyte buffer.
    • Vincent Belaïche's avatar
      Do not hard code A1 cell reference, as it may be renamed. · d533f5f2
      Vincent Belaïche authored
      * lisp/ses.el (ses-recalculate-all): `A1' -> `(ses-cell-symbol 0 0)'
    • Martin Rudalics's avatar
      Fix make_hash_table calls in lread.c · 386a3da9
      Martin Rudalics authored
      * src/lread.c (readevalloop, read_internal_start): Fix
      make_hash_table calls to make build succeed.
    • Ken Raeburn's avatar
      Merge several Lisp reader speedups. · 85f6aa33
      Ken Raeburn authored
    • Ken Raeburn's avatar
      Create less garbage to collect while reading symbols. · 59f3c866
      Ken Raeburn authored
      * 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
    • Ken Raeburn's avatar
      Replace read_objects assoc list with two hash tables. · b9145563
      Ken Raeburn authored
      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
      (substitute_objects_recurse): Check read_objects_completed instead of
      read_objects for the known possibly-recursive objects.
      (syms_of_lread): Update initializations.
    • Ken Raeburn's avatar
      Use getc_unlocked. · efe200c1
      Ken Raeburn authored
      * 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.
    • Stefan Monnier's avatar
      Reduce lread substitutions. · 6af67b4a
      Stefan Monnier authored
      * 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.
    • Ken Raeburn's avatar
      Short-circuit substitutions for some simple types. · 0b3a0f30
      Ken Raeburn authored
      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
    • Paul Eggert's avatar
      Limit style_format to MAX_ALLOCA · 87a44b93
      Paul Eggert authored
      * src/editfns.c (styled_format): Subtract initial buffer size
      from sa_avail, since it is nontrivial.
    • Paul Eggert's avatar
      Limit bidi_find_bracket_pairs to MAX_ALLOCA · 35caaf71
      Paul Eggert authored
      * 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.
    • Paul Eggert's avatar
      Limit insert-file-contents to MAX_ALLOCA · 07a3386f
      Paul Eggert authored
      * src/fileio.c (READ_BUF_SIZE): Don’t allocate more than
      MAX_ALLOCA bytes in a single stack array.
  5. 21 Jun, 2017 6 commits
    • Paul Eggert's avatar
      Remove malloc_find_address relic · b7dfd39c
      Paul Eggert authored
      * src/gmalloc.c (register_heapinfo, _malloc_internal_nolock):
      Omit unnecessary initialization.
    • Paul Eggert's avatar
      Fix temacs hybrid_malloc core dump · ac1ceadc
      Paul Eggert authored
      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.
      Remove; no longer needed.
      (BLOCK): Use unsigned division, as that does the right thing near zero.
      (register_heapinfo, __malloc_internal_nolock, __free_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.
    • Katsumi Yamaoka's avatar
      Make gnus-article-date-user work · 1de9e298
      Katsumi Yamaoka authored
      * lisp/gnus/gnus-art.el (article-date-ut):
      Work for unfolded multi-line Date header.
      Refactor; add header name if it is missing in user-defined date line.
      (article-date-user): Fix name of date type.
    • Noam Postavsky's avatar
      Keep order of completion candidates (Bug#25995, Bug#24676) · 1ed2086a
      Noam Postavsky authored
      * 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.
    • Glenn Morris's avatar
    • Alex Gramiak's avatar
      Mark prolog indent variables as safe (bug#27369) · 67192113
      Alex Gramiak authored
      * lisp/progmodes/prolog.el (prolog-indent-width)
      (prolog-left-indent-regexp, prolog-paren-indent-p)
      (prolog-paren-indent): Add :safe property.
  6. 20 Jun, 2017 9 commits