Lars Ingebrigtsen [Wed, 26 May 2021 22:38:33 +0000 (00:38 +0200)]
Fix ediff message parsing in non-English locales
* lisp/vc/ediff-diff.el (ediff-exec-process): Run diff in the C
locale to enable parsing the messages (bug#21387).
Juri Linkov [Wed, 26 May 2021 22:19:36 +0000 (01:19 +0300)]
* lisp/vc/diff-mode.el (diff-hunk-text): Test-driven fix for newlines.
* lisp/vc/diff-mode.el (diff-hunk-text): Fix handling of newlines
to cover all test cases according to new test.
* test/lisp/vc/diff-mode-tests.el (diff-mode-test-hunk-text-no-newline):
New test to cover cases with no newline at end of file.
Alex Bochannek [Wed, 26 May 2021 21:54:59 +0000 (23:54 +0200)]
Remove the base64 Face header repadding in Gnus
* lisp/gnus/gnus-fun.el (gnus-convert-face-to-png): Remove call.
* lisp/gnus/gnus-util.el (gnus-base64-repad): Remove.
Karl Fogel [Wed, 26 May 2021 19:28:11 +0000 (14:28 -0500)]
Improve some doc strings in bookmark.el
* lisp/bookmark.el (bookmark-bmenu-load): Describe prefix argument
behavior. Refer to related functions for more information.
(bookmark-bmenu-save): Likewise refer to related functions.
As discussed in this thread:
https://lists.gnu.org/archive/html/emacs-devel/2021-05/msg00389.html
From: Karl Fogel
To: Eli Zaretskii
Cc: Matthias Meulien, Drew Adams, Lars Ingebrigtsen,
Stefan Monnier, Emacs Devel
Subject: Re: [External] : Re: [PATCH] When deleting in bookmark menu,
prompt for confirmation.
Date: Sun, 09 May 2021 13:37:52 -0500
Message-ID: <87h7jboirj.fsf@red-bean.com>
Eli Zaretskii [Wed, 26 May 2021 17:08:47 +0000 (20:08 +0300)]
Make 'string-width' auto-composition aware
* src/composite.c (find_automatic_composition): Now extern.
(char_composable_p): Don't assume 'unicode-category-table' is
always available.
* src/composite.h (find_automatic_composition): Add prototype.
* src/character.c (lisp_string_width): Support automatic
compositions; call 'find_automatic_composition' when
'auto-composition-mode' is ON.
Filipp Gunbin [Wed, 26 May 2021 14:20:55 +0000 (17:20 +0300)]
* src/sysdep.c (system_process_attributes): Fix misspelled Qttname for FreeBSD
Filipp Gunbin [Thu, 20 May 2021 20:32:59 +0000 (23:32 +0300)]
Improve system_process_attributes on macOS (Bug#48548)
* src/sysdep.c (system_process_attributes): Fix misprint in 'tty' attr
- should be 'ttname' instead. Change 'utime', 'stime', 'time',
'majflt' attrs to obtain them from proc_pid_rusage, as sysctl call
used before doesn't give correct values; remove 'minflt' because it's
not available. Obtain 'vsize' / 'rss' / 'thcount' from proc_pidinfo.
Use sysctl with KERN_PROCARGS2 to obtain args: value contains both
argc and argv, so argv can be reliably cut out.
Protesilaos Stavrou [Wed, 26 May 2021 09:08:01 +0000 (12:08 +0300)]
Remove modus-themes.org build date (bug#48661)
* modus-themes.org: Delete Org macro of the current export date.
This makes the manual reproducible between Emacs builds.
Juri Linkov [Tue, 25 May 2021 20:55:13 +0000 (23:55 +0300)]
* lisp/international/mule-cmds.el (mule--ucs-names-group): Better char check.
Tassilo Horn [Tue, 25 May 2021 20:38:14 +0000 (22:38 +0200)]
Make the Alacritty terminal an alias of xterm-256color
* lisp/faces.el (term-file-aliases): Make the Alacritty terminal
an alias of xterm-256color (bug#48439).
Lars Ingebrigtsen [Tue, 25 May 2021 20:31:00 +0000 (22:31 +0200)]
Make hs-set-up-overlay into user option
* lisp/progmodes/hideshow.el (hs-set-up-overlay): Make into
defcustom (bug#48513).
Stephen Leake [Tue, 25 May 2021 20:26:42 +0000 (22:26 +0200)]
Restore `ff-find-other-file' buffer selection logic
* lisp/find-file.el (ff-find-other-file): Restore selection of
buffer changed by previous change (bug#48535).
Lars Ingebrigtsen [Tue, 25 May 2021 20:22:28 +0000 (22:22 +0200)]
Fix font and indentation of call-with-port in scheme-mode
* lisp/progmodes/scheme.el (scheme-font-lock-keywords-2): Add
call-with-port (bug#48544).
(call-with-port): Indent correctly.
Lars Ingebrigtsen [Tue, 25 May 2021 20:17:40 +0000 (22:17 +0200)]
Handle syntactically invalid .dir-locals.el files better
* lisp/files.el (dir-locals-read-from-dir): Handle syntactically
invalid .dir-locals.el files more gently (bug#48568). Give a
message instead of bugging out later.
Protesilaos Stavrou [Tue, 25 May 2021 19:47:37 +0000 (21:47 +0200)]
Update modus-themes to version 1.4.0
* doc/misc/modus-themes.org:
(Overview): Document good support for cases with red-green color
deficiency (deuteranopia).
(Customization Options): Add code block with sample configuration.
(Option for mode line presentation): Document new values.
(Option for completion framework aesthetics): Reword statements.
(Option for mail citations): Include new customization.
(Option for line highlighting (hl-line-mode)): Change description
of possible value.
(Option for diff buffer looks): Update the meaning of 'fg-only',
which now is an alias for 'fg-only-deuteranopia'.
(Option for org-mode block styles): Rename possible values.
(Cycle through arbitrary colors (DIY)): Include code samples for
demo case.
(Override colors (DIY)): Use correct symbol.
(Override color saturation (DIY)): Show how to combine manual and
automatic color overrides.
(Update Org block delimiter fontification (DIY)): Provide example.
(Load theme depending on time of day): Include missing "DIY" label.
(Full support for packages or face groups): Update list with
additions, removals.
(Indirectly covered packages): Update list.
(Notes for individual packages)
(Note on dimmer.el)
(Note on display-fill-column-indicator-mode)
(Note on mmm-mode.el background colors)
(Note on prism.el)
(Note on ERC escaped color sequences)
(Note on powerline or spaceline)
(Note on Helm grep)
(Note on EWW and Elfeed fonts (SHR fonts)): Stylistic change to
the heading.
(Note on inline Latex in Org buffers)
(Note on god-mode.el): Add note.
(Frequently Asked Questions (FAQ)): Include new section.
(Acknowledgements): Update list of contributors (bug#48647).
* etc/themes/modus-operandi-theme.el: Bump version number.
* etc/themes/modus-themes.el: Add new defcustom forms and update
existing ones, edit doc strings, remove old obsolete aliases,
tweak internal functions, refine face specifications.
* etc/themes/modus-vivendi-theme.el: Bump version number.
Gregory Heytings [Tue, 25 May 2021 19:40:02 +0000 (21:40 +0200)]
Do not switch to other window when minibuffer is selected
* lisp/window.el (handle-select-window): Do not silently switch to
other window when minibuffer is selected and
mouse-autoselect-window is t (Bug#47969).
Eli Zaretskii [Tue, 25 May 2021 19:30:24 +0000 (22:30 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Lars Ingebrigtsen [Tue, 25 May 2021 19:29:24 +0000 (21:29 +0200)]
Restore `dired-do-create-files' return value
* lisp/dired-aux.el (dired-do-create-files): Preserve the return
value from `dired-create-files', which is apparently an
undocumented feature used by dired-aux-tests.el (dired-test-bug30624).
Eli Zaretskii [Tue, 25 May 2021 19:29:11 +0000 (22:29 +0300)]
Fix documentation of a recent change
* src/process.c (syms_of_process) <process-prioritize-lower-fds>:
Doc fix.
* etc/NEWS: Reword the entry for 'process-prioritize-lower-fds'.
Lars Ingebrigtsen [Tue, 25 May 2021 19:22:22 +0000 (21:22 +0200)]
Update help-tests.el after minibuffer map change
Miha Rihtaršič [Tue, 25 May 2021 19:01:58 +0000 (21:01 +0200)]
Try to not prioritise reading from lower file descriptors
* src/process.c (wait_reading_process_output): When looping through
fds, continue from where we left off.
(syms_of_process): Vprocess_prioritize_lower_fds: New variable
(bug#48118).
Glenn Morris [Tue, 25 May 2021 18:05:47 +0000 (11:05 -0700)]
* doc/misc/cc-mode.texi: Remove hand-written node pointers (bug#48402).
Stefan Monnier [Tue, 25 May 2021 17:38:05 +0000 (13:38 -0400)]
* lisp/emacs-lisp/byte-opt.el: Make the build more reproducible
(byte-compile-inline-expand): When inlining code from another file,
always inline the byte-code version of the function.
(byte-optimize--pcase): Simplify edebug spec.
Philipp Stephani [Tue, 25 May 2021 12:03:03 +0000 (14:03 +0200)]
Allow years in a copyright range to be separated by en dashes.
* lisp/emacs-lisp/copyright.el (copyright-regexp)
(copyright-years-regexp, copyright-update-year)
(copyright-fix-years): Also include en dash.
* test/lisp/emacs-lisp/copyright-tests.el (copyright-tests--data): New
test cases.
Jonas Bernoulli [Tue, 25 May 2021 11:45:32 +0000 (13:45 +0200)]
* lisp/transient.el: Update to package version 0.3.4.
Gregory Heytings [Tue, 25 May 2021 08:39:48 +0000 (10:39 +0200)]
Further improvements to completion-list-mode-map
* doc/emacs/mini.texi (Completion Commands): Mention the change,
and mention the 'n' and 'p' keys bound to 'next-completion' and
'previous-completion'. (bug#47699).
* lisp/minibuffer.el (minibuffer-local-completion-map): Change the
M-g key to M-g M-c.
* lisp/simple.el (completion-list-mode-map): Change the M-g key to
M-g M-c.
(read-expression-map): Bind M-g M-c to
read-expression-switch-to-completions.
(read-expression-switch-to-completions): New function.
Gregory Heytings [Tue, 25 May 2021 04:38:15 +0000 (06:38 +0200)]
Improve completion-list-mode-map
* doc/emacs/mini.texi (Completion Commands): Mention it.
* lisp/minibuffer.el (minibuffer-local-completion-map): Add the M-g key
for switch-to-completion (bug#47699).
* lisp/simple.el (completion-list-mode-map): Make special-mode-map its
parent, unbind the 'g' revert key, add the 'n' and 'p' keys for
next-completion and previous-completion, and the M-g key for
switch-to-minibuffer.
(switch-to-minibuffer): New function.
Gregory Heytings [Tue, 25 May 2021 04:22:36 +0000 (06:22 +0200)]
Use correct face when pulsing in CEDET
* lisp/cedet/pulse.el (pulse-momentary-highlight-overlay): Use
pulse-highlight-face, not pulse-highlight-start-face (bug#47810).
Gregory Heytings [Tue, 25 May 2021 04:21:03 +0000 (06:21 +0200)]
Consider all user-defined bitmaps in gui_init_fringe()
* src/fringe.c (gui_init_fringe): Consider user-defined bitmaps
that override default ones (bug#47832).
Gregory Heytings [Tue, 25 May 2021 04:18:29 +0000 (06:18 +0200)]
Fix infloop in Modula-2 mode
* lisp/progmodes/modula2.el (m2-smie-refine-colon): Stop looping
when point does not move with forward-sexp (Bug#48011).
Amin Bandali [Tue, 25 May 2021 03:25:27 +0000 (23:25 -0400)]
* lisp/erc/erc-services.el: Fix newly-added Libera.Chat entry (bug#48529).
Gregory Heytings [Mon, 24 May 2021 22:24:57 +0000 (00:24 +0200)]
Fix bug when moving directories to trash
* lisp/files.el (move-file-to-trash): Pass the correct dir-flag to
make-temp-file so that a directory is created when a directory is
being trashed (Bug#47960).
Corwin Brust [Mon, 24 May 2021 21:36:01 +0000 (23:36 +0200)]
Add Libera.chat to `erc-nickserv-alist'
* lisp/erc/erc-services.el (erc-nickserv-alist): Add support for
the Libera chat.
Copyright-paperwork-exempt: yes
Glenn Morris [Sun, 23 May 2021 23:03:03 +0000 (16:03 -0700)]
Tweak c-mode bug reporting address
* lisp/progmodes/cc-mode.el (c-mode-help-address):
Switch to bug-gnu-emacs. This is an alias for the previous
submit@debbugs address, except that if no Package header can be found,
as often seems to happen for cc-mode reports, debbugs will assign
the report to the "emacs" package rather than to "debbugs.gnu.org".
Philipp Stephani [Mon, 17 May 2021 19:59:57 +0000 (21:59 +0200)]
Fix find invocation for macOS (Bug#48471).
* lisp/progmodes/project.el (project--files-in-directory): Instead of
appending a slash (which doesn't work well with macOS find), remove
trailing slash and pass -H instead.
Michael Albinus [Sun, 23 May 2021 10:34:36 +0000 (12:34 +0200)]
Adapt tramp-archive-autoload-file-name-handler
* lisp/net/tramp-archive.el (tramp-archive-autoload-file-name-handler):
Bind `default-directory' to safe value.
Juri Linkov [Sat, 22 May 2021 20:52:19 +0000 (23:52 +0300)]
* src/editfns.c (Finsert_char): Add docstring reference to read-char-by-name.
Tassilo Horn [Sat, 22 May 2021 17:06:57 +0000 (19:06 +0200)]
Document bug-reference setup for 3rd-party packages
* doc/emacs/maintaining.texi (Bug Reference): Add section explaining
adding support for third-party packages.
* lisp/progmodes/bug-reference.el (bug-reference-maybe-setup-from-vc)
(bug-reference-maybe-setup-from-mail)
(bug-reference-maybe-setup-from-irc): Rename from
bug-reference--maybe-setup-from-*, i.e., un-privatize them because
they are advertised in the docs now.
Glenn Morris [Sat, 22 May 2021 16:19:01 +0000 (09:19 -0700)]
Merge from origin/emacs-27
30e5d93ee1 (origin/emacs-27) Improve documentation of display tables
8804ac857b * src/buffer.c (syms_of_buffer) <ctl-arrow>: Doc fix. (Bu...
Glenn Morris [Sat, 22 May 2021 16:17:56 +0000 (09:17 -0700)]
* doc/emacs/maintaining.texi (Bug Reference): Fix cross refs.
"First argument to cross-reference may not be empty." (makeinfo 4).
Michael Albinus [Sat, 22 May 2021 15:51:07 +0000 (17:51 +0200)]
Fix bug#48476
* lisp/net/tramp-archive.el (tramp-archive-autoload-file-name-handler):
Add implementation.
* lisp/net/tramp-integration.el (tramp-rename-files)
(tramp-rename-these-files): Declare them.
* lisp/net/tramp.el (tramp-autoload-file-name-handler):
Load tramp-archive.el if needed. (Bug#48476)
* test/lisp/net/tramp-archive-tests.el (tramp-archive-test45-auto-load):
Extend test.
Use #' syntax for function symbols.
Stefan Monnier [Sat, 22 May 2021 14:21:59 +0000 (10:21 -0400)]
* lisp/emacs-lisp/subr-x.el (if-let*, if-let): Use looser Edebug spec
This makes the same spec work both for `if-let` and `when-let`.
(when-let*, and-let*, when-let): Simplify accordingly.
Basil L. Contovounesios [Sat, 22 May 2021 12:22:29 +0000 (13:22 +0100)]
Fix native-comp-async-report-warnings-errors :type
* doc/lispref/compile.texi (Native-Compilation Variables): Document
'silent' alternative of native-comp-async-report-warnings-errors.
* lisp/emacs-lisp/comp.el
(native-comp-async-report-warnings-errors): Fix quoting in
:type expression (bug#48586).
Philipp Stephani [Sat, 22 May 2021 11:29:50 +0000 (13:29 +0200)]
Give 'when-let' and 'when-let*' their own Edebug specification.
The Edebug specification of 'if-let' and 'if-let*' doesn't work if the
body is empty. While that's a pathological case, it's not wrong per
se, and could arguably happen due to macro expansion.
* lisp/emacs-lisp/subr-x.el (when-let*, when-let): Don't reuse Edebug
specification from 'if-let*' and 'if-let'.
Philipp Stephani [Sat, 22 May 2021 11:17:00 +0000 (13:17 +0200)]
* lisp/emacs-lisp/cl-macs.el (cl-loop): Add missing 'when' to spec
Tassilo Horn [Fri, 21 May 2021 21:11:43 +0000 (23:11 +0200)]
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.
Eric Abrahamsen [Fri, 21 May 2021 20:35:38 +0000 (13:35 -0700)]
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.
Basil L. Contovounesios [Fri, 21 May 2021 19:49:32 +0000 (20:49 +0100)]
; * etc/NEWS: Fix typo in last change.
Juri Linkov [Fri, 21 May 2021 18:31:48 +0000 (21:31 +0300)]
* lisp/dired-aux.el (dired-do-revert-buffer): New defcustom (bug#48456).
(dired-do-create-files): Use it.
Juri Linkov [Fri, 21 May 2021 18:18:09 +0000 (21:18 +0300)]
* lisp/simple.el (yank-from-kill-ring): Fix kill-ring-yank-pointer (bug#48478)
Michael Albinus [Fri, 21 May 2021 18:03:31 +0000 (20:03 +0200)]
; * test/infra/gitlab-ci.yml: Fix it, again.
Michael Albinus [Fri, 21 May 2021 18:00:55 +0000 (20:00 +0200)]
; * test/infra/gitlab-ci.yml: Fix previous commit
Michael Albinus [Fri, 21 May 2021 17:33:42 +0000 (19:33 +0200)]
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.
Eli Zaretskii [Fri, 21 May 2021 10:37:48 +0000 (13:37 +0300)]
Avoid byte-compiler warning during bootstrap
* lisp/isearch.el (multi-isearch-switch-buffer): Avoid
byte-compiler warning.
Michael Albinus [Fri, 21 May 2021 07:43:04 +0000 (09:43 +0200)]
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.
Eli Zaretskii [Fri, 21 May 2021 06:51:17 +0000 (09:51 +0300)]
Improve documentation of display tables
* doc/lispref/display.texi (Display Tables): Add a cross-reference
to the next section.
Andrea Corallo [Fri, 21 May 2021 06:44:55 +0000 (08:44 +0200)]
* 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'.
Eli Zaretskii [Fri, 21 May 2021 06:37:47 +0000 (09:37 +0300)]
* src/buffer.c (syms_of_buffer) <ctl-arrow>: Doc fix. (Bug#48539)
Tassilo Horn [Thu, 20 May 2021 19:30:10 +0000 (21:30 +0200)]
; Improve new bug-reference manual section
Juri Linkov [Thu, 20 May 2021 18:37:04 +0000 (21:37 +0300)]
* 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.
Juri Linkov [Thu, 20 May 2021 18:23:01 +0000 (21:23 +0300)]
* lisp/vc/diff-mode.el (diff-hunk-text): Handle better "\ No newline at end".
Juri Linkov [Thu, 20 May 2021 18:02:27 +0000 (21:02 +0300)]
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.
Juri Linkov [Thu, 20 May 2021 17:51:32 +0000 (20:51 +0300)]
* 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
Daniel Mendler [Tue, 11 May 2021 07:08:05 +0000 (09:08 +0200)]
(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`.
Daniel Mendler [Sun, 2 May 2021 14:19:42 +0000 (16:19 +0200)]
(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.
Daniel Mendler [Sun, 2 May 2021 13:50:08 +0000 (15:50 +0200)]
(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`.
Daniel Mendler [Fri, 30 Apr 2021 06:40:59 +0000 (08:40 +0200)]
(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.
Daniel Mendler [Sun, 25 Apr 2021 11:07:29 +0000 (13:07 +0200)]
(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.
Michael Albinus [Thu, 20 May 2021 12:33:43 +0000 (14:33 +0200)]
* doc/emacs/maintaining.texi (Bug Reference): Add debbugs-browse-mode.
Eli Zaretskii [Thu, 20 May 2021 10:02:29 +0000 (13:02 +0300)]
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
Eli Zaretskii [Thu, 20 May 2021 09:01:40 +0000 (12:01 +0300)]
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.
Eli Zaretskii [Thu, 20 May 2021 08:44:54 +0000 (11:44 +0300)]
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>.
Eli Zaretskii [Thu, 20 May 2021 08:26:00 +0000 (11:26 +0300)]
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)
Eli Zaretskii [Thu, 20 May 2021 06:55:28 +0000 (09:55 +0300)]
; * src/fns.c (Fline_number_at_pos): Fix doc string and comments.
Tassilo Horn [Wed, 19 May 2021 19:21:03 +0000 (21:21 +0200)]
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.
Juri Linkov [Wed, 19 May 2021 16:30:33 +0000 (19:30 +0300)]
* lisp/simple.el (yank-from-kill-ring-rotate): New defcustom (bug#48478).
(read-from-kill-ring, yank-from-kill-ring): Use it.
Eli Zaretskii [Wed, 19 May 2021 16:01:07 +0000 (19:01 +0300)]
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)
Eli Zaretskii [Wed, 19 May 2021 15:56:27 +0000 (18:56 +0300)]
* lisp/startup.el (command-line-1): Avoid byte-compiler warning.
Glenn Morris [Wed, 19 May 2021 15:28:35 +0000 (08:28 -0700)]
Fix custom type of recent dired-aux additions
* lisp/dired-aux.el (dired-compress-file-default-suffix)
(dired-compress-directory-default-suffix): Fix :type.
Stefan Monnier [Wed, 19 May 2021 15:19:10 +0000 (11:19 -0400)]
* lisp/kmacro.el (kmacro-lambda-form): Fix bug#48523
Re-add `counter` and `format` arguments, since they are used in
`insert-kbd-macro`.
Eli Zaretskii [Wed, 19 May 2021 14:42:50 +0000 (17:42 +0300)]
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.
Ingo Lohmar [Wed, 19 May 2021 13:02:33 +0000 (15:02 +0200)]
* lisp/progmodes/sql.el: `sql-postgres-statement-starters' defcustom
Recognize common table expression as statement start in Postgres.
Mauro Aranda [Wed, 19 May 2021 12:57:46 +0000 (09:57 -0300)]
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.
Martin Rudalics [Wed, 19 May 2021 07:17:37 +0000 (09:17 +0200)]
Fix recently introduced misbehavior of `quit-restore-window' (Bug#48493)
* lisp/window.el (quit-restore-window): Unconditionally call
`switch-to-prev-buffer' (Bug#48493).
Stefan Monnier [Wed, 19 May 2021 00:30:08 +0000 (20:30 -0400)]
* lisp/progmodes/js.el (js--make-framework-matcher): Use a closure
Stefan Monnier [Wed, 19 May 2021 00:21:51 +0000 (20:21 -0400)]
* lisp/progmodes/gud.el (gud-tooltip-tips): Use proper closures
Also prefer #' to quote function names.
(jdb): Fix $ => \'.
Stefan Monnier [Tue, 18 May 2021 23:54:38 +0000 (19:54 -0400)]
* lisp/org/org-timer.el (org-timer--run-countdown-timer): Use closures
Stefan Monnier [Tue, 18 May 2021 23:51:26 +0000 (19:51 -0400)]
* 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.
Stefan Monnier [Tue, 18 May 2021 23:36:54 +0000 (19:36 -0400)]
* lisp/org/org-colview.el (org-columns-map): Use proper closures
Also prefer #' to quote function names.
(org-columns-map): Use derived-mode-p.
Stefan Monnier [Tue, 18 May 2021 23:32:35 +0000 (19:32 -0400)]
* lisp/org/org-clock.el (org-clock-get-table-data): Use proper closures
Also, prefer #' to quote function names
Stefan Monnier [Tue, 18 May 2021 23:23:54 +0000 (19:23 -0400)]
* lisp/net/sieve-manage.el (sieve-sasl-auth): Use proper closures
Stefan Monnier [Tue, 18 May 2021 23:15:04 +0000 (19:15 -0400)]
* lisp/net/shr.el (shr-image-displayer): Use proper closures
Stefan Monnier [Tue, 18 May 2021 23:12:11 +0000 (19:12 -0400)]
* lisp/net/imap.el (imap-mailbox-close): Use proper closures
Also, remove redundant `:group` args, and prefer #' to quote function names
Stefan Monnier [Tue, 18 May 2021 23:06:54 +0000 (19:06 -0400)]
* lisp/net/eudc.el (eudc-menu): Use proper closures
Stefan Monnier [Tue, 18 May 2021 23:05:29 +0000 (19:05 -0400)]
* 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.
Stefan Monnier [Tue, 18 May 2021 23:03:06 +0000 (19:03 -0400)]
* lisp/misearch.el (multi-isearch-push-state): Use proper closures
Stefan Monnier [Tue, 18 May 2021 23:01:49 +0000 (19:01 -0400)]
* lisp/menu-bar.el: Avoid `(lambda
(menu-bar-buffer-vector, menu-bar-update-buffers): Use proper closures.
Stefan Monnier [Tue, 18 May 2021 22:13:28 +0000 (18:13 -0400)]
* lisp/info.el (Info-isearch-push-state): Use proper closures
Stefan Monnier [Tue, 18 May 2021 22:11:08 +0000 (18:11 -0400)]
* lisp/imenu.el (imenu--create-keymap): Use proper closures
Stefan Monnier [Tue, 18 May 2021 22:06:15 +0000 (18:06 -0400)]
* lisp/find-dired.el (find-dired): Use a proper closure