]> git.eshelyaron.com Git - emacs.git/log
emacs.git
6 years agoFix bignum comparisons with NaN
Tom Tromey [Sat, 4 Aug 2018 16:50:35 +0000 (10:50 -0600)]
Fix bignum comparisons with NaN

* src/data.c (isnan): Move earlier.
(bignumcompare): Explicitly handle NaN.
* test/src/data-tests.el (data-tests-min): Add NaN tests
for bignum.
(data-check-sign): Fix for previous patch.
* test/src/fns-tests.el (test-bignum-eql): Add NaN test.

6 years agoMake bignums work better when EMACS_INT is larger than long
Andy Moreton [Sat, 4 Aug 2018 16:28:13 +0000 (10:28 -0600)]
Make bignums work better when EMACS_INT is larger than long

* lisp/international/ccl.el (ccl-fixnum): New function.
(ccl-embed-data, ccl-embed-current-address, ccl-dump): Use it.
* src/alloc.c (make_number): Handle case where EMACS_INT is
larger than long.
* src/data.c (bignumcompare): Handle case where EMACS_INT is
larger than long.
(arith_driver): Likewise.  Coerce markers.
(float_arith_driver): Coerce markers.
(Flogcount): Use mpz_sgn.
(ash_lsh_impl): Fix bugs.
(Fsub1): Fix underflow check.
* src/lisp.h (NUMBERP): Don't check BIGNUMP.
(CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER): Fix indentation.
* test/lisp/international/ccl-tests.el: New file.

6 years agoFix bignum creation when EMACS_INT is wider than long
Tom Tromey [Thu, 19 Jul 2018 21:58:10 +0000 (15:58 -0600)]
Fix bignum creation when EMACS_INT is wider than long

* src/alloc.c (mpz_set_intmax_slow, mpz_set_uintmax_slow): New
functions.
* src/data.c (arith_driver, Frem, Fmod, ash_lsh_impl, Fadd1)
(Fsub1): Use mpz_set_intmax, mpz_set_uintmax.
* src/emacs-module.c (module_make_integer): Use mpz_set_intmax.
* src/floatfns.c (Fabs): Use mpz_set_intmax.
* src/lisp.h (mpz_set_intmax, mpz_set_uintmax): New inline
functions.
(mpz_set_uintmax_slow, mpz_set_intmax_slow): Declare.

6 years agoAdd missing @end defun
Tom Tromey [Mon, 16 Jul 2018 14:29:31 +0000 (08:29 -0600)]
Add missing @end defun

* doc/lispref/numbers.texi (Bitwise Operations): Add missing @end defun.

6 years agoAdd GMP to emacs_config_features
Robert Pluim [Fri, 13 Jul 2018 13:26:30 +0000 (15:26 +0200)]
Add GMP to emacs_config_features

* configure.ac : Add GMP to emacs_config_features.  This allows us
to determine whether the built-in gmp-mini is being used or not.

6 years agoDocument bignums
Tom Tromey [Mon, 9 Jul 2018 05:10:53 +0000 (23:10 -0600)]
Document bignums

* doc/lispref/numbers.texi (Numbers, Integer Basics)
(Predicates on Numbers, Comparison of Numbers)
(Arithmetic Operations, Bitwise Operations): Update for bignums.
* doc/lispref/objects.texi (Integer Type, Type Predicates):
Update for bignums.
* etc/NEWS: Update for bigums.

6 years agoBignum fixes for byte-compiler and bytecode interpreter
Tom Tromey [Sun, 8 Jul 2018 15:36:37 +0000 (09:36 -0600)]
Bignum fixes for byte-compiler and bytecode interpreter

* lisp/emacs-lisp/byte-opt.el: Mark bignump and fixnump as
side-effect-and-error-free-fns.
* src/bytecode.c (exec_byte_code): Handle bignums.

6 years agoUse fixnump rather than integerp in some spots
Tom Tromey [Sun, 8 Jul 2018 15:31:13 +0000 (09:31 -0600)]
Use fixnump rather than integerp in some spots

* src/buffer.c (syms_of_buffer): Use Qfixnump, not Qintegerp.
* src/data.c (syms_of_data): Define fixnump symbol.
* src/lisp.h (lisp_h_CHECK_FIXNUM): Use Qfixnump.
(struct Lisp_Buffer_Objfwd): Update comment.

6 years agoMake ash and lsh handle bignums
Tom Tromey [Sun, 8 Jul 2018 15:22:17 +0000 (09:22 -0600)]
Make ash and lsh handle bignums

* src/data.c (ash_lsh_impl): Handle bignums.
* test/src/data-tests.el (data-tests-ash-lsh): New test.

6 years agoMake logb handle bignums
Tom Tromey [Sun, 8 Jul 2018 06:10:54 +0000 (00:10 -0600)]
Make logb handle bignums

* src/floatfns.c (Flogb): Handle bignums.
* test/src/floatfns-tests.el (bignum-logb): New test.

6 years agoMake % and mod handle bignums
Tom Tromey [Sun, 8 Jul 2018 05:42:10 +0000 (23:42 -0600)]
Make % and mod handle bignums

* src/data.c (Frem, Fmod): Handle bignums.
* src/lisp.h (CHECK_INTEGER_COERCE_MARKER): New macro.
* test/src/data-tests.el (data-tests-check-sign)
(data-tests-%-mod): New tests.

6 years agoLet C modules access bignum values
Tom Tromey [Sun, 8 Jul 2018 04:51:58 +0000 (22:51 -0600)]
Let C modules access bignum values

