]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoImprove accuracy of apropos commands that search doc strings
Eli Zaretskii [Sun, 3 May 2020 13:53:53 +0000 (16:53 +0300)]
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.

4 years agoRegexps cannot infloop; fix manual
Mattias Engdegård [Sun, 3 May 2020 12:22:50 +0000 (14:22 +0200)]
Regexps cannot infloop; fix manual

* doc/lispref/searching.texi (Regexp Special): Edit erroneous
statements about infinite looping in regexps.

4 years agoDo not delete asynchronous Tramp processes due to session timeout
Michael Albinus [Sun, 3 May 2020 11:59:50 +0000 (13:59 +0200)]
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)

4 years agoImprove Tramp debug messages
Michael Albinus [Sun, 3 May 2020 11:59:08 +0000 (13:59 +0200)]
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>.

4 years agoUse lexical-binding for some term libraries
Stefan Kangas [Sat, 2 May 2020 20:50:14 +0000 (22:50 +0200)]
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.

4 years agoImprove Info-mode doc and menu
Stefan Kangas [Sat, 2 May 2020 20:41:20 +0000 (22:41 +0200)]
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)

4 years ago;; Revert recent change in tramp-cache.el
Michael Albinus [Sat, 2 May 2020 10:48:55 +0000 (12:48 +0200)]
;; 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.

4 years agoFix 'count-screen-lines' when lines are truncated
Eli Zaretskii [Sat, 2 May 2020 08:45:05 +0000 (11:45 +0300)]
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)

4 years agoProperly fix embarassing missing paren typo in jsonrpc.el
João Távora [Fri, 1 May 2020 23:10:51 +0000 (00:10 +0100)]
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

4 years agoInhibit modification hooks when saving eieio-persistent's
Michael Heerdegen [Fri, 1 May 2020 00:08:17 +0000 (02:08 +0200)]
Inhibit modification hooks when saving eieio-persistent's

* lisp/emacs-lisp/eieio-base.el (eieio-persistent-save): Bind
inhibit-modification-hooks -> t.

4 years agocc-mode: add support for Doxygen documentation style
Michal Nazarewicz [Sun, 26 Apr 2020 18:30:41 +0000 (19:30 +0100)]
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.

4 years ago* lisp/jsonrpc.el (initialize-instance): Fix closing-paren typo.
Paul Eggert [Fri, 1 May 2020 17:50:03 +0000 (10:50 -0700)]
* lisp/jsonrpc.el (initialize-instance): Fix closing-paren typo.

4 years agoConsolidate lisp/jsonrpc.el logging in single events buffer
João Távora [Fri, 1 May 2020 12:24:56 +0000 (13:24 +0100)]
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

4 years ago; Fix recent additions with lisp-data-mode
Basil L. Contovounesios [Fri, 1 May 2020 13:44:56 +0000 (14:44 +0100)]
; 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.

4 years ago; Auto-commit of loaddefs files.
Glenn Morris [Fri, 1 May 2020 13:27:00 +0000 (06:27 -0700)]
; Auto-commit of loaddefs files.

4 years agoProtect non-selected face spec components in custimize-face. Fixes bug #40866
Alan Mackenzie [Fri, 1 May 2020 12:23:15 +0000 (12:23 +0000)]
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.

4 years agoAdd lisp-data-mode for editing non-code Lisp data
João Távora [Sat, 18 Apr 2020 01:46:04 +0000 (02:46 +0100)]
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.

4 years agoUse lexical-binding in most remaining tests
Stefan Kangas [Fri, 1 May 2020 11:02:38 +0000 (13:02 +0200)]
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.

