1. 06 Aug, 2018 2 commits
    • Paul Eggert's avatar
      Rename src/regex.c to src/regex-emacs.c. · e5652268
      Paul Eggert authored
      This is in preparation for using Gnulib regex for etags,
      to avoid collisions in include directives.
      * src/regex-emacs.c: Rename from src/regex.c.
      * src/regex-emacs.h: Rename from src/regex.h.  All uses changed.
      * test/src/regex-emacs-tests.el: Rename from test/src/regex-tests.el.
    • Paul Eggert's avatar
      Update from gnulib · ba8eb994
      Paul Eggert authored
      This incorporates:
      2018-08-05 Fix link error regarding 'rpl_environ'
      * build-aux/config.guess, lib/unistd.in.h, lib/warn-on-use.h:
      * m4/extern-inline.m4: Copy from Gnulib.
  2. 05 Aug, 2018 2 commits
  3. 04 Aug, 2018 11 commits
    • Stephen Berman's avatar
      Fix assorted todo-mode bugs (bug#32366) · f7d65a5e
      Stephen Berman authored
      * lisp/calendar/todo-mode.el (todo-forward-category): Fix
      calculation for skipping backward over archived categories.
      (todo-jump-to-category): When hl-line-mode is enabled, force
      highlighting to compensate for apparent failure of
      post-command-hook to run.
      (todo-insert-item--basic): Prevent inserting a new todo item in an
      archive category.
      (todo-delete-item): Ensure done items separator disappears when
      the last done item is deleted.
      (todo-edit-item--header): Fix calculation for choosing a month
      prior to the current one.
      (todo-find-filtered-items-file): Fix use of completing-read,
      correcting typo in default value passed to it and confining
      history to filtered items files.
      (todo-go-to-source-item): Make a noop when point is not on an item.
      (todo-save-filtered-items-buffer): Make buffer read-only after
      saving and improve buffer name.
      (todo-key-bindings-t+a+f): Remove three mistakenly included bindings.
      (todo-key-bindings-t+a): Add two mistakenly omitted bindings.
    • Noam Postavsky's avatar
    • Noam Postavsky's avatar
    • Noam Postavsky's avatar
      Respect non-saved value of `read-short-answer' (Bug#31782) · 95050a58
      Noam Postavsky authored
      * lisp/emacs-lisp/map-ynp.el (read-answer-short): Add an `auto'
      (read-answer): Check the function cell of `yes-or-no-p' when
      `read-answer-short' is `auto' rather than calling
      `custom-reevaluate-setting' which would reset the option to its saved
    • Noam Postavsky's avatar
      ; Merge from emacs-26 · d228de8a
      Noam Postavsky authored
      The following commit was skipped:
      cc233365 New function read-answer (Bug#31782)
    • Noam Postavsky's avatar
      Merge from emacs-26 · 529ec8df
      Noam Postavsky authored
      f0b8e64f Avoid assertion violations in maybe_produce_line_number
      7669bf78 Avoid assertion violations in set_text_properties_1
    • Noam Postavsky's avatar
      ; Merge from emacs-26 · b6dd0374
      Noam Postavsky authored
      The following commit was skipped:
      15458a83 ; Auto-commit of loaddefs files.
    • Noam Postavsky's avatar
      Merge from emacs-26 · 6328d2ff
      Noam Postavsky authored
      951c5a12 Fix wdired test failure when byte compiled (bug#32318)
      0252f731 * test/lisp/wdired-tests.el (wdired-test-symlink-name): Ne...
      dd514347 Fix url's thing-at-point beginning-op (Bug#32028)
    • Juri Linkov's avatar
      New function read-answer (Bug#31782) · cc233365
      Juri Linkov authored
      * lisp/emacs-lisp/map-ynp.el (read-answer-short): New defcustom.
      (read-answer): New function.
      * lisp/subr.el (assoc-delete-all): New function.
      * etc/NEWS: Announce them.
      * lisp/dired.el (dired-delete-file): Use read-answer.
      (dired--yes-no-all-quit-help): Remove function.
      (dired-delete-help): Remove defconst.
      (backported from master, "New function read-answer (bug#30073)" and
      "Respect non-saved value of `read-short-answer' (Bug#31782)")
    • Michael Albinus's avatar
      * lisp/international/mule-cmds.el (universal-coding-system-argument): · c27bd469
      Michael Albinus authored
      Use `current-input-mode' for determining quit char.
    • Michael Albinus's avatar
      Rename Tramp method "owncloud" to "nextcloud" · b9e2a91e
      Michael Albinus authored
      In the spirit of freedom, "nextcloud" is preferred over "owncloud".
      * doc/misc/tramp.texi (Quick Start Guide, GVFS based methods):
      * etc/NEWS: Rename "owncloud" method to "nextcloud".
      * lisp/net/tramp-gvfs.el (tramp-gvfs-methods, tramp-goa-methods)
      (tramp-gvfs-url-file-name, tramp-gvfs-handler-mounted-unmounted)
      (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec)
      (tramp-get-goa-accounts): Use "nextcloud" instead of "owncloud".
      (tramp-gvfs-nextcloud-default-prefix-regexp): Rename them.  Adapt
      all callees.
      * test/lisp/net/tramp-tests.el (tramp--test-nextcloud-p):
      Rename from `tramp--test-owncloud-p'.
      (tramp-test11-copy-file, tramp-test12-rename-file): Use it.
  4. 03 Aug, 2018 20 commits
    • Ken Brown's avatar
      Fix a filenotify test failure on Cygwin · 5dc3d0a9
      Ken Brown authored
      * test/lisp/filenotify-tests.el
      (file-notify-test04-autorevert): Increase a sleep-for time
      from 2 to 3 on Cygwin.  This avoids sporadic failures of the
      test.  (Bug#32363)
    • Gemini Lasswell's avatar
      Merge branch 'scratch/backtrace-mode' · da0054c3
      Gemini Lasswell authored
    • Gemini Lasswell's avatar
      Fix some documentation formatting nits · 95b2ab3d
      Gemini Lasswell authored
      * doc/misc/ert.texi (Running Tests Interactively): Correct
      Elisp manual titile in xref.
      * doc/lispref/edebug.texi (Edebug Misc): Use single argument
      form of xref.
      * doc/lispref/debugging.texi (Backtraces): Add comma and
      period after xref braces.
      (Backtraces): Correct Emacs manual title.
      (Internals of Debugger): Add a space before period.
    • Gemini Lasswell's avatar
      Fix typo in edebug-backtrace-hide-instrumentation's docstring. · 58be6cb6
      Gemini Lasswell authored
      * lisp/emacs-lisp/edebug.el (edebug-backtrace-hide-instrumentation):
      Fix docstring copypasta.
    • Gemini Lasswell's avatar
      Give two backtrace-mode commands better names · 3cd6a684
      Gemini Lasswell authored
      * lisp/emacs-lisp/backtrace.el (backtrace-mode-map): Update
      bindings and menu items with new function names.
      (backtrace-collapse, backtrace-pretty-print)
      (backtrace--collapse, backtrace--pretty-print): Remove functions.
      (backtrace-single-line, backtrace-multi-line)
      (backtrace--single-line, backtrace--multi-line): New functions.
      (backtrace--reformat-sexp): Remove 'error-message' argument.
      * test/lisp/emacs-lisp/backtrace-tests.el
      (backtrace-tests--pretty-print-and-collapse): Remove.
      (backtrace-tests--single-and-multi-line): New test.
      (backtrace-tests--verify-pp-and-collapse): Remove.
      (backtrace-tests--verify-single-and-multi-line): New function.
    • Gemini Lasswell's avatar
      Move 'backtrace' from subr.el to backtrace.el · 83af893f
      Gemini Lasswell authored
      * lisp/subr.el (backtrace, backtrace--print-frame): Remove functions.
      * lisp/emacs-lisp/backtrace.el (backtrace-backtrace): Remove function.
      (backtrace): New function.
      (backtrace-to-string): Make argument optional.
      * doc/lispref/debugging.texi (Internals of Debugger): Update
      description of 'backtrace' function.
    • Gemini Lasswell's avatar
      Add new commands to Edebug backtraces · ca983772
      Gemini Lasswell authored
      Add commands to go to source if available, and to show and hide
      Edebug's instrumentation.  Make Edebug pop to backtraces instead of
      displaying them, which makes Edebug consistant with the behavior of
      ERT and the Lisp Debugger.
      * doc/lispref/edebug.texi (Edebug Misc): Document when and how you can
      jump to source code from an Edebug backtrace.  Document
      'edebug-backtrace-show-instrumentation' and
      * lisp/emacs-lisp/backtrace.el (backtrace-frame): Add comments to
      describe the fields.
      (backtrace-goto-source-functions): New
      abnormal hook.
      (backtrace-mode-map): Add keybinding and menu item for
      (backtrace--flags-width): New constant.
      (backtrace-update-flags): Use it.
      (backtrace-goto-source): New command.
      (backtrace--print-flags): Print the :source-available flag.
      * lisp/emacs-lisp/edebug.el (edebug-backtrace-frames)
      (edebug-instrumented-backtrace-frames): New variables.
      (edebug-backtrace, edebug--backtrace-frames): Remove functions.
      (edebug-pop-to-backtrace, edebug--backtrace-goto-source)
      (edebug--add-source-info): New functions.
      (edebug-mode-map, edebug-mode-menus): Replace 'edebug-backtrace' with
      (edebug--strip-instrumentation): New function.
      (edebug--unwrap-and-add-info): Remove.
      (edebug-unwrap-frame, edebug-add-source-info): New functions.
      (edebug-backtrace-hide-instrumentation): New commands.
      * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-check-keymap):
      Verify keybindings in backtrace-mode-map used by new test.
      Update with binding for 'edebug-pop-to-backtrace'.
      (edebug-tests-backtrace-goto-source): New test.
      * test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
      (edebug-test-code-range): Add a new stop point.
    • Gemini Lasswell's avatar
      Add a menu for backtrace-mode · 1459ad2c
      Gemini Lasswell authored
      * lisp/emacs-lisp/backtrace.el (backtrace-mode-map): Add a menu.
      * lisp/emacs-lisp/debug.el (debugger-mode-map): Change menu text for
      'backtrace-help-follow-symbol' to better describe what it does.
    • Gemini Lasswell's avatar
    • Gemini Lasswell's avatar
      Add new command to expand all "..."s in a backtrace frame · a3ba34ae
      Gemini Lasswell authored
      * doc/lispref/debugging.texi (Backtraces): Document new keybinding.
      * lisp/emacs-lisp/backtrace.el (backtrace-line-length): Add the
      option of unlimited line length.
      (backtrace--match-ellipsis-in-string): Add a comment to explain
      why this function is necessary.
      (backtrace-mode-map): Add keybinding for 'backtrace-expand-ellipses'.
      (backtrace-expand-ellipsis): Use 'cl-print-to-string-with-limit'.
      (backtrace-expand-ellipses): New command.
      (backtrace-print-to-string): Use 'cl-print-to-string-with-limit'.
      Tag the printed forms with a gensym instead of the values of
      print-length and print-level.
      (backtrace--print): Add 'stream' argument.
      * test/lisp/emacs-lisp/backtrace-tests.el
      (backtrace-tests--expand-ellipsis): Make the test less dependent
      on the implementation.
      (backtrace-tests--expand-ellipses): New test.
      Move the fitting of a printed representation into a limited number of
      characters using appropriate values of print-level and print-length
      from 'backtrace-print-to-string' to cl-print.el for future use by
      other parts of Emacs.
      * lisp/emacs-lisp/cl-print.el (cl-print-to-string-with-limit): New
      * test/lisp/emacs-lisp/cl-print-tests.el
      (cl-print-tests-print-to-string-with-limit): New test.
    • Gemini Lasswell's avatar
      Change keybinding for backtrace-collapse from '=' to '-' · 2ede75c4
      Gemini Lasswell authored
      '+' and '-' make a more intuitive pair of keybindings for
      backtrace-pretty-print and backtrace-collapse than '+' and '='.
      * lisp/emacs-lisp/backtrace.el (backtrace-mode-map):
      * doc/lispref/debugging.texi (Backtraces): Change
      keybinding for backtrace-collapse.
    • Gemini Lasswell's avatar
      Add more tests for backtrace-mode · 04cc0b61
      Gemini Lasswell authored
      * test/lisp/emacs-lisp/backtrace-tests.el (backtrace-tests--variables)
      (backtrace-tests--backward-frame, backtrace-tests--forward-frame)
      (backtrace-tests--print-circle, backtrace-tests--make-regexp)
      (backtrace-tests--expand-ellipsis): New tests.
      (backtrace-tests--to-string): Use backtrace-tests--make-backtrace.
      (backtrace-tests--get-substring): New function.
      Change the method of generating sample backtraces in backtrace tests
      to work whether or not the tests are byte-compiled.
      * test/lisp/emacs-lisp/backtrace-tests.el (backtrace-tests--func1)
      (backtrace-tests--func2, backtrace-tests--func3)
      (backtrace-tests--create-backtrace-frames): Remove.
      (backtrace-tests--uncompiled-functions): New constant.
      (backtrace-tests--make-backtrace, backtrace-tests--setup-buffer):
      New functions.
      (backtrace-tests--backtrace-lines-with-locals): New functions.
      (backtrace-tests--line-count): New constant.
      (backtrace-tests--result, backtrace-tests--result-with-locals):
      New functions.
      (backtrace-tests--header): New constant.
      (backtrace-tests--insert-header): Use backtrace-tests--header.
      (backtrace-tests--with-buffer): Remove.
    • Gemini Lasswell's avatar
      Add link in backtraces to position in buffer being evaluated (bug#14081) · af5f3771
      Gemini Lasswell authored
      * lisp/emacs-lisp/backtrace.el (backtrace-frame): Add buffer field.
      (backtrace-get-frames): Set buffer field of frame.
      (backtrace-buffer-pos): New button type.
      (backtrace--pop-to-buffer-pos): New function.
      (backtrace--print-func-and-args): Create a button for the buffer
      position if it is set.
    • Gemini Lasswell's avatar
      Add links in backtraces to functions written in C (bug#25393) · 9aa9d79e
      Gemini Lasswell authored
      * lisp/emacs-lisp/backtrace.el (backtrace--print-func-and-args):
      Look up file names for built-in functions with evaluated arguments.
    • Gemini Lasswell's avatar
      Add prefix argument to backtrace-toggle-print-circle · bb9de872
      Gemini Lasswell authored
      With prefix argument, toggle print-circle for the whole buffer.
      * lisp/emacs-lisp/backtrace.el (backtrace-toggle-print-circle): Add
      universal prefix argument.
      (backtrace--toggle-feature): Add new argument 'all' to toggle all
      (backtrace--set-feature): New function.
      (backtrace-mode): Use indent functions from Lisp modes.
    • Gemini Lasswell's avatar
      Lazily print backtrace frame local variables · d6b364ed
      Gemini Lasswell authored
      Instead of printing the local variables for all frames when the
      backtrace buffer is created, print them when they are first made
      visible.  Add a prefix argument to backtrace-toggle-locals to toggle
      local variables display for the entire buffer.
      * lisp/emacs-lisp/backtrace.el (backtrace-view): Mention
      :show-locals in docstring.
      (backtrace-get-section-end): Remove function.
      (backtrace-toggle-locals): Add prefix argument.
      (backtrace--with-output-variables): Move before first use.
      (backtrace--set-frame-locals-visible): New function.
      (backtrace--set-locals-visible-overlay): New function.
      (backtrace--set-locals-visible): Remove function.
      (backtrace-toggle-feature): Remove TODO comment.
      (backtrace--print-locals): Skip printing the locals if they are not
    • Gemini Lasswell's avatar
      Always make buttons from function names in backtraces · 5b50fa5a
      Gemini Lasswell authored
      * lisp/emacs-lisp/backtrace.el (backtrace-view)
      (backtrace--print-func-and-args, backtrace-mode): Always
      make buttons.  Remove all uses of ':do-xrefs'.
      * lisp/emacs-lisp/debug.el (debugger-setup-buffer): Modify
      backtrace-view instead of setting it.
      * lisp/emacs-lisp/edebug.el (edebug-backtrace):
      * lisp/emacs-lisp/ert.el
      Remove initialization of backtrace-view.
    • Gemini Lasswell's avatar
      Add backtrace-mode and use it in the debugger, ERT and Edebug · e09120d6
      Gemini Lasswell authored
      * doc/lispref/debugging.texi (Using Debugger): Remove explanation of
      backtrace buffer.  Refer to new node.
      (Backtraces): New node.
      (Debugger Commands): Refer to new node.  Remove 'v'.
      * doc/lispref/edebug.texi (Edebug Misc): Refer to new node.
      * doc/misc/ert.texi (Running Tests Interactively): Refer to new node.
      * lisp/emacs-lisp-backtrace.el: New file.
      * test/lisp/emacs-lisp/backtrace-tests.el: New file.
      * lisp/emacs-lisp/debug.el: (debugger-buffer-state): New cl-defstruct.
      (debugger--restore-buffer-state): New function.
      (debug): Use a debugger-buffer-state object to save and restore buffer
      state.  Fix bug#15749 by leaving an unused buffer in debugger-mode,
      empty, instead of in fundamental-mode, and then when reusing a buffer,
      not calling debugger-mode if the buffer is already in debugger-mode.
      (debugger-insert-backtrace): Remove.
      (debugger-setup-buffer): Use backtrace-mode.
      (debugger--insert-header): New function.
      (debugger-continue, debugger-return-value): Change check for flags to
      use backtrace-frames.
      (debugger-frame-number): Determine backtrace frame number from
      (debugger--locals-visible-p, debugger--insert-locals)
      (debugger--show-locals, debugger--hide-locals)
      (debugger-toggle-locals): Remove.
      (debugger-mode-map): Make a child of backtrace-mode-map.  Move
      navigation commands to backtrace-mode-map.  Bind 'q' to debugger-quit
      instead of top-level.  Make Help Follow menu item call
      (debugger-mode): Derive from backtrace-mode.
      (debug-help-follow): Remove.  Move body of this function to
      'backtrace-help-follow-symbol' in backtrace.el.
      (debugger-quit): New function.
      * lisp/emacs-lisp/edebug.el (edebug-unwrap-results): Remove warning
      in docstring about circular results.
      (edebug-unwrap): Use pcase.
      (edebug-unwrap1): New function to unwrap circular objects.
      (edebug-unwrap*): Use it.
      (edebug--frame): New cl-defstruct.
      (edebug-backtrace): Call the buffer *Edebug Backtrace* and use
      backtrace-mode.  Get the frames from edebug--backtrace-frames.
      (edebug--backtrace-frames, edebug--unwrap-and-add-info)
      (edebug--symbol-not-prefixed-p): New functions.
      * lisp/emacs-lisp/lisp-mode.el
      (lisp-el-font-lock-keywords-for-backtraces-2): New constants.
      * lisp/emacs-lisp/ert.el (ert--print-backtrace): Remove.
      (ert--run-test-debugger): Use backtrace-get-frames.
      (ert-run-tests-batch): Use backtrace-to-string.
      (ert-results-pop-to-backtrace-for-test-at-point): Use backtrace-mode.
      (ert--insert-backtrace-header): New function.
      * tests/lisp/emacs-lisp/ert-tests.el (ert-test--which-file):
      Use backtrace-frame slot accessor.
    • Gemini Lasswell's avatar
      Add methods for strings to cl-print · 8a762095
      Gemini Lasswell authored
      * lisp/emacs-lisp/cl-print.el (cl-print-object) <string>: New method.
      (cl-print-object-contents) <string>: New method.
      (cl-print--find-sharing): Look in string property lists.
      * test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-3): Test
      printing of long strings.
      (cl-print-tests-4): Test printing of strings nested in other objects.
      (cl-print-tests-strings, cl-print-tests-ellipsis-string): New
    • Gemini Lasswell's avatar
      Support ellipsis expansion in cl-print · eba16e5e
      Gemini Lasswell authored
      * lisp/emacs-lisp/cl-print.el (cl-print-object-contents): New
      generic method.
      (cl-print-object-contents) <cons, vector,cl-structure-object>: New
      (cl-print-object) <cons>: Use cl-print-insert-ellipsis.
      (cl-print-object) <vector, cl-structure-object>: Elide whole object if
      print-level exceeded.  Use cl-print-insert-ellipsis.
      (cl-print-insert-ellipsis, cl-print-propertize-ellipsis)
      (cl-print-expand-ellipsis): New functions.
      * test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-4): Test
      printing of objects nested in other objects.
      (cl-print-tests-strings, cl-print-tests-ellipsis-cons)
      (cl-print-tests-ellipsis-vector, cl-print-tests-ellipsis-struct)
      (cl-print-tests-ellipsis-circular): New tests.
      (cl-print-tests-check-ellipsis-expansion-rx): New functions.
  5. 02 Aug, 2018 4 commits
    • Eli Zaretskii's avatar
      Avoid assertion violations in maybe_produce_line_number · f0b8e64f
      Eli Zaretskii authored
      * src/xdisp.c (redisplay_window): Make sure desired_matrix is
      cleared before calling try_window.  This is important when
      display-line-numbers is non-nil, because line-number display code
      assumes each glyph row is completely cleared when it is called to
      produce a line number.  (Bug#32358)
    • Eli Zaretskii's avatar
      Avoid assertion violations in set_text_properties_1 · 7669bf78
      Eli Zaretskii authored
      * src/textprop.c (set_text_properties): If the call to
      modify_text_properties modifies the interval tree as side effect,
      recalculate the correct interval for START and END.  (Bug#32265)
    • Tino Calancha's avatar
      New commands to create an empty file · e65ec81f
      Tino Calancha authored
      Similarly as `create-directory', `dired-create-directory',
      the new commands create the parent dirs as needed (Bug#24150).
      * lisp/files.el (make-empty-file): New command.
      * lisp/dired-aux.el (dired-create-empty-file): New command.
      (dired--find-topmost-parent-dir): New function extracted
      from `dired-create-directory'.
      (dired-create-directory, dired-create-empty-file): Use it.
      * lisp/dired.el (dired-mode-map):
      Add menu entry for `dired-create-empty-file'.
      * doc/emacs/dired.texi (Misc Dired Features)
      * doc/lispref/files.texi (Create/Delete Dirs): Update manual.
      ; * etc/NEWS: Announce the changes.
    • Paul Eggert's avatar
      Substitute a <ieee754.h> on hosts lacking it · d216d7d2
      Paul Eggert authored
      * .gitignore: Add lib/ieee754.h.
      * admin/merge-gnulib (GNULIB_MODULES): Add ieee754-h.
      * configure.ac: Remove ieee754.h check, as Gnulib now does that.
      * etc/NEWS: Mention this.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib/ieee754.in.h, m4/ieee754-h.m4: New files, from Gnulib.
      * src/lisp.h (IEEE_FLOATING_POINT): Now a macro so that it
      can be used in #if.
      * src/lread.c, src/print.c: Include <ieee754.h> if
      * src/lread.c (string_to_number):
      * src/print.c (float_to_string):
      Process NaNs only on IEEE hosts, and assume <ieee754.h>
      in that case.
  6. 01 Aug, 2018 1 commit
    • Michael Albinus's avatar
      Fix Bug#32325 · 2f37ecae
      Michael Albinus authored
      * lisp/net/tramp-sh.el (tramp-sh-handle-make-directory): In case
      of PARENTS flush also upper directories caches.  (Bug#32325)