* src/emacs-module.c (module_extract_integer, module_make_integer):
Handle bignums.

6 years agoMake min and max handle bignums
Tom Tromey [Sun, 8 Jul 2018 04:19:21 +0000 (22:19 -0600)]
Make min and max handle bignums

* src/data.c (minmax_driver): Handle bignums.
* test/src/data-tests.el (data-tests-minmax): New test.

6 years agoMake logcount handle bignums
Tom Tromey [Sat, 7 Jul 2018 20:22:44 +0000 (14:22 -0600)]
Make logcount handle bignums

* src/data.c (Flogcount): Handle bignums.
* test/src/data-tests.el (data-tests-logcount): New test.

6 years agoMake lognot handle bignums
Tom Tromey [Sat, 7 Jul 2018 05:44:30 +0000 (23:44 -0600)]
Make lognot handle bignums

* src/data.c (Flognot): Handle bignums.

6 years agoMake 1+ and 1- handle bignums
Tom Tromey [Sat, 7 Jul 2018 05:26:13 +0000 (23:26 -0600)]
Make 1+ and 1- handle bignums

* src/data.c (Fadd1, Fsub1): Handle bignums.
* test/src/data-tests.el (data-tests-1+, data-tests-1-): New tests.

6 years agoMake abs handle bignums
Tom Tromey [Thu, 5 Jul 2018 19:19:32 +0000 (13:19 -0600)]
Make abs handle bignums

* src/floatfns.c (Fabs): Handle bignums.
* test/src/floatfns-tests.el (bignum-abs): New test.

6 years agoAllow conversion of bignums to floats
Tom Tromey [Thu, 5 Jul 2018 19:17:36 +0000 (13:17 -0600)]
Allow conversion of bignums to floats

* src/floatfns.c (extract_float, Ffloat): Handle bignums.
* src/lisp.h (XFLOATINT): Handle bignums.
* test/src/floatfns-tests.el (bignum-to-float): New test.

6 years agoMake format handle bignums
Tom Tromey [Thu, 5 Jul 2018 20:46:26 +0000 (14:46 -0600)]
Make format handle bignums

* src/editfns.c (styled_format): Handle bignums.
* test/src/editfns-tests.el (read-large-integer): Update.
(format-bignum): New test.

6 years agoMake number-to-string work for bignums
Tom Tromey [Thu, 5 Jul 2018 17:45:21 +0000 (11:45 -0600)]
Make number-to-string work for bignums

* src/data.c (Fnumber_to_string): Handle bignum.
* test/src/data-tests.el (data-tests-number-to-string): New test.

6 years agoAdd some bignum tests
Tom Tromey [Sat, 7 Jul 2018 21:32:34 +0000 (15:32 -0600)]
Add some bignum tests

* test/src/data-tests.el (data-tests-bignum, data-tests-+)
(data-tests-/, data-tests-number-predicates): New tests.
* test/src/fns-tests (test-bignum-eql): New test.
* test/src/lread-tests (lread-long-hex-integer): Expect bignum.
* test/src/print-tests (print-bignum): New test.

6 years agoMake arithmetic work with bignums
Tom Tromey [Fri, 6 Jul 2018 16:12:14 +0000 (10:12 -0600)]
Make arithmetic work with bignums

* src/data.c (free_mpz_value): New function.
(arith_driver): Rewrite.
(float_arith_driver): Handle bignums.

6 years agoMake comparison operators handle bignums
Tom Tromey [Sat, 7 Jul 2018 21:44:15 +0000 (15:44 -0600)]
Make comparison operators handle bignums

* sc/data.c (bignumcompare): New function.
(arithcompare): Handle bignums.

6 years agoMake the reader accept bignums
Tom Tromey [Sat, 7 Jul 2018 21:32:52 +0000 (15:32 -0600)]
Make the reader accept bignums

* src/data.c (Fstring_to_number): Update.
* src/lisp.h (S2N_OVERFLOW_TO_FLOAT): Remove.
* src/lread.c (free_contents): New function.
(read_integer): Handle bignums.
(read1): Update.
(string_to_number): Handle bignums.
(syms_of_lread): Remove read-integer-overflow-as-float.
* src/process.c (Fsignal_process): Update.

6 years agoMake eql work for bignums
Tom Tromey [Sat, 7 Jul 2018 21:32:30 +0000 (15:32 -0600)]
Make eql work for bignums

* src/fns.c (Feql, internal_equal): Handle bignums.

6 years agoProvide new functions to create bignums
Tom Tromey [Sat, 7 Jul 2018 20:53:23 +0000 (14:53 -0600)]
Provide new functions to create bignums

* src/alloc.c (make_bignum_str, make_number): New functions.
* src/lisp.h (make_bignum_str, make_number): Declare.

6 years agoIntroduce the bignum type
Tom Tromey [Sat, 7 Jul 2018 20:52:09 +0000 (14:52 -0600)]
Introduce the bignum type

