1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-06 20:49:33 +00:00

141345 Commits

Author SHA1 Message Date
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
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 e8b3a15cb6ff187ce08afcb43bd9a0b7907268ca.
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 82140c510c4d27e639b4bca1e9bf158f0f66c375.
(Bug#40892)
2020-04-30 17:02:57 +03:00
Mattias Engdegård
82140c510c 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 15:24:19 +02:00
Stefan Kangas
d386f1fb62 Use lexical-binding in most remaining emacs-lisp tests
* test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el:
* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el:
* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el:
* test/lisp/emacs-lisp/faceup-resources/faceup-test-mode.el:
* test/lisp/emacs-lisp/faceup-resources/faceup-test-this-file-directory.el:
* test/lisp/emacs-lisp/faceup-tests/faceup-test-basics.el:
* test/lisp/emacs-lisp/faceup-tests/faceup-test-files.el:
* test/lisp/emacs-lisp/package-resources/newer-versions/new-pkg-1.0.el:
* test/lisp/emacs-lisp/package-resources/newer-versions/simple-single-1.4.el:
* test/lisp/emacs-lisp/package-resources/simple-depend-1.0.el:
* test/lisp/emacs-lisp/package-resources/simple-single-1.3.el:
* test/lisp/emacs-lisp/package-resources/simple-two-depend-1.1.el:
* test/lisp/emacs-lisp/package-tests.el:
* test/lisp/emacs-lisp/shadow-resources/p1/foo.el:
* test/lisp/emacs-lisp/shadow-resources/p2/FOO.el: Use lexical-binding.

* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
(eitest-F, eitest-H, eitest-I, constructor, make-instance)
(initialize-instance, CNM-M):
* test/lisp/emacs-lisp/package-tests.el (with-package-test)
(package-test-update-archives, package-test-signed): Silence byte-compiler.
2020-04-30 12:09:51 +02:00
Basil L. Contovounesios
44d824e7f0 ; Silence byte-compiler warning in version.el
* lisp/version.el (emacs-repository-get-version): Prefix unused
argument with underscore.
2020-04-30 11:01:13 +01:00
Basil L. Contovounesios
72570e0fc3 ; Fix last addition to dom-tests.el
* test/lisp/dom-tests.el (dom-tests-remove-attribute): Make test
idempotent by avoiding destructive modification of constant literal.
2020-04-30 10:46:54 +01:00
Stefan Kangas
3c810669f7 Use lexical-binding in qp.el and add tests
* test/lisp/mail/qp-tests.el: New file.
* lisp/mail/qp.el: Use lexical-binding.
2020-04-30 10:36:54 +02:00
Lars Ingebrigtsen
6c1b12e7d2 Add new function dom-remove-attribute
* doc/lispref/text.texi (Document Object Model): Document it.

* lisp/dom.el (dom-remove-attribute): Add new function.
2020-04-30 06:05:26 +02:00
Dmitry Gutov
1f17193e00 Expand file name for remote dirs as well
* lisp/progmodes/project.el (project--files-in-directory):
Expand file name for remote dirs as well (bug#40940).
2020-04-29 22:46:17 +03:00
Eli Zaretskii
7a12ab5ea2 Fix project.el commands in "transient" projects
* lisp/progmodes/project.el (project--files-in-directory): Run
local DIR directory names through 'expand-file-name', so that "~/"
is expanded, in case the shell doesn't or the shell's notion of
the home directory is different from that of Emacs.  (Bug#40940)
2020-04-29 18:58:42 +03:00
Stephen Gildea
0a982c077e Test iso8601-parse-zone vs format-time-string %z
* test/lisp/calendar/iso8601-tests.el
(iso8601-format-time-string-zone-round-trip): New unit test that
format-time-string %z and iso8601-parse-zone are inverses.
(test-iso8601-format-time-string-zone-round-trip): New helper function.
2020-04-29 08:44:23 -07:00
Eli Zaretskii
274ec97e3c Make sure alist-related functions say so in their doc
* src/fns.c (Fassq, assq_no_quit, Fassoc, assoc_no_quit, Frassq)
(Frassoc): Rename argument LIST to ALIST.  Doc strings updated.
2020-04-29 17:52:53 +03:00
Glenn Morris
b56401f384 Merge from origin/emacs-27
2f9bfaef21 (origin/emacs-27) ; Fix last change
520fd3e728 * lisp/env.el (substitute-env-vars): Doc fix.  (Bug#40948)
85544f8ef5 * lisp/isearch.el: Fix lazy-highlighting and lazy-counting...
d83cc05a73 Fix error in ERC when 'erc-server-coding-system' is custom...
16fed05ba8 Avoid crashes on TTY frames with over-long compositions
0278741676 Fix typo in custom.texi
9f5ae717fb * test/lisp/simple-tests.el (with-shell-command-dont-erase...
1f76a16ed3 * lisp/image-mode.el (image-mode-map): Update menu items.
f0e1bf56f0 Fix bugs in tab-bar and tab-line and mention remaining fea...
f0b9f18457 Make shell-command tests fit for tcsh.
68f4a740a1 Remove doc duplication
ac31cd384c * etc/NEWS: Fix inconsistencies.

# Conflicts:
#	etc/NEWS
2020-04-29 07:50:20 -07:00
Eli Zaretskii
2f9bfaef21 ; Fix last change 2020-04-29 14:15:03 +03:00
Eli Zaretskii
520fd3e728 * lisp/env.el (substitute-env-vars): Doc fix. (Bug#40948) 2020-04-29 14:06:35 +03:00
Stefan Kangas
17eae91cb1 Use lexical-binding in most eshell tests
* test/lisp/eshell/em-hist-tests.el:
* test/lisp/eshell/em-ls-tests.el:
* test/lisp/eshell/esh-opt-tests.el: Use lexical-binding.
2020-04-29 10:28:07 +02:00
Stefan Kangas
702d9d86f2 Add new tests to bindat-tests.el
* test/lisp/emacs-lisp/bindat-tests.el (bindat-test-format-vector)
(bindat-test-vector-to-dec, bindat-test-vector-to-hex)
(bindat-test-ip-to-string): New tests.
* lisp/emacs-lisp/bindat.el (bindat-vector-to-hex): Fix typo.
2020-04-29 09:52:34 +02:00
Stefan Kangas
c8115e88f1 Use lexical-binding in float-sup.el and add tests
* lisp/emacs-lisp/float-sup.el: Use lexical-binding.
* test/lisp/emacs-lisp/float-sup-tests.el: New file.
2020-04-29 09:25:02 +02:00
Juri Linkov
85544f8ef5 * lisp/isearch.el: Fix lazy-highlighting and lazy-counting of hidden matches
* lisp/isearch.el (isearch-lazy-highlight-search): Let-bind
search-invisible to t when search-invisible is 'open' or when both
isearch-lazy-count and search-invisible are non-nil.  (Bug#40808)
2020-04-29 02:49:44 +03:00
Stefan Kangas
f998e6297d Use lexical-binding in rfc2368.el and add tests
* lisp/mail/rfc2368.el: Use lexical-binding.
* test/lisp/mail/rfc2368-tests.el: New file.
2020-04-28 23:55:02 +02:00
Stefan Kangas
e309b329bb Use lexical-binding in version.el and add tests
* lisp/version.el: Use lexical-binding.
* test/lisp/version-tests.el: New file.
2020-04-28 23:35:52 +02:00
Eli Zaretskii
d83cc05a73 Fix error in ERC when 'erc-server-coding-system' is customized
* lisp/erc/erc-backend.el (erc-split-line): Handle the case where
'erc-coding-system-for-target' returns a coding-system's symbol.
(Bug#40914)
2020-04-28 20:22:50 +03:00
Stefan Kangas
8aca659bd1 Use lexical-binding in puny.el and add more tests
* lisp/net/puny.el: Use lexical-binding.
* test/lisp/net/puny-tests.el (puny-test-encode-domain)
(puny-test-decode-domain, puny-highly-restrictive-domain-p): New
tests.
2020-04-28 18:14:28 +02:00
Stefan Kangas
1844bcf556 Use lexical-binding in hmac-md5.el and add tests
* lisp/net/hmac-md5.el: Use lexical-binding.
* test/lisp/net/hmac-md5-tests.el: New file.
2020-04-28 18:14:28 +02:00
Stefan Kangas
a0ee542d9e Use lexical-binding in many emacs-lisp tests
* test/lisp/emacs-lisp/bytecomp-tests.el:
* test/lisp/emacs-lisp/ert-x-tests.el:
* test/lisp/emacs-lisp/nadvice-tests.el:
* test/lisp/emacs-lisp/pcase-tests.el:
* test/lisp/emacs-lisp/seq-tests.el:
* test/lisp/emacs-lisp/subr-x-tests.el:
* test/lisp/emacs-lisp/text-property-search-tests.el: Use
lexical-binding.

* test/lisp/emacs-lisp/seq-tests.el (test-seq-filter)
(test-seq-remove, test-seq-count, test-seq-every-p): Silence
byte-compiler.
2020-04-28 18:14:24 +02:00