]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years ago(completion-all-sorted-completions): Additional alphabetical sorting
Daniel Mendler [Mon, 19 Apr 2021 20:13:55 +0000 (22:13 +0200)]
(completion-all-sorted-completions): Additional alphabetical sorting

Even in the cases where it does not make much visible difference,
it brings the benefit of making the result deterministic.

* minibuffer.el (minibuffer--sort-by-length-alpha): New function.
(minibuffer--sort-by-position): New function extracted from
`completion-all-sorted-completions`.
(completion-all-sorted-completions): Use use them.

3 years agominibuffer.el: Use completion--message instead of minibuffer-message
Daniel Mendler [Mon, 19 Apr 2021 13:40:00 +0000 (15:40 +0200)]
minibuffer.el: Use completion--message instead of minibuffer-message

* minibuffer.el: Use completion--message consistently for the messages
"Incomplete", "Sole completion" and "No completions".

3 years agoSeccomp filter: deal with arch_prctl(ARCH_CET_STATUS, ...).
Philipp Stephani [Mon, 19 Apr 2021 19:10:20 +0000 (21:10 +0200)]
Seccomp filter: deal with arch_prctl(ARCH_CET_STATUS, ...).

The dynamic loader of GNU libc 2.28 uses this system call to
initialize CPU information, see
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/x86/cpu-features.c;hb=glibc-2.28#l28.
Simulating an older kernel by returning EINVAL should be the most
harmless rule here.

The ARCH_CET_STATUS symbol isn't yet exposed by the kernel headers;
see the FIXME at the top of
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/x86/include/asm/prctl.h;hb=glibc-2.28.

* lib-src/seccomp-filter.c (ARCH_CET_STATUS): Define if not
already present.  Inline the value because there doesn't seem to
be a header file exporting this constant yet.
(main): Make ARCH_CET_STATUS subfunction of arch_prctl return EINVAL.

3 years ago* lisp/minibuffer.el (completion-all-sorted-completions): Fix last change
Stefan Monnier [Mon, 19 Apr 2021 19:10:05 +0000 (15:10 -0400)]
* lisp/minibuffer.el (completion-all-sorted-completions): Fix last change

3 years ago* lisp/minibuffer.el (minibuffer--sort-by-key): New function
Stefan Monnier [Mon, 19 Apr 2021 18:57:41 +0000 (14:57 -0400)]
* lisp/minibuffer.el (minibuffer--sort-by-key): New function

(completion-all-sorted-completions): Use it.

3 years agocompletion-all-sorted-completions: Fix sorting performance bug
Daniel Mendler [Mon, 19 Apr 2021 06:43:41 +0000 (08:43 +0200)]
completion-all-sorted-completions: Fix sorting performance bug

* lisp/minibuffer.el (completion-all-sorted-completions): Use hash
table for sorting by history position, O(m+n*log(n)) instead of
O(m*n*log(n)) with history length `m` and candidate length `n`.

3 years agocompleting-read: If HIST is the symbol `t', history is not recorded.
Daniel Mendler [Mon, 19 Apr 2021 06:20:50 +0000 (08:20 +0200)]
completing-read: If HIST is the symbol `t', history is not recorded.

* lisp/minibuffer.el (completion-all-sorted-completions): Check if
`minibuffer-history-variable` is `t`
* src/minibuf.c (completing-read): Update docstring
* doc/lispref/minibuf.texi: Update documentation of
`read-from-minibuffer` and `completing-read`

3 years ago; Normalize and add missing first and last lines
Stefan Kangas [Mon, 19 Apr 2021 10:21:01 +0000 (12:21 +0200)]
; Normalize and add missing first and last lines

3 years agoAdd Tramp recompilation
Michael Albinus [Mon, 19 Apr 2021 09:52:48 +0000 (11:52 +0200)]
Add Tramp recompilation

* doc/misc/tramp.texi (Frequently Asked Questions): Refer to GNU
ELPA Tramp README.

