]> git.eshelyaron.com Git - emacs.git/log
emacs.git
6 years agoRename Tramp method "owncloud" to "nextcloud"
Michael Albinus [Sat, 4 Aug 2018 10:05:28 +0000 (12:05 +0200)]
Rename Tramp method "owncloud" to "nextcloud"

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)
(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.

6 years agoFix a filenotify test failure on Cygwin
Ken Brown [Fri, 3 Aug 2018 14:37:04 +0000 (10:37 -0400)]
Fix a filenotify test failure on Cygwin

* 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)

6 years agoMerge branch 'scratch/backtrace-mode'
Gemini Lasswell [Fri, 3 Aug 2018 17:28:28 +0000 (10:28 -0700)]
Merge branch 'scratch/backtrace-mode'

6 years agoFix some documentation formatting nits
Gemini Lasswell [Wed, 1 Aug 2018 14:47:12 +0000 (07:47 -0700)]
Fix some documentation formatting nits

* 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.

6 years agoFix typo in edebug-backtrace-hide-instrumentation's docstring.
Gemini Lasswell [Fri, 27 Jul 2018 19:37:10 +0000 (12:37 -0700)]
Fix typo in edebug-backtrace-hide-instrumentation's docstring.

* lisp/emacs-lisp/edebug.el (edebug-backtrace-hide-instrumentation):
Fix docstring copypasta.

6 years agoGive two backtrace-mode commands better names
Gemini Lasswell [Sat, 21 Jul 2018 19:27:32 +0000 (12:27 -0700)]
Give two backtrace-mode commands better names

* 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.

6 years agoMove 'backtrace' from subr.el to backtrace.el
Gemini Lasswell [Wed, 18 Jul 2018 15:30:45 +0000 (08:30 -0700)]
Move 'backtrace' from subr.el to backtrace.el

* 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.