* src/alloc.c (mark_object): Handle Lisp_Misc_Bignum.
(sweep_misc): Call mpz_clear for Lisp_Misc_Bignum.
* src/data.c (Ftype_of): Handle Lisp_Misc_Bignum.
(Fintegerp, Finteger_or_marker_p, Fnatnump, Fnumberp)
(Fnumber_or_marker_p): Update for bignum.
(Ffixnump, Fbignump): New defuns.
(syms_of_data): Update.
* src/emacs.c (xrealloc_for_gmp, xfree_for_gmp): New functions.
(main): Call mp_set_memory_functions.
* src/lisp.h (enum Lisp_Misc_Type) <Lisp_Misc_Bignum>: New constant.
(struct Lisp_Bignum): New.
(union Lisp_Misc): Add u_bignum.
(BIGNUMP, XBIGNUM, INTEGERP, NATNUMP, NUMBERP, CHECK_NUMBER)
(CHECK_INTEGER, CHECK_NUMBER_COERCE_MARKER): New functions.
* src/print.c (print_object): Handle Lisp_Misc_Bignum.

6 years agoAdd configury for GMP library
Tom Tromey [Sat, 7 Jul 2018 04:37:51 +0000 (22:37 -0600)]
Add configury for GMP library

* configure.ac (GMP_LIB, GMP_OBJ): New substs.
* src/Makefile.in (GMP_OBJ, GMP_OBJ): New variables.
(base_obj): Add GMP_OBJ.
(LIBES): Add GMP_LIB.
* src/mini-gmp.h: New file.
* src/mini-gmp.c: New file.

6 years agoRename integerp->fixnum, etc, in preparation for bignums
Tom Tromey [Sat, 7 Jul 2018 03:56:17 +0000 (21:56 -0600)]
Rename integerp->fixnum, etc, in preparation for bignums

* src/json.c, src/keyboard.c, src/keyboard.h, src/keymap.c,
src/kqueue.c, src/lcms.c, src/lisp.h, src/lread.c, src/macros.c,
src/marker.c, src/menu.c, src/minibuf.c, src/msdos.c, src/print.c,
src/process.c, src/profiler.c, src/search.c, src/sound.c,
src/syntax.c, src/sysdep.c, src/term.c, src/terminal.c,
src/textprop.c, src/undo.c, src/w16select.c, src/w32.c,
src/w32console.c, src/w32cygwinx.c, src/w32fns.c, src/w32font.c,
src/w32inevt.c, src/w32proc.c, src/w32select.c, src/w32term.c,
src/w32uniscribe.c, src/widget.c, src/window.c, src/xdisp.c,
src/xfaces.c, src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c,
src/xrdb.c, src/xselect.c, src/xterm.c, src/xwidget.c: Rename
INTEGERP->FIXNUM, make_number->make_fixnum, CHECK_NUMBER->CHECK_FIXNUM,
make_natnum->make_fixed_natum, NUMBERP->FIXED_OR_FLOATP,
NATNUMP->FIXNATP, CHECK_NATNUM->CHECK_FIXNAT.

6 years agoSpeed up smerge-refine-regions by avoiding fsync
Noam Postavsky [Thu, 12 Jul 2018 00:13:25 +0000 (20:13 -0400)]
Speed up smerge-refine-regions by avoiding fsync

* lisp/vc/smerge-mode.el (smerge-refine-regions): Bind
write-region-inhibit-fsync to t.  This was reported in
https://github.com/magit/magit/pull/2834 to give a noticable speedup.

6 years agoDon't skip epg-tests even with gpg 2.0 (Bug#23561)
Noam Postavsky [Thu, 12 Jul 2018 00:01:11 +0000 (20:01 -0400)]
Don't skip epg-tests even with gpg 2.0 (Bug#23561)

* test/lisp/epg-tests.el (epg-tests--config-program-alist): New
constant, which allows gpg2 version 2.0+.
(epg-tests-find-usable-gpg-configuration): Pass it to
epg-find-configuration.

6 years agoFix the bootstrap differently, so zerop can be where it belongs
Stefan Monnier [Thu, 12 Jul 2018 14:29:28 +0000 (10:29 -0400)]
Fix the bootstrap differently, so zerop can be where it belongs

Suggested by Robert Pluim <rpluim@gmail.com>.

* lisp/emacs-lisp/byte-run.el (defun-declarations-alist): Avoid cadr/cddr.
* lisp/subr.el (zerop): Un-revert 2018-07-10T23:08:58-07:00!contovob@tcd.ie.

6 years ago; Add commentary on location of zerop
Basil L. Contovounesios [Wed, 11 Jul 2018 17:11:55 +0000 (20:11 +0300)]
; Add commentary on location of zerop

* lisp/subr.el (zerop): Add commentary explaining why moving the
function's location within the file broke bootstrap in
2018-07-10T23:08:58-07:00!contovob@tcd.ie.

6 years agoUnbreak bootstrap
Glenn Morris [Wed, 11 Jul 2018 15:27:14 +0000 (08:27 -0700)]
Unbreak bootstrap

* lisp/subr.el (zerop): Revert previous change, which caused
bootstrap to fail with void function cadr.

6 years ago; Rearrange definition of zerop in subr.el
Basil L. Contovounesios [Wed, 11 Jul 2018 06:08:58 +0000 (23:08 -0700)]
; Rearrange definition of zerop in subr.el

* lisp/subr.el (zerop): Move from under 'List functions' heading to
under 'Basic Lisp functions' heading.

6 years ago* lisp/vc/diff-mode.el: Perform hunk refinement from font-lock
Stefan Monnier [Wed, 11 Jul 2018 02:52:21 +0000 (22:52 -0400)]
* lisp/vc/diff-mode.el: Perform hunk refinement from font-lock

Remove redundant :group arguments.
(diff-font-lock-refine): New var.
(diff--refine-hunk): New function, extracted from diff-refine-hunk.
(diff-refine-hunk): Use it.
(diff--font-lock-refine--refresh): New function.
(diff--font-lock-refined): New function.
(diff-font-lock-keywords): Use it.

