Paul Eggert [Wed, 1 Jan 2020 01:08:16 +0000 (01:08 +0000)]
Merge from origin/emacs-27
186152ba40 Pacify gcc -Wunused-function on Ubuntu 18.04.3 4cd143aded Fix copyright years by hand 365e01cc9f Update copyright year to 2020 cd2c156163 ; * etc/NEWS: Make the description of XDG fallback more ac...
Paul Eggert [Wed, 1 Jan 2020 01:03:14 +0000 (01:03 +0000)]
Pacify gcc -Wunused-function on Ubuntu 18.04.3
This improves on 2019-12-25T20:01:07Z!eggert@cs.ucla.edu,
by fixing a GCC warning on Ubuntu 18.04.3
“‘x_get_net_workarea’ defined but not used”.
* src/xfns.c (x_get_net_workarea) [!USE_GTK]: Do not define.
Glenn Morris [Tue, 31 Dec 2019 15:50:15 +0000 (07:50 -0800)]
; Merge from origin/emacs-27
The following commits were skipped:
195bde9ea8 (origin/emacs-27) Don't always resort in recently introduc... f2a349ba8d Don't force completion recalculation in icomplete-fido-ret 9b1053ba27 Correctly cache sorted completions in icomplete--sorted-co... b1c3ed9f32 Move flex style's minibuffer-default-aware sorting to lisp... e3276f36c0 Make fido-mode behave more like ido-mode when finding dire... fe0ed17175 Slightly simplify lisp/icomplete.el with new icomplete--ca... 5352947d0d Another adjustment to flex completion style's sorting func...
Glenn Morris [Tue, 31 Dec 2019 15:50:15 +0000 (07:50 -0800)]
Merge from origin/emacs-27
9b6872b4e4 ; * test/lisp/calc/calc-tests.el: Fix warnings 957cdca6f0 Make minibuffer-tests work in out-of-tree builds (bug#38816) 2065316749 Make comint-tests more robust (bug#38813)
João Távora [Wed, 25 Dec 2019 17:57:20 +0000 (17:57 +0000)]
Don't force completion recalculation in icomplete-fido-ret
Besides the adverse effect of delaying completions, it tripped up the
useful logic of icomplete-force-complete-and-exit in the case where a
default was available, but no completions calculated yet.
* lisp/icomplete.el (icomplete-fido-ret): Don't force calculation
of completions.
* test/lisp/comint-tests.el (comint-test-no-password-function)
(comint-test-password-function-with-value)
(comint-test-password-function-with-nil):
Call accept-process-output as many times as needed, with a slightly
more generous timeout (100 ms), after sending the Password: prompt to
the process, since there must be time for some back-and-forth
communication. Also clear the process-query-on-exit flag, since it
doesn't go well with noninteractive tests.
Glenn Morris [Mon, 30 Dec 2019 17:12:25 +0000 (09:12 -0800)]
Merge from origin/emacs-27
59f71d20ea (origin/emacs-27) Fix tar-mode reading the oldgnu Tar format e3ec84fd7d Ensure mini-window is resized to show active minibuffer co... 450633f85a Fix mini-window resizing under resize-mini-windows = t 219d47893a (emacs-27) Fixes for makeinfo 4.13 4bbfd2b42f ; fix previous NEWS entry 81b697d106 Fix crash under -nw on macOS properly this time 9ce4207969 Revert "Check for GUI frame in ns_color_index_to_rgba" 732dcfc850 Ignore all color fonts when using XFT aa0c679f48 Avoid unbounded growth of cl-random-state components (bug#...
Glenn Morris [Mon, 30 Dec 2019 17:04:05 +0000 (09:04 -0800)]
Merge from origin/emacs-27
70fe552c61 ; xref-references-in-directory: Autoload as well 181f571651 Fix up requires 43f66c3368 Extract xref-matches-in-files from project--find-regexp-in... 65af18d86e Rename xref-collect-references and xref-collect-matches 98788bf976 ; Improve the docstring some more c190e91a1e Improve docstrings 012c12a05e Fix when expose draws partially visible first glyph (bug#3... d915b8c3f1 Don't require semantic/fw 50a0126402 Do some renames for clarity 74261ff301 Rearrange NEWS, add missing documentation 6c9571379e Fix interactive spec in netrc-parse 32222fb34c Fix documentation of define-obsolete-* functions
Eli Zaretskii [Mon, 30 Dec 2019 16:17:03 +0000 (18:17 +0200)]
Fix tar-mode reading the oldgnu Tar format
This makes sure an entry for a long file name will not
accidentally appear as a directory, and thus its size will be
disregarded, causing corrupted file headers for all the subsequent
entries. The original problem happened because the long file name
truncated to 99 bytes happened to end in a slash, which tar-mode
takes to be the indication of a directory.
* lisp/tar-mode.el (tar-header-block-tokenize): Accept an
additional argument DISABLE-SLASH; if non-nil, don't set the
link-type field of the descriptor to 5 (meaning a directory) just
because the name ends in a slash. Use this argument when calling
itself recursively, to read the entry of the file with a long
name. Set the link-type to 5 if the long name ends in a slash.
(Bug#38777)
Eli Zaretskii [Mon, 30 Dec 2019 15:53:52 +0000 (17:53 +0200)]
Fix mini-window resizing under resize-mini-windows = t
* src/window.c (grow_mini_window): Fix resizing of mini-window
when the echo area is cleared, and the caller asks for the
mini-window to have zero lines. (Bug#38791)
Avoid unbounded growth of cl-random-state components (bug#38753)
* lisp/emacs-lisp/cl-extra.el (cl-random):
Perform the modulo 2**23 operation before updating the state instead
of after. The result is always the same, but it prevents the state
from growing into arbitrary large bignums.
Dmitry Gutov [Sun, 29 Dec 2019 12:22:11 +0000 (15:22 +0300)]
Fix up requires
* lisp/progmodes/project.el (project-files):
Remove (require 'xref).
(project--files-in-directory): Add it here instead.
(project-find-regexp, project-or-external-find-regexp): And here.
For 'xref--show-xrefs'.
Dmitry Gutov [Sun, 29 Dec 2019 12:44:08 +0000 (15:44 +0300)]
Rename xref-collect-references and xref-collect-matches
* lisp/progmodes/xref.el (xref-references-in-directory): Rename
from xref-collect-references. Update the sole caller.
(xref-matches-in-directory): Rename from xref-collect-matches.
Update all callers (all of them are in the /tests/ dir).
* test/lisp/progmodes/xref-tests.el (xref-tests-data-dir):
Don't use the EMACS_TEST_DIRECTORY env var. It doesn't work when
running interactively.
Dmitry Gutov [Sat, 28 Dec 2019 16:28:30 +0000 (19:28 +0300)]
Do some renames for clarity
* lisp/progmodes/xref.el (xref--last-file-buffer):
Rename from xref--last-visiting-buffer. Update users.
(xref--find-file-buffer): Rename from xref--find-buffer-visiting
to match the standard function that gets called inside. Ditto.
Eli Zaretskii [Sat, 28 Dec 2019 13:19:05 +0000 (15:19 +0200)]
Rearrange NEWS, add missing documentation
* etc/NEWS: Rearrange and mark entries whether documented or not.
* doc/lispref/streams.texi (Output Variables): Document the new
default of 'print-quoted'.
* doc/lispref/keymaps.texi (Functions for Key Lookup): Document
that KEYMAP arg to 'lookup-key' can also be a list.
* doc/lispref/customize.texi (Variable Definitions): Document the
:local keyword of 'defcustom'.
* doc/lispref/numbers.texi (Float Basics): Document changes in
'logb'.
* doc/lispref/hooks.texi (Standard Hooks): Document
'comint-password-function'.
* doc/emacs/display.texi (Text Scale): Document text-size
adjustment using the mouse wheel.
* doc/emacs/frames.texi (Mouse Commands): Document image scaling
with the mouse wheel.
* doc/emacs/windows.texi (Window Convenience): Document
'global-tab-line-mode'.
* doc/emacs/search.texi (Repeat Isearch, Symbol Search)
(Isearch Yank): Document the new support for numeric arguments in
Isearch commands.
(Special Isearch): Document 'M-s M->' and 'M-s M-<'.
(Search Customizations): Document 'isearch-lazy-count'. Improve
indexing.
(Not Exiting Isearch): Document the new value of
'isearch-allow-scroll'.
* doc/emacs/maintaining.texi (Xref Commands): Document the new 'g'
key binding.
* doc/emacs/package.texi (Package Installation): Document changes
in 'package-check-signature'.
* doc/emacs/maintaining.texi (VC Change Log): Document
'vc-log-search'.
* doc/emacs/dired.texi (Operating on Files): Document
'dired-vc-rename'.
Eli Zaretskii [Sat, 28 Dec 2019 09:13:25 +0000 (11:13 +0200)]
Fix documentation of define-obsolete-* functions
* doc/lispref/functions.texi (Obsolete Functions): Make
documentation of functions that obsolete symbols match the
advertised calling conventions.
* lisp/emacs-lisp/byte-run.el (define-obsolete-function-alias)
(define-obsolete-variable-alias, define-obsolete-face-alias):
State in the doc strings that WHEN is a mandatory argument, to be
consistent with the advertised calling convention. (Bug#38675)
* lisp/gnus/gnus-start.el (gnus-group-change-level): Fix previous
patch that made info nil when adding new groups (thereby making
gnus-newsrc-alist invalid).
* lisp/gnus/gnus-start.el (gnus-group-change-level): Fix previous
patch that made info nil when adding new groups (thereby making
gnus-newsrc-alist invalid).
Dmitry Gutov [Fri, 27 Dec 2019 16:17:48 +0000 (19:17 +0300)]
(xref--find-buffer-visiting): Speed up by using get-file-buffer
* lisp/progmodes/xref.el (xref--find-buffer-visiting):
Speed up by using get-file-buffer.
(xref--collect-matches): Remove the condition on remote-id.
(https://lists.gnu.org/archive/html/emacs-devel/2019-12/msg00753.html)
Glenn Morris [Fri, 27 Dec 2019 15:50:16 +0000 (07:50 -0800)]
Merge from origin/emacs-27
3f2788d4ac (origin/emacs-27) project--vc-list-files: Recurse into sub... f0da3aa83e Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/e... 3b199614cc Minor improvements of buffer documentation e1e0a7a751 xref--collect-matches: Speed up on remote 219b91eb2c ; project--find-regexp-in-files: Avoid prepending remote-i...
Dmitry Gutov [Fri, 27 Dec 2019 15:18:41 +0000 (18:18 +0300)]
project--vc-list-files: Recurse into submodules
* lisp/progmodes/project.el (project-try-vc): Do not treat a Git
submodule as a project root, go up to the parent repo.
(project--git-submodules): New function.
(project--vc-list-files): Use it. Recurse into submodules.
Eli Zaretskii [Fri, 27 Dec 2019 14:19:09 +0000 (16:19 +0200)]
Minor improvements of buffer documentation
* doc/emacs/buffers.texi (Buffers): Say that buffers are killed
when no longer needed. Suggested by Jean-Christophe Helary
<jean.christophe.helary@traduction-libre.org>.
Deduplicate non-fixnum numeric constants in byte-compilation
* lisp/emacs-lisp/bytecomp.el (byte-compile-get-constant):
Use eql for looking up constants instead of eq, allowing
for bignum and flonum deduplication (bug#38708).
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Treat all expressions in the body of 'while' as for-effect,
since their values are discarded. This also finds some errors.
* lisp/calc/calc-alg.el (math-simplify-only, calc-simplify-mode)
(math-expand-formulas, calc-poly-div-remainder)
(math-living-dangerously, math-simplifying, calc-angle-mode)
(calc-prefer-frac, math-poly-base-variable):
Declare dynamic variables.
* test/lisp/calc/calc-tests.el (calc-poly-div):
Add test for at least one bug caused by missing declarations.
Dmitry Gutov [Thu, 26 Dec 2019 15:39:48 +0000 (17:39 +0200)]
Speed up dired-do-find-regexp
* lisp/dired-aux.el (dired-do-find-regexp): Speed up (bug#36857).
Previously, 'find' was called for every marked file (for plain
files and directories both). Now 'find' is only called for
directories.
Philipp Stephani [Thu, 26 Dec 2019 09:29:21 +0000 (10:29 +0100)]
Promote function type aliases to the public module API.
Previously module authors had to define type aliases for module
functions and finalizers themselves. This commit adds and documents
aliases so that this is no longer necessary.
* src/emacs-module.h.in: Add 'emacs_function' and 'emacs_finalizer'
type aliases.
* src/emacs-module.c: Remove old 'emacs_subr' and 'emacs_finalizer'
type aliases.
(struct Lisp_Module_Function, module_make_function): Switch from
'emacs_subr' to 'emacs_function'.
* doc/lispref/internals.texi (Module Functions): Document and use
'emacs_function' type alias.
(Module Values): Document 'emacs_finalizer' type alias.
Paul Eggert [Wed, 25 Dec 2019 20:01:07 +0000 (12:01 -0800)]
Port x_get_monitor_attributes_fallback to !HAVE_GTK3
* src/xfns.c (x_get_net_workarea) [!HAVE_GTK3]:
Define in this case too, since x_get_monitor_attributes_fallback
contains a call to it regardless whether HAVE_GTK3 is defined.
João Távora [Wed, 25 Dec 2019 17:57:20 +0000 (17:57 +0000)]
Don't force completion recalculation in icomplete-fido-ret
Besides the adverse effect of delaying completions, it tripped up the
useful logic of icomplete-force-complete-and-exit in the case where a
default was available, but no completions calculated yet.
* lisp/icomplete.el (icomplete-fido-ret): Don't force calculation
of completions.
Philipp Stephani [Wed, 25 Dec 2019 14:41:39 +0000 (15:41 +0100)]
Support .dylib suffix for modules on macOS (Bug#36226).
On macOS, shared libraries typically have the suffix .dylib. This
commit switches the module suffix to .dylib on Darwin to account for
that. To also support the .so suffix, introduce the concept of a
secondary module suffix.
* configure.ac: Switch MODULES_SUFFIX to .dylib for Darwin, introduce
MODULES_SECONDARY_SUFFIX.
* src/lread.c (Fload, syms_of_lread): Also use
MODULES_SECONDARY_SUFFIX if defined.
* test/src/emacs-module-tests.el (module-darwin-secondary-suffix): New
unit test.
Wolfgang Scherer [Mon, 26 Aug 2019 22:45:48 +0000 (00:45 +0200)]
Improve vc--add-line, vc--remove-regexp
* lisp/vc/vc.el (vc--add-line): Create file if it does not exist.
Use existing buffer to avoid discrepancies with filesytem. Make sure
that the file ends with a newline.
(vc--remove-line): Do not create file if it does not exist. Use
existing buffer to avoid discrepancies with filesytem. (bug#37185)