Juri Linkov [Tue, 18 Dec 2018 22:55:15 +0000 (00:55 +0200)]
Fontify one-line diffs without the final newline (bug#33567)
* lisp/vc/diff-mode.el (diff-hunk-text, diff-syntax-fontify-hunk):
Skip lines beginning with backslash like "\ No newline at end of file".
(diff-syntax-fontify-hunk): Use string-trim-right.
For one-line diffs use 1 explicitly in the list of line numbers.
Paul Eggert [Tue, 18 Dec 2018 20:21:27 +0000 (12:21 -0800)]
Support (ash INTEGER BIGNUM)
* src/data.c (emacs_mpz_mul_2exp): 2nd arg is now a
nonnegative EMACS_INT not mp_bitcnt_t, to simplify checking.
(Fash): Support COUNT values that are bignums or that
exceed mp_bitcnt_t range.
* test/src/data-tests.el (data-tests-ash-lsh): Test this.
Glenn Morris [Tue, 18 Dec 2018 16:29:05 +0000 (08:29 -0800)]
Expect tramp environment test to fail on hydra
* test/lisp/net/tramp-tests.el (tramp-test32-environment-variables):
Expect failure on hydra.nixos.org.
Glenn Morris [Tue, 18 Dec 2018 16:25:55 +0000 (08:25 -0800)]
A filenotify test now passes on hydra
* test/lisp/filenotify-tests.el (file-notify-test04-autorevert):
Remote test now passes on hydra.nixos.org, since PATH
workaround for bug#33781.
Michael Albinus [Tue, 18 Dec 2018 12:58:00 +0000 (13:58 +0100)]
Fix Bug#33781
* lisp/net/tramp-cache.el (tramp-connection-properties):
* lisp/net/tramp-sh.el (tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args):
Reinsert autoload cookie. (Bug#33781)
* test/lisp/net/tramp-tests.el: Do not require tramp-sh before
changing tramp-remote-path.
Nicolas Petton [Tue, 18 Dec 2018 08:42:50 +0000 (09:42 +0100)]
New convenience functions in seq.el
Functions to access the first or all but the first elements of
sequences have been repeatedly asked for (the last occurrence being
https://github.com/NicolasPetton/seq.el/issues/9).
* lisp/emacs-lisp/seq.el (seq-first, seq-rest): New functions.
* test/lisp/emacs-lisp/seq-tests.el (test-seq-first, test-seq-rest):
New tests for seq-first and seq-rest.
Glenn Morris [Tue, 18 Dec 2018 06:52:34 +0000 (22:52 -0800)]
Tiny ert-summarize-tests-batch-and-exit improvement
* lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit):
Report the details of unexpected passes as well as failures.
Juri Linkov [Mon, 17 Dec 2018 23:11:15 +0000 (01:11 +0200)]
Syntactic fontification of diff hunks (bug#33567)
* lisp/vc/diff-mode.el (diff-font-lock-syntax): New defcustom.
(diff-default-directory): New buffer-local variable.
(diff-indicator-removed, diff-indicator-added)
(diff-indicator-changed): Set foreground to distinctive colors.
(diff-context): Remove colors to make room for syntax highlighting.
(diff-font-lock-keywords): Add diff--font-lock-syntax.
(diff--font-lock-cleanup): Remove diff-mode syntax overlays.
(diff--font-lock-syntax, diff--font-lock-syntax--refresh)
(diff-syntax-fontify-revisions, diff-syntax-fontify-hunk)
(diff-syntax-fontify-props): New functions.
* lisp/vc/diff.el (diff-no-select): Set diff-default-directory to
default-directory.
* doc/emacs/files.texi (Diff Mode): Document diff-font-lock-syntax.
Paul Eggert [Mon, 17 Dec 2018 21:26:42 +0000 (13:26 -0800)]
Make org-protocol-flatten always an alias
* lisp/org/org-protocol.el (org-protocol-flatten):
Rewrite as top-level alias, as per Stefan’s suggestion,
to avoid compiler warnings.
Stefan Monnier [Mon, 17 Dec 2018 19:51:01 +0000 (14:51 -0500)]
* lisp/emacs-lisp/map.el: Avoid special casing lists.
(map-not-inplace, map-inplace): New errors.
(map-insert): New generic function.
(map-put!): Signal map-not-inplace rather than a generic 'error'.
(map-elt): Use map-not-inplace and map-insert to avoid hardcoding
a special case for lists.
* test/lisp/emacs-lisp/map-tests.el (test-map-put!): Rename from
test-map-put. Also test the errors signaled.
Glenn Morris [Mon, 17 Dec 2018 18:52:46 +0000 (13:52 -0500)]
Avoid tests failures on hydra due to Tramp autoload changes
* test/lisp/filenotify-tests.el, test/lisp/shadowfile-tests.el:
* test/lisp/net/tramp-tests.el: Require tramp-sh before changing
tramp-remote-path.
Paul Eggert [Mon, 17 Dec 2018 18:19:48 +0000 (10:19 -0800)]
One more flatten-tree test
* test/lisp/subr-tests.el (subr-tests-flatten-tree):
Add a test for lots of nothing.
Paul Eggert [Mon, 17 Dec 2018 18:19:23 +0000 (10:19 -0800)]
Some more flatten-tree aliases
* lisp/allout.el (allout-flatten):
* lisp/progmodes/hideif.el (hif-flatten):
Now an obsolete alias for flatten-tree. All callers changed.
* lisp/org/org-protocol.el (org-protocol-flatten):
Make it an alias for flatten-tree if available.
* lisp/progmodes/js.el (js--flatten-list):
Remove alias. We shouldn’t need obsolete function aliases for
private functions.
Paul Eggert [Mon, 17 Dec 2018 17:55:06 +0000 (09:55 -0800)]
Improve flatten-tree documentation
* doc/lispref/lists.texi (Building Lists):
* lisp/subr.el (flatten-tree):
Don’t imply that flatten-tree modifies its argument.
Clarify wording.
Paul Eggert [Mon, 17 Dec 2018 17:54:14 +0000 (09:54 -0800)]
Improve flatten-tree performance
* lisp/subr.el (flatten-tree): Improve performance by calling
‘cons’ once rather than twice when a cons cell is popped.
Paul Eggert [Mon, 17 Dec 2018 17:31:08 +0000 (09:31 -0800)]
Assume ‘emacs’ is defined in Emacs-only code
* src/charset.c, src/coding.c, src/coding.h, src/gmalloc.c:
* src/ralloc.c, src/regex-emacs.c: Simplify slightly by
assuming that ‘emacs’ is defined. These modules have long
been specific to Emacs, and are not used elsewhere.
Michael Albinus [Mon, 17 Dec 2018 11:26:58 +0000 (12:26 +0100)]
Use `flatten-tree' in Tramp
* lisp/net/tramp-compat.el (tramp-compat-flatten-tree): New defun.
(tramp-compat-flatten-list): Remove.
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command): Use it.
Alex Branham [Mon, 17 Dec 2018 11:15:09 +0000 (12:15 +0100)]
New function flatten-tree
Co-authored-by: Basil L. Contovounesios <contovob@tcd.ie>
* doc/lispref/lists.texi: Document `flatten-tree'.
* lisp/progmodes/js.el (js--maybe-join):
* lisp/printing.el (pr-switches):
* lisp/lpr.el (lpr-print-region):
* lisp/gnus/nnimap.el (nnimap-find-wanted-parts):
* lisp/gnus/message.el (message-talkative-question):
* lisp/gnus/gnus-sum.el (gnus-remove-thread)
(gnus-thread-highest-number, gnus-thread-latest-date):
* lisp/eshell/esh-util.el (eshell-flatten-and-stringify):
* lisp/eshell/esh-opt.el (eshell-eval-using-options):
* lisp/eshell/esh-ext.el (eshell-external-command):
* lisp/eshell/em-xtra.el (eshell/expr):
* lisp/eshell/em-unix.el (eshell/rm, eshell-mvcpln-template)
(eshell/cat, eshell/make, eshell-poor-mans-grep, eshell-grep)
(eshell/du, eshell/time, eshell/diff, eshell/locate):
* lisp/eshell/em-tramp.el (eshell/su, eshell/sudo):
* lisp/eshell/em-term.el (eshell-exec-visual):
* lisp/eshell/em-dirs.el (eshell-dirs-substitute-cd, eshell/cd):
* lisp/eshell/em-basic.el (eshell/printnl):
Use new flatten-tree.
* lisp/progmodes/js.el (js--flatten-list):
* lisp/lpr.el (lpr-flatten-list):
* lisp/gnus/message.el (message-flatten-list):
* lisp/eshell/esh-util.el (eshell-flatten-list):
Obsolete in favor of Emacs-wide `flatten-tree'.
* lisp/subr.el (flatten-list): Alias to `flatten-tree' for
discoverability.
* lisp/subr.el (flatten-tree): New defun.
* test/lisp/subr-tests.el (subr-tests-flatten-tree): New test.
Michael Albinus [Mon, 17 Dec 2018 10:56:05 +0000 (11:56 +0100)]
Fix Bug#33524
* lisp/progmodes/flymake-proc.el
(flymake-proc-create-temp-with-folder-structure):
Unquote file-name. (Bug#33524)
Michael Albinus [Mon, 17 Dec 2018 10:50:06 +0000 (11:50 +0100)]
Reduce autoloaded objects in Tramp
* lisp/net/tramp-adb.el (tramp-adb-program)
(tramp-adb-connect-if-not-connected, tramp-adb-prompt):
Remove autoload cookie.
* lisp/net/tramp-cache.el (tramp-connection-properties)
(tramp-persistency-file-name): Remove autoload cookie.
* lisp/net/tramp-ftp.el (tramp-ftp-enable-ange-ftp):
Use `tramp-autoload' cookie.
* lisp/net/tramp-gvfs.el (tramp-gvfs-zeroconf-domain):
Remove autoload cookie.
* lisp/net/tramp-rclone.el (tramp-rclone-program): Remove autoload
cookie.
(tramp-set-completion-function): Use `tramp--with-startup'.
* lisp/net/tramp-sh.el (tramp-inline-compress-start-size)
(tramp-copy-size-limit, tramp-histfile-override)
(tramp-use-ssh-controlmaster-options, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args):
Remove autoload cookie.
(tramp-stat-marker, tramp-stat-quoted-marker): Move to tramp.el.
* lisp/net/tramp-smb.el (tramp-smb-program)
(tramp-smb-acl-program, tramp-smb-conf)
(tramp-smb-winexe-program, tramp-smb-winexe-shell-command)
(tramp-smb-winexe-shell-command-switch): Remove autoload cookie.
* lisp/net/tramp-sudoedit.el (server, tramp-sh): Do not require.
* lisp/net/tramp.el (tramp--startup-hook): Define.
(tramp-stat-marker, tramp-stat-quoted-marker): New defconsts,
taken from tramp-sh.el.
* test/lisp/net/tramp-archive-tests.el (tramp-copy-size-limit)
(tramp-persistency-file-name): Declare.
* test/lisp/net/tramp-tests.el (tramp-connection-properties)
(tramp-display-escape-sequence-regexp)
(tramp-inline-compress-start-size, tramp-remote-path): Declare.
Stefan Monnier [Mon, 17 Dec 2018 04:39:51 +0000 (23:39 -0500)]
* lisp/emacs-lisp/macroexp.el: Don't hide backtrace
(macroexp--compiler-macro): Use condition-case-unless-debug.
João Távora [Sun, 16 Dec 2018 16:55:09 +0000 (16:55 +0000)]
Jsonrpc error handlers can now safely call jsonrpc-shutdown
Previously, if an error handler called jsonrpc-shutdown, and if that
error handler was being called from the process sentinel,
jsonrpc-shutdown would infloop waiting for jsonrpc-sentinel-done to be
set.
Rename the process property jsonrpc-sentinel-done to
jsonrpc-sentinel-cleanup-started, arrange for it to be set earlier
in the sentinel, and also check for it earlier in jsonrpc-shutdown.
* lisp/jsonrpc.el (Version): Bump to 1.0.7.
(jsonrpc--process-sentinel): Set jsonrpc-sentinel-cleanup-started
a bit earlier than previous jsonrpc-sentinel-done.
(jsonrpc-shutdown): Query jsonrpc-sentinel-cleanup-started
Paul Eggert [Sun, 16 Dec 2018 16:11:35 +0000 (08:11 -0800)]
Update from Gnulib
This incorporates:
2018-12-16 regex: propagate fix for glibc bug 18040
2018-12-16 obstack, libc-config: Support HP-UX cc in C99 mode
2018-12-15 regex: work around a bug in glibc-2.27 and prior
2018-12-13 localtime-buffer: Avoid endless recursion
* build-aux/config.guess, build-aux/config.sub, lib/cdefs.h:
* lib/gettext.h, lib/localtime-buffer.c, lib/regexec.c, m4/regex.m4:
Copy from Gnulib.
Stefan Monnier [Sun, 16 Dec 2018 15:32:53 +0000 (10:32 -0500)]
* lisp/net/tramp: Rework mutual dependencies
Functionally split tramp-loaddefs.el into two parts: one part run
while loading it at the very beginning of loading tramp.el (holding plain
autoloads and declarations), and another run at the very end of loading
tramp.el (holding setup code).
This should reduce infinite-recursion problems while loading.
* lisp/net/tramp.el: Require tramp-loaddefs at beginning.
Run (new and internal) tramp--startup-hook at the end.
Remove all tramp-autoloads. Prefer tramp--with-startup over
eval-after-load.
(tramp--with-startup): New macro.
(tramp-set-syntax): Show the new value rather than the old value in the
error message.
(tramp-syntax-values): Explicitly return 'values'.
(tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp)
(tramp-postfix-method-format, tramp-postfix-method-regexp)
(tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp)
(tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp)
(tramp-postfix-host-format, tramp-postfix-host-regexp)
(tramp-remote-file-name-spec-regexp, tramp-file-name-structure)
(tramp-completion-file-name-regexp): Don't initialize in the declaration,
since it's recomputed at the end anyway.
(tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use.
* lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more.
(tramp-compat-tramp-syntax): Declare tramp-syntax.
* lisp/net/tramp-smb.el:
* lisp/net/tramp-rclone.el:
* lisp/net/tramp-gvfs.el:
* lisp/net/tramp-ftp.el:
* lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within
tramp--with-startup.
* lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within
tramp--with-startup.
(tramp-display-escape-sequence-regexp)
(tramp-device-escape-sequence-regexp): Don't tramp-autoload any more.
(tramp-stat-marker): Use eval-and-compile rather than tramp-autoload.
* lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within
tramp--with-startup.
Require tramp-sh at compile-time to precompute some regexps based on
tramp-stat-marker.
Michael Albinus [Sun, 16 Dec 2018 14:49:07 +0000 (15:49 +0100)]
Add Tramp sudoedit method
* doc/misc/tramp.texi (Quick Start Guide): New section "Using sudoedit".
(External methods) <sudoedit>: Describe.
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist)
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Add handler.
* lisp/net/tramp-sh.el (tramp-sh-handle-set-file-uid-gid): Rename from
`tramp-sh-handle-set-file-uid-gid'. Handle only remote file names.
* lisp/net/tramp-sudoedit.el: New file.
* lisp/net/tramp.el (tramp-file-name-for-operation): Handle also
`tramp-set-file-uid-gid'.
(tramp-set-file-uid-gid): New defun.
(tramp-get-local-uid, tramp-get-local-gid): Cache result.
* test/lisp/net/tramp-tests.el (tramp--test-sudoedit-p): New defun.
(tramp-test20-file-modes, tramp-test22-file-times)
(tramp--test-sudoedit-p): Use it.
João Távora [Sun, 16 Dec 2018 11:45:27 +0000 (11:45 +0000)]
Rephrase a confusing sentence in the jsonrpc.el manual
* doc/lispref/text.texi (JSONRPC Overview): Rephrase first
sentence on building JSONRPC applications.
Glenn Morris [Sun, 16 Dec 2018 02:17:01 +0000 (18:17 -0800)]
Expect two epg tests to fail on hydra
* test/lisp/epg-tests.el (epg-decrypt-1, epg-roundtrip-1):
These currently fail for unknown reasons on hydra.nixos.org.
Glenn Morris [Sat, 15 Dec 2018 23:23:58 +0000 (15:23 -0800)]
; * src/macuvs.h: Regenerate with new header.
Glenn Morris [Sat, 15 Dec 2018 23:19:25 +0000 (15:19 -0800)]
Merge from origin/emacs-26
fa953b5 (origin/emacs-26) Fix an epg test for recent GnuPG versions (...
3015636 Document font structure layout constraints
f14d574 Document font structure layout constraints
f519aa1 Fix display of line numbers in empty lines beyond EOB
24b5026 Fix redisplay when a window's scroll bar or fringes are changed
5d1b158 Tiny markup fix in Elisp manual
Glenn Morris [Sat, 15 Dec 2018 23:08:28 +0000 (15:08 -0800)]
Ensure flymake tests use gcc rather than $CC
* test/lisp/progmodes/flymake-resources/Makefile: Force use of gcc.
This seems to be what the tests expect. (Bug#33735)
Glenn Morris [Sat, 15 Dec 2018 23:04:24 +0000 (15:04 -0800)]
Suppress filenotify remote test failures on hydra.nixos.org
* test/lisp/filenotify-tests.el (file-notify--deftest-remote):
Add optional argument to pass expected-result.
(file-notify-test04-autorevert-remote)
(file-notify-test08-backup-remote): Expect failure on hydra (bug#33735).
Glenn Morris [Sat, 15 Dec 2018 22:49:46 +0000 (14:49 -0800)]
Fix an eshell ls dired test for non-recent files
* test/lisp/eshell/em-ls-tests.el (em-ls-test-bug27844):
Work around an eshell issue with non-recent files. (Bug#33734)
Glenn Morris [Sat, 15 Dec 2018 01:09:02 +0000 (20:09 -0500)]
Fix an epg test for recent GnuPG versions (bug#33439)
* test/lisp/epg-tests.el (epg-decrypt-1):
Tell recent GnuPG (e.g. 2.2.11) not to worry about missing MDC.
Glenn Morris [Fri, 14 Dec 2018 20:41:17 +0000 (15:41 -0500)]
* make-dist: Improve no-byte-compile check.
Glenn Morris [Fri, 14 Dec 2018 20:40:15 +0000 (15:40 -0500)]
* make-dist: Improve tempfile handling.
Prompted by /tmp/out existing and being owned by another user.
Glenn Morris [Fri, 14 Dec 2018 19:57:11 +0000 (14:57 -0500)]
* make-dist: Silence test of tar functionality.
Basil L. Contovounesios [Fri, 14 Dec 2018 14:46:47 +0000 (14:46 +0000)]
* lisp/emacs-lisp/map.el: Fix recent changes
(map-empty-p): Add method for lists which avoids computing their
entire length.
(map-contains-key): Check for alist membership by comparing against
DEFAULT argument returned by alist-get.
(map-put!): Reconcile argument name with that used in docstring.
Robert Pluim [Fri, 14 Dec 2018 15:07:47 +0000 (16:07 +0100)]
Document font structure layout constraints
This has to be the same as in src/ftcrfont.c and src/ftfont.c
* src/xftfont.c (struct xftfont_info): Document layout constraints.
Robert Pluim [Fri, 14 Dec 2018 14:04:14 +0000 (15:04 +0100)]
Document font structure layout constraints
The layout of the initial members of ftcrfont_info must match
ftfont_info
* src/ftcrfont.c (struct ftcrfont_info): Likewise.
* src/ftfont.c (struct ftfont_info): Document layout constraints.
Eli Zaretskii [Fri, 14 Dec 2018 08:43:37 +0000 (10:43 +0200)]
Fix display of line numbers in empty lines beyond EOB
* src/xdisp.c (maybe_produce_line_number): When the current
line is at EOB, use the 'line-number-current-line' face only
on that single line, but not on the rest of empty lines beyond
EOB. (Bug#33732)
Glenn Morris [Fri, 14 Dec 2018 02:02:15 +0000 (21:02 -0500)]
* test/lisp/eshell/em-ls-tests.el (em-ls-test-bug27844): Remove debug.
Stephen Leake [Thu, 13 Dec 2018 22:45:05 +0000 (14:45 -0800)]
Get long package description for installed packages from installed files
* doc/lispref/package.texi (Archive Web Server): New; document web
server interface.
* lisp/emacs-lisp/package.el (package--get-description): New; get long
description from installed files.
(describe-package-1): Use it, improve comments. No longer writing
NAME-readme.txt.
* test/lisp/emacs-lisp/package-tests.el:
(package-test-describe-package): There is now a description for an
installed package.
(package-test-describe-installed-multi-file-package): New test.
Stephen Leake [Thu, 13 Dec 2018 22:39:02 +0000 (14:39 -0800)]
Paul Eggert [Thu, 13 Dec 2018 21:03:54 +0000 (13:03 -0800)]
Fix stray CHECK_FIXNUM_COERCE_MARKER
* src/xdisp.c (Fbidi_resolved_levels): Don’t allow a marker arg;
markers are character positions not vertical positions.
Glenn Morris [Thu, 13 Dec 2018 18:41:19 +0000 (13:41 -0500)]
* test/lisp/eshell/em-ls-tests.el (em-ls-test-bug27844): Add debug.
Michael Albinus [Thu, 13 Dec 2018 13:19:22 +0000 (14:19 +0100)]
* doc/misc/tramp.texi (Ad-hoc multi-hops): Reinsert lost line.
João Távora [Thu, 13 Dec 2018 00:09:01 +0000 (00:09 +0000)]
Allow per-diagnostic overlay properties in Flymake
* lisp/progmodes/flymake.el (Version): Bump to 1.0.3.
(flymake--diag): Add new field overlay-properties.
(flymake-make-diagnostic): New optional arg overlay-properties.
(flymake--highlight-line): Use it.
Juri Linkov [Wed, 12 Dec 2018 23:17:05 +0000 (01:17 +0200)]
* lisp/vc/vc.el (vc-find-revision-no-save): Use decode-coding-inserted-region
and after-insert-file-set-coding. Don't let-bind coding-system-for-read
and coding-system-for-write. For non-interactive use, let-bind
enable-local-variables to :safe and ignore errors from set-auto-mode call.
(Bug#33567)
Glenn Morris [Wed, 12 Dec 2018 22:01:06 +0000 (17:01 -0500)]
Improve em-ls-test-bug27844
* test/lisp/eshell/em-ls-tests.el (em-ls-test-bug27844):
Skip if source-directory absent.
Paul Eggert [Wed, 12 Dec 2018 17:54:42 +0000 (09:54 -0800)]
Simplify validate_interval_range and callers
* src/textprop.c (validate_interval_range):
Remove useless code. Fix comment to match current behavior.
(set_text_properties, copy_text_properties): Simplify, as
validate_interval_range has not incremented START or END for
quite some time.
(copy_text_properties): Assume C99. Fix an unlikely
integer overflow bug if WIDE_EMACS_INT.
Paul Eggert [Wed, 12 Dec 2018 17:54:42 +0000 (09:54 -0800)]
set_text_properties_1 can assume START <= END
* src/textprop.c (set_text_properties_1):
Do not swap START and END. All callers do that already,
and the test for swapping here is redundant.
Eli Zaretskii [Wed, 12 Dec 2018 16:27:05 +0000 (18:27 +0200)]
Fix regression in expand-file-name with drive-relative HOME
* src/fileio.c (get_homedir) [DOS_NT]: Expand drive-relative
$HOME to begin with "X:/".
* test/src/fileio-tests.el (fileio-tests--relative-HOME): Add
testing of drive-relative value of $HOME on MS-Windows and
MS-DOS.
Michael Albinus [Wed, 12 Dec 2018 09:49:59 +0000 (10:49 +0100)]
Fix Bug#33568
* test/lisp/net/secrets-tests.el (secrets-test02-collections)
(secrets-test03-items): Do not expect "login" collection to
exist. (Bug#33568)
Stefan Monnier [Tue, 11 Dec 2018 22:54:13 +0000 (17:54 -0500)]
* lisp/emacs-lisp/map.el: Make the functions generic
Make them document their delegation relationship, to clarify when
a method is needed.
(map--dispatch): Give more info in the error message.
(map-elt): Make it generic and deprecate the 'testfn' arg.
(map-put): Make it obsolete.
(map-length): Make it work on hash-tables.
(map-apply): Define it in terms of map-do.
(map-do, map-into): Use cl-generic dispatch instead of map--dispatch.
(map-empty-p): Define it in terms of map-length.
(map-contains-key): Deprecate 'testfn'. Make it return a boolean, so
it can return non-nil even if 'key' is nil. Improve implementation to
avoid constructing an intermediate list of all keys.
(map-merge-with): Use 'eql' rather than `eq'.
(map-put!): Rename from map--put and make it generic, to replace map-put.
(map--apply-alist, map--apply-hash-table, map--apply-array):
Turn them into methods of map-apply.
(map--do-alist, map--do-array): Turn them into methods of map-do.
(map--into-hash-table): Turn it into a method of map-into.
Stephen Leake [Tue, 11 Dec 2018 19:25:45 +0000 (11:25 -0800)]
Fix bug in display-buffer-use-some-frame
* lisp/window.el (display-buffer-use-some-frame): Pass 'reuse, not
'frame, to window--display-buffer.
Eli Zaretskii [Tue, 11 Dec 2018 10:32:11 +0000 (12:32 +0200)]
Fix redisplay when a window's scroll bar or fringes are changed
* src/window.c (set_window_fringes, set_window_scroll_bars):
Set windows_or_buffers_changed flag to cause immediate
thorough redisplay of a window when scroll bars or fringes are
changed. (Bug#33694)
Martin Rudalics [Tue, 11 Dec 2018 08:16:21 +0000 (09:16 +0100)]
Tiny markup fix in Elisp manual
* doc/lispref/lists.texi (Building Lists): Use '@var' instead
of '@code' for argument.
Martin Rudalics [Tue, 11 Dec 2018 07:56:15 +0000 (08:56 +0100)]
Fix typo in 'dired-restore-positions'
* lisp/dired.el (dired-restore-positions): Fix typo in last
change fixing Bug#33458.
Glenn Morris [Tue, 11 Dec 2018 01:40:16 +0000 (20:40 -0500)]
Add test/Makefile machinery to exclude test .el files
* test/Makefile.in (EXCLUDE_TESTS): New variable.
(ELFILES): Filter out any specified exclude files.
Nobuyoshi Nakada [Tue, 11 Dec 2018 01:12:46 +0000 (03:12 +0200)]
Support Ruby block arguments ending with , or *
* lisp/progmodes/ruby-mode.el (ruby-smie--forward-token):
Recognize punctuation before "closing-|" as a separate token.
(ruby-smie--backward-token): Same (bug#33487).
* test/lisp/progmodes/ruby-mode-tests.el
(ruby-forward-sexp-jumps-do-end-block-with-no-args)
(ruby-backward-sexp-jumps-do-end-block-with-no-args)
(ruby-forward-sexp-jumps-do-end-block-with-empty-args)
(ruby-backward-sexp-jumps-do-end-block-with-empty-args)
(ruby-forward-sexp-jumps-do-end-block-with-args)
(ruby-backward-sexp-jumps-do-end-block-with-args)
(ruby-forward-sexp-jumps-do-end-block-with-any-args)
(ruby-forward-sexp-jumps-do-end-block-with-expanded-one-arg)
(ruby-forward-sexp-jumps-do-end-block-with-one-and-any-args)
(ruby-backward-sexp-jumps-do-end-block-with-one-and-any-args):
New tests.
Juri Linkov [Tue, 11 Dec 2018 00:36:46 +0000 (02:36 +0200)]
* lisp/isearch.el (isearch-pre-command-hook): Support `isearch-move'
command properties with values `enabled' and `disabled'
also for the value `shift' of isearch-yank-on-move. (Bug#15839)
Juri Linkov [Mon, 10 Dec 2018 23:54:20 +0000 (01:54 +0200)]
* lisp/vc/vc.el (vc-root-version-diff): New command (bug#33650).
(vc-root-diff): Call it interactively on a prefix argument.
Matthias Meulien [Tue, 4 Sep 2018 20:50:56 +0000 (22:50 +0200)]
Support git commit --no-verify
* lisp/vc/vc-git.el (vc-git-log-edit-toggle-no-verify): New function.
(vc-git-log-edit-mode-map): Add binding.
(vc-git-checkin): Add an entry for that header.
Paul Eggert [Mon, 10 Dec 2018 21:40:43 +0000 (13:40 -0800)]
Fix bug when hashing reversed buffer regions
* src/fns.c (extract_data_from_object): When checking
file-coding-system-alist, calculate the coding system
correctly even if START and END are out of order.
Use bool for booleans.
Glenn Morris [Mon, 10 Dec 2018 17:43:05 +0000 (09:43 -0800)]
Merge from origin/emacs-26
2075864 (origin/emacs-26) CC Mode: stop extra parens on expression ca...
Glenn Morris [Mon, 10 Dec 2018 17:43:05 +0000 (09:43 -0800)]
; Merge from origin/emacs-26
The following commit was skipped:
0220391 Fix cairo scrolling for side-by-side windows
Glenn Morris [Mon, 10 Dec 2018 17:43:05 +0000 (09:43 -0800)]
Merge from origin/emacs-26
5a7451c CC Mode: stop wrongly recognizing "func(a * 9)" as "pointer t...
b0ed9d1 * lisp/emacs-lisp/cursor-sensor.el: Add motivation
Glenn Morris [Mon, 10 Dec 2018 17:43:05 +0000 (09:43 -0800)]
; Merge from origin/emacs-26
The following commit was skipped:
ee1ebe8 Guard occur against an undefined orig-line
Glenn Morris [Mon, 10 Dec 2018 17:43:05 +0000 (09:43 -0800)]
Merge from origin/emacs-26
908af9d Indexing followup to recent changes
505ac9a Improve documentation of cursor-sensor.el (bug#33664)
d817d2c * doc/lispref/commands.texi (Adjusting Point): Bug#33662
18442da Tramp multi-hop methods must be inline
1e3e24d ; * src/xterm.c (x_update_begin): Fix whitespace.
1d743d2 Fix scaling problem in Cairo builds
2b9e993 ; * doc/lispref/text.texi (Special Properties): Fix wording. ...
e568202 * lisp/simple.el (next-line-or-history-element): Use current-...
c7897c2 A few further fixes of window internals description
# Conflicts:
# doc/misc/tramp.texi
Glenn Morris [Mon, 10 Dec 2018 17:42:17 +0000 (12:42 -0500)]
* admin/gitmerge.el (gitmerge-skip-regexp): Add yet another variant.
Michael Albinus [Mon, 10 Dec 2018 15:52:21 +0000 (16:52 +0100)]
* lisp/net/tramp-compat.el (tramp-compat-flatten-list): New defun.
Stefan Monnier [Mon, 10 Dec 2018 15:06:34 +0000 (10:06 -0500)]
* lisp/Makefile.in (compile-main): Use a more selective regexp.
Alan Mackenzie [Mon, 10 Dec 2018 14:30:40 +0000 (14:30 +0000)]
CC Mode: stop extra parens on expression causing false fontification as type
* lisp/progmodes/cc-fonts.el (c-get-fontification-context): recognize
arithmetic operator followed by several open parentheses, not just one, as not
being an argument list.
Ari Roponen [Sun, 6 May 2018 12:29:28 +0000 (15:29 +0300)]
Fix cairo scrolling for side-by-side windows
Backport: Fixes Bug#33442.
* src/xterm.c (x_scroll_run) [USE_CAIRO]: Fix scrolling for
side-by-side split windows. (Bug#31288)
(cherry picked from commit
6e362a32bc9d21f73a0f29ca6f45481edeea6f29)
Alan Mackenzie [Mon, 10 Dec 2018 12:12:02 +0000 (12:12 +0000)]
CC Mode: stop wrongly recognizing "func(a * 9)" as "pointer to type a"
* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): When testing for an
identifier after "a *", on failure additionally check for a digit, setting a
new flag variable got-number if one is found. In the test for CASE 18, check
this flag.
Stefan Monnier [Mon, 10 Dec 2018 01:56:35 +0000 (20:56 -0500)]
* lisp/emacs-lisp/cursor-sensor.el: Add motivation
Paul Eggert [Mon, 10 Dec 2018 01:07:16 +0000 (17:07 -0800)]
Remove CHECK_FIXNUM_CAR etc.
* src/coding.c (CHECK_FIXNAT_CAR, CHECK_FIXNAT_CDR):
* src/lisp.h (CHECK_FIXNUM_CAR, CHECK_FIXNUM_CDR):
Remove. All uses removed. These seem to have been based on
the assumption that the argument cons needs to be modified,
an assumption that is incorrect for fixnums.
(Fdefine_coding_system_internal): Use CHECK_RANGED_INTEGER
instead of a special diagnostic for graphic register numbers.
Glenn Morris [Sun, 9 Dec 2018 23:54:35 +0000 (15:54 -0800)]
* test/lisp/eshell/eshell-tests.el (with-temp-eshell):
Avoid permanently changing HISTFILE.
Juri Linkov [Sun, 9 Dec 2018 23:53:08 +0000 (01:53 +0200)]
Fix occur for non-nil list-matching-lines-jump-to-current-line (bug#33476)
* lisp/replace.el (occur-engine): Move orig-line let-binding higher.
Don't use start-line in forward-line.
Raimon Grau [Sun, 9 Dec 2018 23:42:41 +0000 (01:42 +0200)]
Guard occur against an undefined orig-line
; Not to be merged to master
* lisp/replace.el (occur-engine): Avoid inserting the current line if
orig-line is nil. This happens, for example, when reverting an occur
buffer with `list-matching-lines-jump-to-current-line' set to t.
(Bug#33476)
Michael Albinus [Sun, 9 Dec 2018 16:09:53 +0000 (17:09 +0100)]
* test/lisp/net/tramp-tests.el (tramp-test03-file-name-host-rules):
Use proper error symbol.
Eli Zaretskii [Sun, 9 Dec 2018 15:14:55 +0000 (17:14 +0200)]
Indexing followup to recent changes
* doc/lispref/text.texi (Special Properties): Index
'cursor-sensor-inhibit'. (Bug#33664)
Stefan Monnier [Sun, 9 Dec 2018 13:59:20 +0000 (08:59 -0500)]
Improve documentation of cursor-sensor.el (bug#33664)
* doc/lispref/text.texi (Special Properties): Mention cursor-sensor-inhibit.
* lisp/emacs-lisp/cursor-sensor.el (Commentary): Add cursor-sensor-mode.
(cursor-sensor-inhibit): Add docstring.
Stefan Monnier [Sun, 9 Dec 2018 13:34:35 +0000 (08:34 -0500)]
* doc/lispref/commands.texi (Adjusting Point): Bug#33662
Tweak text to clarify intangibility.
Alan Mackenzie [Sun, 9 Dec 2018 12:59:03 +0000 (12:59 +0000)]
Don't create *Compile-Log* due to byte-compile. Amend message to it.
This fixes bug #33602 and is a partial reversion of a commit from
2018-11-28T13:15:50.
* lisp/emacs-lisp/bytecomp.el (byte-compile-log-file): Don't create buffer
*Compile-Log* because it doesn't already exist. Amend message "Compiling no
file" to be clearer (?and less irritating).
Michael Albinus [Sun, 9 Dec 2018 08:55:29 +0000 (09:55 +0100)]
Tramp multi-hop methods must be inline
* doc/misc/tramp.texi (Ad-hoc multi-hops): Involved methods must
be inline methods.
Paul Eggert [Sun, 9 Dec 2018 08:18:36 +0000 (00:18 -0800)]
Add make_vector and make_nil_vector
This makes the callers a bit easier to read, and doubtless
improves efficiency very slightly. It also simplifies
possible future changes to allow bignum indexes to buffers.
* src/alloc.c (allocate_vectorlike):
Prefer ptrdiff_t to size_t when either will do.
(make_vector): New function.
(Fmake_vector): Use it.
* src/buffer.c (syms_of_buffer):
* src/bytecode.c (syms_of_bytecode):
* src/category.c (Fmake_category_table, init_category_once):
* src/ccl.c (syms_of_ccl):
* src/character.c (syms_of_character):
* src/charset.c (Fdefine_charset_internal)
(Ffind_charset_region, Ffind_charset_string):
* src/chartab.c (copy_char_table):
* src/coding.c (Fdefine_coding_system_internal, syms_of_coding):
* src/composite.c (get_composition_id, Fcomposition_get_gstring):
* src/composite.h (LGLYPH_NEW):
* src/fns.c (concat, Flocale_info, make_hash_table):
* src/font.c (font_otf_ValueRecord, font_otf_anchor)
(build_style_table, syms_of_font):
* src/fontset.c (RFONT_DEF_NEW, fontset_find_font)
(dump_fontset, syms_of_fontset):
* src/image.c (xpm_make_color_table_v):
* src/keyboard.c (modify_event_symbol, menu_bar_items)
(parse_menu_item, parse_tool_bar_item, init_tool_bar_items)
(syms_of_keyboard):
* src/keymap.c (Fdefine_key, describe_map, describe_vector):
* src/lread.c (read_vector):
* src/macfont.m (macfont_shape):
* src/menu.c (init_menu_items):
* src/nsfns.m (ns_make_monitor_attribute_list):
* src/process.c (conv_sockaddr_to_lisp, network_interface_info):
* src/profiler.c (make_log):
* src/window.c (Fcurrent_window_configuration):
* src/xdisp.c (with_echo_area_buffer_unwind_data)
(format_mode_line_unwind_data):
* src/xfaces.c (Finternal_make_lisp_face)
(Fface_attributes_as_vector):
* src/xfns.c (x_make_monitor_attribute_list)
(Fx_display_monitor_attributes_list):
* src/xfont.c (syms_of_xfont):
* src/xselect.c (x_handle_dnd_message):
* src/xwidget.c (save_script_callback):
Prefer make_nil_vector (N) to Fmake_vector (make_fixnum (N), Qnil).
* src/callint.c (Fcall_interactively):
* src/charset.c (load_charset_map):
* src/chartab.c (Fmake_char_table, uniprop_encode_value_numeric):
* src/composite.c (get_composition_id)
* src/dispnew.c (Fframe_or_buffer_changed_p)
(syms_of_display):
* src/fns.c (make_hash_table, maybe_resize_hash_table):
* src/font.c (font_style_to_value):
* src/fontset.c (FONTSET_ADD, fontset_add):
* src/json.c (json_to_lisp):
* src/keymap.c (syms_of_keymap):
* src/lread.c (init_obarray):
* src/profiler.c (make_log, Fprofiler_cpu_log):
* src/term.c (term_get_fkeys_1):
Prefer make_vector (N, V) to Fmake_vector (make_fixnum (N), V).
* src/font.c (build_style_table):
* src/macfont.m (macfont_shape):
* src/process.c (conv_sockaddr_to_lisp, network_interface_info):
Prefer make_uninit_vector if the vector will be initialized soon.
* src/lisp.h (make_nil_vector): New function.
Eli Zaretskii [Sun, 9 Dec 2018 07:45:40 +0000 (09:45 +0200)]
Fix resolving symlinks in Eshell history file names
* lisp/eshell/em-dirs.el (eshell-write-last-dir-ring):
* lisp/eshell/em-hist.el (eshell-write-history): Don't call
file-truename with argument of nil. (Bug#33477)
* test/lisp/eshell/eshell-tests.el (with-temp-eshell): Remove
HISTFILE from the environment, to make sure the Eshell history
file is nil.
Paul Eggert [Sun, 9 Dec 2018 06:59:50 +0000 (22:59 -0800)]
* src/alloc.c (VECTOR_ELTS_MAX): Make sure it’s signed.
Paul Eggert [Sun, 9 Dec 2018 06:53:15 +0000 (22:53 -0800)]
Port VECTOR_ELTS_MAX to older GCC etc.
Problem reported by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2018-12/msg00182.html
* src/alloc.c (VECTOR_ELTS_MAX): Now a macro.
Needed for portability to older GCC and non-GCC.
Paul Eggert [Sun, 9 Dec 2018 00:56:32 +0000 (16:56 -0800)]
Streamline and fix vector-size checks
* src/alloc.c (VECTOR_ELTS_MAX): New constant.
(allocate_vectorlike): LEN now must be positive. Assume LEN
is in range. All callers changed.
(allocate_vector): Arg is now ptrdiff_t, not EMACS_INT.
All callers changed. Return zero vector here, not in
allocate_vectorlike.
* src/lisp.h (make_uninit_vector): Simplify.
* src/xwidget.c (webkit_js_to_lisp):
Check for overflow in ptrdiff_t calculations.
Paul Eggert [Sat, 8 Dec 2018 23:29:07 +0000 (15:29 -0800)]
Suppress WebKitGTK+ 2.21.1 diagnostics
* src/xwidget.c: Suppress deprecation warnings (Bug#33679).
Michael Heerdegen [Sat, 8 Dec 2018 21:21:23 +0000 (22:21 +0100)]
Fix quote in the copyright skeleton
Revert replacing a backquote in the "copyright" skeleton with a quote
done in "Replace insignificant backquotes" which broke the skeleton.
* lisp/emacs-lisp/copyright.el (copyright): Restore the correct
version of the skeleton that used a backquote.
Paul Eggert [Sat, 8 Dec 2018 18:47:38 +0000 (10:47 -0800)]
Fix integer overflow in oversize vectors
* src/alloc.c (allocate_vector): Fix integer overflow when
allocating very large vectors, by taking large_vector_offset
into account. Assume C99.
Paul Eggert [Sat, 8 Dec 2018 18:42:50 +0000 (10:42 -0800)]
* src/alloc.c (allocate_vectorlike): Simplify.
Eli Zaretskii [Sat, 8 Dec 2018 09:50:58 +0000 (11:50 +0200)]
; * src/xterm.c (x_update_begin): Fix whitespace.
Ari Roponen [Fri, 30 Nov 2018 12:09:09 +0000 (14:09 +0200)]
Fix scaling problem in Cairo builds
* src/xterm.c (x_begin_cr_clip) [USE_GTK]:
(x_update_begin) [USE_CAIRO && USE_GTK]: Support scaling.
(Bug#33442)
Eli Zaretskii [Sat, 8 Dec 2018 09:39:35 +0000 (11:39 +0200)]
Honor 'vc-bzr-log-switches' in 'vc-bzr-revision-table'
* lisp/vc/vc-bzr.el (vc-bzr-revision-table): Honor
'vc-bzr-log-switches'.
Steven De Herdt [Sat, 24 Nov 2018 22:57:57 +0000 (23:57 +0100)]
Honor 'vc-bzr-log-switches' in 'vc-bzr-expanded-log-entry'
* lisp/vc/vc-bzr.el (vc-bzr-expanded-log-entry): Honor
'vc-bzr-log-switches'. (Bug#33494)
Copyright-paperwork-exempt: yes
Eli Zaretskii [Sat, 8 Dec 2018 09:13:28 +0000 (11:13 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs