1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-14 09:39:42 +00:00
Commit Graph

147871 Commits

Author SHA1 Message Date
Ashish SHUKLA
f9c1008ced * lisp/emacs-lisp/comp.el (comp-effective-async-max-jobs): Handle BSD. 2021-04-16 11:13:09 +02:00
Andrea Corallo
686259e65a * configure.ac: Revert prev commit and fix native-comp NetBSD build. 2021-04-14 23:58:54 +02:00
Andrea Corallo
bfaa6df492 * configure.ac: Fix native-comp FreeBSD build. 2021-04-14 20:03:17 +02:00
Eli Zaretskii
95dd6bb080 Fix MS-Windows build following last change
* src/emacs.c (real_filename) [WINDOWSNT]: Fix off-by-one error
when allocating storage for a file name.
2021-04-14 17:28:19 +03:00
Andrea Corallo
0c1fc9d581 * Fix native-comp startup for symliked binary (bug#44128)
* src/emacs.c (real_filename): New function.
	(set_invocation_vars, load_pdump): Make use of.
2021-04-14 15:45:20 +02:00
Andrea Corallo
b064ddd3f6 Merge remote-tracking branch 'savannah/master' into native-comp 2021-04-13 12:06:23 +02:00
Andrea Corallo
2d23f19e7d * Fix two comp-cstr tests
* test/lisp/emacs-lisp/comp-cstr-tests.el
	(comp-cstr-typespec-tests-alist): Fix test 53 70.
2021-04-13 12:05:33 +02:00
Andrea Corallo
70adc28e97 * lisp/emacs-lisp/comp-cstr.el (comp-cstr-union-1-no-mem): (not null) => t. 2021-04-13 12:05:33 +02:00
Andrea Corallo
3062480309 * lisp/emacs-lisp/comp-cstr.el (comp-normalize-valset): Remove duplicates. 2021-04-13 12:05:33 +02:00
Stefan Monnier
6de79542e4 * lisp/comint.el: Add font-lock-face to rear-nonsticky
(comint--prompt-rear-nonsticky): New const.
(comint-send-input, comint-output-filter): Use it.
2021-04-12 22:49:48 -04:00
Stefan Monnier
214dfbfea0 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`.
2021-04-12 22:10:38 -04:00
Stefan Monnier
fc3caa45ef * lisp/minibuffer.el (completion-table-with-quoting): Fix bug#47678 2021-04-12 19:23:57 -04:00
Wilson Snyder
3cb0229d75 * lisp/progmodes/verilog-mode.el (vl-memory): Add missing defvar. 2021-04-12 13:36:05 -04:00
Stefan Monnier
f63da590fd * 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.
2021-04-12 13:01:06 -04:00
Stefan Monnier
c42dc493d1 * lisp/emacs-lisp/memory-report.el (memory-report--object-size-1): Simplify 2021-04-12 12:55:52 -04:00
Stefan Monnier
be75b08f82 * lisp/emacs-lisp/float-sup.el (pi): Actually mark it as obsolete 2021-04-12 12:53:53 -04:00
Stefan Monnier
0e2cf3b985 * lisp/emacs-lisp/edebug.el (edebug--frame): Move docstring where it belongs 2021-04-12 12:51:28 -04:00
Stefan Monnier
0df37f7416 * lisp/vt-control.el: Avoid called-interactively-p
(vt-keypad-on, vt-keypad-off): Use the `tell` arg instead.
(vt-numlock): Add `tell` arg.
2021-04-12 12:49:36 -04:00
Stefan Monnier
cf774fb8cc * 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.
2021-04-12 12:46:47 -04:00
Stefan Monnier
9a6523dfd6 * 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.
2021-04-12 12:32:58 -04:00
Juri Linkov
ed4b51962e * 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).
2021-04-12 19:14:45 +03:00
Stefan Monnier
632fd8079d * lisp/dynamic-setting.el: Add missing footer 2021-04-12 11:54:10 -04:00
Stefan Monnier
2ae53db722 * lisp/comint.el (comint-strip-ctrl-m): Avoid called-interactively-p 2021-04-12 11:53:25 -04:00
Glenn Morris
2ec25de5ea * lisp/strokes.el (strokes-mode): Fix typo in previous. 2021-04-12 08:35:27 -07:00
Stefan Monnier
6bec60ad31 (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.
2021-04-12 11:08:19 -04:00
Stefan Monnier
07671edbf0 * lisp/progmodes/vhdl-mode.el: Add note about XEmacs compatibility 2021-04-12 10:46:07 -04:00
Lars Ingebrigtsen
72db25ef54 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.
2021-04-12 11:45:33 +02:00
Shitikanth Kashyap
f2ab4cec7a 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
2021-04-12 10:43:42 +02:00
Ralph Schleicher
9dc28e1fca 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).
2021-04-12 10:31:46 +02:00
Junya Takahashi
636e9fd6a0 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
2021-04-12 10:14:48 +02:00
Philipp Stephani
104c5e3d57 * lib-src/seccomp-filter.c: Add missing headers. 2021-04-12 09:20:51 +02:00
Philipp Stephani
17d20bb3cb 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.
2021-04-12 09:15:59 +02:00
Stefan Monnier
c45bfd3c4a * 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`.
2021-04-11 23:47:14 -04:00
Stefan Monnier
ccfd6a975e * 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.
2021-04-11 22:55:18 -04:00
Stefan Monnier
a89da3f008 * lisp/eshell/esh-util.el: Require seq
Also remove redundant `:group` args and tweak comment
2021-04-11 22:46:48 -04:00
Stefan Monnier
24073c6479 * lisp/eshell/esh-proc.el (eshell-kill-process-function): Use remove-hook
Also remove redundant `:group` args
2021-04-11 22:42:36 -04:00
Stefan Monnier
954ce51d7a * lisp/mail/rmailmm.el (rmail-mime): Simplify interactive spec 2021-04-11 22:38:34 -04:00
Stefan Monnier
828e688bef * lisp/progmodes/sql.el (sql-mode-ansi-font-lock-keywords): Fix declaration 2021-04-11 22:34:58 -04:00
Stefan Monnier
28a5932e74 * lisp/vc/log-edit.el (log-edit-diff-function): Give non-nil default
(log-edit-show-diff): Simplify accordingly.
2021-04-11 22:27:25 -04:00
Stefan Monnier
4315a0bb26 * lisp/progmodes/bug-reference.el: Avoid old-style define-minor-mode
(bug-reference-mode, bug-reference-prog-mode): Remove redundant args.
2021-04-11 18:02:34 -04:00
Philipp Stephani
d37f0f3ac3 * src/emacs.c (load_seccomp): Consistently check for nonzero result 2021-04-11 22:15:03 +02:00
Philipp Stephani
c8d542fd59 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.
2021-04-11 21:19:09 +02:00
Philipp Stephani
cf0701eff0 * lib-src/seccomp-filter.c (main): Also allow O_NOFOLLOW. 2021-04-11 21:14:41 +02:00
Philipp Stephani
9a57897ea1 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.
2021-04-11 20:46:59 +02:00
Philipp Stephani
ea5ea09244 Seccomp filter: allow reading the current time (Bug#47708).
* lib-src/seccomp-filter.c (main): Allow reading the current time.
2021-04-11 19:50:45 +02:00
Andreas Schwab
751e801f90 Fix check for timer_getoverrun
* configure.ac (timer_getoverrun): Move check after gnulib checks
and use $LIB_TIMER_TIME during check.
2021-04-11 17:33:33 +02:00
Philipp Stephani
725fc96b70 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.
2021-04-11 16:50:29 +02:00
Philipp Stephani
d06c54db1b Remove SCMP_FLTATR_CTL_LOG attribute from Seccomp filter.
Whether or not we log failing syscalls isn't security-critical, and we
shouldn't care.

* lib-src/seccomp-filter.c (main): Remove log attribute.
2021-04-11 16:41:44 +02:00
Philipp Stephani
9dc26d4a8a Only attempt to generate seccomp filter files on x86-64 systems.
The seccomp filters are always architecture-specific, and
seccomp-filter.c right now only supports x86-64.

* lib-src/Makefile.in (SECCOMP_FILTER): New variable.
(DONT_INSTALL, all, seccomp-filter$(EXEEXT)): Use it.
2021-04-11 16:25:09 +02:00
Eli Zaretskii
6b3ca89cac ; * etc/NEWS: Minor copyedits. 2021-04-11 17:04:07 +03:00