Eli Zaretskii [Sat, 31 Mar 2018 17:41:32 +0000 (20:41 +0300)]
Support more separators in rmail-retry-failure
* lisp/mail/rmail.el (mail-unsent-separator): Add a form of
separator that confused rmail-retry-failure due to additional
lines that start with a series of dashes. (Bug#30965)
Noam Postavsky [Sat, 31 Mar 2018 04:40:43 +0000 (00:40 -0400)]
Document return value of pcase (Bug#30425)
* doc/lispref/control.texi (Pattern matching case statement):
* lisp/emacs-lisp/pcase.el (pcase): State that pcase returns nil if no
patterns match.
(pcase-exhaustive): State that an error is signaled if no patterns
match.
Paul Eggert [Fri, 30 Mar 2018 23:11:45 +0000 (16:11 -0700)]
Improve doc for web pages; reproducible tarballs
* admin/make-tarball.txt: Make the tarballs more reproducible.
Fix instructions for web pages as best I can (they are still
incomplete).
* make-dist (default_gzip): Add --no-name for gzip.
(taropt): Add options to make the build more reproducible.
Noam Postavsky [Fri, 30 Mar 2018 20:44:24 +0000 (16:44 -0400)]
Fix another case of freed markers in the undo-list (Bug#30931)
* src/alloc.c (free_marker): Remove.
* src/editfns.c (save_restriction_restore):
* src/insdel.c (signal_before_change): Detach the markers from the
buffer when we're done with them instead of calling free_marker on
them.
* test/src/editfns-tests.el (delete-region-undo-markers-1)
(delete-region-undo-markers-2): New tests.
Eli Zaretskii [Fri, 30 Mar 2018 12:57:57 +0000 (15:57 +0300)]
Fix C-p and C-n when wrap-prefix is too wide
* src/xdisp.c (move_it_in_display_line_to): Avoid looping in
previous/next-line when wrap-prefix is set to a too-wide
stretch of whitespace. (Bug#30432)
* src/nsfns.m (ns_set_represented_filename): Move function from
nsterm.m and set represented filename directly.
* src/nsterm.h (ns_set_represented_filename): Remove definition.
* src/nsterm.m (ns_set_represented_filename): Move function to
nsfns.m.
(x_free_frame_resources): Remove references to represented_frame.
(sendEvent): Don't set represented filename.
Noam Postavsky [Thu, 29 Mar 2018 23:11:47 +0000 (19:11 -0400)]
Don't wait for visible frames to become visible
For discussion, see thread starting at
https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00807.html.
* src/xterm.c (x_make_frame_visible): Check FRAME_VISIBLE_P before
calling x_wait_for_event.
Paul Eggert [Thu, 29 Mar 2018 18:01:38 +0000 (11:01 -0700)]
New experimental variable read-integer-overflow-as-float.
Following a suggestion by Eli Zaretskii (Bug#30408#46).
* etc/NEWS: Mention it.
* src/lread.c (syms_of_lread): Add it.
(read1): Treat out-of-range integers as floats if
read-integer-overflow-as-float is non-nil.
Paul Eggert [Wed, 28 Mar 2018 22:03:40 +0000 (15:03 -0700)]
Port recent org-clock fix to POSIX time_t
* lisp/org/org-clock.el (org-clock-special-range):
Don't assume support for time_t values less than 0, or less than
-2**31 for that matter (Bug#27736).
Alan Mackenzie [Wed, 28 Mar 2018 19:39:30 +0000 (19:39 +0000)]
Handle C++17's constexpr keyword in if statements
* lisp/progmodes/cc-engine.el (c-after-conditional): Test for matches to
c-block-stmt-hangon-key.
* lisp/progmodes/cc-langs.el (c-block-stmt-hangon-kwds): New lang const.
(c-block-stmt-hangon-key): New lang const/var matching any element of the
above.
Alan Mackenzie [Wed, 28 Mar 2018 18:53:32 +0000 (18:53 +0000)]
Replace faulty non-matching regexp "\\<\\>" with "a\\`"
The regexp "\\<\\>", which is supposed never to match, actually matches, for
instance, where a Chinese character is directly followed by an ASCII letter.
So, replace it with "a\\`".
Glenn Morris [Wed, 28 Mar 2018 18:20:57 +0000 (14:20 -0400)]
Fix xrefs in pdf Emacs manual
* doc/emacs/fortran-xtra.texi (ForIndent Cont, ForIndent Num)
(Fortran Columns):
* doc/emacs/picture-xtra.texi (Rectangles in Picture):
Fix recent changes that neglected the splitting of the pdf manuals.
Glenn Morris [Wed, 28 Mar 2018 16:38:22 +0000 (09:38 -0700)]
Merge from origin/emacs-26
9bff405 (origin/emacs-26) * doc/misc/org.texi (Installation): Fix clo... 613c9a5 Update Org to v9.1.9 1b075a9 ; Fix some tiny doc typos 441fe20 De-obsolete `if-let' and `when-let' 8696038 * lisp/htmlfontify.el (hfy-begin-span-handler): Doc fix. 930f7b1 * doc/lispref/functions.texi (Defining Functions): Improve in... 95ccf50 Fix crash after frame is freed on macOS (bug#30800) 45d0475 More manual editing 2acb9f0 Minor manual changes changes d481cba * lisp/calculator.el (calculator-paste-decimals): Add version. 7d6c7d0 ; Use GNU not Gnu in docs 1bc4def More proofreading of the Emacs manual
Paul Eggert [Tue, 27 Mar 2018 20:48:13 +0000 (13:48 -0700)]
Avoid using unportable integer in org-clock
* lisp/org/org-clock.el (org-clock--oldest-date): Avoid use of an
integer outside portable Emacs range. Go back to using a simple
check, since decode-time should no longer infloop.
Paul Eggert [Tue, 27 Mar 2018 20:30:50 +0000 (13:30 -0700)]
Update from Gnulib
This incorporates:
2018-03-26 time_rz: work around Mac OS X 10.6 infloop
2018-03-20 euidaccess: Port to native Windows.
* lib/euidaccess.c, lib/time_rz.c, m4/time_rz.m4: Copy from Gnulib.
Paul Eggert [Tue, 27 Mar 2018 00:03:54 +0000 (17:03 -0700)]
Fix constant folding of overflows
This suppresses some byte-code optimizations that were invalid in
the presence of integer overflows, because they meant that .elc
files assumed the runtime behavior of the compiling platform, as
opposed to the runtime platform. Problem reported by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2018-03/msg00753.html
* lisp/emacs-lisp/byte-opt.el (byte-opt--portable-max)
(byte-opt--portable-min): New constants.
(byte-opt--portable-numberp, byte-opt--arith-reduce)
(byte-optimize-1+, byte-optimize-1-): New functions.
(byte-optimize-plus, byte-optimize-minus, byte-optimize-multiply)
(byte-optimize-divide): Avoid invalid optimizations.
(1+, 1-): Use new optimizers.
(byte-optimize-or, byte-optimize-cond): Simplify by using
remq instead of delq and copy-sequence.
For the following release it is planned to make `if-let*' and
`when-let*' aliases for `if-let' and `when-let'. For now we revert
declaring `if-let' and `when-let' obsolete and tweak the docstrings.
* lisp/emacs-lisp/subr-x.el (if-let*, when-let*): Make docstrings
refer to those of `if-let' and `when-let'.
(if-let, when-let): De-obsolete. Rewrite documentation.
Stefan Monnier [Mon, 26 Mar 2018 13:41:30 +0000 (09:41 -0400)]
* lisp/emacs-lisp/package.el: New quickstart feature
(package--quickstart-pkgs): New var.
(package-activate-1): Obey and fill it.
(package-activate-all): New function.
(package-initialize): Call it.
Set package-initialized before activating the packages.
(package-installed-p): Make it work before package.el is initialized in
the case where min-version is not specified.
(package-install, package-delete): Refresh the quickstart if applicable.
(package-quickstart, package-quickstart-file): New vars.
(package--quickstart-maybe-refresh, package-quickstart-refresh):
New functions.
* lisp/startup.el (command-line): Use package-activate-all rather than
package-initialize.
Stefan Monnier [Mon, 26 Mar 2018 13:01:30 +0000 (09:01 -0400)]
* src/marker.c: Try and speed up byte<->char conversion with many markers.
When considering markers (to find a starting point for the conversion),
typically one of the two bounds is nearby (coming from
cached_(byte|char)pos) but the other is far (point-min or point-max),
so change the exit condition so we stop as soon as *one* of the bounds
is near.
(BYTECHAR_DISTANCE_INITIAL, BYTECHAR_DISTANCE_INCREMENT): New constants.
(buf_charpos_to_bytepos, buf_bytepos_to_charpos): Use them to try and
reduce the number of markers we consider.
Eric Skoglund [Fri, 16 Mar 2018 13:49:56 +0000 (14:49 +0100)]
Make eshell/kill handle -<signal> and -<SIGNALNAME> (Bug#29156)
* lisp/eshell/esh-proc.el (eshell/kill): Handle the argument parsing
and numeric conversion in function in order to parse -signal and
-SIGNALNAME correctly.
* doc/misc/eshell.texi (kill): Update docs to reflect new function
behaviour.
* etc/NEWS: Mention new eshell/kill behaviour.
Noam Postavsky [Sat, 20 Jan 2018 16:27:23 +0000 (11:27 -0500)]
Allow `&rest' or `&optional' without following variable (Bug#29165)
This is sometimes convenient when writing macros, so that the empty
variable case doesn't need to be handled specially. Older versions of
Emacs accepted this in some cases (especially the interpreter in Emacs
25 and below was very accepting).
Vibhav Pant [Sun, 25 Mar 2018 05:52:50 +0000 (11:22 +0530)]
Fix byte-optimize-memq incorrectly optimizing some memq forms.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-memq): Call
byte-optimize-and only for memq forms that can be optimized, use
byte-optimize-predicate to optimize the final form.
Glenn Morris [Sat, 24 Mar 2018 00:01:26 +0000 (20:01 -0400)]
Remove some unused gnus-registry variables
* lisp/gnus/gnus-registry.el (gnus-registry-clean-empty)
(gnus-registry-use-long-group-names)
(gnus-registry-max-track-groups, gnus-registry-entry-caching)
(gnus-registry-trim-articles-without-groups):
Remove variables labeled as obsolete since 23.4 that do nothing.
Glenn Morris [Fri, 23 Mar 2018 23:52:09 +0000 (19:52 -0400)]
Remove variables labeled as obsolete that do nothing
* lisp/allout.el (allout-passphrase-verifier-string)
(allout-passphrase-hint-string):
* lisp/w32-vars.el (w32-list-proportional-fonts):
Remove variables that are unused since Emacs 23.x.
Glenn Morris [Fri, 23 Mar 2018 20:28:24 +0000 (16:28 -0400)]
Remove some declare-function stub definitions
* lisp/emulation/viper-cmd.el, lisp/emulation/viper-keym.el:
* lisp/emulation/viper-util.el, lisp/net/newst-plainview.el:
* lisp/net/newst-treeview.el, lisp/ps-def.el, lisp/vc/ediff.el:
* lisp/vc/ediff-util.el, lisp/vc/ediff-wind.el:
Remove stub declare-function definitions.
It exists since Emacs 22.2, released 10 years ago.
Most of these files are using even newer features, such as
lexical-binding and cl-lib anyway, making the stubs pointless.
Glenn Morris [Fri, 23 Mar 2018 20:14:26 +0000 (16:14 -0400)]
Replace some uses of cl with cl-lib
* lisp/progmodes/idlw-toolbar.el: No need for cl.
* lisp/progmodes/antlr-mode.el, lisp/progmodes/idlw-shell.el:
* lisp/progmodes/idlwave.el: Replace cl with cl-lib.
Paul Eggert [Fri, 23 Mar 2018 19:57:39 +0000 (12:57 -0700)]
Avoid Fortran-style floating-point optimization
When optimizing arithmetic operations, avoid optimizations that
are valid for mathematical numbers but invalid for floating-point.
For example, do not optimize (+ 1 v 0.5) to (+ v 1.5), as they may
not be the same due to rounding errors. In general,
floating-point numbers cannot be constant-folded, since that would
make .elc files platform-dependent.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-associative-math):
Do not optimize floats.
(byte-optimize-nonassociative-math, byte-optimize-approx-equal)
(byte-optimize-delay-constants-math, byte-compile-butlast)
(byte-optimize-logmumble):
Remove; no longer used.
(byte-optimize-minus): Do not optimize (- 0 x) to (- x).
(byte-optimize-multiply): Do not optimize (* -1 x) to (- x).
(byte-optimize-divide): Do not optimize (/ x -1) to (- x).
(logand, logior, logxor): Optimize with byte-optimize-predicate
instead of with byte-optimize-logmumble.
* test/lisp/emacs-lisp/bytecomp-tests.el:
(byte-opt-testsuite-arith-data): Add a couple of test cases.