6 years agoFix Bug#32107
Filipp Gunbin [Wed, 11 Jul 2018 02:28:21 +0000 (05:28 +0300)]
Fix Bug#32107

* lisp/progmodes/sql.el (sql-buffer-live-p): Fix handling of optional
  connection argument.  (Bug#32107)

6 years agoFix infinite recursion in eshell/clear (Bug#31326)
Jonathan Kyle Mitchell [Thu, 3 May 2018 04:09:55 +0000 (23:09 -0500)]
Fix infinite recursion in eshell/clear (Bug#31326)

* lisp/eshell/esh-mode.el (eshell/clear): Bind
eshell-input-filter-functions to nil to prevent entries like
eshell-smart-display-setup from causing infinite recursion.

6 years ago* lisp/indent.el (indent-line-to): Fix dedenting of tabs.
Noam Postavsky [Tue, 10 Jul 2018 16:07:01 +0000 (12:07 -0400)]
* lisp/indent.el (indent-line-to): Fix dedenting of tabs.

6 years ago* lisp/format.el (format-annotate-single-property-change): Simplify.
Paul Eggert [Tue, 10 Jul 2018 01:59:58 +0000 (18:59 -0700)]
* lisp/format.el (format-annotate-single-property-change): Simplify.

6 years agoAdd predicate proper-list-p
Basil L. Contovounesios [Tue, 10 Jul 2018 01:46:33 +0000 (18:46 -0700)]
Add predicate proper-list-p

For discussion, see emacs-devel thread starting at
https://lists.gnu.org/archive/html/emacs-devel/2018-04/msg00460.html.

* lisp/subr.el (proper-list-p): New function.
Implementation suggested by Paul Eggert <eggert@cs.ucla.edu> in
https://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00138.html.
* doc/lispref/lists.texi (List Elements):
* etc/NEWS: Document proper-list-p.
* lisp/org/ob-core.el (org-babel-insert-result):
* lisp/emacs-lisp/byte-opt.el (byte-optimize-if):
* lisp/emacs-lisp/cl-macs.el (cl--make-usage-args): Use proper-list-p.
* lisp/emacs-lisp/ert.el (ert--proper-list-p): Remove.
Replaced by proper-list-p in lisp/subr.el.
(ert--explain-equal-rec): Use proper-list-length.
* lisp/format.el (format-proper-list-p): Remove.
Replaced by proper-list-p in lisp/subr.el.
(format-annotate-single-property-change): Use proper-list-p.
* test/lisp/emacs-lisp/ert-tests.el (ert-test-proper-list-p):
Move from here...
* test/lisp/subr-tests.el (subr-tests--proper-list-length):
...to here, mutatis mutandis.

6 years agoRespect field boundaries in indent-line-to (Bug#32014)
Noam Postavsky [Sat, 30 Jun 2018 13:14:22 +0000 (09:14 -0400)]
Respect field boundaries in indent-line-to (Bug#32014)

* lisp/indent.el (indent-line-to): Use the back-to-indentation point
as the end-point of whitespace removal, rather than
backward-to-indentation which doesn't respect field boundaries.
* test/lisp/emacs-lisp/lisp-mode-tests.el
(lisp-indent-with-read-only-field): Don't expect to fail.

6 years ago; Merge from emacs-26
Noam Postavsky [Tue, 10 Jul 2018 00:06:29 +0000 (20:06 -0400)]
; Merge from emacs-26

The following commit was skipped:

8f7d35cabd Stop using indent-line-to in lisp-indent-line (Bug#32014)

6 years agoMerge from emacs-26
Noam Postavsky [Tue, 10 Jul 2018 00:06:27 +0000 (20:06 -0400)]
Merge from emacs-26

db3f779780 ; Test for Bug#32014
90d95b000c Explicitly reject :server and :nowait (Bug#31903)
917158f8c9 Fix Bug#32090

# Conflicts:
# src/process.c

6 years ago; Merge from emacs-26
Noam Postavsky [Tue, 10 Jul 2018 00:03:30 +0000 (20:03 -0400)]
; Merge from emacs-26

The following commit was skipped:

848f0f73e9 Fix floating point exceptions on Alpha (Bug#32086)

6 years agoMerge from emacs-26
Noam Postavsky [Tue, 10 Jul 2018 00:03:30 +0000 (20:03 -0400)]
Merge from emacs-26

65889a6d12 Fix bootstrap infloop in GNU/Linux alpha
48efd1c98b Minor fix of a recent documentation change
3302b7cd7f Mention the NSM in the gnutls variable doc strings
40c2ce743b Remove test code from last commit
e02d8e29c6 Fix Bug#32084
da5d6dbe39 Fix (length NON-SEQUENCE) documentation

6 years agoStop using indent-line-to in lisp-indent-line (Bug#32014)
Noam Postavsky [Fri, 29 Jun 2018 23:58:58 +0000 (19:58 -0400)]
Stop using indent-line-to in lisp-indent-line (Bug#32014)

This is partial revert of "Remove ignored argument from
lisp-indent-line", because `indent-line-to' doesn't respect field
boundaries.
* lisp/emacs-lisp/lisp-mode.el (lisp-indent-line): Use delete-region
and indent-to instead of `indent-line-to'.
* test/lisp/emacs-lisp/lisp-mode-tests.el
(lisp-indent-with-read-only-field): Expect to pass.

Don't merge to master, we will fix indent-line-to there instead.

6 years ago; Test for Bug#32014
Noam Postavsky [Sat, 30 Jun 2018 00:15:10 +0000 (20:15 -0400)]
; Test for Bug#32014

* test/lisp/emacs-lisp/lisp-mode-tests.el
(lisp-indent-with-read-only-field): New test.

6 years agoExplicitly reject :server and :nowait (Bug#31903)
Noam Postavsky [Thu, 5 Jul 2018 23:37:28 +0000 (19:37 -0400)]
Explicitly reject :server and :nowait (Bug#31903)

* src/process.c (Fmake_network_process): Explicitly check for and
signal an error when passed both :server and :nowait non-nil.  In
Emacs 25, :nowait would be ignored in this case, but as of Emacs 26.1
this gives an error, albeit an unclear one.  Also remove obsolete
comment regarding configurations lacking non-blocking mode, the
corresponding code was removed in 2012-11-17 "Assume POSIX 1003.1-1988
or later for fcntl.h."

6 years agoFix Bug#32090
Michael Albinus [Mon, 9 Jul 2018 14:03:49 +0000 (16:03 +0200)]
Fix Bug#32090

* lisp/files-x.el (connection-local-normalize-criteria): Do not
use PROPERTIES anymore.
(connection-local-get-profiles): Rewrite, in order to accept any
property as optional.  (Bug#32090)
(connection-local-set-profiles):
Adapt ´connection-local-normalize-criteria' call.

* test/lisp/files-x-tests.el
(files-x-test-connection-local-set-profiles)
(files-x-test-hack-connection-local-variables-apply): Extend tests.

6 years agodired-do-find-regexp: Use rgrep-find-ignored-directories.
Sam Steingold [Mon, 9 Jul 2018 13:29:09 +0000 (09:29 -0400)]
dired-do-find-regexp: Use rgrep-find-ignored-directories.

6 years agoFix floating point exceptions on Alpha (Bug#32086)
Paul Eggert [Sun, 8 Jul 2018 17:51:00 +0000 (10:51 -0700)]
Fix floating point exceptions on Alpha (Bug#32086)

Backport from master.
* admin/merge-gnulib (GNULIB_MODULES): Add fpieee.
* m4/fpieee.m4: New file, copied from Gnulib.
* m4/gnulib-comp.m4: Regenerate.

6 years agoFix etc/HELLO searching in grep.el
Paul Eggert [Sun, 8 Jul 2018 17:00:17 +0000 (10:00 -0700)]
Fix etc/HELLO searching in grep.el

* lisp/progmodes/grep.el (grep-compute-defaults):
Search for "^Copyright", not "^English", as the latter is no
longer present in etc/HELLO and the former is more likely to
survive future changes to etc/HELLO (Bug#32093).

6 years agoFix floating point exceptions on Alpha (Bug#32086)
Paul Eggert [Sun, 8 Jul 2018 16:24:10 +0000 (09:24 -0700)]
Fix floating point exceptions on Alpha (Bug#32086)

* admin/merge-gnulib (GNULIB_MODULES): Add fpieee.
* m4/fpieee.m4: New file, copied from Gnulib.
* m4/gnulib-comp.m4: Regenerate.

6 years agoFix bootstrap infloop in GNU/Linux alpha
Paul Eggert [Sun, 8 Jul 2018 16:04:02 +0000 (09:04 -0700)]
Fix bootstrap infloop in GNU/Linux alpha

* src/emacs.c (main): Do not re-exec if EMACS_HEAP_EXEC
is already set (Bug#32083).

6 years agoMinor fix of a recent documentation change
Eli Zaretskii [Sun, 8 Jul 2018 15:22:51 +0000 (18:22 +0300)]
Minor fix of a recent documentation change

* lisp/net/gnutls.el (gnutls-algorithm-priority): Clarify the doc
string.

6 years agoMinor improvements in recent NSM documentation changes
Eli Zaretskii [Sun, 8 Jul 2018 14:46:32 +0000 (17:46 +0300)]
Minor improvements in recent NSM documentation changes

* doc/emacs/misc.texi (Network Security): Improve wording and
markup of last change.

* src/gnutls.c (Fgnutls_peer_status): Doc fix.

* etc/NEWS: Improve wording of last change.

6 years agoFix typo in sha1-intermediate check
Lars Ingebrigtsen [Sun, 8 Jul 2018 14:14:06 +0000 (16:14 +0200)]
Fix typo in sha1-intermediate check

* lisp/net/nsm.el (nsm-protocol-check--intermediate-sha1): Allow
storing the exception with a correct name.

6 years agoMention the NSM in the gnutls variable doc strings
Lars Ingebrigtsen [Sun, 24 Jun 2018 12:48:30 +0000 (14:48 +0200)]
Mention the NSM in the gnutls variable doc strings

* gnutls.el (gnutls-algorithm-priority): Mention the Network
Security Manager here since this variable is an obvious place
for people concerned about network security to look.
(gnutls-verify-error): Ditto.
(gnutls-min-prime-bits): Ditto.

6 years agoDocument network-security-protocol-checks better
Lars Ingebrigtsen [Sun, 8 Jul 2018 11:40:37 +0000 (13:40 +0200)]
Document network-security-protocol-checks better

* doc/emacs/misc.texi (Network Security): Rearrange the
network-security-protocol-checks documentation and try to explain
more what this all means and what checks are triggered.

6 years agoNSM-related doc fixes
Lars Ingebrigtsen [Sun, 8 Jul 2018 11:30:08 +0000 (13:30 +0200)]
NSM-related doc fixes

* src/gnutls.c (Fgnutls_peer_status): Mention :certificates in the
doc string.

* etc/NEWS: Mention how to switch off the additional TLS checks.

6 years agoRemove test code from last commit
Michael Albinus [Sun, 8 Jul 2018 11:08:05 +0000 (13:08 +0200)]
Remove test code from last commit

6 years agoFix Bug#32084
Michael Albinus [Sun, 8 Jul 2018 11:02:19 +0000 (13:02 +0200)]
Fix Bug#32084

* test/lisp/net/dbus-tests.el (dbus-test02-register-service-own-bus):
Unset $DISPLAY when calling dbus-launch, in order to avoid
possible X11 authentication errors.  (Bug#32084)

6 years agoFix (length NON-SEQUENCE) documentation
Basil L. Contovounesios [Sat, 7 Jul 2018 16:33:08 +0000 (19:33 +0300)]
Fix (length NON-SEQUENCE) documentation

Suggested by Eli Zaretskii <eliz@gnu.org> in the following threads:
https://lists.gnu.org/archive/html/emacs-devel/2018-07/msg00171.html
https://lists.gnu.org/archive/html/emacs-devel/2018-07/msg00206.html

* doc/lispref/sequences.texi (Sequence Functions): Mention that
'length' signals a 'wrong-type-argument' also when given a
non-sequencep argument.

6 years ago* lisp/imenu.el: Require cl-lib, not internal components of same.
Glenn Morris [Sat, 7 Jul 2018 16:59:53 +0000 (09:59 -0700)]
* lisp/imenu.el: Require cl-lib, not internal components of same.

6 years ago* admin/make-tarball.txt, admin/release-process: Refcard tweaks.
Glenn Morris [Sat, 7 Jul 2018 16:34:16 +0000 (12:34 -0400)]
* admin/make-tarball.txt, admin/release-process: Refcard tweaks.

6 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 7 Jul 2018 16:27:44 +0000 (09:27 -0700)]
Merge from origin/emacs-26

a427de9 (origin/emacs-26) Fix bug #11732
3a04e15 Improve documentation of 'emacs-lock-mode'
9d6ca5a * lisp/imenu.el (imenu-generic-expression): Doc fix.  (Bug#32...
fdd7e7d Improve indexing of 'eval-defun' in ELisp manual
10af989 Fix (length CIRCULAR) documentation
271d1f7 Tramp editorials
4abf94f Clarify and improve doc strings of 'eval-last-sexp' and friends
6cfc7a7 Automate upload of Emacs manuals to gnu.org
b73cde5 Fix MH-E mail composition with GNU Mailutils (SF#485)
0dce5e5 Speed up 'replace-buffer-contents' some more
00fdce0 * doc/emacs/docstyle.texi: Avoid messing up the html output.

Conflicts:
admin/make-tarball.txt

6 years agoFix 2 minor bugs in 'imenu--generic-function'
Drew Adams [Sat, 7 Jul 2018 16:20:45 +0000 (19:20 +0300)]
Fix 2 minor bugs in 'imenu--generic-function'

* lisp/imenu.el (imenu--generic-function): Move point to START
before checking whether the current item is inside a comment
or a string.  Remove any empty menus that could have been
added before returning.  (Bug#32024)

6 years agoFix bug #11732
Eli Zaretskii [Sat, 7 Jul 2018 11:30:00 +0000 (14:30 +0300)]
Fix bug #11732

* src/w32fns.c (w32_wnd_proc): Fix handling of Windows input
methods.  (Bug#11732)

6 years agoImprove documentation of 'emacs-lock-mode'
Eli Zaretskii [Sat, 7 Jul 2018 09:50:22 +0000 (12:50 +0300)]
Improve documentation of 'emacs-lock-mode'

* lisp/emacs-lock.el (emacs-lock-mode): Mention in the doc string
the special handling of some major modes due to
'emacs-lock-unlockable-modes'.

6 years ago* lisp/imenu.el (imenu-generic-expression): Doc fix. (Bug#32016)
Eli Zaretskii [Sat, 7 Jul 2018 09:34:26 +0000 (12:34 +0300)]
* lisp/imenu.el (imenu-generic-expression): Doc fix.  (Bug#32016)

6 years agoKeep interactive uses of 'recenter' backward compatible (Bug#31325)
John Shahid [Sun, 1 Jul 2018 18:48:24 +0000 (14:48 -0400)]
Keep interactive uses of 'recenter' backward compatible (Bug#31325)

* window.c (Frecenter): Change the interactive spec to always pass
a non-nil value to the REDISPLAY argument when called interactively.
* window.el (recenter-top-bottom): Make sure 'recenter's second
argument is non-nil everywhere.
* windows.texi (Textual Scrolling): Update documentation of
'recenter'.

6 years agoDocumentation followup for bug#32029
Eli Zaretskii [Sat, 7 Jul 2018 09:01:08 +0000 (12:01 +0300)]
Documentation followup for bug#32029

* etc/NEWS: Mention 'xref-find-definitions-at-mouse'

* doc/emacs/maintaining.texi (Looking Up Identifiers):
Document 'xref-find-definitions-at-mouse'.

6 years agoNew function 'xref-find-definitions-at-mouse'
Tobias Gerdin [Sat, 7 Jul 2018 08:59:56 +0000 (11:59 +0300)]
New function 'xref-find-definitions-at-mouse'

* lisp/progmodes/xref.el (xref-find-definitions-at-mouse): New
function.  (Bug32029)

Copyright-paperwork-exempt: yes

6 years agoImprove indexing of 'eval-defun' in ELisp manual
Eli Zaretskii [Sat, 7 Jul 2018 08:37:43 +0000 (11:37 +0300)]
Improve indexing of 'eval-defun' in ELisp manual

* doc/lispref/display.texi (Defining Faces):
* doc/lispref/debugging.texi (Explicit Debug):
* doc/lispref/customize.texi (Variable Definitions):
* doc/lispref/variables.texi (Defining Variables): Add index
entries for 'eval-defun'.  (Bug#32066)

6 years agoFix recent change in window.c
Eli Zaretskii [Sat, 7 Jul 2018 07:45:45 +0000 (10:45 +0300)]
Fix recent change in window.c

* src/window.c (scroll_command): Fix minor inefficiency in
last change: don't call Fset_buffer if the buffer is already set to be
what we want.  (Bug#31988)

6 years agoUpdate from gnulib
Paul Eggert [Sat, 7 Jul 2018 06:17:30 +0000 (23:17 -0700)]
Update from gnulib

This incorporates:
2018-07-04 gnulib-tool: minor tweaks for --gnu-make
* build-aux/config.guess, build-aux/config.sub: Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.

6 years agoFix scrolling
Basil L. Contovounesios [Fri, 6 Jul 2018 23:23:21 +0000 (16:23 -0700)]
Fix scrolling

* src/window.c (scroll_command): Fix scrolling.

6 years agoFix (length CIRCULAR) documentation
Paul Eggert [Fri, 6 Jul 2018 17:59:53 +0000 (10:59 -0700)]
Fix (length CIRCULAR) documentation

* doc/lispref/sequences.texi (Sequence Functions):
Correct documentation of what (length X) does when
X is a circular list.

6 years agoTramp editorials
Michael Albinus [Fri, 6 Jul 2018 12:03:42 +0000 (14:03 +0200)]
Tramp editorials

* doc/misc/tramp.texi (Android shell setup): Mention Termux.

* lisp/net/tramp-sh.el (tramp-remote-process-environment):
Use proper spelling "Tramp" in docstring.

6 years agoClarify and improve doc strings of 'eval-last-sexp' and friends
Eli Zaretskii [Fri, 6 Jul 2018 09:31:51 +0000 (12:31 +0300)]
Clarify and improve doc strings of 'eval-last-sexp' and friends

* lisp/simple.el (eval-expression, eval-expression-print-format):
* lisp/progmodes/elisp-mode.el (eval-last-sexp): Doc fixes.
(Bug#32064)

6 years agoAutomate upload of Emacs manuals to gnu.org
Glenn Morris [Fri, 6 Jul 2018 04:50:18 +0000 (21:50 -0700)]
Automate upload of Emacs manuals to gnu.org

* admin/make-manuals, admin/upload-manuals: New scripts.
* admin/admin.el (make-manuals, make-manuals-dist): Handle batch mode.
* admin/make-tarball.txt: Update web-page details.

6 years agoFix MH-E mail composition with GNU Mailutils (SF#485)
Mike Kupfer [Wed, 4 Jul 2018 22:43:04 +0000 (15:43 -0700)]
Fix MH-E mail composition with GNU Mailutils (SF#485)

* lisp/mh-e/mh-comp.el (mh-bare-components): Recursively delete
the temporary folder.

6 years ago* lisp/shell.el (shell-completion-vars):
Michael Albinus [Wed, 4 Jul 2018 07:04:55 +0000 (09:04 +0200)]
* lisp/shell.el (shell-completion-vars):

Set `comint-file-name-prefix' to "" for local default directory.

6 years agoAdjust to Gnulib change with -Wswitch-default
Paul Eggert [Wed, 4 Jul 2018 06:51:03 +0000 (23:51 -0700)]
Adjust to Gnulib change with -Wswitch-default

* configure.ac: Simplify by not bothering to omit
-Wswitch-default, as Gnulib no longer enables it by default.

6 years agoUpdate from Gnulib
Paul Eggert [Wed, 4 Jul 2018 06:47:52 +0000 (23:47 -0700)]
Update from Gnulib

This incorporates:
2018-07-01 getloadavg: don't redefine WINDOWS32
2018-07-01 manywarnings: omit -Wswitch-default
* build-aux/config.sub, lib/getloadavg.c, m4/manywarnings.m4:
Copy from Gnulib.

6 years agoFix Tcl indentation in a namespace
Tom Tromey [Wed, 4 Jul 2018 04:13:27 +0000 (22:13 -0600)]
Fix Tcl indentation in a namespace

Fixes bug#32035
* lisp/progmodes/tcl.el (tcl-proc-list): Add "namespace".
* test/lisp/progmodes/tcl-tests.el (tcl-mode-namespace-indent): New
test.

6 years ago* lisp/mail/sendmail.el: Use lexical-binding
Stefan Monnier [Tue, 3 Jul 2018 22:16:52 +0000 (18:16 -0400)]
* lisp/mail/sendmail.el: Use lexical-binding

(mail-recover-1): Declare dired-trivial-filenames.

6 years agoSpeed up 'replace-buffer-contents' some more
Eli Zaretskii [Tue, 3 Jul 2018 19:16:20 +0000 (22:16 +0300)]
Speed up 'replace-buffer-contents' some more

* src/editfns.c (EXTRA_CONTEXT_FIELDS): New members beg_a and beg_b.
(Freplace_buffer_contents): Set up ctx.beg_a and ctx.beg_b.
(buffer_chars_equal): Use ctx->beg_a and ctx->beg_b instead of
calling BUF_BEGV, which is expensive.  This speeds up the recipe
in bug#31888 by 30%.

6 years agoFix typo in --with-x-toolkit=no code
Paul Eggert [Tue, 3 Jul 2018 18:54:35 +0000 (11:54 -0700)]
Fix typo in --with-x-toolkit=no code

* src/xmenu.c (pop_down_menu) [!USE_X_TOOLKIT && !USE_GTK]:
Fix type typo introduced by 2018-06-14T22:59:08!eggert@cs.ucla.edu.

6 years agoAdjust previous jsonrpc change
João Távora [Tue, 3 Jul 2018 07:21:42 +0000 (08:21 +0100)]
Adjust previous jsonrpc change

(nth 2) is probably a better alternative to caddr, and in Emacs 26.1
we can pass 0 as :service to automatically find an available port.

* lisp/jsonrpc.el (jsonrpc--call-deferred): Use cl-caddr.

* test/lisp/jsonrpc-tests.el
(jsonrpc--call-with-emacsrpc-fixture): Pass 0 as :service to when
making the listen server.

6 years ago* doc/emacs/docstyle.texi: Avoid messing up the html output.
Glenn Morris [Tue, 3 Jul 2018 05:37:22 +0000 (22:37 -0700)]
* doc/emacs/docstyle.texi: Avoid messing up the html output.

Previously the @hyphenation commands somehow caused the <head>
section to go missing, with makeinfo 4.13 at least.

6 years ago* lisp/mail/sendmail.el (mail-from-style):
Glenn Morris [Tue, 3 Jul 2018 05:07:08 +0000 (22:07 -0700)]
* lisp/mail/sendmail.el (mail-from-style):
Improve obsolescence message.

6 years ago; Merge from origin/emacs-26
Glenn Morris [Tue, 3 Jul 2018 02:19:26 +0000 (19:19 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

8c70142 (origin/emacs-26) ; Auto-commit of loaddefs files.

6 years agoMerge from origin/emacs-26
Glenn Morris [Tue, 3 Jul 2018 02:19:26 +0000 (19:19 -0700)]
Merge from origin/emacs-26

fc5cae7 ; Fix ChangeLog typo.
e17a5e5 ; make change-history-commit
f205928 * etc/HISTORY: Cite Brinkoff on early history.
4e58ca8 Document internal use of 'above-suspended' z-group frame para...
4bd43b0 Increase max-lisp-eval-depth adjustment while in debugger (bu...
ab98352 Improve on last change in replace-buffer-contents
2f149c0 Fix a factual error in Introduction to Emacs Lisp
8ad50a3 ; * lisp/files.el (buffer-offer-save): Doc fix.  (Bug#32000)
c80f31f Minor improvements in documentation of imenu.el
8ebb683 Avoid errors with recentering in 'skeleton-insert'
e980a3c * src/lisp.h: Omit obsolete comment re bytecode stack.
eec71eb Speed up replace-buffer-contents
93c41ce Remove extra process call from vc-git-find-file-hook
7ea0873 ; Update some commentary
4a7f423 Speed up vc-git-dir-status-files
9134c84 Avoid compiler warning using coding.h

Conflicts:
src/editfns.c

6 years ago; Merge from origin/emacs-26
Glenn Morris [Tue, 3 Jul 2018 02:19:05 +0000 (19:19 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

1f50379 Sync with Tramp 2.3.4.  Do not merge with master

6 years agoMerge from origin/emacs-26
Glenn Morris [Tue, 3 Jul 2018 02:19:05 +0000 (19:19 -0700)]
Merge from origin/emacs-26

d008ef3 * src/xdisp.c (Vmouse_autoselect_window): Clarify doc-string ...
6f6d525 Detect a non-list package archive content properly (Bug#22311)

6 years ago; Auto-commit of loaddefs files.
Glenn Morris [Tue, 3 Jul 2018 00:45:00 +0000 (20:45 -0400)]
; Auto-commit of loaddefs files.

6 years agoMake lisp/jsonrpc.el work with Emacs 25.1
João Távora [Mon, 2 Jul 2018 14:57:24 +0000 (15:57 +0100)]
Make lisp/jsonrpc.el work with Emacs 25.1

* jsonrpc.el (Package-Requires): Require Emacs 25.1
(jsonrpc-lambda): Use cl-gensym.
(jsonrpc--call-deferred): Caddr doesn't exist in
emacs 25.1.

* jsonrpc-tests.el
(jsonrpc--call-with-emacsrpc-fixture): New function.
(jsonrpc--with-emacsrpc-fixture): Use it.
(deferred-action-complex-tests): Adjust test for Emacs 25.1

6 years agoOptionally add argument description in minor mode DOC (bug#10754)
John Shahid [Mon, 2 Jul 2018 03:34:53 +0000 (23:34 -0400)]
Optionally add argument description in minor mode DOC (bug#10754)

Add a paragraph to minor mode's docstring documenting the mode's ARG
usage if the supplied docstring doesn't already contain the word "ARG".

* easy-mmode.el (easy-mmode--arg-docstring): New const.
(easy-mmode--arg-docstring): New function.
(define-minor-mode): Use them.

Remove argument documentation from all minor modes.