]> git.eshelyaron.com Git - emacs.git/log
emacs.git
6 years ago; Auto-commit of loaddefs files.
Glenn Morris [Sun, 1 Apr 2018 11:28:42 +0000 (07:28 -0400)]
; Auto-commit of loaddefs files.

6 years agoFollowup to last change
Eli Zaretskii [Sun, 1 Apr 2018 09:45:37 +0000 (12:45 +0300)]
Followup to last change

* etc/NEWS: Mark nxml-sexp-element-flag entry as not needing
documentation updates.

* lisp/nxml/nxml-mode.el (nxml-mode, nxml-forward-balanced-item):
Doc fixes.

6 years agoChange the default value of nxml-sexp-element-flag.
Jostein Kjønigsen [Tue, 20 Mar 2018 06:15:17 +0000 (07:15 +0100)]
Change the default value of nxml-sexp-element-flag.

* lisp/nxml/nxml-mode.el (nxml-sexp-element-flag): Default value
is now t.

6 years agoMinor copyedits of completion-at-point-functions documentation
Eli Zaretskii [Sun, 1 Apr 2018 09:19:49 +0000 (12:19 +0300)]
Minor copyedits of completion-at-point-functions documentation

* lisp/minibuffer.el (completion-at-point-functions):
* doc/lispref/minibuf.texi (Completion in Buffers): Fix wording
and filling.

6 years agoSupport more separators in rmail-retry-failure
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)

6 years ago; * admin/make-tarball.txt: Fix whitespace.
Eli Zaretskii [Sat, 31 Mar 2018 07:56:26 +0000 (10:56 +0300)]
; * admin/make-tarball.txt: Fix whitespace.