* lisp/net/tramp-cmds.el (tramp-recompile-elpa-command-completion-p)
(tramp-recompile-elpa): New defuns.  Add property `completion-predicate'.

3 years agoDon't hard-code "~/.emacs.d/" in two more places
Stefan Kangas [Mon, 19 Apr 2021 07:50:13 +0000 (09:50 +0200)]
Don't hard-code "~/.emacs.d/" in two more places

* lisp/gnus/gnus-group.el (gnus-read-ephemeral-bug-group):
* lisp/progmodes/js.el (js-js-tmpdir): Don't hard-code
"~/.emacs.d/".

3 years agoDon't hard-code "~/.emacs.d/" in rcirc.el
Philip K [Sun, 18 Apr 2021 18:41:37 +0000 (20:41 +0200)]
Don't hard-code "~/.emacs.d/" in rcirc.el

* lisp/net/rcirc.el (rcirc-log-directory): Use
locate-user-emacs-file.  (Bug#47880)

3 years ago; * test/lisp/progmodes/xref-tests.el: Add footer.
Philipp Stephani [Sun, 18 Apr 2021 20:05:59 +0000 (22:05 +0200)]
; * test/lisp/progmodes/xref-tests.el: Add footer.

3 years agoFactor out a helper macro to create a temporary directory.
Philipp Stephani [Sun, 18 Apr 2021 19:57:59 +0000 (21:57 +0200)]
Factor out a helper macro to create a temporary directory.

This is a useful abstraction, and saves a few levels of indentation in
the test body.

* test/lisp/progmodes/project-tests.el
(project-tests--with-temporary-directory): New helper macro.
(project/quoted-directory): Use it.

3 years agoAdd quoted filename support to 'project-find-regexp' (Bug#47799).
Philipp Stephani [Sun, 18 Apr 2021 19:47:53 +0000 (21:47 +0200)]
Add quoted filename support to 'project-find-regexp' (Bug#47799).

This is only a band-aid; it would be better to fix xref.el to work
with quoted filenames as well.

* lisp/progmodes/project.el (project--find-regexp-in-files): Unquote
filenames before passing them to 'xref-matches-in-files'.
* test/lisp/progmodes/project-tests.el (project/quoted-directory):
Also test 'project-find-regexp'.

3 years agoExtend project test so that 'project-current' works.
Philipp Stephani [Sun, 18 Apr 2021 19:46:10 +0000 (21:46 +0200)]
Extend project test so that 'project-current' works.

* test/lisp/progmodes/project-tests.el (project/quoted-directory):
Verify that 'project-current' returns the right project.

3 years agoSkip a unit test that requires an external program if necessary.
Philipp Stephani [Sun, 18 Apr 2021 19:43:17 +0000 (21:43 +0200)]
Skip a unit test that requires an external program if necessary.

* test/lisp/progmodes/project-tests.el (project/quoted-directory):
Skip if the 'find' program isn't available.  The 'project-files'
function uses 'find' to obtain the list of project files.

3 years agoUpdate modus-themes to version 1.3.2
Protesilaos Stavrou [Sun, 18 Apr 2021 03:30:12 +0000 (06:30 +0300)]
Update modus-themes to version 1.3.2

* doc/misc/modus-themes.org (COPYING): Reword to match the phrasing of
other manuals that are distributed with Emacs.

(Install from the archives)
(Sample configuration for use-package)
(Option for more bold constructs)
(Option for more slanted constructs)
(Option for syntax highlighting)
(Option for no font mixing)
(Option for links)
(Option for command prompt styles)
(Option for completion framework aesthetics)
(Option for fringe visibility)
(Option for language checkers)
(Option for org-habit graph styles)
(Option for line numbers (display-line-numbers-mode))
(Option for parenthesis matching (show-paren-mode))
(Option for diff buffer looks)
(Option for scaled headings)
(Option for variable-pitch font in UI elements)
(Option for variable-pitch font in headings)
(Case-by-case face specs using the themes' palette (DIY))
(Face specs at scale using the themes' palette (DIY))
(Font configurations for Org and others (DIY))
(Load theme depending on time of day): Minor markup changes for better
texi output.

(Option for mode line presentation): Document new possible values for
'modus-themes-mode-line'.

(Option for line highlighting (hl-line-mode)): Document new
'modus-themes-hl-line' variable, which supersedes
'modus-themes-intense-hl-line'.

(Option for active region): Document new possible values for
'modus-themes-region'.

(Option for org-mode block styles): Cite variables that affect
fontification.

(Option for the headings' overall style): Include the option of a
per-level nil value.

(Remap face with local value (DIY))
(Override colors (DIY)): Add sections.

(Full support for packages or face groups): Document newly supported packages

(Note for dimmer.el)
(Note for EWW and Elfeed fonts (SHR fonts)): Add notes.

(Acknowledgements): Add names of new contributors.

(GNU Free Documentation License): Add tags for html export.

* etc/themes/modus-operandi-theme.el (File)
* etc/themes/modus-vivendi-theme.el (File): Update to version 1.3.1

* etc/themes/modus-themes.el (modus-themes-operandi-colors)
(modus-themes-vivendi-colors)
(modus-theme-subtle-red)
(modus-themes-subtle-red)
(modus-theme-subtle-green)
(modus-themes-subtle-green)
(modus-theme-subtle-yellow)
(modus-themes-subtle-yellow)
(modus-theme-subtle-blue)
(modus-themes-subtle-blue)
(modus-theme-subtle-magenta)
(modus-themes-subtle-magenta)
(modus-theme-subtle-cyan)
(modus-themes-subtle-cyan)
(modus-theme-subtle-neutral)
(modus-themes-subtle-neutral)
(modus-theme-intense-red)
(modus-themes-intense-red)
(modus-theme-intense-green)
(modus-themes-intense-green)
(modus-theme-intense-yellow)
(modus-themes-intense-yellow)
(modus-theme-intense-blue)
(modus-themes-intense-blue)
(modus-theme-intense-magenta)
(modus-themes-intense-magenta)
(modus-theme-intense-cyan)
(modus-themes-intense-cyan)
(modus-theme-intense-neutral)
(modus-themes-intense-neutral)
(modus-theme-refine-red)
(modus-themes-refine-red)
(modus-theme-refine-green)
(modus-themes-refine-green)
(modus-theme-refine-yellow)
(modus-themes-refine-yellow)
(modus-theme-refine-blue)
(modus-themes-refine-blue)
(modus-theme-refine-magenta)
(modus-themes-refine-magenta)
(modus-theme-refine-cyan)
(modus-themes-refine-cyan)
(modus-theme-active-red)
(modus-themes-active-red)
(modus-theme-active-green)
(modus-themes-active-green)
(modus-theme-active-yellow)
(modus-themes-active-yellow)
(modus-theme-active-blue)
(modus-themes-active-blue)
(modus-theme-active-magenta)
(modus-themes-active-magenta)
(modus-theme-active-cyan)
(modus-themes-active-cyan)
(modus-theme-fringe-red)
(modus-themes-fringe-red)
(modus-theme-fringe-green)
(modus-themes-fringe-green)
(modus-theme-fringe-yellow)
(modus-themes-fringe-yellow)
(modus-theme-fringe-blue)
(modus-themes-fringe-blue)
(modus-theme-fringe-magenta)
(modus-themes-fringe-magenta)
(modus-theme-fringe-cyan)
(modus-themes-fringe-cyan)
(modus-theme-nuanced-red)
(modus-theme-nuanced-green)
(modus-theme-nuanced-yellow)
(modus-theme-nuanced-blue)
(modus-theme-nuanced-magenta)
(modus-theme-nuanced-cyan)
(modus-theme-special-cold)
(modus-theme-special-mild)
(modus-theme-special-warm)
(modus-theme-special-calm)
(modus-theme-diff-added)
(modus-theme-diff-changed)
(modus-theme-diff-removed)
(modus-theme-diff-refine-added)
(modus-theme-diff-refine-changed)
(modus-theme-diff-refine-removed)
(modus-theme-diff-focus-added)
(modus-theme-diff-focus-changed)
(modus-theme-diff-focus-removed)
(modus-theme-diff-heading)
(modus-theme-pseudo-header)
(modus-theme-mark-alt)
(modus-theme-mark-del)
(modus-theme-mark-sel)
(modus-theme-mark-symbol)
(modus-theme-heading-1)
(modus-theme-heading-2)
(modus-theme-heading-3)
(modus-theme-heading-4)
(modus-theme-heading-5)
(modus-theme-heading-6)
(modus-theme-heading-7)
(modus-theme-heading-8)
(modus-theme-hl-line)
(modus-theme-bold)
(modus-theme-slant)
(modus-theme-variable-pitch)
(modus-theme-graph-red-0)
(modus-theme-graph-red-1)
(modus-theme-graph-green-0)
(modus-theme-graph-green-1)
(modus-theme-graph-yellow-0)
(modus-theme-graph-yellow-1)
(modus-theme-graph-blue-0)
(modus-theme-graph-blue-1)
(modus-theme-graph-magenta-0)
(modus-theme-graph-magenta-1)
(modus-theme-graph-cyan-0)
(modus-theme-graph-cyan-1)
(modus-theme-lang-note)
(modus-theme-lang-warning)
(modus-theme-lang-error): Rename all internal faces.

(modus-themes-headings)
(modus-themes-fringes)
(modus-themes-lang-checkers)
(modus-themes-org-blocks)
(modus-themes-org-habit)
(modus-themes-mode-line)
(modus-themes-diffs)
(modus-themes-completions)
(modus-themes-prompts)
(modus-themes-intense-hl-line)
(modus-themes-hl-line)
(modus-themes-paren-match)
(modus-themes-syntax)
(modus-themes-links)
(modus-themes-region): Update defcustom.

(modus-themes--fringe):
(modus-themes--headings-choice):
(modus-themes--prompt):
(modus-themes--org-block-delim):
(modus-themes--mode-line-attrs):
(modus-themes--link):
(modus-themes--region):
(modus-themes--hl-line): Adjustments to internal functions.

(modus-themes-faces): Update faces.
(modus-themes-custom-variables): Update custom variables.

3 years agoFix Seccomp filter on CentOS 8.3 (Bug#47828).
Philipp Stephani [Sun, 18 Apr 2021 08:33:41 +0000 (10:33 +0200)]
Fix Seccomp filter on CentOS 8.3 (Bug#47828).

* lib-src/seccomp-filter.c (main): mmap: Also allow MAP_SHARED.

3 years ago* lisp/misearch.el (multi-isearch-pop-state): Doc fix.
Stefan Kangas [Sun, 18 Apr 2021 08:03:35 +0000 (10:03 +0200)]
* lisp/misearch.el (multi-isearch-pop-state): Doc fix.

3 years agoAvoid selecting tooltip windows and frames (Bug#47207)
Martin Rudalics [Sun, 18 Apr 2021 07:51:32 +0000 (09:51 +0200)]
Avoid selecting tooltip windows and frames (Bug#47207)

* src/frame.c (do_switch_frame): Don't switch to a tooltip frame.
(Fselect_frame): Do not select a tooltip frame.
* src/w32fns.c (Fx_show_tip):
* src/xfns.c (Fx_show_tip): Set the tooltip window's
`no-other-window' parameter so `other-window' will skip it.
* src/window.c (select_window): Do not select a tooltip window.
(candidate_window_p): Make sure MINIBUF is live.
(decode_next_window_args): Make sure that W's frame's minibuffer
window is live before including it.
(Qno_other_window): New symbol.