4 years agoMake `make-local-variable' declare the var locally dynamic
Michael Heerdegen [Thu, 9 Apr 2020 23:21:33 +0000 (01:21 +0200)]
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.

4 years agoFix calculator division truncation (bug#40892)
Mattias Engdegård [Thu, 30 Apr 2020 13:06:06 +0000 (15:06 +0200)]
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.

4 years agoUse lexical-binding in most remaining emacs-lisp tests
Stefan Kangas [Thu, 30 Apr 2020 10:06:48 +0000 (12:06 +0200)]
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.

4 years ago; Silence byte-compiler warning in version.el
Basil L. Contovounesios [Thu, 30 Apr 2020 10:01:13 +0000 (11:01 +0100)]
; Silence byte-compiler warning in version.el

* lisp/version.el (emacs-repository-get-version): Prefix unused
argument with underscore.

4 years ago; Fix last addition to dom-tests.el
Basil L. Contovounesios [Thu, 30 Apr 2020 09:46:54 +0000 (10:46 +0100)]
; 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.

4 years agoUse lexical-binding in qp.el and add tests
Stefan Kangas [Thu, 30 Apr 2020 08:36:54 +0000 (10:36 +0200)]
Use lexical-binding in qp.el and add tests

* test/lisp/mail/qp-tests.el: New file.
* lisp/mail/qp.el: Use lexical-binding.

4 years agoAdd new function dom-remove-attribute
Lars Ingebrigtsen [Thu, 30 Apr 2020 04:05:17 +0000 (06:05 +0200)]
Add new function dom-remove-attribute

* doc/lispref/text.texi (Document Object Model): Document it.

* lisp/dom.el (dom-remove-attribute): Add new function.

4 years agoTest iso8601-parse-zone vs format-time-string %z
Stephen Gildea [Wed, 29 Apr 2020 14:36:07 +0000 (07:36 -0700)]
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.

4 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 29 Apr 2020 14:50:20 +0000 (07:50 -0700)]
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

4 years ago; Fix last change
Eli Zaretskii [Wed, 29 Apr 2020 11:15:03 +0000 (14:15 +0300)]
; Fix last change

4 years ago* lisp/env.el (substitute-env-vars): Doc fix. (Bug#40948)
Eli Zaretskii [Wed, 29 Apr 2020 11:06:35 +0000 (14:06 +0300)]
* lisp/env.el (substitute-env-vars): Doc fix.  (Bug#40948)

4 years agoUse lexical-binding in most eshell tests
Stefan Kangas [Wed, 29 Apr 2020 08:28:07 +0000 (10:28 +0200)]
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.

4 years agoAdd new tests to bindat-tests.el
Stefan Kangas [Wed, 29 Apr 2020 07:52:34 +0000 (09:52 +0200)]
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.

4 years agoUse lexical-binding in float-sup.el and add tests
Stefan Kangas [Tue, 28 Apr 2020 22:11:56 +0000 (00:11 +0200)]
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.

4 years ago* lisp/isearch.el: Fix lazy-highlighting and lazy-counting of hidden matches
Juri Linkov [Tue, 28 Apr 2020 23:49:44 +0000 (02:49 +0300)]
* 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)

4 years agoUse lexical-binding in rfc2368.el and add tests
Stefan Kangas [Tue, 28 Apr 2020 21:54:28 +0000 (23:54 +0200)]
Use lexical-binding in rfc2368.el and add tests

* lisp/mail/rfc2368.el: Use lexical-binding.
* test/lisp/mail/rfc2368-tests.el: New file.

4 years agoUse lexical-binding in version.el and add tests
Stefan Kangas [Tue, 28 Apr 2020 21:35:00 +0000 (23:35 +0200)]
Use lexical-binding in version.el and add tests

* lisp/version.el: Use lexical-binding.
* test/lisp/version-tests.el: New file.

4 years agoFix error in ERC when 'erc-server-coding-system' is customized
Eli Zaretskii [Tue, 28 Apr 2020 17:22:50 +0000 (20:22 +0300)]
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)

4 years agoUse lexical-binding in puny.el and add more tests
Stefan Kangas [Tue, 28 Apr 2020 16:13:58 +0000 (18:13 +0200)]
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.

4 years agoUse lexical-binding in hmac-md5.el and add tests
Stefan Kangas [Tue, 28 Apr 2020 15:35:12 +0000 (17:35 +0200)]
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.

4 years agoUse lexical-binding in many emacs-lisp tests
Stefan Kangas [Tue, 28 Apr 2020 14:33:08 +0000 (16:33 +0200)]
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.

4 years agoUse lexical-binding in most semantic tests
Stefan Kangas [Tue, 28 Apr 2020 14:11:47 +0000 (16:11 +0200)]
Use lexical-binding in most semantic tests

* test/lisp/cedet/semantic-utest-fmt.el:
* test/lisp/cedet/semantic-utest-ia.el:
* test/lisp/cedet/semantic-utest.el:
* test/lisp/cedet/srecode-utest-getset.el:
* test/lisp/cedet/srecode-utest-template.el: Use lexical-binding.

* test/lisp/cedet/semantic-utest-fmt.el (semantic-fmt-utest):
* test/lisp/cedet/semantic-utest.el (semantic-utest-generic)
(semantic-utest-Python, semantic-utest-Javascript)
(semantic-utest-Java, semantic-utest-Makefile)
(semantic-utest-Scheme, semantic-utest-Html, semantic-utest-PHP)
(semantic-utest-Csharp, semantic-utest-last-invalid):
* test/lisp/cedet/semantic-utest-ia.el (semantic-ia-utest-buffer)
(semantic-symref-test-count-hits-in-tag):
* test/lisp/cedet/srecode-utest-getset.el
(srecode-insert-getset-fully-automatic-flag): Silence
byte-compiler.

4 years agoDon't skip test semantic-utest-Python
Stefan Kangas [Tue, 28 Apr 2020 12:12:25 +0000 (14:12 +0200)]
Don't skip test semantic-utest-Python

* test/lisp/cedet/semantic-utest.el (semantic-utest-Python):
Ensure test is not skipped.

4 years agoUse lexical-binding in most progmodes tests
Stefan Kangas [Tue, 28 Apr 2020 11:54:00 +0000 (13:54 +0200)]
Use lexical-binding in most progmodes tests

* test/lisp/progmodes/etags-tests.el:
* test/lisp/progmodes/f90-tests.el:
* test/lisp/progmodes/ps-mode-tests.el:
* test/lisp/progmodes/python-tests.el:
* test/lisp/progmodes/ruby-mode-tests.el:
* test/lisp/progmodes/subword-tests.el:
* test/lisp/progmodes/tcl-tests.el:
* test/lisp/progmodes/xref-tests.el: Use lexical-binding.

* test/lisp/progmodes/python-tests.el (python-tests-visible-string)
(python-tests-look-at-1, python-tests-look-at-2)
(python-shell-calculate-process-environment-2): Silence byte-compiler.

4 years agoAvoid crashes on TTY frames with over-long compositions
Eli Zaretskii [Tue, 28 Apr 2020 08:57:16 +0000 (11:57 +0300)]
Avoid crashes on TTY frames with over-long compositions

* src/term.c (encode_terminal_code): Each character from an
automatic composition is a multibyte character, so its multibyte
representation can take up to MAX_MULTIBYTE_LENGTH bytes.
Account for that when allocating storage for characters to be
encoded.  (Bug#40913)

4 years agoUse lexical-binding in most vc tests
Stefan Kangas [Tue, 28 Apr 2020 08:36:34 +0000 (10:36 +0200)]
Use lexical-binding in most vc tests

* test/lisp/vc/add-log-tests.el:
* test/lisp/vc/diff-mode-tests.el:
* test/lisp/vc/ediff-ptch-tests.el:
* test/lisp/vc/smerge-mode-tests.el:
* test/lisp/vc/vc-hg-tests.el:
* test/lisp/vc/vc-tests.el: Use lexical-binding.

* test/lisp/vc/add-log-tests.el
(add-log-current-defun-deftest): Silence byte-compiler.

4 years agoImprove multibyte_length performance
Paul Eggert [Mon, 27 Apr 2020 22:46:37 +0000 (15:46 -0700)]
Improve multibyte_length performance

* src/character.h (multibyte_length):
Merge tests so that there are fewer conditional branches.
This improved CPU speed of ‘make compile-always’
by about 1.5% on my platform.

4 years ago* lisp/jit-lock.el: Don't use `make-variable-buffer-local` on hooks.
Stefan Monnier [Mon, 27 Apr 2020 22:36:28 +0000 (18:36 -0400)]
* lisp/jit-lock.el: Don't use `make-variable-buffer-local` on hooks.

(jit-lock-functions): Clarify that it's a hook.
(jit-lock-unregister): Adjust accordingly.

4 years agoUse lexical-binding in calendar tests
Stefan Kangas [Mon, 27 Apr 2020 16:27:24 +0000 (18:27 +0200)]
Use lexical-binding in calendar tests

* test/lisp/calendar/icalendar-tests.el:
* test/lisp/calendar/parse-time-tests.el: Use lexical-binding.

* test/lisp/calendar/icalendar-tests.el (icalendar--format-ical-event)
(icalendar--decode-isodatetime, icalendar-tests--do-test-import)
(icalendar-tests--decode-isodatetime): Silence byte-compiler.

4 years agoFix typo in custom.texi
Stefan Kangas [Mon, 27 Apr 2020 15:09:11 +0000 (17:09 +0200)]
Fix typo in custom.texi

* doc/emacs/custom.texi (Variables): Fix typo.  Pointed out by
ej32u@protonmail.com.  (Bug#40890)

4 years ago* test/lisp/simple-tests.el (with-shell-command-dont-erase-buffer):
Michael Albinus [Mon, 27 Apr 2020 08:36:33 +0000 (10:36 +0200)]
* test/lisp/simple-tests.el (with-shell-command-dont-erase-buffer):

Use `shell-quote-argument' instead of quoting 'like this'.