6 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 31 Mar 2018 07:53:56 +0000 (10:53 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

6 years agoImprove doc for web pages; reproducible tarballs
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.

6 years agoDo not assume --with-file-notification
Paul Eggert [Fri, 30 Mar 2018 21:25:33 +0000 (14:25 -0700)]
Do not assume --with-file-notification

* src/fileio.c (report_file_notify_error) [!USE_FILE_NOTIFY]: Omit.

6 years agoCentralize Bug#30931 fix
Paul Eggert [Fri, 30 Mar 2018 21:23:55 +0000 (14:23 -0700)]
Centralize Bug#30931 fix

* src/marker.c (detach_marker): New function.
* src/editfns.c (save_restriction_restore):
* src/insdel.c (signal_before_change): Use it.

6 years agoFix another case of freed markers in the undo-list (Bug#30931)
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.

6 years agoAdd Capital sharp s to 2 more Latin input methods
Eli Zaretskii [Fri, 30 Mar 2018 13:12:07 +0000 (16:12 +0300)]
Add Capital sharp s to 2 more Latin input methods

* lisp/leim/quail/latin-pre.el ("latin-prefix"):
* lisp/leim/quail/latin-post.el ("latin-postfix"): Support Capital
sharp s.  (Bug#30988)

6 years agoFix C-p and C-n when wrap-prefix is too wide
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)

6 years agoSimplify represented filename handling (bug#30800)
Alan Third [Fri, 30 Mar 2018 11:25:15 +0000 (12:25 +0100)]
Simplify represented filename handling (bug#30800)

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

6 years agoImprove Tramp test performance
Michael Albinus [Fri, 30 Mar 2018 10:36:07 +0000 (12:36 +0200)]
Improve Tramp test performance

* lisp/net/tramp.el (tramp-backtrace): Improve performance.

* test/lisp/net/tramp-tests.el (tramp-test03-file-name-host-rules):
Skip for older Emacsen.
(tramp-test39-utf8): Remove instrumentation.

6 years agoFix CHECK_ALLOCATED_AND_LIVE abort during GC
Paul Eggert [Fri, 30 Mar 2018 06:00:23 +0000 (23:00 -0700)]
Fix CHECK_ALLOCATED_AND_LIVE abort during GC

* src/editfns.c (save_restriction_restore):
Wait for the GC to free the temporary markers (Bug#30931).

6 years agoPrefer \... to control chars in .el literals
Paul Eggert [Fri, 30 Mar 2018 00:41:11 +0000 (17:41 -0700)]
Prefer \... to control chars in .el literals

6 years ago* src/xterm.c (x_make_frame_visible): Fix typo in previous change.
Noam Postavsky [Thu, 29 Mar 2018 23:17:34 +0000 (19:17 -0400)]
* src/xterm.c (x_make_frame_visible): Fix typo in previous change.

6 years agoDon't wait for visible frames to become visible
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.

6 years agoNew experimental variable read-integer-overflow-as-float.
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.

6 years agoLisp reader now checks for integer overflow
Paul Eggert [Thu, 29 Mar 2018 17:16:29 +0000 (10:16 -0700)]
Lisp reader now checks for integer overflow

* doc/lispref/numbers.texi (Integer Basics), etc/NEWS:
Document this.
* src/lisp.h (S2N_IGNORE_TRAILING, S2N_OVERFLOW_TO_FLOAT):
New constants.
* src/lread.c (string_to_number): Change trailing bool arg to
integer argument with flags, to support S2N_OVERFLOW_TO_FLOAT.
All uses changed.
* test/src/editfns-tests.el (read-large-integer): New test.

6 years agoSupport Capital sharp S in German input methods
Eli Zaretskii [Thu, 29 Mar 2018 16:45:13 +0000 (19:45 +0300)]
Support Capital sharp S in German input methods

* lisp/leim/quail/latin-post.el ("german-postfix"):
* lisp/leim/quail/latin-pre.el ("german-prefix"): Add Capital
sharp S.  (Bug#30988)

* etc/NEWS: Mention the support of Capital sharp S.

6 years agoFix Bug#30946
Michael Albinus [Thu, 29 Mar 2018 13:59:11 +0000 (15:59 +0200)]
Fix Bug#30946

* doc/misc/tramp.texi (Multi-hops): Mention host name checks.

* lisp/net/tramp.el (tramp-set-syntax, tramp-dissect-file-name)
(tramp-debug-message, tramp-handle-shell-command):
* lisp/net/tramp-adb.el (tramp-adb-handle-shell-command):
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler)
(tramp-archive-dissect-file-name):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler): Adapt callees.

* lisp/net/tramp-compat.el (tramp-compat-user-error): Move defsubst ---

* lisp/net/tramp-sh.el (tramp-compute-multi-hops): Check for proper
host names in multi-hop.  (Bug#30946)

* lisp/net/tramp.el (tramp-user-error): ... here.  Make it a defun.

* test/lisp/net/tramp-tests.el (tramp-test03-file-name-host-rules):
New test.

6 years ago* src/keyboard.c (record_char, read_key_sequence): Copy raw events
Stefan Monnier [Thu, 29 Mar 2018 13:11:22 +0000 (09:11 -0400)]
* src/keyboard.c (record_char, read_key_sequence): Copy raw events

6 years agoTest notify handlers only if file notification
Paul Eggert [Wed, 28 Mar 2018 23:32:46 +0000 (16:32 -0700)]
Test notify handlers only if file notification

* test/lisp/files-tests.el:
(files-file-name-non-special-notify-handlers):
Skip if file notification is not available.

6 years agoPort recent org-clock fix to POSIX time_t
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).

6 years agoUpdate from Gnulib
Paul Eggert [Wed, 28 Mar 2018 20:14:07 +0000 (13:14 -0700)]
Update from Gnulib

This incorporates:
2018-03-28 time_rz: fix workaround for Mac OS X 10.6 infloop
* m4/time_rz.m4: Copy from Gnulib.

6 years agoHandle C++17's constexpr keyword in if statements
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.

6 years agoReplace faulty non-matching regexp "\\<\\>" with "a\\`"
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\\`".

* lisp/progmodes/cc-defs.el (cc-fix, c-make-keywords-re)
* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1)
(c-forward-<>-arglist-recur, c-forward-decl-or-cast-1)
(c-looking-at-decl-block)
* lisp/progmodes/cc-langs.el (c-assignment-op-regexp)
(c-block-comment-ender-regexp, c-block-comment-start-regexp)
(c-line-comment-start-regexp, c-doc-comment-start-regexp)
(c-decl-start-colon-kwd-re, c-type-decl-prefix-key)
(c-type-decl-operator-prefix-key, c-pre-id-bracelist-key)
(c-enum-clause-introduction-re, c-nonlabel-token-2-key)
* lisp/progmodes/cc-vars.el (c-noise-macro-with-parens-name-re)
(c-make-noise-macro-regexps):
Replace "\\<\\>" by "a\\`".

6 years agoRemove unstable tags in Tramp
Michael Albinus [Wed, 28 Mar 2018 17:06:42 +0000 (19:06 +0200)]
Remove unstable tags in Tramp

* test/lisp/net/tramp-tests.el (tramp-test39-utf8)
(tramp-test39-utf8-with-stat, tramp-test39-utf8-with-perl)
(tramp-test39-utf8-with-ls): Remove :unstable tag.

6 years agoMerge from origin/emacs-26
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

Conflicts:
doc/misc/org.texi
etc/NEWS
lisp/org/org-clock.el

6 years agoImprove tramp--test-utf8
Michael Albinus [Wed, 28 Mar 2018 16:05:58 +0000 (18:05 +0200)]
Improve tramp--test-utf8

* test/lisp/net/tramp-tests.el (tramp--test-check-files):
Encode string when testing environment variables.
(tramp--test-utf8): Remove "TaiViet" test.

6 years agoReduce parallelism to Windows build
Phillip Lord [Wed, 28 Mar 2018 08:40:55 +0000 (09:40 +0100)]
Reduce parallelism to Windows build

* admin/nt/dist-build/build-zips.sh: Reduce make parallelism to 2.

6 years ago* doc/misc/org.texi (Installation): Fix clone commands.
Michael Albinus [Wed, 28 Mar 2018 08:38:26 +0000 (10:38 +0200)]
* doc/misc/org.texi (Installation): Fix clone commands.

6 years agoUpdate Org to v9.1.9
Rasmus [Tue, 27 Mar 2018 21:34:41 +0000 (23:34 +0200)]
Update Org to v9.1.9

Please note this is a bugfix release. See etc/ORG-NEWS for details.

6 years ago; Fix some tiny doc typos
Glenn Morris [Tue, 27 Mar 2018 21:02:04 +0000 (17:02 -0400)]
; Fix some tiny doc typos

6 years agoAvoid using unportable integer in org-clock
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.

6 years agoUpdate from Gnulib
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.

6 years ago(benchmark-run-compiled): Make it work like 'benchmark-run' again
Stefan Monnier [Tue, 27 Mar 2018 20:19:40 +0000 (16:19 -0400)]
(benchmark-run-compiled): Make it work like 'benchmark-run' again

* lisp/emacs-lisp/benchmark.el (benchmark-run): Add special case for
nil repetitions.

6 years ago(completion-at-point-functions): Improve doc
Stefan Monnier [Tue, 27 Mar 2018 20:01:30 +0000 (16:01 -0400)]
(completion-at-point-functions): Improve doc

6 years ago(read_key_sewuence): Use POSN in second event when needed (bug#30955)
Stefan Monnier [Tue, 27 Mar 2018 19:26:02 +0000 (15:26 -0400)]
(read_key_sewuence): Use POSN in second event when needed (bug#30955)

* src/keyboard.c (active_maps): Add arg 'second_event'.
(read_key_sequence): Pass it.

* lisp/mouse.el (mouse--click-1-maybe-follows-link): Modify event in place.

6 years ago* lisp/mouse.el: Remove redundant ':group's.
Stefan Monnier [Tue, 27 Mar 2018 19:22:42 +0000 (15:22 -0400)]
* lisp/mouse.el: Remove redundant ':group's.

6 years ago* test/lisp/emacs-lisp/bytecomp-tests.el
Glenn Morris [Tue, 27 Mar 2018 01:56:33 +0000 (21:56 -0400)]
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test-featurep-warnings): New.

6 years ago* lisp/emacs-lisp/benchmark.el (benchmark-run): Allow variable.
Stefan Monnier [Tue, 27 Mar 2018 01:07:35 +0000 (21:07 -0400)]
* lisp/emacs-lisp/benchmark.el (benchmark-run): Allow variable.

(benchmark-run): Allow `repetitions` to be a variable rather than a constant.

6 years agoFix constant folding of overflows
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.

6 years agoDe-obsolete `if-let' and `when-let'
Michael Heerdegen [Sat, 10 Mar 2018 15:39:41 +0000 (16:39 +0100)]
De-obsolete `if-let' and `when-let'

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.

6 years ago* lisp/htmlfontify.el (hfy-begin-span-handler): Doc fix.
Glenn Morris [Mon, 26 Mar 2018 20:12:51 +0000 (16:12 -0400)]
* lisp/htmlfontify.el (hfy-begin-span-handler): Doc fix.

6 years agoTrivial fixes for last changes to package.el and marker.c
Stefan Monnier [Mon, 26 Mar 2018 18:29:49 +0000 (14:29 -0400)]
Trivial fixes for last changes to package.el and marker.c

* lisp/emacs-lisp/package.el (package-quickstart): Add missing version.
* src/marker.c (verify_bytepos): Fix typo.

6 years ago; Spelling fix
Paul Eggert [Mon, 26 Mar 2018 16:29:42 +0000 (09:29 -0700)]
; Spelling fix

6 years ago* doc/lispref/functions.texi (Defining Functions): Improve indexing.
Eli Zaretskii [Mon, 26 Mar 2018 15:58:20 +0000 (18:58 +0300)]
* doc/lispref/functions.texi (Defining Functions): Improve indexing.

6 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Mon, 26 Mar 2018 14:44:01 +0000 (16:44 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

6 years ago* lisp/emacs-lisp/package.el: New quickstart feature
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.

* doc/lispref/package.texi (Packaging Basics):
* doc/emacs/package.texi (Package Installation):
* doc/lispref/os.texi (Startup Summary): Refer to package-activate-all.

6 years ago* src/marker.c: Try and speed up byte<->char conversion with many markers.
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.

6 years agoFix problem with trailing slash in Tramp
Michael Albinus [Mon, 26 Mar 2018 12:33:24 +0000 (14:33 +0200)]
Fix problem with trailing slash in Tramp

* lisp/net/tramp.el (tramp-handle-file-truename):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-truename):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-truename):
Fix problem with trailing slash.

* test/lisp/net/tramp-tests.el (tramp-test21-file-links):
Test also quoted directories.

6 years agoRemove architecture dependent source downloads feature/deps-download
Phillip Lord [Mon, 26 Mar 2018 11:49:50 +0000 (12:49 +0100)]
Remove architecture dependent source downloads

* admin/nt/dist-build/build-dep-zips.py:

6 years agoFix crash after frame is freed on macOS (bug#30800)
Aaron Jensen [Thu, 22 Mar 2018 05:30:08 +0000 (22:30 -0700)]
Fix crash after frame is freed on macOS (bug#30800)

* src/nsterm.m (x_free_frame_resources): Clear represented_frame.
(bug#30800)

6 years agoMake eshell/kill handle -<signal> and -<SIGNALNAME> (Bug#29156)
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.

6 years agoMore manual editing
Michael Albinus [Sun, 25 Mar 2018 13:15:20 +0000 (15:15 +0200)]
More manual editing

* doc/emacs/basic.texi:
* doc/emacs/calendar.texi:
* doc/emacs/display.texi:
* doc/emacs/mini.texi:
* doc/emacs/misc.texi:
* doc/emacs/picture-xtra.texi:
* doc/misc/info.texi: Prefer <PageDown> and <PageUp> over
<next> and <prior>.  Add missing @kindex entries.

* doc/emacs/custom.texi (Function Keys): Fix and add missing
key symbols.

6 years agoAllow `&rest' or `&optional' without following variable (Bug#29165)
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).

                            |   interpreted/compiled   |
| arglist                   | 25 & earlier | 26  | 27  |
|---------------------------+--------------+-----+-----|
| (&rest)                   | y/n          | n/n | y/y |
| (&rest &rest)             | y/n          | n/n | n/n |
| (&rest &rest x)           | y/n          | n/n | n/n |
| (&rest x &rest)           | y/n          | n/n | n/n |
| (&rest x &rest y)         | y/n          | n/n | n/n |
|---------------------------+--------------+-----+-----|
| (&optional)               | y/n          | n/n | y/y |
| (&optional &optional)     | y/n          | n/n | n/n |
| (&optional x &optional)   | y/n          | n/n | n/n |
| (&optional x &optional y) | y/y          | n/n | n/n |
|---------------------------+--------------+-----+-----|
| (&optional &rest)         | y/n          | n/n | y/y |
| (&optional x &rest)       | y/n          | n/n | y/y |
| (&optional &rest y)       | y/y          | n/n | y/y |
|---------------------------+--------------+-----+-----|
| (&rest &optional)         | y/n          | n/n | n/n |
| (&rest &optional y)       | y/n          | n/n | n/n |
| (&rest x &optional y)     | y/n          | n/n | n/n |

The values in the table above can be produced with the following code:

(with-current-buffer (get-buffer-create "*ck-args*")
  (erase-buffer)
  (dolist (arglist '((&rest)
                     (&rest &rest)
                     (&rest &rest x)
                     (&rest x &rest)
                     (&rest x &rest y)
                     (&optional)
                     (&optional &optional)
                     (&optional x &optional)
                     (&optional x &optional y)
                     (&optional &rest)
                     (&optional x &rest)
                     (&optional &rest y)
                     (&rest &optional)
                     (&rest &optional y)
                     (&rest x &optional y)))
    (insert
     (format "%c/%c\n"
             (condition-case err
                 (progn (funcall `(lambda ,arglist 'ok))
                        ?y)
               (error ?n))
             (condition-case err
                 (progn (byte-compile-check-lambda-list arglist)
                        ?y)
               (error ?n))))
    (display-buffer (current-buffer))))

* src/eval.c (funcall_lambda):
* lisp/emacs-lisp/bytecomp.el (byte-compile-check-lambda-list): Don't
check for missing variables after `&rest' and `&optional'.
* test/src/eval-tests.el (eval-tests--bugs-24912-and-24913)
(eval-tests-accept-empty-optional-rest): Update tests accordingly.
* etc/NEWS: Update announcement accordingly.
* doc/lispref/functions.texi (Argument List): Update manual to
indicate that variable names are optional.

6 years agoMinor manual changes changes
Michael Albinus [Sun, 25 Mar 2018 10:18:09 +0000 (12:18 +0200)]
Minor manual changes changes

* doc/emacs/misc.texi (FFAP): Complete commands.
(Amusements): Add some @cindex entries.  Add "M-x butterfly".

6 years agoFix byte-optimize-memq incorrectly optimizing some memq forms.
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.

6 years agoOptimize certain memq forms during byte-compilation.
Vibhav Pant [Sat, 24 Mar 2018 19:08:01 +0000 (00:38 +0530)]
Optimize certain memq forms during byte-compilation.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-memq): New function.
  Set the byte optimizer function for memq to byte-optimize-memq.

6 years agoReduce build load
Phillip Lord [Sat, 24 Mar 2018 17:34:19 +0000 (17:34 +0000)]
Reduce build load

* admin/nt/dist-build/build-zips.sh: Reduce parallelism to 8

6 years ago* lisp/emulation/viper.el (viper-set-hooks): Replace obsolete func.
Glenn Morris [Sat, 24 Mar 2018 00:55:51 +0000 (20:55 -0400)]
* lisp/emulation/viper.el (viper-set-hooks): Replace obsolete func.

6 years ago* lisp/vc/vc.el (vc-initial-comment): Remove var unused since 23.2.
Glenn Morris [Sat, 24 Mar 2018 00:31:53 +0000 (20:31 -0400)]
* lisp/vc/vc.el (vc-initial-comment): Remove var unused since 23.2.

6 years agoRemove some unused gnus-registry variables
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.

6 years agoRemove variables labeled as obsolete 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.

6 years ago* lisp/calculator.el (calculator-paste-decimals): Add version.
Glenn Morris [Fri, 23 Mar 2018 23:49:28 +0000 (19:49 -0400)]
* lisp/calculator.el (calculator-paste-decimals): Add version.

6 years agoLimit build load
Phillip Lord [Fri, 23 Mar 2018 23:11:13 +0000 (23:11 +0000)]
Limit build load

* admin/nt/dist-build/build-zips.sh: Limit build load.

6 years agoEnsure configure is running if necessary
Phillip Lord [Fri, 23 Mar 2018 22:01:08 +0000 (22:01 +0000)]
Ensure configure is running if necessary

* admin/nt/dist-build/build-zips.sh: Check for missing Makefile.

6 years ago* lisp/progmodes/cc-langs.el: Silence compiler.
Glenn Morris [Fri, 23 Mar 2018 21:09:51 +0000 (17:09 -0400)]
* lisp/progmodes/cc-langs.el: Silence compiler.

6 years agoQuieten lisp/obsolete compilation
Glenn Morris [Fri, 23 Mar 2018 21:05:01 +0000 (17:05 -0400)]
Quieten lisp/obsolete compilation

* lisp/obsolete/vi.el (vi-mark-region):
* lisp/obsolete/vip.el (vip-delete-backward-char): Silence compiler.

6 years agoClarify syntax of radixed integers
Paul Eggert [Fri, 23 Mar 2018 20:49:58 +0000 (13:49 -0700)]
Clarify syntax of radixed integers

* doc/lispref/numbers.texi (Integer Basics): Specify what digits
are allowed in radixed integers, and that there is no initial sign
or final period.

6 years agoRemove some declare-function stub definitions
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.

6 years agoReplace some uses of cl with cl-lib
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.

6 years agoReplace cl in some obsolete files
Glenn Morris [Fri, 23 Mar 2018 20:13:55 +0000 (16:13 -0400)]
Replace cl in some obsolete files

* lisp/obsolete/assoc.el, lisp/obsolete/fast-lock.el:
* lisp/obsolete/mouse-sel.el: No need for cl.
* lisp/obsolete/lazy-lock.el, lisp/obsolete/pgg-gpg.el:
* lisp/obsolete/pgg-parse.el, lisp/obsolete/pgg-pgp.el:
* lisp/obsolete/pgg-pgp5.el, lisp/obsolete/pgg.el:
* lisp/obsolete/sregex.el: Replace cl with cl-lib.

6 years agocedet: replace cl with cl-lib
Glenn Morris [Fri, 23 Mar 2018 20:13:40 +0000 (16:13 -0400)]
cedet: replace cl with cl-lib

* lisp/cedet/ede/linux.el, lisp/cedet/semantic/decorate/mode.el:
* lisp/cedet/semantic/wisent/comp.el: Replace cl with cl-lib.
* lisp/cedet/cedet.el, lisp/cedet/mode-local.el:
* lisp/cedet/ede/dired.el, lisp/cedet/ede/pmake.el:
* lisp/cedet/ede/proj-comp.el, lisp/cedet/ede/proj-misc.el:
* lisp/cedet/ede/proj-obj.el, lisp/cedet/ede/proj-prog.el:
* lisp/cedet/ede/speedbar.el, lisp/cedet/semantic/analyze.el:
* lisp/cedet/semantic/complete.el:
* lisp/cedet/semantic/mru-bookmark.el, lisp/cedet/semantic/debug.el:
* lisp/cedet/semantic/wisent/python.el:
* lisp/cedet/srecode/compile.el, lisp/cedet/srecode/dictionary.el:
* lisp/cedet/srecode/srt.el: No need for cl.

6 years agognus: replace cl with cl-lib
Glenn Morris [Fri, 23 Mar 2018 20:13:09 +0000 (16:13 -0400)]
gnus: replace cl with cl-lib

* lisp/gnus/gnus-agent.el, lisp/gnus/gnus-art.el:
* lisp/gnus/gnus-async.el, lisp/gnus/gnus-cache.el:
* lisp/gnus/gnus-demon.el, lisp/gnus/gnus-group.el:
* lisp/gnus/gnus-icalendar.el, lisp/gnus/gnus-logic.el:
* lisp/gnus/gnus-msg.el, lisp/gnus/gnus-picon.el:
* lisp/gnus/gnus-registry.el, lisp/gnus/gnus-salt.el:
* lisp/gnus/gnus-score.el, lisp/gnus/gnus-spec.el:
* lisp/gnus/gnus-srvr.el, lisp/gnus/gnus-start.el:
* lisp/gnus/gnus-sum.el, lisp/gnus/gnus-topic.el:
* lisp/gnus/gnus-util.el, lisp/gnus/gnus-uu.el, lisp/gnus/gnus-win.el:
* lisp/gnus/mail-source.el, lisp/gnus/mm-decode.el:
* lisp/gnus/mm-encode.el, lisp/gnus/mm-url.el, lisp/gnus/mm-view.el:
* lisp/gnus/mml-smime.el, lisp/gnus/mml.el, lisp/gnus/mml2015.el:
* lisp/gnus/nnbabyl.el, lisp/gnus/nndoc.el, lisp/gnus/nneething.el:
* lisp/gnus/nnheader.el, lisp/gnus/nnimap.el, lisp/gnus/nnmail.el:
* lisp/gnus/nnmaildir.el, lisp/gnus/nnoo.el, lisp/gnus/nnrss.el:
* lisp/gnus/nnspool.el, lisp/gnus/nntp.el, lisp/gnus/nnvirtual.el:
* lisp/gnus/nnweb.el, lisp/gnus/spam.el: Replace cl with cl-lib.
* lisp/gnus/canlock.el, lisp/gnus/gnus-bcklg.el:
* lisp/gnus/gnus-cite.el, lisp/gnus/gnus-cloud.el:
* lisp/gnus/gnus-draft.el, lisp/gnus/gnus-dup.el:
* lisp/gnus/gnus-fun.el, lisp/gnus/gnus-html.el:
* lisp/gnus/gnus-int.el, lisp/gnus/gnus-kill.el, lisp/gnus/gnus-ml.el:
* lisp/gnus/gnus-mlspl.el, lisp/gnus/gnus-range.el:
* lisp/gnus/gnus-undo.el, lisp/gnus/gnus-vm.el:
* lisp/gnus/mm-partial.el, lisp/gnus/mm-uu.el, lisp/gnus/mml1991.el:
* lisp/gnus/nnagent.el, lisp/gnus/nndiary.el, lisp/gnus/nndir.el:
* lisp/gnus/nndraft.el, lisp/gnus/nnfolder.el, lisp/gnus/nngateway.el:
* lisp/gnus/nnmairix.el, lisp/gnus/nnmbox.el, lisp/gnus/nnmh.el:
* lisp/gnus/nnml.el, lisp/gnus/score-mode.el, lisp/gnus/smiley.el:
No need for cl.

6 years ago* lisp/gnus/gnus-vm.el (vm-mode, vm-save-message):
Glenn Morris [Fri, 23 Mar 2018 20:12:13 +0000 (16:12 -0400)]
* lisp/gnus/gnus-vm.el (vm-mode, vm-save-message):
Declare rather than autoload.

6 years ago* src/process.c (Fsignal_process): Simplify.
Paul Eggert [Fri, 23 Mar 2018 20:14:06 +0000 (13:14 -0700)]
* src/process.c (Fsignal_process): Simplify.

6 years agoFix too-large integer in Hg backend
Paul Eggert [Fri, 23 Mar 2018 20:10:14 +0000 (13:10 -0700)]
Fix too-large integer in Hg backend

* lisp/vc/vc-hg.el (vc-hg-state-fast):
Don’t assume that 2**32 - 1 is representable as a fixnum.

6 years ago; Use GNU not Gnu in docs
Glenn Morris [Fri, 23 Mar 2018 20:01:12 +0000 (16:01 -0400)]
; Use GNU not Gnu in docs

6 years agoAvoid Fortran-style floating-point optimization
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.

6 years agoInstrument tramp-test39-utf8
Michael Albinus [Fri, 23 Mar 2018 16:39:29 +0000 (17:39 +0100)]
Instrument tramp-test39-utf8

* test/lisp/net/tramp-tests.el (tramp--test-expensive-test):
Add the test name to the template.
(tramp-test39-utf8): Instrument test.

6 years agoMore proofreading of the Emacs manual
Eli Zaretskii [Fri, 23 Mar 2018 16:08:32 +0000 (19:08 +0300)]
More proofreading of the Emacs manual

* doc/emacs/trouble.texi (DEL Does Not Delete): Improve wording.
(Screen Garbled): Mention the command name.
(Bug Criteria): Mention that problems in packages should first be
reported to the respective maintainers.
(Checklist): Fix wording.
(Contributing, Copyright Assignment): Minor copyedits.
* doc/emacs/misc.texi (Amusements): Remove Landmark.
* doc/emacs/picture-xtra.texi (Tabs in Picture): Improve wording.
(Rectangles in Picture): Add a cross-reference to "Registers".
* doc/emacs/misc.texi (Gnus Group Buffer, Gnus Summary Buffer):
Mention command names in parentheses.
(Gnus Summary Buffer): Document "M-r".
(Network Security): Document that current NSM works with TLS
encryption.  Fix markup.
(Document View): Improve wording and fix a typo.
(DocView Conversion): Rephrase description of
doc-view-cache-directory.
(Single Shell): Mention variables that control when shell output
appears in the echo area.
(Shell Mode): Improve wording.
(Shell Prompts): Fix a typo.
(Shell Ring, Term Mode): Mention command names.
(History References): Add a cross-reference to "Rebinding".
(Remote Host): Mention SSH.
(TCP Emacs server): Improve wording.
(emacsclient Options): Minor improvements.
(PostScript): Fix wording.
(PostScript Variables): Mention that ps-font-size could be a cons.
(Sorting): Minor improvements.  Suggested by Michael Albinus
<michael.albinus@gmx.de> in emacs-manual-bugs@gnu.org

6 years agosql.el defcustom fixes
Glenn Morris [Thu, 22 Mar 2018 18:31:33 +0000 (14:31 -0400)]
sql.el defcustom fixes

* lisp/progmodes/sql.el (sql-login-params): Update.
Avoids type mismatch with postgres and sqlite login params.
(sql-postgres-login-params): Bump version.

6 years agoFix bug#30846, along with misc cleanups found along the way
Stefan Monnier [Fri, 23 Mar 2018 15:29:06 +0000 (11:29 -0400)]
Fix bug#30846, along with misc cleanups found along the way

* test/src/data-tests.el (data-tests-kill-all-local-variables): New test.

* src/buffer.c (swap_out_buffer_local_variables): Remove.
Fuse the body of its loop into that of reset_buffer_local_variables.
(Fkill_buffer, Fkill_all_local_variables): Don't call it any more.
(reset_buffer_local_variables): Make sure the buffer's local binding
is swapped out before removing it from the alist (bug#30846).
Call watchers before actually killing the var.

* src/data.c (Fmake_local_variable): Simplify.
Use swap_in_global_binding to swap out any local binding, instead of
a mix of find_symbol_value followed by messing with where&found.
Don't call swap_in_symval_forwarding since the currently swapped
binding is never one we've modified.
(Fkill_local_variable): Use swap_in_global_binding rather than messing
with where&found to try and trick find_symbol_value into doing the same.

* src/alloc.c (mark_localized_symbol): 'where' can't be a frame any more.

6 years ago* src/alloc.c: Avoid O(N²) complexity when unchaining markers (bug#24548).
Stefan Monnier [Fri, 23 Mar 2018 15:09:54 +0000 (11:09 -0400)]
* src/alloc.c: Avoid O(N²) complexity when unchaining markers (bug#24548).

Unchain all dead markers with a single scan of the markers list,
instead of calling the O(N) 'unchain_marker' N times.

(unchain_dead_markers): New function.
(sweep_buffers): Use it.
(gc_sweep): Sweep buffers before markers.
(sweep_misc): Check that markers have been unchained when reclaiming them.

6 years agoMerge from origin/emacs-26
Stefan Monnier [Fri, 23 Mar 2018 15:01:31 +0000 (11:01 -0400)]
Merge from origin/emacs-26

b8ebf5fb64 * src/lisp.h (struct Lisp_Buffer_Local_Value): Update comm...
8c92a37cb4 * doc/emacs/trouble.texi: Fix location of `emacs-version' ...
10b1f2fdd5 Explain more about (defvar foo) form (Bug#18059)
68c2f336b1 * doc/lispref/buffers.texi (Buffer List): Fix grammar.
7e720c6851 * doc/lispref/anti.texi (Antinews): Fix grammar.
a6a821d29b * lisp/org/ob-lisp.el (org-babel-lisp-eval-fn): Tweak type.

6 years ago; Merge from origin/emacs-26
Stefan Monnier [Fri, 23 Mar 2018 15:01:31 +0000 (11:01 -0400)]
; Merge from origin/emacs-26

The following commit was skipped:

7c993c34b0 sql.el defcustom fixes

6 years ago* src/lisp.h (struct Lisp_Buffer_Local_Value): Update commentary.
Noam Postavsky [Fri, 23 Mar 2018 08:51:53 +0000 (04:51 -0400)]
* src/lisp.h (struct Lisp_Buffer_Local_Value): Update commentary.

6 years ago* doc/emacs/trouble.texi: Fix location of `emacs-version' index.
Noam Postavsky [Thu, 15 Mar 2018 11:42:40 +0000 (07:42 -0400)]
* doc/emacs/trouble.texi: Fix location of `emacs-version' index.

6 years agoExplain more about (defvar foo) form (Bug#18059)
Noam Postavsky [Sat, 10 Feb 2018 19:06:05 +0000 (14:06 -0500)]
Explain more about (defvar foo) form (Bug#18059)

* doc/lispref/variables.texi (Defining Variables)
(Using Lexical Binding):
* doc/lispref/compile.texi (Compiler Errors): Emphasize that omitting
VALUE for `defvar' marks the variable special only locally.
* doc/lispref/variables.texi (Using Lexical Binding): Add example of
using `defvar' without VALUE.

6 years agoMake update_autogen work in git worktrees
Robert Pluim [Thu, 22 Mar 2018 08:06:44 +0000 (09:06 +0100)]
Make update_autogen work in git worktrees

* admin/update_autogen: Make it work in a git worktree

6 years agoQuieten cl-lib related compiler warnings
Glenn Morris [Fri, 23 Mar 2018 04:40:24 +0000 (21:40 -0700)]
Quieten cl-lib related compiler warnings

* lisp/completion.el (cl-set-difference):
* lisp/files.el (map-merge-with, map-merge):
* lisp/emacs-lisp/radix-tree.el (map-apply): Declare.
* lisp/emacs-lisp/thunk.el: Load cl-lib at run-time, not
cl-macs at compile.
* lisp/gnus/gnus-group.el: Load cl-lib at run-time, not cl at compile.
* lisp/emacs-lisp/checkdoc.el, lisp/emacs-lisp/package.el
* lisp/gnus/gnus-sum.el, lisp/gnus/message.el, lisp/net/shr.el:
Load cl-lib at run-time.
* lisp/gnus/mml-sec.el (mml-signencrypt-style)
(mml-secure-cust-record-keys): Replace cl with cl-lib,
and load it at run-time.
* lisp/cedet/ede/linux.el, lisp/vc/vc-hg.el: Reorder requires.

6 years agoTry and fix the more obvious sources of bug#30635
Stefan Monnier [Thu, 22 Mar 2018 22:18:26 +0000 (18:18 -0400)]
Try and fix the more obvious sources of bug#30635

* lisp/files.el (dir-locals-read-from-dir): Handle the easy cases
without loading `map`.

* lisp/emacs-lisp/bytecomp.el: Don't require cl-lib at run-time.
(byte-compile-and-folded): Avoid cl-every.

6 years ago* doc/lispref/buffers.texi (Buffer List): Fix grammar.
Charles A. Roelli [Thu, 22 Mar 2018 19:43:42 +0000 (20:43 +0100)]
* doc/lispref/buffers.texi (Buffer List): Fix grammar.

6 years ago* doc/lispref/anti.texi (Antinews): Fix grammar.
Charles A. Roelli [Thu, 22 Mar 2018 19:40:02 +0000 (20:40 +0100)]
* doc/lispref/anti.texi (Antinews): Fix grammar.

6 years agoAdd new command vc-git-stash-delete
Charles A. Roelli [Thu, 22 Mar 2018 19:33:45 +0000 (20:33 +0100)]
Add new command vc-git-stash-delete

* lisp/vc/vc-git.el (vc-git-stash-delete): New command, in line with
vc-git-stash-delete-at-point.
(vc-git-extra-menu-map): Add menu entry.

6 years ago* lisp/org/ob-lisp.el (org-babel-lisp-eval-fn): Tweak type.
Glenn Morris [Thu, 22 Mar 2018 18:37:45 +0000 (14:37 -0400)]
* lisp/org/ob-lisp.el (org-babel-lisp-eval-fn): Tweak type.

Avoids type mismatch when relevant library is not present/loaded.