1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00
Commit graph

141944 commits

Author SHA1 Message Date
Andrea Corallo
c6a610ecdc Merge remote-tracking branch 'savannah/master' into HEAD 2020-05-04 18:24:00 +01:00
Michael Albinus
2db70edd9c Adapt Tramp tests
* test/lisp/net/tramp-tests.el (tramp-test33-environment-variables):
Adapt test.
2020-05-04 13:09:32 +02:00
Michael Albinus
221e6a9bcd Fix setting of INSIDE_EMACS in Tramp
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process)
(tramp-sh-handle-process-file, tramp-open-shell): Set proper
INSIDE_EMACS environment variable.
2020-05-04 10:43:58 +02:00
Paul Eggert
106936415d Simplify by using attribute.h macros
attribute.h is partly designed for C2X forward compatibility,
since C2X will add some standard attributes.  Using its macros
should help insulate Emacs from C2X teething problems.
* src/conf_post.h: Include attribute.h.
(HAS_ATTRIBUTE, HAS_FEATURE): Rename from __has_attribute and
__has_feature, to avoid polluting the builtin namespace.
All uses changed.
(ATTRIBUTE_COLD, ATTRIBUTE_FORMAT, FALLTHROUGH, ATTRIBUTE_CONST)
(ATTRIBUTE_PURE, ATTRIBUTE_UNUSED, ATTRIBUTE_MAY_ALIAS)
(ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE)
(ATTRIBUTE_RETURNS_NONNULL): Remove, as attribute.h does this now.
(NO_INLINE, EXTERNALLY_VISIBLE, ARG_NONNULL, ATTRIBUTE_UNUSED):
Simplify by defining in terms of attribute.h macros.
* src/systhread.h (ATTRIBUTE_WARN_UNUSED_RESULT): Remove.
All uses replaced by attribute.h’s NODISCARD.
2020-05-03 15:10:07 -07:00
Paul Eggert
6bd47f4477 Update from Gnulib
This incorporates:
2020-05-03 attribute: new module
2020-04-13 explicit_bzero: improve code style
2020-04-13 explicit_bzero: On native Windows, use SecureZeroMemory
2020-04-13 explicit_bzero: use memset_s() when available
2020-04-04 maint: remove a stray inter-word space
* build-aux/config.guess, build-aux/config.sub:
* build-aux/gitlog-to-changelog, build-aux/update-copyright:
* doc/misc/texinfo.tex, lib/explicit_bzero.c, lib/ieee754.in.h:
* lib/nstrftime.c, m4/explicit_bzero.m4, m4/gnulib-common.m4:
Copy from Gnulib.
* lib/attribute.h: New file, copied from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2020-05-03 15:10:07 -07:00
Stefan Monnier
40149b8718 * lisp/emacs-lisp/eieio.el (oset, oset-default): Mark as obsolete 2020-05-03 18:05:16 -04:00
Simen Heggestøyl
7db0093bc2 Use lexical-binding in check-declare.el and add tests
* lisp/emacs-lisp/check-declare.el: Use lexical-binding.
(check-declare-warn): Silence byte compiler warning about unused
lexical argument.