4 years agoSimplify string-to-char
Paul Eggert [Mon, 27 Apr 2020 02:30:37 +0000 (19:30 -0700)]
Simplify string-to-char

* src/editfns.c (Fstring_to_char): Simplify.

* src/editfns.c (Fstring_to_char): Simplify.

This tweak improved the CPU time performance of
‘make compile-always’ by about 1.8% on my platform.

4 years agoImprove string_char_and_length speed
Paul Eggert [Sun, 26 Apr 2020 22:18:49 +0000 (15:18 -0700)]
Improve string_char_and_length speed

This tweak improved the CPU time performance of
‘make compile-always’ by about 1.7% on my platform.
* src/character.c (string_char): Remove; no longer used.
* src/character.h (string_char_and_length): Redo so that it
needn’t call string_char.  This helps the caller, which can now
become a leaf function.

4 years ago* test/lisp/mail/rfc2045-tests.el: Make it work.
Glenn Morris [Sun, 26 Apr 2020 23:47:04 +0000 (16:47 -0700)]
* test/lisp/mail/rfc2045-tests.el: Make it work.

4 years ago* lisp/image-mode.el (image-mode-map): Update menu items.
Juri Linkov [Sun, 26 Apr 2020 22:33:36 +0000 (01:33 +0300)]
* lisp/image-mode.el (image-mode-map): Update menu items.

