summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* * lisp/vc/log-edit.el (log-edit-diff-function): Give non-nil defaultStefan Monnier2021-04-111-4/+3
| | | | (log-edit-show-diff): Simplify accordingly.
* * lisp/progmodes/bug-reference.el: Avoid old-style `define-minor-mode`Stefan Monnier2021-04-111-6/+0
| | | | (bug-reference-mode, bug-reference-prog-mode): Remove redundant args.
* * src/emacs.c (load_seccomp): Consistently check for nonzero resultPhilipp Stephani2021-04-111-1/+1
|
* Add a variant of the Seccomp filter file that allows 'execve'.Philipp Stephani2021-04-115-7/+75
| | | | | | | | | | | | | | | | 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.
* * lib-src/seccomp-filter.c (main): Also allow O_NOFOLLOW.Philipp Stephani2021-04-111-2/+2
|
* Don't attempt to generate Seccomp filter file in Linux < 4.14.Philipp Stephani2021-04-111-0/+6
| | | | | | | | 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.
* Seccomp filter: allow reading the current time (Bug#47708).Philipp Stephani2021-04-111-0/+7
| | | | * lib-src/seccomp-filter.c (main): Allow reading the current time.
* Fix check for timer_getoverrunAndreas Schwab2021-04-111-1/+7
| | | | | * configure.ac (timer_getoverrun): Move check after gnulib checks and use $LIB_TIMER_TIME during check.
* Use pkg-config to check for libseccomp.Philipp Stephani2021-04-112-7/+10
| | | | | | | | | | 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.
* Remove SCMP_FLTATR_CTL_LOG attribute from Seccomp filter.Philipp Stephani2021-04-111-1/+0
| | | | | | | 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.
* Only attempt to generate seccomp filter files on x86-64 systems.Philipp Stephani2021-04-111-2/+9
| | | | | | | | 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.
* ; * etc/NEWS: Minor copyedits.Eli Zaretskii2021-04-111-3/+3
|
* * lib-src/seccomp-filter.c: Print trailing newline.Philipp Stephani2021-04-111-1/+4
|
* * doc/lispref/elisp.texi (Top): Add missing entry.Stefan Kangas2021-04-111-0/+1
|
* Fix calculator-string-to-number yet again (bug#47694)Eli Barzilay2021-04-112-4/+56
| | | | | | | | | | * 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.)
* Fix typo in cconvMattias Engdegård2021-04-112-1/+8
| | | | | | * lisp/emacs-lisp/cconv.el (cconv-convert): Typo. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): Add test case.
* Add another check for the required header <linux/filter.h>.Philipp Stephani2021-04-112-3/+3
| | | | | * configure.ac: Also check for <linux/filter.h>. * src/emacs.c (SECCOMP_USABLE): Also check for <linux/filter.h>.
* Also check for needed seccomp macros.Philipp Stephani2021-04-112-7/+23
| | | | | | | | | 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.
* Fix handling of mouse clicks on tab-bar buttonsEli Zaretskii2021-04-111-137/+10
| | | | | | | | | | | | | | | | * 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)
* ; * lisp/net/shr.el (shr-insert-document): Fix last change.Eli Zaretskii2021-04-111-2/+3
|
* * lisp/net/shr.el (shr-insert-document): Explain why bidi-display-reorderingStefan Monnier2021-04-101-0/+5
|
* Add new icomplete-vertical-modeGregory Heytings2021-04-103-4/+54
| | | | | | | | | | | | | 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
* * lisp/misearch.el (multi-isearch-read-buffers): Fix last changeStefan Monnier2021-04-101-1/+1
| | | | These are not buffers but buffer names.
* * src/emacs.c (read_full): Add a few assertions.Philipp Stephani2021-04-101-0/+3
|
* * lisp/cus-dep.el: Use lexical-bindingStefan Monnier2021-04-101-3/+3
|
* * lisp/misearch.el: Use lexical-bindingStefan Monnier2021-04-101-14/+14
| | | | | (multi-isearch-read-buffers, multi-isearch-read-files): Replace `add-to-list` with `cl-pushnew` for use on a local variable.
* * src/emacs.c (load_seccomp): Add a useful assertion.Philipp Stephani2021-04-101-0/+1
|
* * src/emacs.c (load_seccomp): Fix condition.Philipp Stephani2021-04-101-1/+1
|
* * lisp/ps-bdf.el: Use lexical-bindingStefan Monnier2021-04-101-2/+2
|
* * lisp/informat.el: Use lexical-bindingStefan Monnier2021-04-101-2/+2
|
* * lisp/loadup.el: Use lexical-bindingStefan Monnier2021-04-101-9/+9
|
* * lisp/jka-compr.el: Use lexical-bindingStefan Monnier2021-04-101-14/+13
| | | | Prefer #' to quote function names.
* * etc/NEWS: Extend paragraph about &define form and backtrackingPhilipp Stephani2021-04-101-2/+5
|
* ; Fix copyright yearsGlenn Morris2021-04-101-1/+1
|
* Convert CC Mode to lexical binding in EmacsAlan Mackenzie2021-04-1013-51/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lisp/progmodes/cc-align.el, lisp/progmodes/cc-awk.el, 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-guess.el, lisp/progmodes/cc-langs.el, lisp/progmodes/cc-menus.el, lisp/progmodes/cc-mode.el, lisp/progmodes/cc-styles.el, lisp/progmodes/cc-subword.el, lisp/progmodes/cc-vars.el: Mark these files with a `lexical-binding' setting in line 1. lisp/progmodes/cc-align.el, lisp/progmodes/cc-engine.el, lisp/progmodes/cc-vars.el (c-syntactic-context, c-syntactic-element): Declare these as special variables. lisp/progmodes/cc-bytecomp.el (cc-bytecomp-debug-msg): prefix the parameter ARGS with a _, and remove an `ignore' call. lisp/progmodes/cc-cmds.el (c-where-wrt-brace-construct): Remove `kluge-start', an unused variable. (c-while-widening-to-decl-block): Add an extra parameter, which suppresses the generation of a setting of variable `where'. (c-defun-name-and-limits): Remove variable `where' from the function and use the new argument to the previous macro. lisp/progmodes/cc-engine.el (c-cache-to-parse-ps-state): Remove two unneeded variables, `last' and `intermediate'. lisp/progmodes/cc-fonts.el (c-font-lock-c++-using): Remove unused variable. lisp/progmodes/cc-langs.el (c-vsemi-status-unknown-p-fn): Replace the doc string with the more precise one from stand-alone CC Mode. lisp/progmodes/cc-styles.el (c-set-offset): Give the `ignored' parameter a leading _.
* Add a helper binary to create a basic Secure Computing filter.Philipp Stephani2021-04-107-0/+402
| | | | | | | | | | | | | | | | | | | | | | The binary uses the 'seccomp' helper library. The library isn't needed to load the generated Secure Computing filter. * configure.ac: Check for 'seccomp' header and library. * lib-src/seccomp-filter.c: New helper binary to generate a generic Secure Computing filter for GNU/Linux. * lib-src/Makefile.in (DONT_INSTALL): Add 'seccomp-filter' helper binary if possible. (all): Add Secure Computing filter file if possible. (seccomp-filter$(EXEEXT)): Compile helper binary. (seccomp-filter.bpf seccomp-filter.pfc): Generate filter files. * test/src/emacs-tests.el (emacs-tests/seccomp/allows-stdout) (emacs-tests/seccomp/forbids-subprocess): New unit tests. * test/Makefile.in (src/emacs-tests.log): Add dependency on the helper binary.
* * src/emacs.c (load_seccomp): Fix condition.Philipp Stephani2021-04-101-1/+1
|
* Read file in a loop if necessary.Philipp Stephani2021-04-101-11/+39
| | | | | | | This allows for short reads from 'emacs_read'. * src/emacs.c (read_full): New helper function. (load_seccomp): Use it.
* ; * etc/NEWS: Fix the wording of a recently added entry.Eli Zaretskii2021-04-101-8/+9
|
* Add support for --seccomp command-line option.Philipp Stephani2021-04-105-4/+314
| | | | | | | | | | | | | | | | | | | | | | | When passing this option on GNU/Linux, Emacs installs a Secure Computing kernel system call filter. See Bug#45198. * configure.ac: Check for seccomp header. * src/emacs.c (usage_message): Document --seccomp option. (emacs_seccomp): New wrapper for 'seccomp' syscall. (load_seccomp, maybe_load_seccomp): New helper functions. (main): Potentially load seccomp filters during startup. (standard_args): Add --seccomp option. * lisp/startup.el (command-line): Detect and ignore --seccomp option. * test/src/emacs-tests.el (emacs-tests/seccomp/absent-file) (emacs-tests/seccomp/empty-file) (emacs-tests/seccomp/file-too-large) (emacs-tests/seccomp/invalid-file-size): New unit tests. (emacs-tests--with-temp-file): New helper macro. * etc/NEWS: Document new --seccomp option.
* Edebug: Disable backtracking when hitting a &define keyword.Philipp Stephani2021-04-104-13/+43
| | | | | | | | | | | | | | | | | | | Edebug doesn't deal well with backtracking out of definitions, see Bug#41988. Rather than trying to support this rare situation (e.g. by implementing a multipass parser), prevent it by adding an implicit gate. * lisp/emacs-lisp/edebug.el (edebug--match-&-spec-op): Disable backtracking when hitting a &define keyword. * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-duplicate-&define): New unit test. (edebug-tests--duplicate-&define): New helper macro. * doc/lispref/edebug.texi (Backtracking): Mention &define in the list of constructs that disable backtracking. * etc/NEWS: Document new behavior.
* * lisp/gnus/nnagent.el: Fix spurious empty line at BOBStefan Monnier2021-04-101-1/+0
|
* * lisp/edmacro.el: Use lexical-bindingStefan Monnier2021-04-101-21/+15
| | | | (edmacro-finish-edit, edmacro-parse-keys): Use `match-string`.
* * lisp/files-x.el: Use lexical-bindingStefan Monnier2021-04-101-2/+2
|
* * lisp/ps-mule.el: Use lexical-bindingStefan Monnier2021-04-101-23/+23
| | | | (ps-mule-encode-header-string, ps-mule-begin-job): Use `pcase`.
* Autoload list-colors-display.Gregory Heytings2021-04-101-0/+1
| | | | | * lisp/facemenu.el (list-colors-display): Autoload, it is mentioned in (info "(emacs)Colors for Faces"), and to be generally available.
* Tramp: fix location of files on W32Michael Albinus2021-04-102-12/+30
| | | | | | * lisp/net/tramp.el: * lisp/net/tramp-sh.el: Use (eq system-type 'windows-nt) where appropriate. (tramp-completion-function-alist-ssh): Fix location of files on W32.
* Further fix of hostname completion on MS WindowsJim Porter2021-04-101-2/+15
| | | | | | | | | * lisp/net/tramp.el (tramp-completion-file-name-regexp-simplified) (tramp-completion-file-name-regexp-separate): Fix W32 hostname/method completion for simplified and separate syntaxes (same as the previous change to default syntax). Copyright-paperwork-exempt: yes
* Fail earlier if stale Flymake report functions calledJoão Távora2021-04-101-1/+4
| | | | | | | | | | If a Flymake backend calls a "stale" report function, flymake--handle-report might be called for a backend function that is no longer in the flymake--backend-state hash table. This patch makes that erroneous situation slightly more explicit. * lisp/progmodes/flymake.el (flymake--handle-report): Improve error reporting.
* Don't stop when before space or closing parenDmitry Gutov2021-04-101-1/+1
| | | | | * lisp/progmodes/elisp-mode.el (elisp-completion-at-point): Don't stop when before space or closing paren (bug#47665).