* test/lisp/emacs-lisp/check-declare-tests.el: New file with tests
for check-declare.el.
2020-05-03 19:50:57 +02:00
Glenn Morris
82c506192b ; admin/notes/git-workflow
Mention reverting on release branch.
2020-05-03 10:21:21 -07:00
Glenn Morris
97146efdc6 ; admin/notes/git-workflow
Prefer "release branch" to a specific branch that can only ever get outdated.
2020-05-03 10:18:04 -07:00
Mattias Engdegård
20c1e7f8af Fix calculator division truncation (bug#40892)
* lisp/calculator.el (calculator-string-to-number): Convert decimal
numbers input to float, fixing a regression introduced in f248292ede.
Reported by Aitor Soroa.
2020-05-03 10:05:43 -07:00
Alan Third
2c306146d2 Fix initial frame resizing issue on NS (bug#40200)
* src/nsterm.m ([EmacsView viewDidResize:]): Don't try to determine
the old size when not drawing to the buffer.
2020-05-03 17:14:48 +01:00
Michal Nazarewicz
22bff6e87b cc-mode: document Doxygen ‘c-doc-comment-style’ (bug#40877)
* doc/misc/cc-mode.texi (Documentation Comments): mention Doxygen markup.
2020-05-03 16:14:14 +01:00
Glenn Morris
4c1a28b47b ; Merge from origin/emacs-27
The following commit was skipped:

e90b7b9ef2 (origin/emacs-27) Revert "Mark breakpoints in edebug with ...
2020-05-03 07:50:21 -07:00
Glenn Morris
99a544c807 Merge from origin/emacs-27
0a3731feef Make memq etc. examples more like they were
ed25282b82 Document effect of 'search-upper-case' on replacement comm...
5a5d8a8ec0 * lisp/desktop.el (desktop-save): Doc fix.  (Bug#41007)
2020-05-03 07:50:21 -07:00
Glenn Morris
8b4a61d33b ; Merge from origin/emacs-27
The following commit was skipped:

fc8e02a4d5 (emacs-27) ; Auto-commit of loaddefs files.
2020-05-03 07:50:21 -07:00
Glenn Morris
76cf14f9ca Merge from origin/emacs-27
1d477a0fec Recommend to avoid unnecessary abbreviations in doc
aea1b4db72 Revert "Fix calculator division truncation (bug#40892)"
2020-05-03 07:50:21 -07:00
Glenn Morris
f696dc883f ; Merge from origin/emacs-27
The following commit was skipped:

82140c510c Fix calculator division truncation (bug#40892)
2020-05-03 07:50:21 -07:00
Glenn Morris
c6d70f890c Merge from origin/emacs-27
1f17193e00 Expand file name for remote dirs as well
7a12ab5ea2 Fix project.el commands in "transient" projects
274ec97e3c Make sure alist-related functions say so in their doc
2020-05-03 07:50:20 -07:00
Stefan Kangas
5f516dc944 Remove redundant :groups args missed in last commit
* lisp/emacs-lisp/cl-indent.el (lisp-lambda-list-keyword-alignment)
(lisp-lambda-list-keyword-parameter-indentation)
(lisp-lambda-list-keyword-parameter-alignment)
(lisp-indent-backquote-substitution-mode): Remove redundant :group args.
2020-05-03 16:21:51 +02:00
Stefan Kangas
d55b3b5966 Improve indentation of 'loop' forms
* lisp/emacs-lisp/cl-indent.el (lisp-loop-keyword-indentation)
(lisp-loop-forms-indentation, lisp-simple-loop-indentation): Use a
more standard indentation of 'loop' forms.  (Bug#2160)

(lisp-indent-maximum-backtracking, lisp-tag-indentation)
(lisp-tag-body-indentation, lisp-backquote-indentation)
(lisp-loop-keyword-indentation, lisp-loop-forms-indentation)
(lisp-simple-loop-indentation): Remove redundant :group args.
2020-05-03 16:19:09 +02:00
Stefan Kangas
b82dbba5e0 Use lexical-binding in w32-vars.el
* lisp/w32-vars.el: Use lexical-binding.
(w32-use-w32-font-dialog, w32-allow-system-shell
(w32-system-shells, w32-fixed-font-alist): Remove redundant :group
args.
2020-05-03 16:17:20 +02:00
Eli Zaretskii
cb1e73d1bc Improve accuracy of apropos commands that search doc strings
It is conceptually wrong for apropos commands that search doc
strings to look for matches of several words only on the same
line, because division of doc strings between lines is
ephemeral.
* lisp/apropos.el (apropos-parse-pattern): Accept an optional
argument MULTILINE-P, and if that is non-nil, produce regexps that
match words in the list even if they are separated by line
boundaries.
(apropos-value, apropos-local-value, apropos-documentation): Use
the new optional argument in apropos commands that search
multiline text, such as doc strings.

* src/search.c (Fposix_looking_at, Fposix_string_match)
(Fposix_search_backward, Fposix_search_forward): Make sure Posix
appears in the doc strings near REGEXP, for better matches.
2020-05-03 16:53:53 +03:00
Andrea Corallo
1ec7499e59 * Add a warning for missing write privilege
* lisp/emacs-lisp/comp.el (native-compile-async): Check for write
	privilege and raise a warning in case.
2020-05-03 13:37:38 +01:00
Andrea Corallo
8d37220190 * Introduce `comp-output-directory'
* lisp/emacs-lisp/comp.el (comp-output-directory): New function.
	(comp-output-base-filename): Use `comp-output-directory'.
2020-05-03 14:35:50 +01:00
Mattias Engdegård
63268253d2 Regexps cannot infloop; fix manual
* doc/lispref/searching.texi (Regexp Special): Edit erroneous
statements about infinite looping in regexps.
2020-05-03 14:27:51 +02:00
Michael Albinus
7f51ab5163 Do not delete asynchronous Tramp processes due to session timeout
* lisp/net/tramp-cmds.el (tramp-cleanup-connection): New optional
argument KEEP-PROCESSES.

* lisp/net/tramp-sh.el (tramp-timeout-session): Use it.  (Bug#41042)
2020-05-03 13:59:50 +02:00
Michael Albinus
a9432bd2cc Improve Tramp debug messages
* lisp/net/tramp-cache.el (tramp-get-file-property)
(tramp-get-connection-property): Improve debug messages.
Suggested by Marc Herbert <marc.herbert@gmail.com>.
2020-05-03 13:59:08 +02:00
Alan Mackenzie
e90b7b9ef2 Revert "Mark breakpoints in edebug with highlights". This fixes bug #40992
Do not merge to master.

This reverts commit e8b3a15cb6.
2020-05-03 11:25:19 +00:00
Stefan Kangas
4be16866b9 Use lexical-binding for some term libraries
This takes care of the most trivial cases, but there are more that
could be easily converted.

* lisp/term/bobcat.el:
* lisp/term/cygwin.el:
* lisp/term/konsole.el:
* lisp/term/linux.el:
* lisp/term/vt100.el:
* lisp/term/vt200.el: Use lexical-binding.
2020-05-02 22:50:14 +02:00
Paul Eggert
0a3731feef Make memq etc. examples more like they were
Problem reported by Štěpán Němec in:
https://lists.gnu.org/r/emacs-devel/2020-05/msg00130.html
* doc/lispref/lists.texi (Sets And Lists, Association Lists):
Revert examples to be more like the way they were, using
self-evaluating expressions.  Be more consistent about listing
unspecified results.
2020-05-02 13:49:32 -07:00
Stefan Kangas
11fd01c994 Improve Info-mode doc and menu
* lisp/info.el (Info-mode-menu): Re-arrange to be more logical, move
items into submenus, add 'Info-directory' and separators.
(Info-mode): Add 'end-of-buffer' to doc string.  (Bug#39042)
2020-05-02 22:41:20 +02:00
Michael Albinus
a941a9e8c2 ;; Revert recent change in tramp-cache.el
* lisp/net/tramp-cache.el (tramp-dump-connection-properties):
Remove compatibility code dumping the persistency file.  Use
`emacs-lisp-mode' for backward compatibility.
2020-05-02 12:48:55 +02:00
Eli Zaretskii
0ea1463e67 Fix 'count-screen-lines' when lines are truncated
* lisp/window.el (count-screen-lines): Fix the return value when
lines are truncated in the window, and the end of the region is
invisible due to this truncation.  (Bug#40849)
2020-05-02 11:45:05 +03:00
Eli Zaretskii
ed25282b82 Document effect of 'search-upper-case' on replacement commands
* doc/emacs/search.texi (Replacement and Lax Matches): Document
the role of 'search-upper-case' in replacement commands.
(Lax Search): Document the value 'not-yanks' of
'search-upper-case' where the variable itself is documented.

* lisp/replace.el (query-replace-regexp, query-replace): Mention
'search-upper-case' and its effect in doc strings.  (Bug#40940)
2020-05-02 10:54:01 +03:00
João Távora
2ea1265f55 Properly fix embarassing missing paren typo in jsonrpc.el
Paul Eggert had fixed it in practice, but the missing paren
was meant to close a previous with-current-buffer.

* lisp/jsonrpc.el (initialize-instance): Put parenthesis in right spot.
(Version): Bump to 1.0.11
2020-05-02 00:11:18 +01:00
Eli Zaretskii
5a5d8a8ec0 * lisp/desktop.el (desktop-save): Doc fix. (Bug#41007) 2020-05-01 22:59:27 +03:00
Michael Heerdegen
c59e878439 Inhibit modification hooks when saving eieio-persistent's
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-save): Bind
inhibit-modification-hooks -> t.
2020-05-01 21:16:30 +02:00
Michal Nazarewicz
145aab0672 cc-mode: add support for Doxygen documentation style
* lisp/progmodes/cc-fonts.el (doxygen-font-lock-doc-comments,
  doxygen-font-lock-keywords): New constants defining Doxygen
  comment style support.
* lisp/progmodes/cc-vars.el (c-doc-comment-style): Updated docstring
  to mention now-supported Doxygen mode.
2020-05-01 19:31:19 +01:00
Paul Eggert
4b6c2bcecf * lisp/jsonrpc.el (initialize-instance): Fix closing-paren typo. 2020-05-01 10:50:22 -07:00
João Távora
b23daca207 Consolidate lisp/jsonrpc.el logging in single events buffer
For inferior processes having useful stderr, it is no longer
cumbersome to switch between different buffers to correlate error
messages with transport-level JSONRPC messages.

The existing stderr and stdout buffers can still be found hidden away
from the normal buffer list.

An original idea of Tobias Rittweiler <trittweiler@gmail.com>.

* lisp/jsonrpc.el (initialize-instance jsonrpc-process-connection):
Setup after-change functions stderr buffer.  Hide stderr and stdout
buffers.
(jsonrpc--log-event): Don't output extra newline.  Tweak log format.
(Version): Bump to 1.0.10
2020-05-01 16:59:05 +01:00
Basil L. Contovounesios
2a8784129d ; Fix recent additions with lisp-data-mode
* lisp/bookmark.el (bookmark-insert-file-format-version-stamp)
(save-place-alist-to-file): Delimit file-local variables on the -*-
line with semicolons.
* lisp/files.el (auto-mode-alist): Use shy regexp group.
2020-05-01 15:03:59 +01:00
Glenn Morris
9f3f169276 ; Auto-commit of loaddefs files. 2020-05-01 06:27:00 -07:00
Glenn Morris
fc8e02a4d5 ; Auto-commit of loaddefs files. 2020-05-01 06:12:54 -07:00
Alan Mackenzie
a4c07bc8c8 Protect non-selected face spec components in custimize-face. Fixes bug #40866
* lisp/cus-edit.el (custom-face-save): If the current face widget is only
displaying part of the face spec, temporarily set it to "display" the whole
spec around the call to custom-face-mark-to-save.
2020-05-01 12:23:15 +00:00
João Távora
43fded12d5 Add lisp-data-mode for editing non-code Lisp data
Fixes: bug#40573

The new mode can be used stand-alone or inherited from by modes
intended to edit programs. The existing emacs-lisp-mode and lisp-mode
are examples.

Thanks to Juri Linkov and Basil L. Contovounesios for researching some
data files in Emacs that can be automatically set to use the new mode.

* lisp/files.el (auto-mode-alist): Add entry for ".dir-locals" and
".dir-locals-2"

* lisp/emacs-lisp/lisp-mode.el: (lisp-data-mode): New major mode.
(lisp-mode): Inherit from lisp-data-mode.  Set special lisp-mode
stuff here.

* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Inherit from
lisp-data-mode.

* lisp/bookmark.el (bookmark-insert-file-format-version-stamp):
Use lisp-data-mode.

* lisp/saveplace.el (save-place-alist-to-file): Use
lisp-data-mode.

* lisp/net/eww.el (eww-write-bookmarks): Use lisp-data-mode.

* lisp/net/nsm.el (nsm-write-settings): Use lisp-data-mode.

* lisp/net/tramp-cache.el (tramp-dump-connection-properties): Use
lisp-data-mode.

* etc/NEWS: Mention lisp-data-mode.

* doc/lispref/modes.texi (Example Major Modes): Update example.
2020-05-01 12:11:10 +01:00
Stefan Kangas
7fa3e754cb Use lexical-binding in most remaining tests
* test/lisp/comint-tests.el:
* test/lisp/custom-resources/custom--test-theme.el:
* test/lisp/dabbrev-tests.el:
* test/lisp/emulation/viper-tests.el:
* test/lisp/erc/erc-track-tests.el:
* test/lisp/gnus/gnus-tests.el:
* test/lisp/imenu-tests.el:
* test/lisp/info-xref-tests.el:
* test/lisp/jit-lock-tests.el:
* test/lisp/json-tests.el:
* test/lisp/man-tests.el:
* test/lisp/replace-tests.el:
* test/lisp/shadowfile-tests.el:
* test/lisp/subr-tests.el:
* test/lisp/thingatpt-tests.el:
* test/lisp/xml-tests.el: Use lexical-binding.

* test/lisp/man-tests.el (man-tests-filter-strings):
* test/lisp/shadowfile-tests.el (shadow-test00-clusters)
(shadow-test01-sites, shadow-test06-literal-groups)
(shadow-test07-regexp-groups, shadow-test09-shadow-copy-files):
Silence byte-compiler.
2020-05-01 13:05:26 +02:00
Michael Heerdegen
0c899eede3 Make `make-local-variable' declare the var locally dynamic
The only effect of this change is to get rid of some unnecessary
"assignment to free variable" warnings.

* lisp/emacs-lisp/bytecomp.el (byte-compile-make-local-variable): New
function.
2020-04-30 20:50:33 +02:00
Mattias Engdegård
691f19798a Fix calculator division truncation (bug#40892)
* lisp/calculator.el (calculator-string-to-number): Convert decimal
numbers input to float, fixing a regression introduced in f248292ede.
Reported by Aitor Soroa.
2020-04-30 18:10:57 +02:00
Stefan Kangas
1d477a0fec Recommend to avoid unnecessary abbreviations in doc
* doc/lispref/tips.texi (Documentation Tips): Recommend to avoid
unnecessary abbreviations.  (Bug#40011)
2020-04-30 18:02:28 +02:00
Eli Zaretskii
aea1b4db72 Revert "Fix calculator division truncation (bug#40892)"
This reverts commit 82140c510c.
(Bug#40892)
2020-04-30 17:02:57 +03:00