1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00
Commit Graph

146372 Commits

Author SHA1 Message Date
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
Philipp Stephani
5537836288 * lib-src/seccomp-filter.c: Print trailing newline. 2021-04-11 16:03:08 +02:00
Stefan Kangas
dac5af2ba1 * doc/lispref/elisp.texi (Top): Add missing entry. 2021-04-11 14:24:04 +02:00
Eli Barzilay
686c366f8a Fix calculator-string-to-number yet again (bug#47694)
* lisp/calculator.el (calculator-string-to-number):
The last bugfix changed the code to just blindly replace ".e".  This
has some minor problems like making "-." parse as 0.0 instead of -0.0,
and ".1.e1" is parsed as 1 instead of 0.1.  Instead, replace the first
"." that is followed by a non-digit with ".0".  Since this has had
several problems over the years, add some tests too.  (Also, restore
the original if-indentation style.)
2021-04-11 14:00:09 +02:00
Mattias Engdegård
01a513bf0b Fix typo in cconv
* lisp/emacs-lisp/cconv.el (cconv-convert): Typo.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test case.
2021-04-11 12:41:21 +02:00
Philipp Stephani
0334fa0532 Add another check for the required header <linux/filter.h>.
* configure.ac: Also check for <linux/filter.h>.
* src/emacs.c (SECCOMP_USABLE): Also check for <linux/filter.h>.
2021-04-11 12:26:13 +02:00
Philipp Stephani
25937821bc Also check for needed seccomp macros.
It looks like these are not available on some versions of GNU/Linux,
breaking the build.

* configure.ac: Also check for needed seccomp macros.
* src/emacs.c (SECCOMP_USABLE): New macro.
(usage_message, main, standard_args): Use it.
2021-04-11 12:01:53 +02:00
Eli Zaretskii
3cf9e2a6e3 Fix handling of mouse clicks on tab-bar buttons
* src/xdisp.c (note_mouse_highlight): Don't attempt to highlight
tab-bar buttons.
(note_tab_bar_highlight): Function deleted: it had no effect on
display of tab-bar buttons.
(tab_bar_item_info): Mention all arguments in the commentary.
(get_tab_bar_item): Don't pay attention to mouse-highlight
information; instead, compare the button's index with the one
recorded in f->last_tab_bar_item.
(handle_tab_bar_click): Don't attempt to show tab-bar buttons in
pressed or released state: that isn't supported.  Determine
whether to generate a tab-bar button click based on DOWN_P
argument, not on mouse-highlight, which has no effect on tab-bar
display.  (Bug#47581)
2021-04-11 12:12:45 +03:00
Eli Zaretskii
0f494760d3 ; * lisp/net/shr.el (shr-insert-document): Fix last change. 2021-04-11 09:35:09 +03:00
Stefan Monnier
d55d07af70 * lisp/net/shr.el (shr-insert-document): Explain why bidi-display-reordering 2021-04-10 20:06:35 -04:00
Gregory Heytings
5761e9004a Add new icomplete-vertical-mode
Co-authored-by: João Távora <joaotavora@gmail.com>

* lisp/icomplete.el (icomplete-completions): Consider icomplete-vertical-mode.
(icomplete-vertical-mode-minibuffer-map): New map.
(icomplete--vertical-minibuffer-setup): New helper.
(icomplete-vertical-mode): New minor mode.

* doc/emacs/buffers.texi (Icomplete): Mention icomplete-vertical-mode.

* etc/NEWS: Mention icomplete-vertical-mode
2021-04-10 23:51:05 +01:00
Stefan Monnier
ffd12743bd * lisp/misearch.el (multi-isearch-read-buffers): Fix last change
These are not buffers but buffer names.
2021-04-10 18:07:37 -04:00
Philipp Stephani
d6aa50f74c * src/emacs.c (read_full): Add a few assertions. 2021-04-10 23:41:52 +02:00
Stefan Monnier
56e8d969f5 * lisp/cus-dep.el: Use lexical-binding 2021-04-10 17:11:58 -04:00
Stefan Monnier
26e1d854d1 * lisp/misearch.el: Use lexical-binding
(multi-isearch-read-buffers, multi-isearch-read-files):
Replace `add-to-list` with `cl-pushnew` for use on a local variable.
2021-04-10 17:08:11 -04:00
Philipp Stephani
2db03e3e53 * src/emacs.c (load_seccomp): Add a useful assertion. 2021-04-10 23:04:04 +02:00
Philipp Stephani
496a46b32d * src/emacs.c (load_seccomp): Fix condition. 2021-04-10 23:04:04 +02:00
Stefan Monnier
8b92897633 * lisp/ps-bdf.el: Use lexical-binding 2021-04-10 17:03:11 -04:00
Stefan Monnier
edf8497ce3 * lisp/informat.el: Use lexical-binding 2021-04-10 17:01:01 -04:00
Stefan Monnier
5ad3893eba * lisp/loadup.el: Use lexical-binding 2021-04-10 16:58:11 -04:00
Stefan Monnier
cb6b810dfd * lisp/jka-compr.el: Use lexical-binding
Prefer #' to quote function names.
2021-04-10 16:25:28 -04:00