* lisp/image-mode.el (image-mode-map): Move "Fit Image to Window (Best Fit)"
higher.  Add "Zoom In" (image-increase-size), "Zoom Out" (image-decrease-size)
and "Rotate Clockwise" (image-rotate).  Use name "Set Rotation..."
for image-transform-set-rotation.  Swap "Next Image" and "Previous Image".
Swap "Next Frame" and "Previous Frame".

4 years agoFix bugs in tab-bar and tab-line and mention remaining features in manual.
Juri Linkov [Sun, 26 Apr 2020 22:28:36 +0000 (01:28 +0300)]
Fix bugs in tab-bar and tab-line and mention remaining features in manual.

* doc/emacs/frames.texi (Tab Bars): Mention tab-bar-new-tab-to,
tab-bar-close-last-tab-choice, tab-bar-close-tab-select, tab-undo,
tab-select, tab-bar-history-mode.

* doc/emacs/windows.texi (Tab Line): Mention tab-line-tabs-function.

* lisp/tab-bar.el (tab-bar-select-tab-modifiers): Mention
tab-bar-tab-hints in docstring.
(tab-bar-tab-hints): Mention tab-bar-select-tab-modifiers
in docstring.
(tab-bar-select-tab): Mention tab-bar-select-tab-modifiers
in docstring.
(tab-bar-switch-to-tab): Expand the docstring.
(tab-bar-new-tab-to): Fix bug in handling 'left' value.
(tab-bar-close-tab): Fix bug in handling 'left' value.
(tab-bar-undo-close-tab): Use funcall tab-bar-tabs-function
instead of direct call to tab-bar-tabs.
(tab-bar-history-back, tab-bar-history-forward): Add docstrings.
(tab-bar-history-mode): Expand docstring.

* lisp/tab-line.el (tab-line-format): Fix bug for handling window
switching that should set face 'tab-line-tab-current'.

4 years agoUse lexical-binding for themes
Stefan Kangas [Sun, 26 Apr 2020 14:22:34 +0000 (16:22 +0200)]
Use lexical-binding for themes

* etc/themes/adwaita-theme.el:
* etc/themes/deeper-blue-theme.el:
* etc/themes/dichromacy-theme.el:
* etc/themes/light-blue-theme.el:
* etc/themes/manoj-dark-theme.el:
* etc/themes/misterioso-theme.el:
* etc/themes/tango-dark-theme.el:
* etc/themes/tango-theme.el:
* etc/themes/tsdh-dark-theme.el:
* etc/themes/tsdh-light-theme.el:
* etc/themes/wheatgrass-theme.el:
* etc/themes/whiteboard-theme.el:
* etc/themes/wombat-theme.el: Use lexical-binding.

4 years agoUse lexical-binding in dos-vars.el
Stefan Kangas [Sun, 26 Apr 2020 12:17:58 +0000 (14:17 +0200)]
Use lexical-binding in dos-vars.el

* lisp/dos-vars.el: Use lexical-binding.
(msdos-shells, dos-codepage-setup-hook): Remove redundant :group
args.

4 years agoFix tramp-test32-shell-command-dont-erase-buffer
Michael Albinus [Sun, 26 Apr 2020 11:32:01 +0000 (13:32 +0200)]
Fix tramp-test32-shell-command-dont-erase-buffer

* test/lisp/net/tramp-tests.el
(tramp-test32-shell-command-dont-erase-buffer): Adapt test.

4 years agoMake shell-command tests fit for tcsh.
Michael Albinus [Sun, 26 Apr 2020 09:39:40 +0000 (11:39 +0200)]
Make shell-command tests fit for tcsh.

