]> git.eshelyaron.com Git - emacs.git/log
emacs.git
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.

4 years agoMinor improvements in documentation of the last change
Eli Zaretskii [Tue, 21 Apr 2020 13:50:13 +0000 (16:50 +0300)]
Minor improvements in documentation of the last change

* etc/NEWS:
* doc/emacs/files.texi (Image Mode): Minor copyedits of last change.

4 years agoFix recently introduced error in `tramp-sh-handle-vc-registered'
Michael Albinus [Tue, 21 Apr 2020 11:33:24 +0000 (13:33 +0200)]
Fix recently introduced error in `tramp-sh-handle-vc-registered'

* lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered): Improve test for
`vc-handled-backends'.  (Bug#40670)

4 years agoFix string-to-multibyte overlong sequence bug
Paul Eggert [Tue, 21 Apr 2020 05:26:30 +0000 (22:26 -0700)]
Fix string-to-multibyte overlong sequence bug

* src/character.h (MULTIBYTE_LENGTH, MULTIBYTE_LENGTH_NO_CHECK):
Remove, replacing with ...
(multibyte_length): ... this new function.  All callers changed.
The new function rejects overlong multibyte forms.
* test/src/buffer-tests.el (buffer-multibyte-overlong-sequences):
New test.

4 years ago* lisp/hi-lock.el (hi-lock--regexps-at-point): Use proper-list-p, not consp.
Juri Linkov [Mon, 20 Apr 2020 23:48:22 +0000 (02:48 +0300)]
* lisp/hi-lock.el (hi-lock--regexps-at-point): Use proper-list-p, not consp.

4 years agoAdd image-auto-resize defcustoms to image-mode.el
Juri Linkov [Mon, 20 Apr 2020 23:42:16 +0000 (02:42 +0300)]
Add image-auto-resize defcustoms to image-mode.el

* lisp/image-mode.el (image-auto-resize)
(image-auto-resize-on-window-resize): New defcustoms.
(image-mode-map): Bind "sb" to image-transform-fit-both.
(image-mode): Set image-transform-resize to image-auto-resize initially.
(image-mode--setup-mode): Add hook on image-auto-resize-on-window-resize.
(image-toggle-display-image): Check if image-transform-resize is t.
(image-transform-properties): Check image-transform-resize for nil and t.
(image-transform-fit-both): New command.
(image-transform-reset): Reset image-transform-resize to image-auto-resize.

* doc/emacs/files.texi (Image Mode): Mention image-auto-resize and
image-auto-resize-on-window-resize.

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

4 years agoImprove the documentation of tab-bar and tab-line
Juri Linkov [Mon, 20 Apr 2020 23:23:35 +0000 (02:23 +0300)]
Improve the documentation of tab-bar and tab-line

* doc/emacs/frames.texi (Tab Bars): Add xref to "Tab Line".
Document more commands.

* doc/emacs/windows.texi (Windows):
* doc/emacs/emacs.texi (Top): Add "Tab Line" menu.

* doc/emacs/windows.texi (Window Convenience):
Move tab-line documentation to new node "Tab Line".
(Tab Line): New node.

* doc/emacs/glossary.texi (Glossary):
* doc/emacs/modes.texi (Minor Modes):
* doc/emacs/display.texi (Standard Faces): Add xref to "Tab Line".

4 years agoRemove unnecessary lambda quoting
Eric Abrahamsen [Mon, 20 Apr 2020 18:25:40 +0000 (11:25 -0700)]
Remove unnecessary lambda quoting

* lisp/gnus/nntp.el (nntp-open-connection): Buffer has lexical-binding
turned on.

4 years agoRemove workaround from w32image.c
Eli Zaretskii [Mon, 20 Apr 2020 16:29:58 +0000 (19:29 +0300)]
Remove workaround from w32image.c

* src/w32image.c (w32_load_image): Remove a workaround for a bug
that is not needed anymore.  This error was happening because
GDI+ functions were called as CDECL, not as STDCALL.

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

05089a4d65 (origin/emacs-27) Tweak wording re constant variables
a1040861f1 Tweak setcar-related wording
751510f865 * lisp/image-mode.el: Add prefix key 's' and reduce depend...
9261a219ec * doc/emacs/windows.texi (Window Convenience): Decribe mor...
e1d42da0d6 Fix mutability glitches reported by Drew Adams
5805df74f5 Improve mutability doc
dca35b31d0 Improve mutability documentation
81e7d7f111 Document that quoting yields constants
5734339f40 * doc/lispref/keymaps.texi (Extended Menu Items, Easy Menu...
14a570afae Remove #' and function quoting from lambda forms in manual
d5ec18c66b * src/regex-emacs.c (re_match_2_internal): Rework comment ...
4df8a61117 Add new node "Image Mode" to Emacs Manual.
d7d5ee6c57 ; Fix a typo in cmdargs.texi (bug#40701)
5e9db48fbe * doc/lispref/display.texi (Customizing Bitmaps): Fix typo.
eebfb72c90 Document constant vs mutable objects better
6c187ed6b0 Improve documentation of 'sort-lines'
52288f4b66 Mention 'spam-stat-process-directory-age' in the documenta...
067b070598 ; Fix some typos and doc issues (bug#40695)

# Conflicts:
# etc/NEWS

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

4 years agoSilence byte-compiler after my previous commit
Stefan Kangas [Mon, 20 Apr 2020 05:00:06 +0000 (07:00 +0200)]
Silence byte-compiler after my previous commit

* lisp/autoarg.el (autoarg-kp-digits): Silence byte-compiler.

4 years agoTweak wording re constant variables
Paul Eggert [Mon, 20 Apr 2020 02:52:53 +0000 (19:52 -0700)]
Tweak wording re constant variables

* doc/lispref/objects.texi (Constants and Mutability): Tweak.
Problem reported by Michael Heerdegen (Bug#40693#44).

4 years agoTweak setcar-related wording
Paul Eggert [Sun, 19 Apr 2020 23:46:47 +0000 (16:46 -0700)]
Tweak setcar-related wording

* doc/lispref/eval.texi (Self-Evaluating Forms):
Change “primitives” to “operations”.
Problem reported by Štěpán Němec in:
https://lists.gnu.org/r/emacs-devel/2020-04/msg01146.html

4 years ago* lisp/image-mode.el: Add prefix key 's' and reduce dependency on ImageMagick.
Juri Linkov [Sun, 19 Apr 2020 23:07:43 +0000 (02:07 +0300)]
* lisp/image-mode.el: Add prefix key 's' and reduce dependency on ImageMagick.

* lisp/image-mode.el (image-mode-map): Regroup existing keybindings and
add new ones with the prefix key 's'.
Remove condition ":visible (eq image-type 'imagemagick)" from menu.
(image-toggle-display-image): Don't rotate again after user rotated manually.
(image-transform-check-size): Remove check for imagemagick.
(image-transform-properties, image-transform-set-scale)
(image-transform-fit-to-height, image-transform-fit-to-width)
(image-transform-set-rotation, image-transform-reset):
Remove mentions of ImageMagick from docstrings since these commands
now work without ImageMagick.

4 years ago* doc/emacs/windows.texi (Window Convenience): Decribe more windmove features.
Juri Linkov [Sun, 19 Apr 2020 22:57:32 +0000 (01:57 +0300)]
* doc/emacs/windows.texi (Window Convenience): Decribe more windmove features.

* doc/emacs/windows.texi (Window Convenience): Add descriptions of
windmove-display-default-keybindings,
windmove-delete-default-keybindings,
windmove-swap-states-in-direction.

* etc/NEWS: Regroup to move some parts closer to related sections.

4 years agoFix mutability glitches reported by Drew Adams
Paul Eggert [Sun, 19 Apr 2020 22:09:02 +0000 (15:09 -0700)]
Fix mutability glitches reported by Drew Adams

See Bug#40693#32.
* doc/lispref/eval.texi (Self-Evaluating Forms, Backquote):
Say that these yield constant conses, vectors and strings,
not constant symbols.
* doc/lispref/objects.texi (Constants and Mutability): Say that an
attempt to modify a constant variable signals an error, instead of
saying that it has undefined behavior.

4 years agoImprove mutability doc
Paul Eggert [Sun, 19 Apr 2020 20:22:10 +0000 (13:22 -0700)]
Improve mutability doc

See Eli Zaretskii’s suggestions (Bug#40671#33).
* doc/lispref/lists.texi (Setcar, Setcdr, Rearrangement):
* doc/lispref/sequences.texi (Sequence Functions)
(Array Functions):
Add commentary to examples.
* doc/lispref/lists.texi (Sets And Lists):
Revert change to delq example.

4 years agoImprove mutability documentation
Paul Eggert [Sun, 19 Apr 2020 19:00:49 +0000 (12:00 -0700)]
Improve mutability documentation

This change was inspired by comments from Štěpán Němec in:
https://lists.gnu.org/r/emacs-devel/2020-04/msg01063.html
* doc/lispref/objects.texi (Lisp Data Types): Mention mutability.
(Constants and mutability): New section.
* doc/lispintro/emacs-lisp-intro.texi (Lists diagrammed)
(Indent Tabs Mode): Improve wording.
* doc/lispref/eval.texi (Self-Evaluating Forms):
Say that they return constants.
* doc/lispref/lists.texi (Sets And Lists):
Fix memql mistake/confusion that I recently introduced.