1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00
Commit Graph

146611 Commits

Author SHA1 Message Date
Mattias Engdegård
a7cc19e5ff Don't erroneously declare mark as error-free
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns)
(side-effect-and-error-free-fns):
`mark` is side-effect-free but not error-free.
2021-04-21 22:52:17 +02:00
Juri Linkov
8c83231dae * lisp/isearch.el (isearch-forward-thing-at-point): New command (bug#39512).
(search-map): Bind "M-s M-." to isearch-forward-thing-at-point.
(isearch-forward-thing-at-point): New defcustom.
2021-04-21 23:39:27 +03:00
Juri Linkov
57805231b2 * lisp/thingatpt.el (region): Put property bounds-of-thing-at-point, bug#39512 2021-04-21 22:37:05 +03:00
Philipp Stephani
4c6d302da8 Remove a self-reference from the Emacs Lisp manual.
* doc/lispref/minibuf.texi (Programmed Completion): Remove
self-reference.
2021-04-21 20:54:32 +02:00
Stefan Kangas
cecfbf076e Improve error message for missing Info manual
* lisp/info.el (Info-find-file): Improve error message for missing
Info manual.  (Bug#46236)
Fix suggested by Eli Zaretskii <eliz@gnu.org>.
2021-04-21 18:20:00 +02:00
Philip K
3e727cf20b sgml-mode: Only set sgml-xml-mode if guessed to be an XML file
* lisp/textmodes/sgml-mode.el (sgml-mode): Don't override
sgml-xml-mode if the result of the guess is used as the buffer local
value.  (Bug#47877)
2021-04-21 15:27:19 +02:00
Eli Zaretskii
e2464c534e ; * lisp/mail/rmailmm.el (rmail-mime-set-bulk-data): Fix last change. 2021-04-21 15:29:49 +03:00
Stefan Monnier
9e5290aecf * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Fix bug#47925
In order to correctly detect the case of the "new style" with an empty body,
remove the old optional arguments `init-value`, `lighter`, and `keymap`,
so we can distinguish the "nil arg" from the "absent arg" cases.
2021-04-20 19:40:09 -04:00
Harald Jörg
c4c9a60c13 cperl-mode: Avoid abbrev expansion in variable names
* lisp/progmodes/cperl-mode.el (cperl-electric-else): Don't expand
scalar variables like '$continue' as keywords.  (Bug#47902)
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-hyperactive-electric-else): Verify that keywords are
expanded but variable names aren't.
2021-04-20 22:47:13 +02:00
Juri Linkov
ee5d6ae663 * lisp/wdired.el (wdired--self-insert): Put symbol property delete-selection. 2021-04-20 23:04:36 +03:00
Juri Linkov
741dc6a8e8 * lisp/isearch.el (isearch-post-command-hook): Revert ff796823e5 (bug#47894). 2021-04-20 23:00:26 +03:00
Jonas Bernoulli
afcdd4cab3
Add new library transient.el
* lisp/transient.el: New file.
2021-04-20 18:43:49 +02:00
Eli Zaretskii
2647b7b78c Fix Rmail-MIME size estimations
The quoted-printable estimation was obviously wrong: the size becomes
smaller when decoded, not larger...
* lisp/mail/rmailmm.el (rmail-mime-set-bulk-data): Fix estimations
of decoded MIME attachment.
2021-04-20 17:58:18 +03:00
Stefan Monnier
3e93c2e5ae * src/minibuf.c (Fread_no_blanks_input): Move to minibuffer.el
* src/keymap.c (syms_of_keymap):
* lisp/minibuffer.el (minibuffer-local-ns-map): Move declaration
to initialization.
(read-no-blanks-input): Move from `minibuf.c`.
2021-04-20 10:36:48 -04:00
Stefan Monnier
298f25ee1d * lisp/minibuffer.el (minibuffer-mode-map): Make it an alias
Avoid creating this "dummy" keymap by making it an alias of
the parent keymap of all minibuffer keymaps.
2021-04-20 09:36:26 -04:00
Stefan Monnier
efbc07ab57 * src/minibuf.c (read_minibuf): Change multibyte more safely
We used to `bset_enable_multibyte_characters` while the buffer is not
empty, putting the buffer temporarily in an inconsistent state.

Further simplifications along the way: Prefer re-using local var `histvar`
and let `insert` do the unibyte<->multibyte conversion if needed.
2021-04-20 08:52:04 -04:00
Michael Albinus
4da7b2dfee Fix localization problem in Tramp
* lisp/net/tramp-sh.el (tramp-get-remote-stat): Use localized
quotation characters for check.
2021-04-20 13:35:26 +02:00
Alan Mackenzie
4e907fa329 Fix bug #47781: (window-list-1 nil t) wrongly returned nil.
* src/window.c (candidate_window_p): In the WINDOW_P (all_frames) branch of
the conditional, insert "EQ (minibuf, Qt)" in the requisite place.
2021-04-20 10:53:02 +00:00
Alan Mackenzie
55db25b257 Introduce and use minibuffer-mode. This fixes bug #47150
* lisp/minibuffer.el (minibuffer-mode): New derived mode.

* src/minibuf.c (syms_of_minibuf): New DEFSYMs Qminibuffer_mode,
Qminibuffer_inactive_mode, Qminibuffer_completing_file_name,
Qselect_frame_set_input_focus, Qadd_to_history.
(read_minibuf, set_minibuffer_mode, read_minibuf_unwind): Use the new DEFSYMs
in place of continual interning.
(set_minibuffer_mode): Put an active minibuffer into minibuffer-mode rather
than fundamental-mode.

* doc/emacs/mini.texi (Minibuffer Edit): Mention minibuffer-mode.

* doc/lispref/minibuf.texi (Intro to Minibuffers): Add a paragraph about
minibuffer-mode.

* etc/NEWS (Incompatible Lisp Changes in Emacs 28.1): Add an entry.
2021-04-20 10:14:40 +00:00
Daniel Mendler
296ef2e99b (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.
2021-04-19 18:05:36 -04:00
Daniel Mendler
9216e1818a minibuffer.el: Use completion--message instead of minibuffer-message
* minibuffer.el: Use completion--message consistently for the messages
"Incomplete", "Sole completion" and "No completions".
2021-04-19 15:52:01 -04:00
Philipp Stephani
27af0a3dc8 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.
2021-04-19 21:11:21 +02:00
Stefan Monnier
ab287a148f * lisp/minibuffer.el (completion-all-sorted-completions): Fix last change 2021-04-19 15:10:05 -04:00
Stefan Monnier
14633fbc09 * lisp/minibuffer.el (minibuffer--sort-by-key): New function
(completion-all-sorted-completions): Use it.
2021-04-19 14:57:41 -04:00
Daniel Mendler
18d0ef9d59 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`.
2021-04-19 14:33:05 -04:00
Daniel Mendler
077dae3b4c 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`
2021-04-19 14:25:32 -04:00
Stefan Kangas
0a4dc70830 ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
Michael Albinus
518312346d 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'.
2021-04-19 11:52:48 +02:00
Stefan Kangas
07bb2cbf55 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/".
2021-04-19 09:50:13 +02:00
Philip K
869e437c10 Don't hard-code "~/.emacs.d/" in rcirc.el
* lisp/net/rcirc.el (rcirc-log-directory): Use
locate-user-emacs-file.  (Bug#47880)
2021-04-19 09:30:58 +02:00
Philipp Stephani
454fd39782 ; * test/lisp/progmodes/xref-tests.el: Add footer. 2021-04-18 22:05:59 +02:00
Philipp Stephani
652b0f4c74 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.
2021-04-18 21:59:25 +02:00
Philipp Stephani
6ebc6e12cf 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'.
2021-04-18 21:59:25 +02:00
Philipp Stephani
55b22bff6d 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.
2021-04-18 21:59:25 +02:00
Philipp Stephani
d91e1a5701 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.
2021-04-18 21:59:25 +02:00
Protesilaos Stavrou
dc9b0dc461 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.
2021-04-18 18:39:49 +02:00
Philipp Stephani
2822246b5d Fix Seccomp filter on CentOS 8.3 (Bug#47828).
* lib-src/seccomp-filter.c (main): mmap: Also allow MAP_SHARED.
2021-04-18 10:34:48 +02:00
Stefan Kangas
18836fc2d0 * lisp/misearch.el (multi-isearch-pop-state): Doc fix. 2021-04-18 10:03:35 +02:00
Martin Rudalics
5819f4fb0a 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.
2021-04-18 09:51:32 +02:00
Yuuki Harano
de46c7796e Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk 2021-04-18 15:30:29 +09:00
Stefan Monnier
5c07cd0f15 * 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.
2021-04-18 01:03:43 -04:00
Philipp Stephani
568ce6826f 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.
2021-04-17 21:08:17 +02:00
Michael Albinus
3430c12154 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.
2021-04-17 16:39:14 +02:00
Stefan Monnier
556c23cd17 * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Tweak further
Suggested by Lars Ingebrigtsen <larsi@gnus.org>.
2021-04-17 09:57:01 -04:00
Alan Third
c7555f037a Fix :scale's affect on :width and :height (bug#47819)
* src/image.c (compute_image_size): Multiply width and height values
by scale.
2021-04-17 09:41:37 +01:00
Martin Rudalics
cbf5bdd253 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).
2021-04-17 09:50:01 +02:00
Stefan Monnier
d262138383 * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Improve C-h f output
Suggested by Michael Heerdegen <michael_heerdegen@web.de>.
2021-04-16 23:40:51 -04:00
Stefan Kangas
740dbf2295 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.
2021-04-17 02:25:42 +02:00
Alan Mackenzie
610099d641 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.
2021-04-16 19:34:00 +00:00
Glenn Morris
629e5f8026 Merge from origin/emacs-27
eedad01b4b (origin/emacs-27) Fix typos in manuals
24d214652e Fix description of momentary message display
2021-04-16 07:50:20 -07:00