* test/lisp/simple-tests.el (with-shell-command-dont-erase-buffer):
Fix debug spec.  Format command to run also under tcsh.
(simple-tests-shell-command-39067)
(simple-tests-shell-command-dont-erase-buffer): Quote newline in string.

4 years agoUse lexical-binding in spook.el
Stefan Kangas [Sun, 26 Apr 2020 07:19:46 +0000 (09:19 +0200)]
Use lexical-binding in spook.el

* lisp/play/spook.el: Use lexical-binding.
(spook-phrases-file, spook-phrase-default-count): Remove redundant
:group args.

4 years agoUse lexical-binding for rfc2045.el and add tests
Stefan Kangas [Sat, 25 Apr 2020 23:27:23 +0000 (01:27 +0200)]
Use lexical-binding for rfc2045.el and add tests

* lisp/mail/rfc2045.el: Use-lexical-binding.
* test/lisp/mail/rfc2045-tests.el: New file.

4 years agoInline a couple of functions that were macros
Paul Eggert [Sat, 25 Apr 2020 23:17:25 +0000 (16:17 -0700)]
Inline a couple of functions that were macros

This reclaims a bit of performance when compiling with gcc -Og.
These functions were macros until I changed them in
2020-04-17T14:57:25Z!eggert@cs.ucla.edu.
* src/casefiddle.c (make_char_unibyte):
* src/ccl.c (GET_TRANSLATION_TABLE): Now inline.

4 years agoUse lexical-binding in dig.el and add tests
Stefan Kangas [Sat, 25 Apr 2020 23:00:39 +0000 (01:00 +0200)]
Use lexical-binding in dig.el and add tests

* lisp/net/dig.el: Use lexical-binding.
(dig-program, dig-dns-server, dig-font-lock-keywords): Remove
redundant :group args.
* test/lisp/net/dig-tests.el: New file.

4 years agoUse lexical-binding in misc.el and add tests
Stefan Kangas [Sat, 25 Apr 2020 22:27:47 +0000 (00:27 +0200)]
Use lexical-binding in misc.el and add tests

* lisp/misc.el: Use lexical-binding.
* test/lisp/misc-tests.el: New file.

4 years agoImprove list-dynamic-libraries when alist empty
Stefan Kangas [Sat, 25 Apr 2020 21:30:22 +0000 (23:30 +0200)]
Improve list-dynamic-libraries when alist empty

* lisp/misc.el (list-dynamic-libraries--refresh): Improve list format
and show message when 'dynamic-library-alist' is empty.

4 years agoRemove doc duplication
Paul Eggert [Sat, 25 Apr 2020 18:22:01 +0000 (11:22 -0700)]
Remove doc duplication

