1. 13 Jul, 2017 1 commit
    • Vincent Belaïche's avatar
      Add tests for SES, and fix one more cell renaming bug. · b048351a
      Vincent Belaïche authored
      * 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.
  2. 12 Jul, 2017 2 commits
  3. 11 Jul, 2017 4 commits
    • Eli Zaretskii's avatar
      Use fixed-pitch font for display-line-numbers · d014a5e1
      Eli Zaretskii authored
      * 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>.
    • Eli Zaretskii's avatar
    • Eli Zaretskii's avatar
      Improve documentation of display-line-numbers · 373cef5f
      Eli Zaretskii authored
      * src/xdisp.c (syms_of_xdisp) <display-line-numbers>: Improve the
      doc string.  Suggested by Alex <agrambot@gmail.com>.
    • NicolasPetton's avatar
      Add an optional testfn parameter to assoc · 0bece6c6
      NicolasPetton authored
      * 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.
  4. 10 Jul, 2017 2 commits
    • Michael Albinus's avatar
      Use `with-demoted-errors' in Tramp · 689c5c20
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-with-demoted-errors): New defmacro.
      * lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered): Use it.
    • Michael Albinus's avatar
      Add Quick Start Guide to Tramp manual · 0440c748
      Michael Albinus authored
      * 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".
  5. 09 Jul, 2017 16 commits
    • Glenn Morris's avatar
      Fix failing module tests on GNU/Linux · 273f4bde
      Glenn Morris authored
      * test/src/emacs-module-tests.el
      Avoid test failures due to backtraces.
    • Paul Eggert's avatar
      Fix core dump in substitute-object-in-subtree · 083940a9
      Paul Eggert authored
      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.
    • Philipp Stephani's avatar
      Minor simplification of module_free_global_ref · ce6773aa
      Philipp Stephani authored
      * src/emacs-module.c (module_free_global_ref): Remove unused variable
      'hashcode'.  Inline variable 'value' that's only used once.
    • Philipp Stephani's avatar
      Re-add a useful assertion · 81131ff2
      Philipp Stephani authored
      * src/emacs-module.c (module_free_global_ref): Re-add assertion that
      the reference count is zero.  This assertion was removed in commit
      8afaa132, 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.
    • Valentin Gatien-Baron's avatar
      Fix bug in module_free_global_ref (Bug#27587) · 22af6990
      Valentin Gatien-Baron authored
      * src/emacs-module.c (module_free_global_ref): Actually remove entry
      from hash table.
      Copyright-paperwork-exempt: yes
    • Philipp Stephani's avatar
      Further improve electric quote support for Markdown (Bug#24709) · bb2ea81b
      Philipp Stephani authored
      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.
    • Philipp Stephani's avatar
      Remove pointless code in 'electric-quote-mode' · 633db417
      Philipp Stephani authored
      * lisp/electric.el (electric-quote-post-self-insert-function): Remove
      pointless form.
    • Philipp Stephani's avatar
      Refactor 'electric-quote-mode' · 28e65848
      Philipp Stephani authored
      * lisp/electric.el (electric-quote-post-self-insert-function): Remove
      local variable 'start', which was misnamed and only used once.
    • Saulius Menkevičius's avatar
      Avoid crashes on MS-Windows starting 64-bit .NET executables · 51b29de1
      Saulius Menkevičius authored
      * 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
    • Eli Zaretskii's avatar
      Avoid compilation warning in files.el · 0cff089e
      Eli Zaretskii authored
      * lisp/files.el (auto-save-visited-file-name): Avoid obsoletion
      warning due to its use in auto-save-visited-mode.
    • Eli Zaretskii's avatar
      Improve indexing of VC-related stuff in the Emacs manual · c6e94f89
      Eli Zaretskii authored
      * doc/emacs/maintaining.texi (Version Control): Add a "VC" index
      entry.  (Bug#27627)
    • Eli Zaretskii's avatar
      ; * etc/NEWS: Fix a typo. · b56727e7
      Eli Zaretskii authored
    • Eli Zaretskii's avatar
      Speed up display of line numbers for very large buffers · 83218cf4
      Eli Zaretskii authored
      * src/xdisp.c (maybe_produce_line_number): Speed up line counting
      using values cached by mode-line display of line numbers.
    • Philipp Stephani's avatar
    • Alexander Kuleshov's avatar
      Define internal_border_parts for window systems only (Bug#27615) · e15784fb
      Alexander Kuleshov authored
      * src/keyboard.c: (internal_border_parts): Define only
      when HAVE_WINDOW_SYSTEM is enabled.  (Bug#27615)
    • R. Bernstein's avatar
      Add realgud faces faces to whiteboard... · 9b8b73f6
      R. Bernstein authored
      Adjust wheatgrass to use underline for enabled/disabled breakpoints
  6. 08 Jul, 2017 15 commits
    • Noam Postavsky's avatar
    • Noam Postavsky's avatar
      Optimize UCS normalization tests · 06ff34cd
      Noam Postavsky authored
      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--rule2-holds-p): Turn into defsubst.
      (ucs-normalize-tests--rule1-failing-for-partX): Use `eq' instead of
    • Noam Postavsky's avatar
      Update failing lines for UCS normalize tests · a1633918
      Noam Postavsky authored
      * test/lisp/international/ucs-normalize-tests.el
      (ucs-normalize-tests--failing-lines-part2): Update for new
      admin/unidata/NormalizationTest.txt version.
    • Noam Postavsky's avatar
      Semi-automate the procedure for updating UCS normalize test bad lines · 4e3b9c54
      Noam Postavsky authored
      * 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--rule2-holds-p): Renamed from
      (ucs-normalize-tests--rule1-failing-for-partX): Renamed from
      (ucs-normalize-tests--rule1-failing-for-lines): Renamed from
      (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-check-failing-lines): New functions, used to update
      the *--failing-lines-part* variables.
    • Paul Eggert's avatar
    • Philipp Stephani's avatar
      Module assertions: check for garbage collections · b7dab24b
      Philipp Stephani authored
      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.
    • Eli Zaretskii's avatar
      Capitalize the menu entry for display-line-numbers · a87d767c
      Eli Zaretskii authored
      * lisp/menu-bar.el (menu-bar-showhide-menu): Capitalize menu item
      for display-line-numbers.  Suggested by Martin Rudalics
    • Eli Zaretskii's avatar
      Update Unicode data and files to Unicode 10.0 · fd3bcfa3
      Eli Zaretskii authored
      * 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.
    • Alexander Gramiak's avatar
      Support '=' in Scheme and Lisp tags in 'etags' · 42cdb686
      Alexander Gramiak authored
      * 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.
    • Alexander Kuleshov's avatar
      Avoid compiler warnings in xdisp.c debugging code · 92307cb0
      Alexander Kuleshov authored
      * 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)
    • Eli Zaretskii's avatar
      Commentary enhancement in frame.el · 6e2a2b33
      Eli Zaretskii authored
      * lisp/frame.el: Explain how to test whether a variable needs to
      be added to the list of those which are watched for buffer
    • Eli Zaretskii's avatar
      Support display of line numbers natively · 5df239fc
      Eli Zaretskii authored
      This merges branch 'line-numbers'.
      * src/buffer.c (disable_line_numbers_overlay_at_eob): New
      * 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
      (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
      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
      * doc/emacs/display.texi (Display Custom): Describe the
      line-number display.
      * doc/lispref/display.texi (Size of Displayed Text): Document
      * etc/NEWS: Document display-line-numbers and its customizations.
    • Paul Eggert's avatar
      Fix more ungetc bugs with encoding errors · b8ead34f
      Paul Eggert authored
      * 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.
    • Paul Eggert's avatar
      Avoid ungetc when loading charset maps from files · 16283058
      Paul Eggert authored
      * src/charset.c (read_hex): New args LOOKAHEAD and TERMINATOR,
      replacing the old EOF.  All callers changed.  This avoids the
      need to call ungetc.
    • Paul Eggert's avatar
      Fix ungetc bug when reading an encoding error · d2832063
      Paul Eggert authored
      * 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".