1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

148428 commits

Author SHA1 Message Date
Philipp Stephani
91fa95bde0 * lisp/emacs-lisp/cl-macs.el (cl-loop): Add missing 'when' to spec 2021-05-22 13:17:00 +02:00
Tassilo Horn
a3de48687e Add documentation about bug-reference auto-setup.
* doc/emacs/maintaining.texi (Bug Reference): Add documentation about
the automatic setup.
* lisp/progmodes/bug-reference.el
(bug-reference-setup-from-irc-alist): Remove doubling in docstring.
2021-05-21 23:15:46 +02:00
Eric Abrahamsen
5fe343a44c Robustify parsing of gnus-search search results
* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output): Look
for a "process finished" tag, and don't choke on mis-parsed lines.
2021-05-21 13:35:38 -07:00
Basil L. Contovounesios
484bd8137a ; * etc/NEWS: Fix typo in last change. 2021-05-21 20:49:32 +01:00
Juri Linkov
099caace34 * lisp/dired-aux.el (dired-do-revert-buffer): New defcustom (bug#48456).
(dired-do-create-files): Use it.
2021-05-21 21:31:48 +03:00
Juri Linkov
dfe79a8185 * lisp/simple.el (yank-from-kill-ring): Fix kill-ring-yank-pointer (bug#48478) 2021-05-21 21:18:09 +03:00
Michael Albinus
bab7e85461 ; * test/infra/gitlab-ci.yml: Fix it, again. 2021-05-21 20:03:31 +02:00
Michael Albinus
9351da3862 ; * test/infra/gitlab-ci.yml: Fix previous commit 2021-05-21 20:00:55 +02:00
Michael Albinus
5fbbcdea2b Adapt native-comp entries in gitlab-ci.yml
* test/infra/gitlab-ci.yml (stages): New stages native-comp-images
and native-comp.
(build-native-bootstrap-speed0): Simplify.
(build-native-bootstrap-speed1, build-native-bootstrap-speed2):
Deactivate temporarily.

* test/infra/gitlab-ci.yml (.build-template): Add 'needs:' clause.
(.native-comp-template): New template.
(build-native-bootstrap-speed0): Use it.
2021-05-21 19:33:42 +02:00
Eli Zaretskii
fe8c1e7b1a Avoid byte-compiler warning during bootstrap
* lisp/isearch.el (multi-isearch-switch-buffer): Avoid
byte-compiler warning.
2021-05-21 13:37:48 +03:00
Michael Albinus
92464bd9b7 Rearrange nativecomp tests for EMBA
* test/infra/Dockerfile.emba (emacs-native-comp-speed0):
Add recipe.

* test/infra/gitlab-ci.yml (stages): New stages native-comp-images
and native-comp.
(build-native-bootstrap-speed0): Simplify.
(build-native-bootstrap-speed1, build-native-bootstrap-speed2):
Deactivate temporarily.
2021-05-21 09:43:04 +02:00
Andrea Corallo
3f207753a0 * Fix ahead-of-time native compilation for out-of-tree builds (bug#48497)
* src/comp.c (Fcomp_el_to_eln_rel_filename): Expand
'PATH_DUMPLOADSEARCH' while computing 'loadsearch_re_list'.
2021-05-21 08:49:25 +02:00
Tassilo Horn
8349f8294c ; Improve new bug-reference manual section 2021-05-20 21:30:10 +02:00
Juri Linkov
e0ebce5ce2 * lisp/help.el (describe-bindings-outline): New defcustom (bug#45147).
(describe-bindings): Use describe-bindings-outline.
(describe-bindings-internal): Remove function obsolete since 24.4.
2021-05-20 21:37:04 +03:00
Juri Linkov
9be9d1f94e * lisp/vc/diff-mode.el (diff-hunk-text): Handle better "\ No newline at end". 2021-05-20 21:23:01 +03:00
Juri Linkov
ef7a6eec20 Fix off-by-one inconsistency of 'M-y C-y' (bug#48478).
* lisp/simple.el (read-from-kill-ring): Increment kill-ring-yank-pointer by 1.
(yank-from-kill-ring): Don't increment kill-ring-yank-pointer by 1.
2021-05-20 21:02:27 +03:00
Juri Linkov
1866e66a73 * lisp/international/mule-cmds.el: Use group-function in read-char-by-name.
(mule--ucs-names-group): Simplify for using by group-function.
(read-char-by-name-group): Remove defcustom
obsoleted by completions-group.
(read-char-by-name): Mention completions-group and
completions-group-sort in docstring.  Use group-function when
completions-group is non-nil.
https://lists.gnu.org/archive/html/emacs-devel/2021-05/msg00791.html
2021-05-20 20:51:32 +03:00
Daniel Mendler
cb8b994217 (minibuffer-completion-help): Add group sorting
Sort the groups as returned by the `group-function` of the completion
table depending on the value of the customizable variable
`completions-group-sort`.  By default `completions-group-sort` is set
to nil.  The variable can be set to the symbol `alphabetical` in order
to configure alphabetical sorting.  Furthermore, a custom sorting
function can be used as value of `completions-group-sort`.

* lisp/minibuffer.el (completions-group-sort): New variable.
(minibuffer--group-by): Add SORT-FUN argument.
(minibuffer-completion-help): Pass `completions-group-sort` to
`minibuffer--group-by`.
2021-05-20 20:50:35 +03:00
Daniel Mendler
836d69bc60 (completion--insert-vertical): Separate groups completely
Insert the candidates vertically within the groups, but keep the
groups separate using the full width group separators.

* minibuffer.el (completion--insert-vertical): Adjust grouping.
2021-05-20 20:50:33 +03:00
Daniel Mendler
cacfd0321a (minibuffer-completion-help): Do not check completions-group centrally
The guard variable `completions-group` should be checked in each
completion table individually.  The guard variable
`completions-detailed` variable is used in the same way.

* minibuffer.el (minibuffer-completion-help): Remove check of
  `completions-group`.
2021-05-20 20:50:31 +03:00
Daniel Mendler
de168b70b1 (completion--insert-strings): Split function; Full group title support
Split `completion--insert-strings` into a function per completions
format in order to increase readability and extensibility.  This
change eases the addition of more formats.  Add support for group
titles to the vertical and horizontal formatting functions.

* minibuffer.el (completion--insert): Add new function.
(completion--insert-vertical, completion--insert-horizontal,
completion--insert-one-column): Extract function from
`completion--insert-strings`.  Use new function `completion--insert`.
(completion--insert-strings): Use new insertion functions.
2021-05-20 20:50:28 +03:00
Daniel Mendler
443d9efc95 (completing-read): Add group-function to the completion metadata
A completion table can specify a `group-function` in its metadata.
The group function takes two arguments, a completion candidate and a
transform argument.  The group function is used to group the
candidates after sorting and to enhance the completion UI with group
titles.

If the transform argument is nil, the function must return the title
of the group to which the completion candidate belongs.  The function
may also return nil if the candidate does not belong to a group.

If the transform argument is non-nil, the function must return the
transformed candidate.  For example, the transformation allows to
remove a redundant part of the candidate, which is then displayed in
the title.

The grouping functionality is guarded by the customizable variable
`completions-group` and turned off by default for the *Completions*
buffer.

The specific form of the `group-function` has been chosen in order to
allow allocation-free grouping.  This is important for completion UIs,
which continously update the displayed set of candidates (Icomplete,
Vertico, Ivy, etc.).  Only when the transform argument is non-nil the
candidate transformation is performed, which may involve a string
allocation as done in the function `xref--completing-read-group`.

The function `xref-show-definitions-completing-read` makes use of the
`group-function`, by moving the file name prefix to the title.  If
grouping is enabled, the *Completions* are displayed as
"linenum:summary" instead of "file:linenum:summary".  This way the
*Completions* buffer resembles the *Occur* buffer.

* doc/lispref/minibuf.texi: Add documentation.

* lisp/minibuffer.el (completion-metadata): Describe the
`group-function` in the docstring.
(completions-group): Add guard variable, off by default.
(completions-group-format): Add variable defining the format string
for the group titles.
(completions-group-title): Add face used by `completions-group-format`
for the group titles.
(completions-group-separator): Add face used by
`completions-group-format` for the group separator lines.
(minibuffer--group-by): New grouping function.
(minibuffer-completion-help): Use it.
(display-completion-list): Add optional GROUP-FUN argument.
(completion--insert-strings): Add optional GROUP-FUN argument.  Insert
group titles if `completions-format` is `one-column`.  Transform each
candidate with the GROUP-FUN.  Attach the untransformed candidate to
the property `completion--string`.

* lisp/simple.el (choose-completion): Retrieve the untransformed
completion candidate from the property `completion--string`.

* lisp/progmodes/xref.el:
(xref--completing-read-group): New grouping function.
(xref-show-definitions-completing-read): Use it.
2021-05-20 20:50:23 +03:00
Michael Albinus
72ec24d480 * doc/emacs/maintaining.texi (Bug Reference): Add debbugs-browse-mode. 2021-05-20 14:33:43 +02:00
Eli Zaretskii
ae3ec0860a Improve documentation of 'etags' tests
* test/manual/etags/README: New file.  (Bug#46055)

* test/README: Mention separate README files for tests in the
'manual' subdirectory
2021-05-20 13:02:29 +03:00
Eli Zaretskii
8b44740a6a Fix arg-out-of-range errors in 'line-number-at-pos'
* src/fns.c (Fline_number_at_pos): Pass character position to
args_out_of_range.  Suggested by Andreas Schwab
<schwab@linux-m68k.org>.  Call args_out_of_range_3 to show both
ends of the accessible portion.
2021-05-20 12:01:40 +03:00
Eli Zaretskii
328efb47d0 Make sure gmalloc's hybrid_free preserves errno
* src/gmalloc.c (hybrid_free_1): New function, with the body of
the previous 'hybrid_free'.
(hybrid_free): Call 'hybrid_free_1' while preserving the value of
'errno'.  Suggested by Paul Eggert <eggert@cs.ucla.edu>.
2021-05-20 11:44:54 +03:00
Eli Zaretskii
b2eed2ae56 Clean up the fix for unexec build on GNU/Linux
* src/conf_post.h [HYBRID_MALLOC || DARWIN_OS && HAVE_UNEXEC]:
Include <stdlib.h> here, before redirecting 'malloc' and friends
to their hybrid_* and unexec_* equivalents.  #undef malloc and
friends before redefining.  Provide prototypes for the
replacements.  Suggested by Paul Eggert <eggert@cs.ucla.edu>.
* src/gmalloc.c [HYBRID_MALLOC]: Remove declarations of 'malloc'
and friends, as they are now redundant: we include <stdlib.h> in
conf_post.h before redefining 'malloc' etc., and that provides
prototypes from system headers.

* configure.ac (HYBRID_MALLOC): Remove kludge to avoid replacement
of 'free' by Gnulib.  (Bug#36649)
2021-05-20 11:26:00 +03:00
Eli Zaretskii
d68f2b8681 ; * src/fns.c (Fline_number_at_pos): Fix doc string and comments. 2021-05-20 09:55:28 +03:00
Tassilo Horn
6ae3f7e889 Add a section about bug-reference-mode.
* doc/emacs/maintaining.texi (Maintaining): Add a section about
bug-reference-mode.
* doc/emacs/emacs.texi (Top): Link to the new section about
bug-reference-mode.
2021-05-19 21:21:03 +02:00
Juri Linkov
1f0f922ef2 * lisp/simple.el (yank-from-kill-ring-rotate): New defcustom (bug#48478).
(read-from-kill-ring, yank-from-kill-ring): Use it.
2021-05-19 19:30:33 +03:00
Eli Zaretskii
171dbe7048 Fix rare failures in 'window-default-font-height'
* lisp/window.el (window-default-font-height): Avoid signaling an
error when a client TTY frame happens to have an X-style 'display'
parameter.  (Bug#48408)
2021-05-19 19:01:07 +03:00
Eli Zaretskii
eb9f48bfad * lisp/startup.el (command-line-1): Avoid byte-compiler warning. 2021-05-19 18:56:27 +03:00
Glenn Morris
e100ee84e3 Fix custom type of recent dired-aux additions
* lisp/dired-aux.el (dired-compress-file-default-suffix)
(dired-compress-directory-default-suffix): Fix :type.
2021-05-19 08:28:35 -07:00
Stefan Monnier
b4e1fdfe21 * lisp/kmacro.el (kmacro-lambda-form): Fix bug#48523
Re-add `counter` and `format` arguments, since they are used in
`insert-kbd-macro`.
2021-05-19 11:19:10 -04:00
Eli Zaretskii
5e1a8d5654 Fix the unexec build on GNU/Linux
The unexec build on GNU/Linux must use HYBRID_MALLOC (gmalloc.c) and
sheap.c.  This was inadvertently disabled because a configure-time
test for 'sbrk' was moved as side effect of an unrelated change.

* configure.ac: Test for 'sbrk' before using the result in the
decision about SYSTEM_MALLOC and HYBRID_MALLOC.
(HYBRID_MALLOC): Prevent Gnulib from redirecting 'free' to its
replacement 'rpl_free'.

* lib/Makefile.in (not_emacs_OBJECTS): Add mallooc/%.o and free.o.
2021-05-19 17:42:50 +03:00
Ingo Lohmar
dac694b8bb * lisp/progmodes/sql.el: `sql-postgres-statement-starters' defcustom
Recognize common table expression as statement start in Postgres.
2021-05-19 15:07:52 +02:00
Mauro Aranda
61291e06cc Lift restriction for finding theme summary line
* lisp/cus-theme.el (custom-theme-summary): Don't limit the file to
having the deftheme form as the very first form, rather look for the
deftheme form explicitly.
2021-05-19 09:57:46 -03:00
Martin Rudalics
567c31121f Fix recently introduced misbehavior of `quit-restore-window' (Bug#48493)
* lisp/window.el (quit-restore-window): Unconditionally call
`switch-to-prev-buffer' (Bug#48493).
2021-05-19 09:17:37 +02:00
Stefan Monnier
1276ba75eb * lisp/progmodes/js.el (js--make-framework-matcher): Use a closure 2021-05-18 20:30:08 -04:00
Stefan Monnier
942cbc4dea * lisp/progmodes/gud.el (gud-tooltip-tips): Use proper closures
Also prefer #' to quote function names.

(jdb): Fix $ => \'.
2021-05-18 20:21:51 -04:00
Stefan Monnier
09ed51b9c8 * lisp/org/org-timer.el (org-timer--run-countdown-timer): Use closures 2021-05-18 19:54:38 -04:00
Stefan Monnier
5746fd57ab * lisp/org/org-mouse.el: Make use of lexical scoping
(org-mouse-todo-menu): Simplify by eta-reduction.
(org-mouse-popup-global-menu): Remove redundant `eval`.
(org-mouse-keyword-menu, org-mouse-keyword-replace-menu)
(org-mouse-tag-menu, org-mouse-match-closure): Use proper closures.
2021-05-18 19:51:26 -04:00
Stefan Monnier
4e240bf096 * lisp/org/org-colview.el (org-columns-map): Use proper closures
Also prefer #' to quote function names.

(org-columns-map): Use derived-mode-p.
2021-05-18 19:36:54 -04:00
Stefan Monnier
af68b49565 * lisp/org/org-clock.el (org-clock-get-table-data): Use proper closures
Also, prefer #' to quote function names
2021-05-18 19:32:35 -04:00
Stefan Monnier
25bb250e29 * lisp/net/sieve-manage.el (sieve-sasl-auth): Use proper closures 2021-05-18 19:23:54 -04:00
Stefan Monnier
26041ec8d5 * lisp/net/shr.el (shr-image-displayer): Use proper closures 2021-05-18 19:15:04 -04:00
Stefan Monnier
5e7b57ad8f * lisp/net/imap.el (imap-mailbox-close): Use proper closures
Also, remove redundant `:group` args, and prefer #' to quote function names
2021-05-18 19:12:11 -04:00
Stefan Monnier
db8266b0b2 * lisp/net/eudc.el (eudc-menu): Use proper closures 2021-05-18 19:06:54 -04:00
Stefan Monnier
e61bb6f6fe * lisp/net/browse-url.el: Avoid `(lambda ..)
(browse-url-netscape, browse-url-mozilla, browse-url-galeon)
(browse-url-epiphany, browse-url-elinks): Use proper closures.
2021-05-18 19:05:29 -04:00
Stefan Monnier
abedac0909 * lisp/misearch.el (multi-isearch-push-state): Use proper closures 2021-05-18 19:03:06 -04:00