* doc/lispref/objects.texi (Constants and Mutability): Remove
duplication.  From a suggestion by Andreas Schwab (Bug#40671#150).

4 years ago* etc/NEWS: Fix inconsistencies.
Michael Albinus [Sat, 25 Apr 2020 14:54:28 +0000 (16:54 +0200)]
* etc/NEWS: Fix inconsistencies.

4 years agoMerge from origin/emacs-27
Glenn Morris [Sat, 25 Apr 2020 14:50:21 +0000 (07:50 -0700)]
Merge from origin/emacs-27

45a64c97c7 (origin/emacs-27) Clarify semantics of trace-function CONT...
821760fdc4 Don't let a code literal get modified in mml parsing (Bug#...
74a92be16d * lisp/simple.el (kill-ring-save): Doc fix.  (Bug#40797)
3d0e859692 Minor doc clarification regarding fringe bitmaps
4d86c7f822 Fix documentation of fringe bitmaps
a76af88dd8 Tweak mutability doc a bit more
f7e488d206 Calc: fix autoload errors (bug#40800)
369761b36d ; * src/xdisp.c: Improve the introductory commentary.
a92ca1f177 Improve indexing of ELisp manual
5a25d17760 * lisp/image-mode.el (image-transform-resize): Remove FIXM...
37ebec3a95 Improve the default value of 'doc-view-ghostscript-program'.
ba6104d1e8 Change doc-view-mode-map prefix key 's' to 'c'.
400ff5cd19 Improve wording about constants
d2836fe71b Improve the default value of 'doc-view-ghostscript-program'.
fc55f65305 Minor improvements in documentation of the last change
a64da75961 Add image-auto-resize defcustoms to image-mode.el
692ad40539 Improve the documentation of tab-bar and tab-line

# Conflicts:
# etc/NEWS

4 years agoClarify semantics of trace-function CONTEXT argument
Noam Postavsky [Wed, 15 Apr 2020 02:10:58 +0000 (22:10 -0400)]
Clarify semantics of trace-function CONTEXT argument

* lisp/emacs-lisp/trace.el (trace-function-foreground): Explain that
CONTEXT should be a function, when called from Lisp.

4 years agoDon't let a code literal get modified in mml parsing (Bug#39884)
Noam Postavsky [Fri, 17 Apr 2020 00:24:26 +0000 (20:24 -0400)]
Don't let a code literal get modified in mml parsing (Bug#39884)

* lisp/gnus/mml.el (mml-parse-1): Make a fresh cons for the tag type,
because 'mml-generate-mime' destructively modifies it.

4 years agoFix GDI+ image loading by file name
Eli Zaretskii [Sat, 25 Apr 2020 13:37:46 +0000 (16:37 +0300)]
Fix GDI+ image loading by file name

Without a call to image_find_image, we can get a file name that
is relative to data-directory/images/, or a file name that
starts with "~/", in which case w32_load_image would fail.
* src/image.c (native_image_load): Call image_find_image_file to
resolve and encode the image file name.
* src/w32image.c (w32_load_image): No need to encode the file
name, as it's already encoded by native_image_load.

4 years ago* lisp/simple.el (kill-ring-save): Doc fix. (Bug#40797)
Eli Zaretskii [Sat, 25 Apr 2020 10:04:16 +0000 (13:04 +0300)]
* lisp/simple.el (kill-ring-save): Doc fix.  (Bug#40797)

4 years agoMinor doc clarification regarding fringe bitmaps
Clément Pit-Claudel [Wed, 22 Apr 2020 21:46:07 +0000 (17:46 -0400)]
Minor doc clarification regarding fringe bitmaps

* doc/lispref/display.texi (Customizing Bitmaps): Add a note
regarding the order of bits being the opposite of that in
XBM images.  (Bug#40784)

4 years agoFix documentation of fringe bitmaps
Eli Zaretskii [Sat, 25 Apr 2020 09:48:14 +0000 (12:48 +0300)]
Fix documentation of fringe bitmaps

* doc/lispref/display.texi (Fringe Bitmaps): The 'empty-line'
fringe indicator _is_ used.  (Bug#40799)

4 years agoRemove unused variable from ftfont.c
Igor Saprykin [Thu, 23 Apr 2020 20:00:26 +0000 (13:00 -0700)]
Remove unused variable from ftfont.c

* src/ftfont.c (ftfont_lookup_cache): Eliminate unnecessary variable.

Copyright-paperwork-exempt: yes

4 years agoFix two fringe bitmaps
Eli Zaretskii [Sat, 25 Apr 2020 09:11:57 +0000 (12:11 +0300)]
Fix two fringe bitmaps

* src/fringe.c (question_mark_bits, exclamation_mark_bits): Fix
the numerical values.  (Bug#40805)

4 years agoUse lexical-binding in po.el and add tests
Simen Heggestøyl [Sat, 25 Apr 2020 07:10:56 +0000 (09:10 +0200)]
Use lexical-binding in po.el and add tests

* lisp/textmodes/po.el: Use lexical-binding.

* test/lisp/textmodes/po-tests.el: New file with tests for po.el.

4 years agoUse lexical-binding in forms.el example files
Stefan Kangas [Sat, 25 Apr 2020 05:58:26 +0000 (07:58 +0200)]
Use lexical-binding in forms.el example files

* etc/forms/forms-d2.el:
* etc/forms/forms-pass.el: Use lexical-binding.

4 years agoTweak mutability doc a bit more
Paul Eggert [Sat, 25 Apr 2020 02:19:31 +0000 (19:19 -0700)]
Tweak mutability doc a bit more

Inspired by a comment from Michael Heerdegen (Bug#40671#114).
* doc/lispref/objects.texi (Constants and Mutability): Tweak further.

4 years ago; * test/lisp/international/mule-util-tests.el: Fix typos.
Stefan Kangas [Fri, 24 Apr 2020 22:39:31 +0000 (00:39 +0200)]
; * test/lisp/international/mule-util-tests.el: Fix typos.

4 years agoUse lexical-binding for international tests
Stefan Kangas [Fri, 24 Apr 2020 18:38:47 +0000 (20:38 +0200)]
Use lexical-binding for international tests

* test/lisp/international/mule-util-tests.el:
* test/lisp/international/ccl-tests.el: Use lexical-binding.

4 years agoUse lexical-binding for all net tests
Stefan Kangas [Fri, 24 Apr 2020 17:55:47 +0000 (19:55 +0200)]
Use lexical-binding for all net tests

* test/lisp/net/dbus-tests.el:
* test/lisp/net/gnutls-tests.el:
* test/lisp/net/newsticker-tests.el:
* test/lisp/net/puny-tests.el:
* test/lisp/net/rfc2104-tests.el: Use lexical-binding.

4 years agoUse lexical-binding for textmodes tests
Stefan Kangas [Fri, 24 Apr 2020 16:49:28 +0000 (18:49 +0200)]
Use lexical-binding for textmodes tests

* test/lisp/textmodes/mhtml-mode-tests.el:
* test/lisp/textmodes/sgml-mode-tests.el: Use lexical-binding.

4 years agoUse lexical-binding in most url tests
Stefan Kangas [Fri, 24 Apr 2020 16:38:11 +0000 (18:38 +0200)]
Use lexical-binding in most url tests

* test/lisp/url/url-auth-tests.el:
* test/lisp/url/url-expand-tests.el:
* test/lisp/url/url-parse-tests.el:
* test/lisp/url/url-tramp-tests.el:
* test/lisp/url/url-util-tests.el: Use lexical-binding.

4 years agoCalc: fix autoload errors (bug#40800)
Mattias Engdegård [Fri, 24 Apr 2020 10:49:42 +0000 (12:49 +0200)]
Calc: fix autoload errors (bug#40800)

Reported by Hugo Daschbach.

* lisp/calc/calc-ext.el (calc-init-extensions):
Remove calc-kbd-report key binding and autoload; it was removed in 2005.
calc-keypad-x-{left,right,middle}-click were renamed to
calc-keypad-{left,right,middle}-click in 2001; fix the autoloads.
calc-twos-complement-mode is a variable, not a function; remove the
autoload.
* lisp/calc/calc-prog.el: Remove commented-out calc-kbd-report.

4 years agoUse lexical-binding in most src tests
Stefan Kangas [Fri, 24 Apr 2020 13:28:22 +0000 (15:28 +0200)]
Use lexical-binding in most src tests

* test/src/charset-tests.el:
* test/src/chartab-tests.el:
* test/src/cmds-tests.el:
* test/src/coding-tests.el (top-level)
(generate-ascii-file, generate-mostly-nonascii-file):
* test/src/doc-tests.el:
* test/src/floatfns-tests.el:
* test/src/font-tests.el:
* test/src/keymap-tests.el:
* test/src/process-tests.el (top-level)
(process-test-sentinel-wait-function-working-p)
(process-test-stderr-buffer, process-test-stderr-filter):
* test/src/textprop-tests.el:
* test/src/thread-tests.el:
* test/src/timefns-tests.el:
* test/src/undo-tests.el:
* test/src/xml-tests.el: Use lexical-binding.

4 years agoFix bug #40766, an error in edebug spec handling
Alan Mackenzie [Fri, 24 Apr 2020 15:51:43 +0000 (15:51 +0000)]
Fix bug #40766, an error in edebug spec handling

Also remove some debris.

* lisp/emacs-lisp/edebug.el (edebug-spec): Move the entry for edebug-spec-list
to before that for vector in the &or form.  This assures that in a dotted list
of vectors, that list gets handled correctly by edebug-spec-list rather than
wrongly by (vector ...).
(def-edebug-spec &key): Remove, since it is ill formed and superfluous.

4 years ago; * src/xdisp.c: Improve the introductory commentary.
Eli Zaretskii [Fri, 24 Apr 2020 15:09:20 +0000 (18:09 +0300)]
; * src/xdisp.c: Improve the introductory commentary.

4 years ago* etc/edt-user.el: Use lexical-binding.
Stefan Kangas [Mon, 20 Apr 2020 07:27:17 +0000 (09:27 +0200)]
* etc/edt-user.el: Use lexical-binding.

4 years ago* lisp/kermit.el: Use lexical-binding.
Stefan Kangas [Mon, 20 Apr 2020 07:24:20 +0000 (09:24 +0200)]
* lisp/kermit.el: Use lexical-binding.

4 years ago* test/lisp/net/tramp-tests.el
Michael Albinus [Fri, 24 Apr 2020 09:25:50 +0000 (11:25 +0200)]
* test/lisp/net/tramp-tests.el

(tramp-test32-shell-command-dont-erase-buffer): Tag it :unstable.

4 years agoImprove indexing of ELisp manual
Stefan Kangas [Fri, 24 Apr 2020 05:58:17 +0000 (07:58 +0200)]
Improve indexing of ELisp manual

* doc/lispref/tips.texi (Tips): Add index entry 'best practices'.

4 years ago* lisp/image-mode.el (image-transform-resize): Remove FIXME comment.
Juri Linkov [Thu, 23 Apr 2020 22:50:48 +0000 (01:50 +0300)]
* lisp/image-mode.el (image-transform-resize): Remove FIXME comment.

The user customizable variable 'image-auto-resize' is documented now
in the manual.

4 years agoImprove the default value of 'doc-view-ghostscript-program'.
Tassilo Horn [Thu, 23 Apr 2020 16:25:07 +0000 (18:25 +0200)]
Improve the default value of 'doc-view-ghostscript-program'.

* lisp/doc-view.el (doc-view-ghostscript-program): Use plain command
name instead of qualified name returned by executable-find (as
suggested by Stefan Monnier).  (Bug#36357)

4 years agoFix display of composed text with :box face attribute
Eli Zaretskii [Thu, 23 Apr 2020 15:40:42 +0000 (18:40 +0300)]
Fix display of composed text with :box face attribute

* src/xdisp.c (get_next_display_element): For a composition on a
display or overlay string, set the end_of_box_run_p flag if the
string ends at the last character included in the composition.
(fill_gstring_glyph_string): Fix the way the width of a gstring
glyph string is calculated: use the values calculated in
gui_produce_glyphs, since the latter adjusts the width due to the
face's ':box' attribute.
* src/xterm.c (x_draw_glyph_string_box):
* src/w32term.c (w32_draw_glyph_string_box):
* src/nsterm.m (ns_dumpglyphs_box_or_relief): Support automatic
compositions, which have the right_box_line_p flag set on the last
glyph produced from the composition.  (Bug#40687)

* src/w32term.c (w32_compute_glyph_string_overhangs): Update to be
consistent with xterm.c in its support of automatic composition
glyph strings.
* src/dispextern.h (enum glyph_type): More accurate commentary.
* src/.gdbinit (pgx): Display slice.img members only for image
glyphs.

4 years agotext-char-description minor cleanup
Paul Eggert [Thu, 23 Apr 2020 02:00:08 +0000 (19:00 -0700)]
text-char-description minor cleanup

* src/keymap.c (push_text_char_description): Omit useless code.
(Ftext_char_description): Minor code cleanup, inspired by
seeing an incorrect comment about MAX_MULTIBYTE_LENGTH’s value.

4 years agoTweak multibyte parsing loops
Paul Eggert [Thu, 23 Apr 2020 01:58:45 +0000 (18:58 -0700)]
Tweak multibyte parsing loops

* src/character.c (parse_str_as_multibyte, str_as_multibyte):
Let the fast loop run a little longer, fixing what appears
to be an off-by-1 performance nit.

4 years agoChange doc-view-mode-map prefix key 's' to 'c'.
Juri Linkov [Wed, 22 Apr 2020 23:14:42 +0000 (02:14 +0300)]
Change doc-view-mode-map prefix key 's' to 'c'.

* doc/emacs/misc.texi (DocView Slicing): Change prefix key 's' to 'c'.

* lisp/doc-view.el (doc-view-mode-map): Change prefix key 's' to 'c'.

* lisp/image-mode.el (image-mode-map): Add image-transform-set-scale to menu.

* doc/emacs/files.texi (Image Mode): Describe commands
image-transform-fit-both, image-transform-set-scale, image-transform-reset.

* etc/NEWS: Rearrange image sections.

https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg01315.html

4 years agoImprove wording about constants
Paul Eggert [Wed, 22 Apr 2020 17:42:09 +0000 (10:42 -0700)]
Improve wording about constants

Thanks to Štěpán Němec and Drew Adams for reviews of recent changes.
* doc/lispref/eval.texi (Quoting): Give an example.
* doc/lispref/lists.texi (Association Lists): Simplify example code.
* doc/lispref/objects.texi (Lisp Data Types)
(Constants and Mutability): Clarify wording.

4 years agoImprove the default value of 'doc-view-ghostscript-program'.
Tassilo Horn [Wed, 22 Apr 2020 17:23:23 +0000 (19:23 +0200)]
Improve the default value of 'doc-view-ghostscript-program'.

* lisp/doc-view.el (doc-view-ghostscript-program): On Windows, try
gswin64c, gswin32c, rungs, and mgs.  (Bug#36357)

4 years agoSupport old SMB1 protocol in Tramp
Michael Albinus [Wed, 22 Apr 2020 09:16:31 +0000 (11:16 +0200)]
Support old SMB1 protocol in Tramp

* doc/misc/tramp.texi (Frequently Asked Questions):
Describe `tramp-smb-options'.

* lisp/net/tramp-smb.el (tramp-smb-conf): Fix docstring.
(tramp-smb-options): New defcustom.
(tramp-smb-handle-copy-directory, tramp-smb-handle-file-acl)
(tramp-smb-handle-set-file-acl, tramp-smb-maybe-open-connection):
Use it.