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

142733 Commits

Author SHA1 Message Date
Andrea Corallo
72e2c1e6e6 Add 'modern-mode' command line option
* src/emacs.c (standard_args): Add: '-m' '-modern' '--modern'
	cmd line option.

	* lisp/startup.el (command-line-1): Handle modern-mode cmd line
	option.
2020-09-15 16:21:11 +02:00
Andrea Corallo
66a5fa931c * Add new global minor mode 'modern-mode'
* lisp/modern-mode.el: New file implementing a new global minor
	mode to enable a small collection of non invasive modern settings.
2020-09-15 16:12:50 +02:00
Andrea Corallo
c3b60010f9 * lisp/windmove.el (windmove-remove-keybindings): New function. 2020-09-15 16:12:41 +02:00
Stefan Monnier
e408f2fab2 * test/lisp/emacs-lisp/find-func-tests.el: New file (for bug#43393)
* lisp/emacs-lisp/ert-x.el (ert-simulate-keys): New macro.

* test/lisp/international/mule-tests.el
(mule-cmds--test-universal-coding-system-argument): Use it and enable
the test also in batch mode.
2020-09-14 16:04:22 -04:00
Kevin Ryde
15d2f6af00 Tweak the `C-x v =' command when done from a diff buffer
* lisp/vc/vc.el (vc-diff): Offer to save the relevant buffer(s)
when doing `C-x v =' from a diff buffer (bug#5773).
2020-09-14 15:40:07 +02:00
Pip Cet
312da48719 Don't retry reading after receiving EINVAL
* src/process.c (wait_reading_process_output): Don't retry reading
from an fd after an unknown error (bug#6074).
2020-09-14 15:18:52 +02:00
Stephen Berman
f450e53d5c Fix problem of marking files with hidden subdirs
* lisp/dired.el (dired-unhide-subdir):
(dired-subdir-hidden-p):
(dired-subdir-min): Moved from subr-x.
(dired-get-filename): Get the correct filename when directories
are hidden (bug#8484).
2020-09-14 14:55:52 +02:00
Lars Ingebrigtsen
14486c4488 Allow preserving (some) text properties from completion tables
* doc/lispref/minibuf.texi (Text from Minibuffer): Document it.

* lisp/minibuffer.el (completion--replace): Preserve text
properties on completed items (bug#43218).
2020-09-14 14:22:06 +02:00
Lars Ingebrigtsen
cbfa411544 Allow hitting RET on info node names with multiple whitespace chars
* lisp/info.el (info--node-canonicalize-whitespace): New function
(bug#10784).
(Info-extract-menu-node-name): Use it.
(Info-find-node): Use it.
2020-09-14 13:49:04 +02:00
Lars Ingebrigtsen
7629aa7409 Revert "Fix completion in `read-library-name'"
This reverts commit ed44217d32.

This commit broke the use case of `M-x load-library RET o/or TAB' to
expand to org/org.
2020-09-14 13:26:17 +02:00
Lars Ingebrigtsen
7cc1614338 Further fixups in minibuffer-default--in-prompt-regexps
* lisp/minibuf-eldef.el (minibuffer-default--in-prompt-regexps):
Really allow shortening the default prompt format to [foo] (if
requested) (bug#12443).
2020-09-14 13:14:21 +02:00
Lars Ingebrigtsen
b40a7056e5 Support build of Emacs on ARM Macos machines
* configure.ac: Add support for aarch64-* on Macos (i.e., 64-bit
ARM) (bug#43369).
2020-09-14 12:34:56 +02:00
Mattias Engdegård
0e00f199cd Calc: fix binomial coefficients for negative arguments (bug#16999)
For some values outside integers 0≤k≤n, (n choose k) gave wrong
results, entered infinite recursion or used unreasonably amounts of
stack space.  This change fixes that and extends the function to all
integer arguments using the definitions from M. J. Kronenburg
(https://arxiv.org/abs/1105.3689).

* lisp/calc/calc-comb.el (calcFunc-choose):
Fix sign error to prevent infinite recursion and extend function to
handle all integer arguments.
(math-choose-iter, math-choose-float-iter): Rewrite in iterative form;
no TCO in elisp yet.
* test/lisp/calc/calc-tests.el (calc-tests--fac, calc-tests--choose)
(calc-tests--check-choose, calc-tests--explain-choose)
(calc-tests--calc-to-number): New helper functions.
(calc-choose): New test.
2020-09-14 11:19:22 +02:00
Mattias Engdegård
f66829e0f4 * lisp/simple.el (undo-redo): Rephrase error message. 2020-09-14 11:17:49 +02:00
Glenn Morris
1c84b187ab Fix builds without modules
* src/data.c (Finteractive_form):
* src/eval.c (Fcommandp): Fix builds without modules.
2020-09-13 17:19:19 -07:00
Lars Ingebrigtsen
1749d32d02 Fix up report-emacs-bug action on invalid From headers
* lisp/mail/emacsbug.el (report-emacs-bug-hook): Move point to the
From header if the user has to edit the From header.
2020-09-14 01:23:25 +02:00
akater
9cc992e68f Fix compilation-mode-map doc string
* lisp/progmodes/compile.el (compilation-mode-map): Remove mention of
compilation-minor-mode-map (bug#43382).

As the comment in the body says:

;; Don't inherit from compilation-minor-mode-map,
;; because that introduces a menu bar item we don't want.
;; That confuses C-down-mouse-3.

and the map actually inherits from special-mode-map.

Copyright-paperwork-exempt: yes
2020-09-14 01:08:26 +02:00
Philipp Stephani
da0e75e741 Add facility to make module functions interactive (Bug#23486).
* src/module-env-28.h: Add field for 'make_interactive' function.

* src/emacs-module.c (Lisp_Module_Function): Add new field holding the
interactive form.
(allocate_module_function): Adapt to structure layout change.
(module_make_interactive, module_function_interactive_form): New
functions.
(initialize_environment): Use them.

* src/eval.c (Fcommandp):
* src/data.c (Finteractive_form): Also handle interactive module
functions.

* test/data/emacs-module/mod-test.c (Fmod_test_identity): New test
function.
(emacs_module_init): Create two interactive module test functions.

* test/src/emacs-module-tests.el (module/interactive/return-t)
(module/interactive/return-t-int, module/interactive/identity):
New unit tests.

* doc/lispref/internals.texi (Module Functions): Document new
function.  Rework paragraph about wrapping module functions, as the
example no longer applies.

* etc/NEWS: Document new facility.
2020-09-13 20:26:47 +02:00
Reuben Thomas
3eb4e0db5c Escape ampersand in table.el LaTeX output
* lisp/textmodes/table.el (table--generate-source-scan-lines): Add
  ampersand '&' to the list of characters to escape in LaTeX output.
2020-09-13 18:05:47 +01:00
Lars Ingebrigtsen
f9aa499afa Further fixups of the variable-pitch eww header line change
* lisp/net/eww.el (eww-update-header-line-format): Protect against
:url not being set.
2020-09-13 18:51:51 +02:00
Stefan Kangas
2c62e9b20d Improve wording of cua-mode menu entry
* lisp/menu-bar.el (menu-bar-options-menu): Improve wording of the
cua-mode menu entry.  (Bug#43323)
2020-09-13 18:30:45 +02:00
Stefan Kangas
817dd54649 Improve frame-title-format and icon-title-format
* src/xdisp.c (syms_of_xdisp): Replace 'invocation-name' with the text
"%b - GNU Emacs" and replace "@" with " at ".  (Bug#41147)
* etc/NEWS: Announce the above change.
2020-09-13 18:24:31 +02:00
Eli Zaretskii
99af480d00 Fix punctuation in EWW manual
* doc/misc/eww.texi (Advanced): Fix punctuation of a recent
change.
2020-09-13 18:35:54 +03:00
Eli Zaretskii
762817003f ; * etc/NEWS: Document a recent change. 2020-09-13 18:32:31 +03:00
Eli Zaretskii
cc24931b2f ; * lisp/tab-line.el (tab-line-switch-cycling): Fix last change. 2020-09-13 18:27:44 +03:00
Lars Ingebrigtsen
54c2a8df3b Make diff--refine-hunk bug out less on broken patches
* lisp/vc/diff-mode.el (diff--refine-hunk): Don't bug out on
broken patches where we can't find the middle.
2020-09-13 17:25:08 +02:00
Lars Ingebrigtsen
dc01b992e2 Make the eww header work again even if the title is nil
* lisp/net/eww.el (eww-update-header-line-format): Don't bug out
if the title isn't set at all.
2020-09-13 17:06:35 +02:00
Dario Gjorgjevski
2bd41321a6 Make ERC desktop notifications lenient to invalid XML characters
* lisp/xml.el (xml-invalid-characters-re): New constant.

* lisp/erc/erc-desktop-notifications.el
(erc-notifications-notify): Strip IRC control codes and invalid
XML characters before notifying (bug#43328).
2020-09-13 16:49:00 +02:00
Lars Ingebrigtsen
def34a2076 Don't eagerly store articles in the Agent by default
* lisp/gnus/gnus-agent.el (gnus-agent-store-article): Made
obsolete.

* lisp/gnus/gnus-art.el (gnus-request-article-this-buffer): Don't
call it.

* lisp/gnus/gnus-async.el (gnus-async-article-callback): Ditto
(bug#43356).

This partially reverts f3b146e943, which
in was response to what appears to be an erroneous feature-request -
bug#8502.

Instead this should be done instead:

“If I read an article while plugged, do they get entered into the
Agent?”

     *No*. If you want this behavior, add
     ‘gnus-agent-fetch-selected-article’ to
     ‘gnus-select-article-hook’.
2020-09-13 16:46:11 +02:00
Lars Ingebrigtsen
c2dea983e8 Kill gpg-agents started by mml-sec-tests (bug#43358) 2020-09-13 16:05:25 +02:00
Brian Leung
467200dd6e Update .gitignore with ccls files
* .gitignore: Ignore files used by ccls, a language server for C
(bug#43365).

Copyright-paperwork-exempt: yes
2020-09-13 15:48:06 +02:00
Lars Ingebrigtsen
e0f304413c Doc string clarification in file-directory-p
* src/fileio.c (Ffile_directory_p): Mention that "" is a special
case (bug#43375).
2020-09-13 15:33:58 +02:00
Kiso Katsuyuki
2605eb9d0e Clarify when tab-line-switch-cycling is used
* lisp/tab-line.el (tab-line-switch-cycling): Clarify when the
variable is used.
Copyright-paperwork-exempt: yes
2020-09-13 15:23:25 +02:00
Stefan Kangas
1a4d8feb17 * lisp/time.el (display-time-world): Make obsolete. 2020-09-13 15:09:20 +02:00
Stefan Kangas
06d86b954d Make M-x show what aliases point to (Bug#43300)
* lisp/simple.el (read-extended-command--annotation): Show an
annotation for aliases saying what it points to.
2020-09-13 15:05:06 +02:00
Stefan Kangas
1b0a922a19 Make M-x show obsolete commands (Bug#43300)
* lisp/simple.el (read-extended-command): Don't hide obsolete
commands.
(read-extended-command--annotation): Show an annotation for obsolete
commands that says what their new name is.
2020-09-13 15:05:02 +02:00
Lars Ingebrigtsen
9ca83cdd79 Revert "Use format-prompt in read-file-name calls that have a default"
This reverts commit de4f347901.

read-file-name already displays a long path when given a default
(like INITIAL in many other prompting functions), so using
format-prompt here is superfluous.
2020-09-13 14:58:24 +02:00
Lars Ingebrigtsen
e1e93da9a9 Make ascii' a coding system alias for us-ascii'
* lisp/international/mule-conf.el (ascii): Define `ascii' as a
coding system alias to `us-ascii' (bug#43351).
2020-09-13 14:41:54 +02:00
Michael Albinus
a6321fd799 Fix a conversion failure in tramp-archive-tests (Bug#43353)
* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test-file-archive-hexlified): New defun.
(tramp-archive-test02-file-name-dissect): Use it.  (Bug#43353)
2020-09-13 13:25:52 +02:00
Glenn Morris
18f390af8f Don't force LC_ALL=C upon make check (bug#43353)
* test/Makefile.in (TEST_LOCALE): Remove.
(emacs): Don't force LC_ALL=C, since it causes problems with
non-ascii directories.  This mirrors a 7-year old lisp/Makefile change.
2020-09-12 20:22:37 -07:00
Glenn Morris
5e7733694e Mark some diff tests as failing in nonascii directories
* test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock)
(diff-mode-test-font-lock-syntax-one-line):
Expect failure in non-ascii directories.

; * lisp/vc/diff-mode.el (diff-hunk-file-names): Comment.
2020-09-12 19:47:29 -07:00
Lars Ingebrigtsen
854855ec68 Clean up eww error buffer
* lisp/net/eww.el (eww-retrieve): Clean up error buffer after exiting.
2020-09-13 01:02:00 +02:00
Lars Ingebrigtsen
f7d8650187 Fix up example code from previous eww.texi commit
* doc/misc/eww.texi (Advanced): Simplify example command (and
"--virtual-time-budget=3000" makes Chromium unstable).
2020-09-13 00:44:20 +02:00
Lars Ingebrigtsen
31be4d7ca4 Add a way to use an external command to download HTML in eww
* doc/misc/eww.texi (Advanced): Document it.

* lisp/net/eww.el (eww-retrieve): New function.
(eww-reload): Use it.
(eww): Ditto.
(eww-retrieve-command): New variable.
2020-09-13 00:12:33 +02:00
Glenn Morris
3e073520b3 Adapt some tests for Emacs's excitingly variable quoting format
* test/lisp/subr-tests.el (subr-test-version-parsing):
* test/lisp/emacs-lisp/gv-tests.el (gv-dont-define-expander-other-file):
* test/src/callint-tests.el (call-interactively/incomplete-multibyte-sequence):
* test/src/emacs-module-tests.el (module/describe-function-1):
Don't fail if curly quotes are in use, as they can be if LC_ALL != C.
2020-09-12 11:57:42 -07:00
Glenn Morris
6818867a2e ; Fix copyright years 2020-09-12 10:56:04 -07:00
Michael Albinus
2fca3015dd Cleanup in dbus.el, dbus-tests.el
* lisp/net/dbus.el (dbus-error-no-reply): New defconst.
(dbus-call-method): Use it.
(dbus-call-method-asynchronously, dbus-register-signal): Fix docstring.
(dbus-unregister-object): Obey :serial entries in
`dbus-registered-objects-table'.

* test/lisp/net/dbus-tests.el (dbus-test04-register-method)
(dbus-test05-register-property): Extend tests.
2020-09-12 19:33:44 +02:00
Alan Mackenzie
62f239eec2 C++ Mode: handle __attribute__,etc. inside constructor argument lists
This corrects both the fontification and indentation of these things, fixing
bug #42270.

* lisp/progmodes/cc-engine.el (c-do-declarators): Skip over "hangon keys" and
noise macros whilst scanning a putative C++ function.
(c-forward-decl-or-cast-1): When checking for typeless functions, skip over
"hangon keys" and noise macros.

* lisp/progmodes/cc-mode.el (c-fl-decl-end): Deal with certain invalid
"nested declarators" by scanning over them with a recursive call of
c-fl-decl-end.

* lisp/progmodes/cc-vars.el (c-noise-macro-names)
(c-noise-macro-with-parens-names): State in the doc strings that if either of
these is a regexp, it must have a submatch 1 which matches the noise macro
exactly.
2020-09-12 16:37:56 +00:00
Glenn Morris
d228cac2e8 Small Texinfo markup fixes
* doc/misc/dbus.texi (Register Objects):
* doc/misc/gnus.texi (Searching): Texinfo markup fixes.
2020-09-12 09:06:10 -07:00
Lars Ingebrigtsen
b9ff508a2e Fix compilation warning in cl-font-lock
* lisp/progmodes/cl-font-lock.el (cl-font-lock-built-in-mode): Put
in the tools group to avoid a compilation warning.
2020-09-12 15:10:36 +02:00