3 years ago* lisp/emacs-lisp/debug.el (debug): Fix (bug#47588)
Stefan Monnier [Sun, 18 Apr 2021 05:03:43 +0000 (01:03 -0400)]
* lisp/emacs-lisp/debug.el (debug): Fix (bug#47588)

Don't bind `load-read-function` to nil but to its actual default value.
Actually, I'm not sure it's worth the trouble rebinding this var, but
if we do, then we should bind it to a valid value rather than to nil.

* lisp/emacs-lisp/edebug.el (edebug--eval-defun): Re-install our advice
if needed.

3 years agoAttempt to print some debugging information on Seccomp failures.
Philipp Stephani [Sat, 17 Apr 2021 19:06:11 +0000 (21:06 +0200)]
Attempt to print some debugging information on Seccomp failures.

Try to search the audit log as well as recent core dumps.

* test/src/emacs-tests.el (emacs-tests--seccomp-debug): New helper
function.
(emacs-tests/seccomp/allows-stdout)
(emacs-tests/seccomp/forbids-subprocess)
(emacs-tests/bwrap/allows-stdout): Use it.

3 years agoMake stderr in Tramp's make-process more robust
Michael Albinus [Sat, 17 Apr 2021 14:39:14 +0000 (16:39 +0200)]
Make stderr in Tramp's make-process more robust

* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Wrap about
error in inserting stderr file.

* lisp/net/tramp.el (tramp-handle-make-process): Fix docstring.

3 years ago* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Tweak further
Stefan Monnier [Sat, 17 Apr 2021 13:57:01 +0000 (09:57 -0400)]
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Tweak further

Suggested by Lars Ingebrigtsen <larsi@gnus.org>.

3 years agoFix :scale's affect on :width and :height (bug#47819)
Alan Third [Fri, 16 Apr 2021 18:12:23 +0000 (19:12 +0100)]
Fix :scale's affect on :width and :height (bug#47819)

* src/image.c (compute_image_size): Multiply width and height values
by scale.

3 years agoDon't allow quitting while rebuilding Vwindow_list (Bug#47244)
Martin Rudalics [Sat, 17 Apr 2021 07:50:01 +0000 (09:50 +0200)]
Don't allow quitting while rebuilding Vwindow_list (Bug#47244)

* src/window.c (window_list, next_window, window_list_1): Don't
allow quitting in Fnconc and Fmemq (Bug#47244).

3 years ago* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Improve `C-h f` output
Stefan Monnier [Sat, 17 Apr 2021 03:40:51 +0000 (23:40 -0400)]
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Improve `C-h f` output

Suggested by Michael Heerdegen <michael_heerdegen@web.de>.

3 years agoCleanup in em-extra.el
Stefan Kangas [Fri, 16 Apr 2021 19:29:36 +0000 (21:29 +0200)]
Cleanup in em-extra.el

* lisp/eshell/em-xtra.el (cl-lib): Require.
(pcomplete, compile): Remove unnecessary requires.
(eshell/substitute, eshell/count, eshell/mismatch, eshell/union)
(eshell/intersection, eshell/set-difference)
(eshell/set-exclusive-or): Use cl-lib.  Doc fixes.
(eshell/ff, eshell/gf, eshell/expr): Quote function symbols as such.
(eshell/expr): Assume 'calc-eval' is always available.

3 years agoCheck minibuffer windows are live windows, rather than assuming it
Alan Mackenzie [Fri, 16 Apr 2021 19:34:00 +0000 (19:34 +0000)]
Check minibuffer windows are live windows, rather than assuming it

This partly fixes bug #47207.

* src/minibuf.c (choose_minibuf_frame, move_minibuffers_onto_frame)
(read_minibuf (twice), read_minibuf_unwind): Before using a frame's
->minibuffer_window field, check it is valid with WINDOW_LIVE_P.
(choose_minibuf_frame): Remove the emacs_abort for a null minibuffer.

3 years agoMerge from origin/emacs-27
Glenn Morris [Fri, 16 Apr 2021 14:50:20 +0000 (07:50 -0700)]
Merge from origin/emacs-27

eedad01b4b (origin/emacs-27) Fix typos in manuals
24d214652e Fix description of momentary message display

3 years ago; Fix typos: emacs lisp -> Emacs Lisp
Stefan Kangas [Fri, 16 Apr 2021 12:35:25 +0000 (14:35 +0200)]
; Fix typos: emacs lisp -> Emacs Lisp

3 years ago; Remove some useless comments
Stefan Kangas [Fri, 16 Apr 2021 12:28:10 +0000 (14:28 +0200)]
; Remove some useless comments

3 years ago; Grammar fixes
Robert Pluim [Fri, 16 Apr 2021 07:56:41 +0000 (09:56 +0200)]
; Grammar fixes

* doc/lispref/display.texi (Size of Displayed Text): Grammar fix.

* etc/NEWS: Grammar fix.

3 years ago; Fix typos
Robert Pluim [Tue, 13 Apr 2021 16:11:42 +0000 (18:11 +0200)]
; Fix typos

* doc/lispref/display.texi (SVG Images): Fix typos.

3 years agoImprove docstring of 'frame-scale-factor'
Robert Pluim [Tue, 13 Apr 2021 16:07:26 +0000 (18:07 +0200)]
Improve docstring of 'frame-scale-factor'

* src/frame.c (Fframe_scale_factor): Explain what happens when the
FRAME argument is nil.

3 years agoImprove quoting of directory names in project/xref
Dmitry Gutov [Fri, 16 Apr 2021 00:52:44 +0000 (03:52 +0300)]
Improve quoting of directory names in project/xref

* lisp/progmodes/project.el (project--files-in-directory):
Quote LOCALDIR a bit earlier, to affect
xref--find-ignores-arguments as well (bug#47799).

* lisp/progmodes/xref.el (xref-matches-in-directory):
Quote the dir passed to xref--rgrep-command.

3 years agoproject--files-in-directory: Handle errors reported by 'find'
Dmitry Gutov [Fri, 16 Apr 2021 00:38:23 +0000 (03:38 +0300)]
project--files-in-directory: Handle errors reported by 'find'

* lisp/progmodes/project.el (project--files-in-directory):
Handle errors reported by 'find' (bug#47799).

3 years agoFix 'garbage-collect-maybe'
Eli Zaretskii [Thu, 15 Apr 2021 19:00:19 +0000 (22:00 +0300)]
Fix 'garbage-collect-maybe'

* src/alloc.c (Fgarbage_collect_maybe): No longer interactive.
(Bug#47805)

3 years agoAllow use of em in image spec sizes
Alan Third [Mon, 12 Apr 2021 19:30:12 +0000 (20:30 +0100)]
Allow use of em in image spec sizes

* src/image.c (image_get_dimension): New function.
(compute_image_size): Use image_get_dimension to set the sizes, and
pass in the image struct instead of just the spec.
(image_set_transform):
(imagemagick_load_image):
(svg_load_image): Use the image instead of the spec in compute_image_size.
(syms_of_image): Add 'em' as a symbol.

3 years agoImprove project support for quoted directory names (Bug#47799)
Philipp Stephani [Thu, 15 Apr 2021 16:41:04 +0000 (18:41 +0200)]
Improve project support for quoted directory names (Bug#47799)

* lisp/progmodes/project.el (project--files-in-directory): Unquote
directory name before passing it to 'find'.
(project--remote-file-names): Requote local filenames if the original
directory is quoted.
* test/lisp/progmodes/project-tests.el (project/quoted-directory): New
unit test.

3 years ago* lisp/emacs-lisp/bindat.el: Allow non-fixed size of `strz`
Stefan Monnier [Thu, 15 Apr 2021 15:27:52 +0000 (11:27 -0400)]
* lisp/emacs-lisp/bindat.el: Allow non-fixed size of `strz`

(bindat--unpack-strz): Allow `len` to be nil.
(bindat--pack-strz): New function.
(bindat--type) <strz>: Make `len` arg optional.
(bindat-type): Adjust debug spec and docstring accordingly.

* doc/lispref/processes.texi (Bindat Types): Adjust accordingly.

3 years agoAdd condition-case success handler (bug#47677)
Mattias Engdegård [Wed, 7 Apr 2021 09:31:07 +0000 (11:31 +0200)]
Add condition-case success handler (bug#47677)

Allow a condition-case handler on the form (:success BODY) to be
specified as the success continuation of the protected form, with
the specified variable bound to its result.

* src/eval.c (Fcondition_case): Update the doc string.
(internal_lisp_condition_case): Implement in interpreter.
(syms_of_eval): Defsym :success.
* lisp/emacs-lisp/bytecomp.el (byte-compile-condition-case):
Implement in byte-compiler.
* lisp/emacs-lisp/cl-macs.el (cl--self-tco): Allow self-TCO
from success handler.
* doc/lispref/control.texi (Handling Errors): Update manual.
* etc/NEWS: Announce.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases)
(bytecomp-condition-case-success):
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--labels):
Add test cases.

3 years agoCC Mode: Put debug specs inside declare forms. Add missing debug specs.
Alan Mackenzie [Thu, 15 Apr 2021 10:11:20 +0000 (10:11 +0000)]
CC Mode: Put debug specs inside declare forms.  Add missing debug specs.

* lisp/progmodes/cc-bytecomp.el, lisp/progmodes/cc-cmds.el,
lisp/progmodes/cc-defs.el, lisp/progmodes/cc-engine.el,
lisp/progmodes/cc-fonts.el, lisp/progmodes/cc-langs.el,
lisp/progmodes/cc-mode.el: Change the explicit def-edebug-spec for many macros
into a (declare (debug ...) ..) form.  Add such forms to macros which were
previously lacking def-edebug-spec forms.

3 years agorepeat-echo-mode-line-string doesn't need risky-local-variable to keep props
Juri Linkov [Wed, 14 Apr 2021 20:05:43 +0000 (23:05 +0300)]
repeat-echo-mode-line-string doesn't need risky-local-variable to keep props

(bug#47566)

3 years agoJava Mode: Change the syntax of character @ to prefix syntax
Filipp Gunbin [Wed, 14 Apr 2021 19:27:00 +0000 (19:27 +0000)]
Java Mode: Change the syntax of character @ to prefix syntax

lisp/progmodes/cc-langs.el (c-make-mode-syntax-table): Change the syntax of @
as indicated.

3 years ago* lisp/isearch.el (isearch-mouse-2): Let-bind isearch-mode to nil (bug#47755)
Juri Linkov [Wed, 14 Apr 2021 18:35:06 +0000 (21:35 +0300)]
* lisp/isearch.el (isearch-mouse-2): Let-bind isearch-mode to nil (bug#47755)

3 years agoDon't error out when selection data is unavailable (bug#47642)
Juri Linkov [Wed, 14 Apr 2021 18:22:55 +0000 (21:22 +0300)]
Don't error out when selection data is unavailable (bug#47642)

* src/xselect.c (x_get_window_property_as_lisp_data):
Display a message and return nil when data is not available.

3 years ago* lisp/progmodes/gud.el (gud-repeat-map): New variable (bug#47688).
Juri Linkov [Wed, 14 Apr 2021 18:11:45 +0000 (21:11 +0300)]
* lisp/progmodes/gud.el (gud-repeat-map): New variable (bug#47688).

(gud-gdb): Populate gud-repeat-map with repeating keys.

3 years ago* lisp/repeat.el: Add option to indicate repeat-mode in mode-line (bug#47566)
Juri Linkov [Wed, 14 Apr 2021 18:10:00 +0000 (21:10 +0300)]
* lisp/repeat.el: Add option to indicate repeat-mode in mode-line (bug#47566)

* lisp/repeat.el (repeat-echo-function): Rename from repeat-mode-echo.
Add choice repeat-echo-mode-line.
(repeat-in-progress): New variable.
(repeat-post-hook): Call repeat-echo-function with nil arg
at the end of repeating sequence.
(repeat-echo-message-string): New function with body from repeat-post-hook.
(repeat-echo-message): Rename from repeat-mode-message.
(repeat-echo-mode-line-string): New variable.
(repeat-echo-mode-line): New function.

3 years ago; Fix a couple of recent typos.
Basil L. Contovounesios [Wed, 14 Apr 2021 11:41:19 +0000 (12:41 +0100)]
; Fix a couple of recent typos.

3 years agoRearrange argument handling in Tramp scp calls.
Michael Albinus [Wed, 14 Apr 2021 11:25:36 +0000 (13:25 +0200)]
Rearrange argument handling in Tramp scp calls.

* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
Use `start-process' instead of `start-process-shell-command'.
(tramp-make-copy-program-file-name): Do not quote `localname'.

* test/lisp/net/tramp-tests.el (tramp-method-out-of-band-p): Declare.
(tramp--test-windows-nt-and-batch-p)
(tramp--test-windows-nt-and-pscp-psftp-p): Remove, and also all callees.
(tramp--test-windows-nt-and-out-of-band-p)
(tramp--test-windows-nt-and-scp-p): New defuns.
(tramp-test17-dired-with-wildcards)
(tramp-test40-special-characters)
(tramp-test40-special-characters-with-stat)
(tramp-test40-special-characters-with-perl)
(tramp-test40-special-characters-with-ls, tramp-test41-utf8)
(tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl)
(tramp-test41-utf8-with-ls): Use them.

3 years agoAdd two optional arguments to 'string-width'
Eli Zaretskii [Wed, 14 Apr 2021 08:47:55 +0000 (11:47 +0300)]
Add two optional arguments to 'string-width'

* src/character.c (Fstring_width, lisp_string_width): Accept two
optional arguments FROM and TO, to indicate the substring to be
considered.
(Fstring_width): Add caveats in the doc string about display
features ignored by the function.  (Bug#47712)
* src/character.h (lisp_string_width): Update prototype.
* src/editfns.c (styled_format): Adjust call of lisp_string_width
to its changed signature.

* test/src/character-tests.el (character-test-string-width): New
file with tests for 'string-width'.

* doc/lispref/display.texi (Size of Displayed Text): Document
caveats of using 'string-width'.

* etc/NEWS: Announce the change.

3 years ago* src/xdisp.c (wset_update_mode_line): Move from `src/window.c`
Stefan Monnier [Wed, 14 Apr 2021 03:55:47 +0000 (23:55 -0400)]
* src/xdisp.c (wset_update_mode_line): Move from `src/window.c`

Move that function next to its siblings.  Also simplify it, since
after careful analysis it is now clear that the frame's title's update
is already handled elsewhere (in `prepare_menu_bars` and `redisplay_window`)
so we just need to make sure the `redisplay` bit is set.

* src/window.c (wset_update_mode_line): Move to `src/xdisp.c`.
* src/window.h (wset_update_mode_line): Declare.

3 years ago* lisp/nxml/xmltok.el (xmltok-defregexp): Don't quote lambda
Stefan Monnier [Wed, 14 Apr 2021 03:34:35 +0000 (23:34 -0400)]
* lisp/nxml/xmltok.el (xmltok-defregexp): Don't quote lambda

3 years ago* lisp/emacs-lisp/eieio-core.el (list-of): Don't quote lambda
Stefan Monnier [Wed, 14 Apr 2021 03:28:04 +0000 (23:28 -0400)]
* lisp/emacs-lisp/eieio-core.el (list-of): Don't quote lambda

3 years ago* doc/lispref/keymaps.texi (Translation Keymaps): Fix small misprint
Filipp Gunbin [Tue, 13 Apr 2021 17:07:20 +0000 (20:07 +0300)]
* doc/lispref/keymaps.texi (Translation Keymaps): Fix small misprint

3 years ago* doc/lispref/processes.texi: Fix small misprint
Filipp Gunbin [Tue, 13 Apr 2021 16:54:17 +0000 (19:54 +0300)]
* doc/lispref/processes.texi: Fix small misprint

3 years agoImprovements to message-syntax-checks docs and options
Eric Abrahamsen [Sat, 13 Mar 2021 22:25:47 +0000 (14:25 -0800)]
Improvements to message-syntax-checks docs and options

* doc/misc/message.texi: Move the manual entry from the "News Headers"
section to the "Message Headers" section, as it is generally
applicable, not just to News.
* lisp/gnus/message.el (message-syntax-checks): Add an explicit alist
type specifying the valid options; point to the manual for more
information.

3 years ago* lisp/textmodes/two-column.el: Address FIXME
Stefan Monnier [Tue, 13 Apr 2021 13:59:23 +0000 (09:59 -0400)]
* lisp/textmodes/two-column.el: Address FIXME

(2C-associate-buffer): Move minibuffer interactive to the `interactive` spec.

3 years ago* lisp/textmodes/paragraphs.el (multiple-lines): Remove mistaken declaration
Stefan Monnier [Tue, 13 Apr 2021 13:47:46 +0000 (09:47 -0400)]
* lisp/textmodes/paragraphs.el (multiple-lines): Remove mistaken declaration

(forward-paragraph): Remove unused var `multiple-lines`.

3 years agoResurrect mouse-highlight of close buttons on tab-bar
Eli Zaretskii [Tue, 13 Apr 2021 13:40:42 +0000 (16:40 +0300)]
Resurrect mouse-highlight of close buttons on tab-bar

* src/w32term.c (w32_draw_image_relief): Support tab-bar drawing
with relief as xterm.c does.

* src/xdisp.c (handle_tab_bar_click): Access the mouse-highlight
info.  Call show_mouse_face to show the button in the pressed or
the released state, according to value of DOWN_P.
(note_tab_bar_highlight): Function added back.
(note_mouse_highlight): Call note_tab_bar_highlight when the mouse
pointer is in the tab-bar window.
(show_mouse_face): Return immediately if mouse_face_window is not
set up in HLINFO.  This avoids rare assertion violations.

3 years agoFix typos in manuals
Eli Zaretskii [Tue, 13 Apr 2021 12:30:02 +0000 (15:30 +0300)]
Fix typos in manuals

* doc/misc/eshell.texi (Completion):
* doc/lispref/objects.texi (Mutability): Fix typos.  (Bug#47738)

3 years ago* lisp/comint.el: Add `font-lock-face` to `rear-nonsticky`
Stefan Monnier [Tue, 13 Apr 2021 02:49:48 +0000 (22:49 -0400)]
* lisp/comint.el: Add `font-lock-face` to `rear-nonsticky`

(comint--prompt-rear-nonsticky): New const.
(comint-send-input, comint-output-filter): Use it.

3 years agoDon't version-control generated file `grammat-wy.el`
Stefan Monnier [Tue, 13 Apr 2021 01:55:50 +0000 (21:55 -0400)]
Don't version-control generated file `grammat-wy.el`

This file is needed for CEDET's bootstrap, tho, so we now keep a copy of it
under version control in `gram-wy-boot.el`, very much like we do with
the `ldefs-boot.el` copy of `loaddefs.el`.

* lisp/cedet/semantic/grm-wy-boot.el: Rename from
`lisp/cedet/semantic/grammar-wy.el`.

* lisp/cedet/semantic/grammar.el: Load `grm-wy-boot.el` if
`grammar-wy.el` hasn't been generated yet.

* admin/update_autogen: Also refresh `grm-wy-boot.el`.

* admin/grammars/Makefile.in (WISENT): Add `grammar-wy.el` to the
generated files.

* .gitignore: Add `grammar-wy.el`.

3 years ago* lisp/minibuffer.el (completion-table-with-quoting): Fix bug#47678
Stefan Monnier [Mon, 12 Apr 2021 23:23:45 +0000 (19:23 -0400)]
* lisp/minibuffer.el (completion-table-with-quoting): Fix bug#47678

3 years ago* lisp/progmodes/verilog-mode.el (vl-memory): Add missing defvar.
Wilson Snyder [Mon, 12 Apr 2021 17:36:05 +0000 (13:36 -0400)]
* lisp/progmodes/verilog-mode.el (vl-memory): Add missing defvar.

3 years ago* lisp/emacs-lisp/smie.el: Fix URL. Remove redundant `:group` args
Stefan Monnier [Mon, 12 Apr 2021 17:01:06 +0000 (13:01 -0400)]
* lisp/emacs-lisp/smie.el: Fix URL.  Remove redundant `:group` args

(smie-indent-forward-token): Improve error message.
(smie--funcall): New function.
(smie-indent-calculate): Use it.

3 years ago* lisp/emacs-lisp/memory-report.el (memory-report--object-size-1): Simplify
Stefan Monnier [Mon, 12 Apr 2021 16:55:52 +0000 (12:55 -0400)]
* lisp/emacs-lisp/memory-report.el (memory-report--object-size-1): Simplify

3 years ago* lisp/emacs-lisp/float-sup.el (pi): Actually mark it as obsolete
Stefan Monnier [Mon, 12 Apr 2021 16:53:53 +0000 (12:53 -0400)]
* lisp/emacs-lisp/float-sup.el (pi): Actually mark it as obsolete

3 years ago* lisp/emacs-lisp/edebug.el (edebug--frame): Move docstring where it belongs
Stefan Monnier [Mon, 12 Apr 2021 16:51:28 +0000 (12:51 -0400)]
* lisp/emacs-lisp/edebug.el (edebug--frame): Move docstring where it belongs

3 years ago* lisp/vt-control.el: Avoid `called-interactively-p`
Stefan Monnier [Mon, 12 Apr 2021 16:49:36 +0000 (12:49 -0400)]
* lisp/vt-control.el: Avoid `called-interactively-p`

(vt-keypad-on, vt-keypad-off): Use the `tell` arg instead.
(vt-numlock): Add `tell` arg.

3 years ago* lisp/files.el (file-modes-number-to-symbolic): Add `filetype` arg.
Stefan Monnier [Mon, 12 Apr 2021 16:46:47 +0000 (12:46 -0400)]
* lisp/files.el (file-modes-number-to-symbolic): Add `filetype` arg.

* lisp/tar-mode.el (tar-header-block-summarize): Use it.
(tar-grind-file-mode): Declare obsolete.

3 years ago* lisp/frame.el (delete-other-frames): Add universal prefix `iconify` arg
Stefan Monnier [Mon, 12 Apr 2021 16:32:07 +0000 (12:32 -0400)]
* lisp/frame.el (delete-other-frames): Add universal prefix `iconify` arg

(frame--current-backround-mode): New function,
extracted from `frame-set-background-mode`.  Use `color-dark-p`.
(frame-set-background-mode): Use it.

3 years ago* lisp/repeat.el (repeat-mode-echo): New defcustom.
Juri Linkov [Mon, 12 Apr 2021 16:14:45 +0000 (19:14 +0300)]
* lisp/repeat.el (repeat-mode-echo): New defcustom.

(repeat-post-hook): Use it.
(repeat-mode-message): New function (bug#47566).
(repeat-post-hook): Use real-this-command instead of this-command
to handle e.g. rectangle-exchange-point-and-mark remapped to
exchange-point-and-mark (bug#47688).

3 years ago* lisp/dynamic-setting.el: Add missing footer
Stefan Monnier [Mon, 12 Apr 2021 15:54:10 +0000 (11:54 -0400)]
* lisp/dynamic-setting.el: Add missing footer

3 years ago* lisp/comint.el (comint-strip-ctrl-m): Avoid `called-interactively-p`
Stefan Monnier [Mon, 12 Apr 2021 15:53:25 +0000 (11:53 -0400)]
* lisp/comint.el (comint-strip-ctrl-m): Avoid `called-interactively-p`

3 years ago* lisp/strokes.el (strokes-mode): Fix typo in previous.
Glenn Morris [Mon, 12 Apr 2021 15:08:29 +0000 (08:08 -0700)]
* lisp/strokes.el (strokes-mode): Fix typo in previous.

3 years ago(define-minor-mode): Warn about use of pre-Emacs-21 style args
Stefan Monnier [Mon, 12 Apr 2021 15:08:19 +0000 (11:08 -0400)]
(define-minor-mode): Warn about use of pre-Emacs-21 style args

* lisp/emacs-lisp/easy-mmode.el (define-minor-mode):
Use `advertised-calling-convention` to avoid promoting the old
style arguments.  Emit a wanring when old-style arguments are used.
Massage the docstring accordingly.
* doc/lispref/modes.texi (Defining Minor Modes): Document the keyword
arguments rather than the old-style positional arguments.

3 years ago* lisp/progmodes/vhdl-mode.el: Add note about XEmacs compatibility
Stefan Monnier [Mon, 12 Apr 2021 14:46:07 +0000 (10:46 -0400)]
* lisp/progmodes/vhdl-mode.el: Add note about XEmacs compatibility

3 years agoAdjust verilog-mode to changes in the completion framework
Lars Ingebrigtsen [Mon, 12 Apr 2021 09:45:33 +0000 (11:45 +0200)]
Adjust verilog-mode to changes in the completion framework

* lisp/progmodes/verilog-mode.el (verilog-func-completion): Don't
bug out on `C-M-i' (which expects no point movement) (bug#47652).
(verilog-declaration-end): There may be no semicolons; don't bug out.

3 years agoFix python-shell-switch-to-shell redisplay bug
Shitikanth Kashyap [Mon, 12 Apr 2021 08:43:42 +0000 (10:43 +0200)]
Fix python-shell-switch-to-shell redisplay bug

* lisp/progmodes/python.el (python-shell-switch-to-shell):
Redisplay the switched-to window faster (bug#47679).

Copyright-paperwork-exempt: yes

3 years agoAdd command in eww to toggle images
Ralph Schleicher [Mon, 12 Apr 2021 08:31:46 +0000 (10:31 +0200)]
Add command in eww to toggle images

* lisp/net/eww.el (eww-toggle-images): New function.
(eww-mode-map): Add key binding and menu entry.
* lisp/net/shr.el (shr-inhibit-images): Make it customizable.
* doc/misc/eww.texi (Basics): Document eww-toggle-images.
Fix index entries for shr-use-fonts and shr-use-colors.
(Advanced): Document shr-inhibit-images
(bug#47705).

3 years agoFix args-out-of-range error in epa-file-insert-file-contents
Junya Takahashi [Mon, 12 Apr 2021 08:14:11 +0000 (10:14 +0200)]
Fix args-out-of-range error in epa-file-insert-file-contents

* lisp/epa-file.el (epa-file-insert-file-contents): Don't bug out
on a region that's longer than the file (bug#47718).

Copyright-paperwork-exempt: yes

3 years ago* lib-src/seccomp-filter.c: Add missing headers.
Philipp Stephani [Mon, 12 Apr 2021 07:20:51 +0000 (09:20 +0200)]
* lib-src/seccomp-filter.c: Add missing headers.

3 years agoGenerate Seccomp filters only if we have the necessary constants.
Philipp Stephani [Mon, 12 Apr 2021 07:15:59 +0000 (09:15 +0200)]
Generate Seccomp filters only if we have the necessary constants.

If we're missing SECCOMP_SET_MODE_FILTER, the seccomp-filter build
fails.  Reuse the existing HAVE_SECCOMP configuration variable, which
checks for these macros.

* configure.ac (HAVE_SECCOMP): Substitute in Makefile.in.
* lib-src/Makefile.in (HAVE_SECCOMP): New variable.
(SECCOMP_FILTER): Define only if HAVE_SECCOMP.

3 years ago* lisp/**/*.el: Avoid positional args to `define-minor-mode`
Stefan Monnier [Mon, 12 Apr 2021 03:47:14 +0000 (23:47 -0400)]
* lisp/**/*.el: Avoid positional args to `define-minor-mode`

Back in Emacs-21.1, `define-minor-mode` grew keywords arguments to
replace its old positional arguments.  Let's make sure we don't use
the old-style any more.

* lisp/org/ox-beamer.el (org-beamer-mode-map): Move initialization
into declaration.
(org-beamer-mode):
* lisp/textmodes/tildify.el (tildify-mode):
* lisp/textmodes/sgml-mode.el (html-autoview-mode):
* lisp/textmodes/rst.el (rst-minor-mode):
* lisp/textmodes/remember.el (remember-notes-mode):
* lisp/textmodes/ispell.el (ispell-minor-mode):
* lisp/tar-mode.el (tar-subfile-mode):
* lisp/strokes.el (strokes-mode):
* lisp/so-long.el (so-long-minor-mode):
* lisp/shell.el (shell-dirtrack-mode):
* lisp/scroll-all.el (scroll-all-mode):
* lisp/ruler-mode.el (ruler-mode):
* lisp/rect.el (rectangle-mark-mode):
* lisp/progmodes/sh-script.el (sh-electric-here-document-mode):
* lisp/outline.el (outline-minor-mode):
* lisp/org/org.el (org-cdlatex-mode):
* lisp/org/org-table.el (org-table-header-line-mode)
(org-table-follow-field-mode, orgtbl-mode):
* lisp/org/org-src.el (org-src-mode):
* lisp/org/org-list.el (org-list-checkbox-radio-mode):
* lisp/org/org-indent.el (org-indent-mode):
* lisp/org/org-capture.el (org-capture-mode):
* lisp/obsolete/pc-select.el (pc-selection-mode):
* lisp/obsolete/iswitchb.el (iswitchb-mode):
* lisp/net/rcirc.el (rcirc-omit-mode, rcirc-multiline-minor-mode)
(rcirc-track-minor-mode):
* lisp/net/goto-addr.el (goto-address-mode, goto-address-prog-mode):
* lisp/image-mode.el (image-minor-mode):
* lisp/ibuf-ext.el (ibuffer-auto-mode):
* lisp/gnus/gnus-cite.el (gnus-message-citation-mode):
* lisp/font-core.el (font-lock-mode):
* lisp/erc/erc.el (define-erc-module):
* lisp/erc/erc-track.el (erc-track-minor-mode):
* lisp/erc/erc-fill.el (erc-fill-mode):
* lisp/epa-mail.el (epa-mail-mode):
* lisp/emacs-lisp/checkdoc.el (checkdoc-minor-mode):
* lisp/dirtrack.el (dirtrack-mode, dirtrack-debug-mode):
* lisp/dired-aux.el (dired-isearch-filenames-mode):
* lisp/cedet/semantic/idle.el (semantic-idle-scheduler-mode):
* lisp/cedet/semantic/decorate/mode.el (semantic-decoration-mode):
* lisp/autoarg.el (autoarg-mode, autoarg-kp-mode):
* lisp/vc/pcvs.el (cvs-minor-mode):
Avoid old-style positional args to `define-minor-mode`.

3 years ago* lisp/gnus/message.el: Give non-nil defaults for function vars
Stefan Monnier [Mon, 12 Apr 2021 02:55:18 +0000 (22:55 -0400)]
* lisp/gnus/message.el: Give non-nil defaults for function vars

Also prefer #' to quote functions.

(message-send-rename-function, message-reply-to-function)
(message-wide-reply-to-function, message-followup-to-function):
Use a non-nil default value so it can be used with `add-function`.
(message-do-send-housekeeping): Tweak accordingly.
(message-get-reply-headers): Simplify by η-reduction.

3 years ago* lisp/eshell/esh-util.el: Require `seq`
Stefan Monnier [Mon, 12 Apr 2021 02:46:48 +0000 (22:46 -0400)]
* lisp/eshell/esh-util.el: Require `seq`

Also remove redundant `:group` args and tweak comment

3 years ago* lisp/eshell/esh-proc.el (eshell-kill-process-function): Use `remove-hook`
Stefan Monnier [Mon, 12 Apr 2021 02:42:36 +0000 (22:42 -0400)]
* lisp/eshell/esh-proc.el (eshell-kill-process-function): Use `remove-hook`

Also remove redundant `:group` args

3 years ago* lisp/mail/rmailmm.el (rmail-mime): Simplify interactive spec
Stefan Monnier [Mon, 12 Apr 2021 02:38:34 +0000 (22:38 -0400)]
* lisp/mail/rmailmm.el (rmail-mime): Simplify interactive spec

3 years ago* lisp/progmodes/sql.el (sql-mode-ansi-font-lock-keywords): Fix declaration
Stefan Monnier [Mon, 12 Apr 2021 02:34:58 +0000 (22:34 -0400)]
* lisp/progmodes/sql.el (sql-mode-ansi-font-lock-keywords): Fix declaration

3 years ago* lisp/vc/log-edit.el (log-edit-diff-function): Give non-nil default
Stefan Monnier [Mon, 12 Apr 2021 02:27:25 +0000 (22:27 -0400)]
* lisp/vc/log-edit.el (log-edit-diff-function): Give non-nil default

(log-edit-show-diff): Simplify accordingly.

3 years ago* lisp/progmodes/bug-reference.el: Avoid old-style `define-minor-mode`
Stefan Monnier [Sun, 11 Apr 2021 22:02:34 +0000 (18:02 -0400)]
* lisp/progmodes/bug-reference.el: Avoid old-style `define-minor-mode`

(bug-reference-mode, bug-reference-prog-mode): Remove redundant args.

3 years ago* src/emacs.c (load_seccomp): Consistently check for nonzero result
Philipp Stephani [Mon, 14 Dec 2020 20:25:11 +0000 (21:25 +0100)]
* src/emacs.c (load_seccomp): Consistently check for nonzero result

3 years agoAdd a variant of the Seccomp filter file that allows 'execve'.
Philipp Stephani [Sun, 11 Apr 2021 17:47:36 +0000 (19:47 +0200)]
Add a variant of the Seccomp filter file that allows 'execve'.

This is useful when starting Emacs with a Seccomp filter enabled,
e.g. using 'bwrap'.

* lib-src/seccomp-filter.c (main): Generate new Seccomp files.

* lib-src/Makefile.in (all)
(seccomp-filter.bpf seccomp-filter.pfc seccomp-filter-exec.bpf
seccomp-filter-exec.pfc): Generate new Seccomp files.

* .gitignore: Ignore new Seccomp files.

* test/src/emacs-tests.el (emacs-tests/bwrap/allows-stdout): New unit
test.

3 years ago* lib-src/seccomp-filter.c (main): Also allow O_NOFOLLOW.
Philipp Stephani [Sun, 11 Apr 2021 19:14:09 +0000 (21:14 +0200)]
* lib-src/seccomp-filter.c (main): Also allow O_NOFOLLOW.

3 years agoDon't attempt to generate Seccomp filter file in Linux < 4.14.
Philipp Stephani [Sun, 11 Apr 2021 17:35:39 +0000 (19:35 +0200)]
Don't attempt to generate Seccomp filter file in Linux < 4.14.

Only Linux 4.14 and later contain the required support for
SECCOMP_RET_KILL_PROCESS.

* lib-src/Makefile.in (SECCOMP_FILTER): Define only if we run at least
Linux 4.14.

3 years agoSeccomp filter: allow reading the current time (Bug#47708).
Philipp Stephani [Sun, 11 Apr 2021 17:42:44 +0000 (19:42 +0200)]
Seccomp filter: allow reading the current time (Bug#47708).

* lib-src/seccomp-filter.c (main): Allow reading the current time.

3 years agoFix check for timer_getoverrun
Andreas Schwab [Sun, 11 Apr 2021 15:23:22 +0000 (17:23 +0200)]
Fix check for timer_getoverrun

* configure.ac (timer_getoverrun): Move check after gnulib checks
and use $LIB_TIMER_TIME during check.

3 years agoUse pkg-config to check for libseccomp.
Philipp Stephani [Sun, 11 Apr 2021 14:50:29 +0000 (16:50 +0200)]
Use pkg-config to check for libseccomp.

We need at list version 2.4.0 of libseccomp for seccomp-filter.c to
build cleanly.

* configure.ac: Use pkg-config to check for libseccomp.
* lib-src/Makefile.in (HAVE_LIBSECCOMP, LIBSECCOMP_LIBS)
(LIBSECCOMP_CFLAGS): New variables.
(SECCOMP_FILTER, seccomp-filter$(EXEEXT)): Use them.