6 years agoAdd new commands to Edebug backtraces
Gemini Lasswell [Tue, 17 Jul 2018 18:47:43 +0000 (11:47 -0700)]
Add new commands to Edebug backtraces

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
'edebug-backtrace-hide-instrumentation'.
* 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-goto-source.
(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-pop-to-backtrace'.
(edebug--strip-instrumentation): New function.
(edebug--unwrap-and-add-info): Remove.
(edebug-unwrap-frame, edebug-add-source-info): New functions.
(edebug-backtrace-show-instrumentation)
(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.

6 years agoAdd a menu for backtrace-mode
Gemini Lasswell [Sun, 15 Jul 2018 22:45:43 +0000 (15:45 -0700)]
Add a menu for backtrace-mode

* 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.

6 years ago* lisp/emacs-lisp/debug.el (debugger-mode-map): Use easy-menu-define.
Gemini Lasswell [Sun, 15 Jul 2018 22:41:56 +0000 (15:41 -0700)]
* lisp/emacs-lisp/debug.el (debugger-mode-map): Use easy-menu-define.

6 years agoAdd new command to expand all "..."s in a backtrace frame
Gemini Lasswell [Sat, 14 Jul 2018 15:05:51 +0000 (08:05 -0700)]
Add new command to expand all "..."s in a backtrace frame

* 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
function.
* test/lisp/emacs-lisp/cl-print-tests.el
(cl-print-tests-print-to-string-with-limit): New test.

6 years agoChange keybinding for backtrace-collapse from '=' to '-'
Gemini Lasswell [Sat, 14 Jul 2018 14:23:15 +0000 (07:23 -0700)]
Change keybinding for backtrace-collapse from '=' to '-'

'+' 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.

6 years agoAdd more tests for backtrace-mode
Gemini Lasswell [Sat, 30 Jun 2018 15:45:53 +0000 (08:45 -0700)]
Add more tests for backtrace-mode

* test/lisp/emacs-lisp/backtrace-tests.el (backtrace-tests--variables)
(backtrace-tests--backward-frame, backtrace-tests--forward-frame)
(backtrace-tests--pretty-print-and-collapse)
(backtrace-tests--verify-pp-and-collapse)
(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)
(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.

6 years agoAdd link in backtraces to position in buffer being evaluated (bug#14081)
Gemini Lasswell [Sat, 7 Jul 2018 19:48:18 +0000 (12:48 -0700)]
Add link in backtraces to position in buffer being evaluated (bug#14081)

* 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.

6 years agoAdd links in backtraces to functions written in C (bug#25393)
Gemini Lasswell [Mon, 25 Jun 2018 20:23:03 +0000 (13:23 -0700)]
Add links in backtraces to functions written in C (bug#25393)

* lisp/emacs-lisp/backtrace.el (backtrace--print-func-and-args):
Look up file names for built-in functions with evaluated arguments.

6 years agoAdd prefix argument to backtrace-toggle-print-circle
Gemini Lasswell [Sat, 23 Jun 2018 17:25:29 +0000 (10:25 -0700)]
Add prefix argument to backtrace-toggle-print-circle

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
frames.
(backtrace--set-feature): New function.
(backtrace-mode): Use indent functions from Lisp modes.

6 years agoLazily print backtrace frame local variables
Gemini Lasswell [Fri, 22 Jun 2018 19:53:37 +0000 (12:53 -0700)]
Lazily print backtrace frame local variables

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
visible.

6 years agoAlways make buttons from function names in backtraces
Gemini Lasswell [Sun, 24 Jun 2018 14:17:47 +0000 (07:17 -0700)]
Always make buttons from function names in backtraces

* 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
(ert-results-pop-to-backtrace-for-test-at-point):
Remove initialization of backtrace-view.

6 years agoAdd backtrace-mode and use it in the debugger, ERT and Edebug
Gemini Lasswell [Tue, 19 Jun 2018 14:27:41 +0000 (07:27 -0700)]
Add backtrace-mode and use it in the debugger, ERT and Edebug

* 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
backtrace-frames.
(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
backtrace-help-follow-symbol.
(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)
(lisp-el-font-lock-keywords-for-backtraces-1)
(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.

6 years agoAdd methods for strings to cl-print
Gemini Lasswell [Fri, 15 Jun 2018 17:26:13 +0000 (10:26 -0700)]
Add methods for strings to cl-print

* 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
tests.

6 years agoSupport ellipsis expansion in cl-print
Gemini Lasswell [Fri, 15 Jun 2018 17:23:58 +0000 (10:23 -0700)]
Support ellipsis expansion in cl-print

* lisp/emacs-lisp/cl-print.el (cl-print-object-contents): New
generic method.
(cl-print-object-contents) <cons, vector,cl-structure-object>: New
methods.
(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)
(cl-print-tests-check-ellipsis-expansion-rx): New functions.

6 years agoNew commands to create an empty file
Tino Calancha [Thu, 2 Aug 2018 04:20:46 +0000 (13:20 +0900)]
New commands to create an empty file

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.

6 years agoSubstitute a <ieee754.h> on hosts lacking it
Paul Eggert [Thu, 2 Aug 2018 01:53:31 +0000 (18:53 -0700)]
Substitute a <ieee754.h> on hosts lacking it

* .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
IEEE_FLOATING_POINT, not if HAVE_IEEE754_H.
* 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 years agoFix Bug#32325
Michael Albinus [Wed, 1 Aug 2018 21:09:31 +0000 (23:09 +0200)]
Fix Bug#32325

* lisp/net/tramp-sh.el (tramp-sh-handle-make-directory): In case
of PARENTS flush also upper directories caches.  (Bug#32325)

6 years agoFix Edebug spec for cl-macrolet (bug#29919)
Gemini Lasswell [Sat, 21 Jul 2018 04:54:00 +0000 (21:54 -0700)]
Fix Edebug spec for cl-macrolet (bug#29919)

Add an Edebug matching function for cl-macrolet which keeps track of
its bindings and treats them as macros without Edebug specs when found
in the body of the expression.
* lisp/emacs-lisp/edebug.el (edebug--cl-macrolet-defs): New variable.
(edebug-list-form-args): Use it.
(edebug--current-cl-macrolet-defs): New variable.
(edebug-match-cl-macrolet-expr, edebug-match-cl-macrolet-name)
(edebug-match-cl-macrolet-body): New functions.
* lisp/emacs-lisp/cl-macs.el (cl-macrolet): Use cl-macrolet-expr
for Edebug spec.
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-cl-macrolet):
New test.
* test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
(edebug-test-code-use-cl-macrolet): New function.

6 years agoFix todo-mode commands called on done items separator
Stephen Berman [Wed, 1 Aug 2018 12:42:57 +0000 (14:42 +0200)]
Fix todo-mode commands called on done items separator

The done items separator is not reachable by todo-mode navigation
commands, but it is e.g. by C-n and C-p.  Ensure that invoking
todo-mode commands with point on the separator does not result in
unexpected results, errors or file corruption (bug#32343).

* lisp/calendar/todo-mode.el (todo-insert-item--basic): Make
copying item and inserting item "here" noops when invoked on done
items separator.  Consolidate error handling of these cases.  Also
restrict "here" insertion to valid positions in the current
category, since this is simpler than the previous behavior of
inserting as the first item, which was moreover undocumented,
counterintuitive and superfluous.
(todo-set-item-priority, todo-move-item, todo-item-done)
(todo-item-start, todo-item-end): Make noops when invoked on done
items separator.

* test/lisp/calendar/todo-mode-tests.el: Require ert-x.
(todo-test--insert-item): Add formal parameters of
todo-insert-item--basic.
(todo-test--done-items-separator): New function.
(todo-test-done-items-separator01-bol)
(todo-test-done-items-separator01-eol)
(todo-test-done-items-separator02-bol)
(todo-test-done-items-separator02-eol)
(todo-test-done-items-separator03-bol)
(todo-test-done-items-separator03-eol)
(todo-test-done-items-separator04-bol)
(todo-test-done-items-separator04-eol)
(todo-test-done-items-separator05-bol)
(todo-test-done-items-separator05-eol)
(todo-test-done-items-separator06-bol)
(todo-test-done-items-separator06-eol)
(todo-test-done-items-separator07): New tests.

6 years ago; Auto-commit of loaddefs files.
Glenn Morris [Wed, 1 Aug 2018 11:33:38 +0000 (07:33 -0400)]
; Auto-commit of loaddefs files.

6 years agoRead and print NaN significand if <ieee754.h>
Paul Eggert [Wed, 1 Aug 2018 07:49:39 +0000 (00:49 -0700)]
Read and print NaN significand if <ieee754.h>

* configure.ac: Check for ieee754.h.
* doc/lispref/numbers.texi (Float Basics): Document
that NaN string representation digits are machine-dependent.
* etc/NEWS: Mention the change.
* src/lread.c, src/print.c [HAVE_IEEE754_H]: Include ieee754.h.
* src/lread.c (string_to_number) [HAVE_IEEE754_H]:
* src/print.c (float_to_string) [HAVE_IEEE754_H]:
Read and print NaN significand.

6 years agoSimplify by assuming C99 math.h isnan etc.
Paul Eggert [Wed, 1 Aug 2018 06:46:57 +0000 (23:46 -0700)]
Simplify by assuming C99 math.h isnan etc.

These should be portable nowadays.
* src/data.c (isnan): Remove.
* src/floatfns.c (isfinite, isnan): Remove.
* src/print.c: Include math.h, for isinf and isnan.
(float_to_string): Simplify by using them.

6 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Stephen Gildea [Wed, 1 Aug 2018 05:34:35 +0000 (22:34 -0700)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

6 years agoReset mh-blacklist and mh-whitelist on folder undo
Stephen Gildea [Wed, 1 Aug 2018 05:29:47 +0000 (22:29 -0700)]
Reset mh-blacklist and mh-whitelist on folder undo

* mh-funcs.el (mh-undo-folder): Set mh-blacklist and mh-whitelist
to nil, as is done with the other lists of pending operations.

6 years agoFix Bug#32304
Michael Albinus [Tue, 31 Jul 2018 04:50:30 +0000 (06:50 +0200)]
Fix Bug#32304

* lisp/net/tramp.el (tramp-handle-substitute-in-file-name):
Handle special cas on Cygwin and MS-Windows.  (Bug#32304)

6 years ago; Instrumentation for shadowfile.el
Michael Albinus [Mon, 30 Jul 2018 09:11:32 +0000 (11:11 +0200)]
; Instrumentation for shadowfile.el

6 years ago* lisp/term.el (term-read-noecho): Mark obsolete.
Noam Postavsky [Mon, 30 Jul 2018 01:10:31 +0000 (21:10 -0400)]
* lisp/term.el (term-read-noecho): Mark obsolete.

6 years ago; * src/json.c: Fix typo in license statement
Philipp Stephani [Sun, 29 Jul 2018 22:18:27 +0000 (00:18 +0200)]
; * src/json.c: Fix typo in license statement

6 years ago; Instrumentation for shadowfile.el
Michael Albinus [Sun, 29 Jul 2018 21:10:21 +0000 (23:10 +0200)]
; Instrumentation for shadowfile.el

6 years agoAvoid gettimeofday deprecation warnings with MinGW
Eli Zaretskii [Sun, 29 Jul 2018 17:07:09 +0000 (20:07 +0300)]
Avoid gettimeofday deprecation warnings with MinGW

* nt/inc/ms-w32.h (__POSIX_2008_DEPRECATED)
[__MINGW32_VERSION >= 5001000L]: Define to nothing, to avoid
deprecation warnings about gettimeofday with mingw.org's MinGW
runtime 5.1 and later.

6 years agoMerge from origin/emacs-26
Paul Eggert [Sun, 29 Jul 2018 16:47:10 +0000 (09:47 -0700)]
Merge from origin/emacs-26

39d3e8b Fix last change in 'char_width'
67679f0 Add initial tests for wdired.el

6 years ago; Merge from origin/emacs-26
Paul Eggert [Sun, 29 Jul 2018 16:47:10 +0000 (09:47 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

831a3cb Fix use of non-nil wdired-use-interactive-rename

6 years ago; Instrumentation for shadowfile.el
Michael Albinus [Sun, 29 Jul 2018 16:35:43 +0000 (18:35 +0200)]
; Instrumentation for shadowfile.el

6 years agoFix last change in 'char_width'
Eli Zaretskii [Sun, 29 Jul 2018 14:42:11 +0000 (17:42 +0300)]
Fix last change in 'char_width'

* src/character.c (char_width): Make sure variable C is always
initialized.  (Bug#32276)

6 years agoPrefer ?* to hide passwords
Tino Calancha [Sun, 29 Jul 2018 12:21:40 +0000 (21:21 +0900)]
Prefer ?* to hide passwords

It might be argued that a hidden string is more legible when using
?* as the hidden character instead of ?.
For example, the following strings have the same length:
"......"

"******"

It's slighly easier to visually count the number of characters in the second
string (Bug#32220).

* lisp/subr.el (read-passwd): Prefer ?* as default char instead of ?.
* doc/lispref/minibuf.texi (Reading a Password): Update manual.
; * etc/NEWS (Changes in Emacs 27.1): Announce the change.

6 years agoHandle symlinks in wdired.el when restoring filename property
Stephen Berman [Sun, 29 Jul 2018 11:16:48 +0000 (13:16 +0200)]
Handle symlinks in wdired.el when restoring filename property

* lisp/wdired.el (wdired--restore-dired-filename-prop): If the
file name is a symbolic link, only propertize the link name.  This
prevents wdired-create-parentdirs from turning the link into a
directory.

6 years agoFix bugs in wdired.el involving dired-filename property
Stephen Berman [Sat, 28 Jul 2018 23:14:41 +0000 (01:14 +0200)]
Fix bugs in wdired.el involving dired-filename property

After every change in wdired-mode, put the dired-filename text
property on the file name.  This ensures that changing some but not
all characters in the name succeeds with non-nil
wdired-use-interactive-rename (bug#32173) and it also ensures that
changed names can be found (e.g. by dired-isearch-filenames) while
still in wdired-mode.

* lisp/wdired.el (wdired--restore-dired-filename-prop): New function.
(wdired-change-to-wdired-mode): Add it to after-change-functions.
(wdired-change-to-dired-mode): Remove it from after-change-functions.
(wdired-finish-edit): Move invocation of
wdired-change-to-dired-mode below invocation of wdired-do-renames,
so that the latter runs wdired--restore-dired-filename-prop, but
above the invocation of revert-buffer to avoid using
wdired-revert, which changes back to wdired-mode.
(wdired-search-and-rename): Wrap renaming in unwind-protect and if
user types C-g when prompted to change the file name, make sure we
return to dired-mode.

6 years agoAdd initial tests for wdired.el
Stephen Berman [Sat, 28 Jul 2018 22:22:02 +0000 (00:22 +0200)]
Add initial tests for wdired.el

* test/lisp/wdired-tests.el: New file.

6 years agoFix use of non-nil wdired-use-interactive-rename
Stephen Berman [Sat, 28 Jul 2018 21:58:15 +0000 (23:58 +0200)]
Fix use of non-nil wdired-use-interactive-rename

This is a fairly minimal fix for the release branch; a more
comprehensive fix is on master, so do not merge this to master.

* lisp/wdired.el (wdired-search-and-rename): Remove dired-filename
text property in order to find new filename when it only partially
replaces old filename (bug#32173).  If user quits before renaming
succeeds, restore the dired-filename text property.

6 years ago; Instrumentation for shadowfile.el
Michael Albinus [Sat, 28 Jul 2018 18:06:24 +0000 (20:06 +0200)]
; Instrumentation for shadowfile.el

6 years agoMake 'tis620-2533' character set be an alias for 'thai-iso8859-11'
Eli Zaretskii [Sat, 28 Jul 2018 17:34:57 +0000 (20:34 +0300)]
Make 'tis620-2533' character set be an alias for 'thai-iso8859-11'

* lisp/simple.el (what-cursor-position): Revert ad-hoc change
to work around tis620-2533 charset.
* lisp/w32-fns.el: Use thai-iso8859-11 instead of tis620-2533.
* lisp/international/mule-conf.el (tis620-2533): Now an alias
for thai-iso8859-11, not a separate character set.
* lisp/international/fontset.el (charset-script-alist): Add
thai-iso8859-11; fix entries for greek and hebrew.
(font-encoding-alist, font-encoding-charset-alist): Use
thai-iso8859-11 instead of tis620-2533.
* lisp/descr-text.el (describe-char): Remove the ad-hoc code
that assigns eight-bit-control characters to the eight-bit
charset.

6 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 28 Jul 2018 14:50:36 +0000 (07:50 -0700)]
Merge from origin/emacs-26

bd52f37 (origin/emacs-26) ; Fix last change: only MinGW runtime 5.0.2...
024d20f Fix compilation with mingw.org's MinGW 5.x headers
38b6748 Update the list of special forms in the ELisp manual
8579105 Don't fail to indent-sexp before a full sexp (Bug#31984)
d24c5f2 Fix calls to modifications hooks in replace-buffer-contents
71a9151 * src/character.c (char_width): Support glyphs with faces.  (...
0feb673 Display raw bytes as belonging to 'eight-bit' charset
2e2f00f ; * doc/emacs/mule.texi (International Chars): Fix last change.
00561b5 Fix inaccurate text in the user manual
5cfb7a3 Copyedits in tramp.texi, improved example with bash's readline
6f8f358 Minor Tramp doc update
2585fcb File Shadowing is not available on MS Windows
39da592 ; Minor markup change in indent.texi
2f00ffe ; bookmark-jump: Add comment about last change.

6 years ago; Fix last change: only MinGW runtime 5.0.2 and later needs that.
Eli Zaretskii [Sat, 28 Jul 2018 14:21:53 +0000 (17:21 +0300)]
; Fix last change: only MinGW runtime 5.0.2 and later needs that.

6 years agoFix compilation with mingw.org's MinGW 5.x headers
Eli Zaretskii [Sat, 28 Jul 2018 12:34:00 +0000 (15:34 +0300)]
Fix compilation with mingw.org's MinGW 5.x headers

6 years ago* lisp/vc/diff.el (diff-buffer-with-file): Support indirect buffers.
Phil Sainty [Wed, 18 Jul 2018 07:32:11 +0000 (19:32 +1200)]
* lisp/vc/diff.el (diff-buffer-with-file): Support indirect buffers.

(Bug#32195)

6 years agoFix @include directive in Flymake doc again
João Távora [Sat, 28 Jul 2018 07:40:57 +0000 (08:40 +0100)]
Fix @include directive in Flymake doc again

Problem was reintroduced by commit titled:
"Mention use of C-h . (display-local-help) in Flymake manual"

* doc/misc/flymake.texi: Don't @include a relative path.

6 years agoUpdate the list of special forms in the ELisp manual
Eli Zaretskii [Sat, 28 Jul 2018 07:22:04 +0000 (10:22 +0300)]
Update the list of special forms in the ELisp manual

* doc/lispref/eval.texi (Special Forms):
* doc/lispref/frames.texi (Mouse Tracking): 'track-mouse' is
nowadays a macro.  (Bug#32284)

6 years agoFix problem with 'scroll-bar-adjust-thumb-portion' nil (Bug#32002)
Martin Rudalics [Sat, 28 Jul 2018 07:08:30 +0000 (09:08 +0200)]
Fix problem with 'scroll-bar-adjust-thumb-portion' nil (Bug#32002)

* lisp/scroll-bar.el (scroll-bar-drag-1): Do not scroll window
when its buffer is fully visible and
'scroll-bar-adjust-thumb-portion' is nil (Bug#32002).

6 years agoDon't fail to indent-sexp before a full sexp (Bug#31984)
Noam Postavsky [Fri, 27 Jul 2018 23:41:39 +0000 (19:41 -0400)]
Don't fail to indent-sexp before a full sexp (Bug#31984)

* lisp/emacs-lisp/lisp-mode.el (indent-sexp): Only signal error if the
initial forward-sexp fails.  Suppress scan-error forn any of the
forward-sexp calls after that.
* test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp-cant-go): New
test.

6 years ago; Merge from gnulib.
Paul Eggert [Fri, 27 Jul 2018 21:48:04 +0000 (14:48 -0700)]
; Merge from gnulib.

6 years agoFix file-name-case-insensitive-p on non-existent files
Ken Brown [Fri, 27 Jul 2018 18:24:01 +0000 (14:24 -0400)]
Fix file-name-case-insensitive-p on non-existent files

* src/fileio.c (Ffile_name_case_insensitive_p): If the file
doesn't exist, move up the filesystem tree until an existing
directory is found.  Then test that directory for
case-insensitivity.  (Bug#32246)

6 years ago* lisp/simple.el (event-apply-modifier): Map control+[ to C-[
Stefan Monnier [Fri, 27 Jul 2018 20:45:03 +0000 (16:45 -0400)]
* lisp/simple.el (event-apply-modifier): Map control+[ to C-[

6 years ago; More instrumentation for shadowfile-tests.el
Michael Albinus [Fri, 27 Jul 2018 13:49:31 +0000 (15:49 +0200)]
; More instrumentation for shadowfile-tests.el

6 years agoFix calls to modifications hooks in replace-buffer-contents
Eli Zaretskii [Fri, 27 Jul 2018 10:04:19 +0000 (13:04 +0300)]
Fix calls to modifications hooks in replace-buffer-contents

* src/editfns.c (Freplace_buffer_contents): Call the modification
hooks on the entire region where replacements could have taken
place.  The previous attempts of being more accurate just
introduced bugs.  (Bug#32278)

6 years ago* src/character.c (char_width): Support glyphs with faces. (Bug#32276)
Eli Zaretskii [Fri, 27 Jul 2018 09:33:29 +0000 (12:33 +0300)]
* src/character.c (char_width): Support glyphs with faces.  (Bug#32276)

6 years agoDisplay raw bytes as belonging to 'eight-bit' charset
Eli Zaretskii [Fri, 27 Jul 2018 06:47:37 +0000 (09:47 +0300)]
Display raw bytes as belonging to 'eight-bit' charset

* lisp/descr-text.el (describe-char):
* lisp/simple.el (what-cursor-position): Display characters in the
range #x3FFF80..#x3FFF9F as belonging to charset 'eight-bit', not
'tis620-2533'.
* lisp/international/mule-diag.el (describe-character-set):
Improve description of :supplementary-p.

6 years ago; * doc/emacs/mule.texi (International Chars): Fix last change.
Eli Zaretskii [Fri, 27 Jul 2018 05:54:44 +0000 (08:54 +0300)]
; * doc/emacs/mule.texi (International Chars): Fix last change.

6 years agoCorrectly indent C++ brace lists in member init lists.
Alan Mackenzie [Thu, 26 Jul 2018 19:55:47 +0000 (19:55 +0000)]
Correctly indent C++ brace lists in member init lists.

* lisp/progmodes/cc-engine.el (c-guess-basic-syntax; CASE 9B, CASE 9C): Set a
limit for a backward search to the ":" introducing the member init list, when
there is one, rather than the enclosing "{" or nil.

6 years agoFix inaccurate text in the user manual
Eli Zaretskii [Thu, 26 Jul 2018 18:38:09 +0000 (21:38 +0300)]
Fix inaccurate text in the user manual

* doc/emacs/mule.texi (International Chars): Correct inaccurate
description of raw bytes display by "C-x =".

6 years ago; More instrumentation for shadowfile-tests.el
Michael Albinus [Thu, 26 Jul 2018 14:12:15 +0000 (16:12 +0200)]
; More instrumentation for shadowfile-tests.el

6 years agoCopyedits in tramp.texi, improved example with bash's readline
Michael Albinus [Thu, 26 Jul 2018 09:54:33 +0000 (11:54 +0200)]
Copyedits in tramp.texi, improved example with bash's readline

* doc/misc/tramp.texi (all): Unify some wordings.
(Frequently Asked Questions): Update example with bash's readline.

6 years ago* src/editfns.c (syms_of_editfns): Fix typo in previous change.
Paul Eggert [Thu, 26 Jul 2018 08:14:31 +0000 (01:14 -0700)]
* src/editfns.c (syms_of_editfns): Fix typo in previous change.

6 years ago%o and %x can now format signed integers
Paul Eggert [Thu, 26 Jul 2018 07:34:10 +0000 (00:34 -0700)]
%o and %x can now format signed integers

Optionally treat integers as signed numbers with %o
and %x format specifiers, instead of treating them as
a machine-dependent two’s complement representation.
This option is more machine-independent, allows formats
like "#x%x" to be useful for reading later, and is
better-insulated for future changes involving bignums.
Setting the new variable ‘binary-as-unsigned’ to nil
enables the new behavior (Bug#32252).
This is a simplified version of the change proposed in:
https://lists.gnu.org/r/emacs-devel/2018-07/msg00763.html
I simplified that proposal by omitting bitwidth modifiers, as
I could not find an any example uses in the Emacs source code
that needed them and doing them correctly would have been
quite a bit more work for apparently little benefit.
* doc/lispref/strings.texi (Formatting Strings):
Document that %x and %o format negative integers in a
platform-dependent way.  Also, document how to format
numbers so that the same values can be read back in.
* etc/NEWS: Document the change.
* src/editfns.c (styled_format): Treat integers as signed
numbers even with %o and %x, if binary-as-unsigned is nil.
Support the + and space flags with %o and %x, since they’re
about signs.
(syms_of_editfns): New variable binary-as-unsigned.
* test/src/editfns-tests.el (read-large-integer):
Test that maximal integers can be read after printing
with all integer formats, if binary-as-unsigned is nil.

6 years agoNotify systemd in daemon-initialized and kill-emacs (Bug#31498)
Lucas Werkmeister [Sat, 9 Jun 2018 13:01:08 +0000 (15:01 +0200)]
Notify systemd in daemon-initialized and kill-emacs (Bug#31498)

With --[bg-]daemon and Type=forking, systemd will only consider the
daemon to have fully started up once the original process exits, and
will wait until then to start units depending on the Emacs service.  To
get the same functionality with --fg-daemon, use Type=notify instead of
Type=simple and explicitly send a readiness notification to systemd at
the point where the forked process would in --bg-daemon mode notify its
parent process and cause it to exit.  Similarly, notify systemd at the
beginning of the shutdown process as well.  (Both of these calls are
successful no-ops if emacs was not started by systemd.)
* etc/emacs.service: Update Type.
* src/emacs.c (daemon-initialized) [HAVE_LIBSYSTEMD]:
* src/emacs.c (kill-emacs) [HAVE_LIBSYSTEMD]: Call sd_notify().

6 years ago; More instrumentation for shadowfile-tests.el
Michael Albinus [Wed, 25 Jul 2018 20:04:34 +0000 (22:04 +0200)]
; More instrumentation for shadowfile-tests.el

6 years agoFix docstring of gnus-dependencies-add-header
Eric Abrahamsen [Wed, 25 Jul 2018 19:13:36 +0000 (12:13 -0700)]
Fix docstring of gnus-dependencies-add-header

* lisp/gnus/gnus-sum.el (gnus-dependencies-add-header): Code is
  correct, but docs had logic of `gnus-summary-ignore-duplicates'
  backwards: if it's t, the Message-IDs will not be renamed.

6 years ago; More instrumentation for shadowfile-tests.el
Michael Albinus [Wed, 25 Jul 2018 18:48:10 +0000 (20:48 +0200)]
; More instrumentation for shadowfile-tests.el

6 years agoMinor Tramp doc update
Michael Albinus [Wed, 25 Jul 2018 18:26:22 +0000 (20:26 +0200)]
Minor Tramp doc update

* doc/misc/tramp.texi (Frequently Asked Questions): Disable bash's
INPUTRC.

6 years agoFile Shadowing is not available on MS Windows
Michael Albinus [Wed, 25 Jul 2018 15:34:55 +0000 (17:34 +0200)]
File Shadowing is not available on MS Windows

* doc/emacs/files.texi (File Shadowing): File Shadowing is not
available on MS Windows.

* test/lisp/shadowfile-tests.el (shadow-test00-clusters)
(shadow-test01-sites, shadow-test02-files)
(shadow-test03-expand-cluster-in-file-name)
(shadow-test04-contract-file-name, shadow-test05-file-match)
(shadow-test06-literal-groups, shadow-test07-regexp-groups)
(shadow-test08-shadow-todo, shadow-test09-shadow-copy-files):
Skip under MS Windows.

6 years ago; Minor markup change in indent.texi
Eli Zaretskii [Wed, 25 Jul 2018 14:22:29 +0000 (17:22 +0300)]
; Minor markup change in indent.texi

* doc/emacs/indent.texi (Indentation Commands): Use
@kbd{@key{...}} for better looks.  (Bug#32248)

6 years agoInstrument shadowfile{-tests} for error hunting on hydra.
Michael Albinus [Wed, 25 Jul 2018 11:18:46 +0000 (13:18 +0200)]
Instrument shadowfile{-tests} for error hunting on hydra.

* lisp/shadowfile.el (shadow-make-fullname): Use changed
`tramp-make-tramp-file-name' from Tramp 2.4.

* test/lisp/shadowfile-tests.el (shadow-test08-shadow-todo):
Instrument test.  Suppress errors in cleanup.
(shadow-test09-shadow-copy-files): Suppress errors in cleanup.

6 years ago; bookmark-jump: Add comment about last change.
Noam Postavsky [Tue, 24 Jul 2018 22:45:43 +0000 (18:45 -0400)]
; bookmark-jump: Add comment about last change.

6 years agoMove proper-list-p to C
Paul Eggert [Tue, 24 Jul 2018 22:58:46 +0000 (15:58 -0700)]
Move proper-list-p to C

Since C code can use it and it’s simple, we might as well use C.
* lisp/subr.el (proper-list-p): Move to C code.
* src/eval.c (signal_error): Simplify by using Fproper_list_p.
* src/fns.c (Fproper_list_p): New function, moved here from Lisp.

Simplify signal_error
* src/eval.c (signal_error): Simplify by using FOR_EACH_TAIL_SAFE.

6 years ago* etc/NEWS: Omit bug# when not needed.
Paul Eggert [Tue, 24 Jul 2018 17:01:16 +0000 (10:01 -0700)]
* etc/NEWS: Omit bug# when not needed.

6 years agoMerge from origin/emacs-26
Glenn Morris [Tue, 24 Jul 2018 13:40:58 +0000 (06:40 -0700)]
Merge from origin/emacs-26

f64c277 (origin/emacs-26) Let bookmark-jump override window-point (Bu...
1208aaa Omit keymap from subword-mode docstring (Bug#32212)
2b70b54 Prevent line-mode term from showing user passwords
5de4441 Check for special filenames in eshell (Bug#30724)
1b4b965 Fix indent-sexp of #s(...) (Bug#31984)
59e8533 Add save-match-data to abbreviate-file-name (Bug#32201)
47f75b1 Fix last change in editfns.c
671dc5a Fix calls to buffer modification hooks from replace-buffer-co...
cc4ceed ; etc/NEWS: Remove unnecessary reference to a bug number.
e0f33ea Fix Bug#32226
7308fa0 Improve doc strings of several variables in keyboard.c

6 years agoFix typo in `find-alternate-file'
Michael Albinus [Tue, 24 Jul 2018 08:16:22 +0000 (10:16 +0200)]
Fix typo in `find-alternate-file'

* lisp/files.el (find-alternate-file): Add missing arguments to
`find-file-noselect' call.

6 years agoLet bookmark-jump override window-point (Bug#31751)
Noam Postavsky [Tue, 24 Jul 2018 01:49:00 +0000 (21:49 -0400)]
Let bookmark-jump override window-point (Bug#31751)

* lisp/bookmark.el (bookmark-jump): Use pop-to-buffer-same-window
instead of switch-to-buffer, the latter obeys
switch-to-buffer-preserve-window-point and so loses the bookmark's
point.

6 years ago(format "%#x" 0) yields "0", not "0x0"
Paul Eggert [Mon, 23 Jul 2018 17:23:35 +0000 (10:23 -0700)]
(format "%#x" 0) yields "0", not "0x0"

* doc/lispref/strings.texi (Formatting Strings):
* src/editfns.c (Fformat): Document this.

6 years agoOmit keymap from subword-mode docstring (Bug#32212)
Noam Postavsky [Sun, 22 Jul 2018 20:15:43 +0000 (16:15 -0400)]
Omit keymap from subword-mode docstring (Bug#32212)

* lisp/progmodes/subword.el (subword-mode): Remove listing of
subword-mode-map bindings, since it is empty as of 2014-03-23 "Merge
capitalized-words-mode and subword-mode".

6 years agoPrevent line-mode term from showing user passwords
Tino Calancha [Thu, 15 Feb 2018 00:09:50 +0000 (09:09 +0900)]
Prevent line-mode term from showing user passwords

For buffers whose mode derive from comint-mode, the user password is
read from the minibuffer and it's hidden.  A buffer in term-mode and
line submode, instead shows the passwords.  Make buffers in line
term-mode to hide passwords too (Bug#30190).

* lisp/term.el (term-send-invisible): Prefer the more robust
`read-passwd' instead of `term-read-noecho'.
(term-watch-for-password-prompt): New function.
(term-emulate-terminal): Call it each time we receive non-escape
sequence output.

Co-authored-by: Noam Postavsky <npostavs@gmail.com>
6 years ago0x%x → %#x in elisp formats
Paul Eggert [Mon, 23 Jul 2018 07:57:06 +0000 (00:57 -0700)]
0x%x → %#x in elisp formats

* lisp/emacs-lisp/cl-print.el (cl-print-object):
* lisp/profiler.el (profiler-format-entry):
* lisp/progmodes/hideif.el (hif-evaluate-macro):
Prefer %#x to 0x%x in elisp formats when formatting arbitrary
integers, as it’ll produce more-readable output with negative args
should we change how negative values are printed with %x.

6 years agopositive → nonnegative doc fixes
Paul Eggert [Mon, 23 Jul 2018 07:05:25 +0000 (00:05 -0700)]
positive → nonnegative doc fixes

* doc/lispref/numbers.texi (Bitwise Operations)
(Math Functions):
* doc/lispref/strings.texi (Formatting Strings):
* src/editfns.c (Fformat):
Correct “positive” with “nonnegative” in some documentation.

6 years agoRevert "Make nnimap support IMAP namespaces"
Lars Ingebrigtsen [Mon, 23 Jul 2018 07:01:24 +0000 (09:01 +0200)]
Revert "Make nnimap support IMAP namespaces"

This reverts commit 7b5b3ddb2dfa98d640aff7b5b160f777e22cc794.

Insufficiently tested before committing -- bugs out several places
when not using namespaces.

6 years agoAdd \eqref to RefTeX's reference styles (Bug#32203)
Arash Esbati [Wed, 18 Jul 2018 19:20:12 +0000 (21:20 +0200)]
Add \eqref to RefTeX's reference styles (Bug#32203)

* lisp/textmodes/reftex-vars.el (reftex-ref-style-alist): Add entry
for \eqref provided by amsmath.sty and bind it to "e" key.

6 years agoPreserve nonblank whitespace when indenting (Bug#32200)
Noam Postavsky [Wed, 18 Jul 2018 23:11:23 +0000 (19:11 -0400)]
Preserve nonblank whitespace when indenting (Bug#32200)

* lisp/indent.el (indent-line-to): Remove only spaces and tabs, not
any whitespace syntax characters.

6 years agoAdd further clarifications to gnus-blocked-images
Lars Ingebrigtsen [Sun, 22 Jul 2018 13:57:49 +0000 (15:57 +0200)]
Add further clarifications to gnus-blocked-images

* lisp/gnus/gnus-art.el (gnus-blocked-images): Add further
clarifications.

6 years agoMake nnimap support IMAP namespaces
Nikolaus Rath [Sun, 22 Jul 2018 13:33:38 +0000 (15:33 +0200)]
Make nnimap support IMAP namespaces

* lisp/gnus/nnimap.el (nnimap-use-namespaces): Introduc new
server variable.
(nnimap-group-to-imap, nnimap-get-groups): Transform IMAP group
names to Gnus group name by stripping / prefixing personal
namespace prefix.
(nnimap-open-connection-1): Ask server for namespaces and store them.

* lisp/gnus/nnimap.el (nnimap-request-group-scan)
(nnimap-request-create-group, nnimap-request-delete-group)
(nnimap-request-rename-group, nnimap-request-move-article)
(nnimap-process-expiry-targets)
(nnimap-request-update-group-status)
(nnimap-request-accept-article, nnimap-request-list)
(nnimap-retrieve-group-data-early, nnimap-change-group)
(nnimap-split-incoming-mail): Use nnimap-group-to-imap.
(nnimap-group-to-imap): New function to map Gnus group names to
IMAP folder names.

6 years agoMake async :family 'local failures fail correctly again
Lars Ingebrigtsen [Sun, 22 Jul 2018 11:39:10 +0000 (13:39 +0200)]
Make async :family 'local failures fail correctly again

* src/fileio.c (get_file_errno_data): Refactor out into its own
function so that we can reuse the error handling from an async
context (bug#31901).

* src/process.c (connect_network_socket): When an async :family
'local client fails (with a file error, for instance), mark the
process as failed.

6 years agothread-join returns the result of finished thread
Michael Albinus [Sun, 22 Jul 2018 09:53:24 +0000 (11:53 +0200)]
thread-join returns the result of finished thread

* doc/lispref/threads.texi (Basic Thread Functions):
* etc/NEWS: Document return value of `thread-join'.

* src/thread.c (invoke_thread_function, Fmake_thread)
(init_main_thread): Set result.
(Fthread_join): Propagate signals, and return result.
(Vmain_thread): New defvar.

* src/thread.h (struct thread_state): Add `result' field.

* test/src/thread-tests.el (threads-join): Test also return value.
(threads-join-error): New test.
(threads-mutex-signal): Check for propagation of `quit' signal.

6 years agoAvoid destroying match data in 'setenv' (Bug#32201)
John Shahid [Thu, 19 Jul 2018 00:18:19 +0000 (20:18 -0400)]
Avoid destroying match data in 'setenv' (Bug#32201)

* lisp/env.el (setenv,setenv-internal): Replace string-match with
string-match-p.

6 years agoCheck for special filenames in eshell (Bug#30724)
Jonathan Kyle Mitchell [Tue, 17 Jul 2018 02:46:20 +0000 (21:46 -0500)]
Check for special filenames in eshell (Bug#30724)

* lisp/eshell/esh-cmd.el (eshell-lisp-command): Check for "~"
in lisp commands with the eshell-filename-arguments property
(Bug#30724).

* lisp/eshell/em-dirs.el (eshell/cd, eshell/pushd, eshell/popd):
* lisp/eshell/em-ls.el (eshell/ls):
* lisp/eshell/em-unix.el (eshell/rm, eshell/mkdir, eshell/rmdir)
(eshell/mv, eshell/cp, eshell/ln, eshell/cat, eshell/du, eshell/diff):
* lisp/eshell/esh-ext.el (eshell/addpath): Add
eshell-filename-arguments to symbol plist.

6 years agoFix indent-sexp of #s(...) (Bug#31984)
Noam Postavsky [Thu, 19 Jul 2018 10:40:54 +0000 (06:40 -0400)]
Fix indent-sexp of #s(...) (Bug#31984)

* lisp/emacs-lisp/lisp-mode.el (indent-sexp): Look for a sexp that
ends after the current line.
* test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp-go): New test.

6 years agoAdd save-match-data to abbreviate-file-name (Bug#32201)
Noam Postavsky [Wed, 18 Jul 2018 22:45:47 +0000 (18:45 -0400)]
Add save-match-data to abbreviate-file-name (Bug#32201)

* lisp/files.el (abbreviate-file-name): Save match-data around
expand-file-name; it is not guaranteed to preserve match-data, and may
well do so depending on what file handlers and hooks are in effect.