1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

150429 commits

Author SHA1 Message Date
Stefan Kangas
3d2d7e8ea2 Fix automatic filling of docstring in cl-defstruct
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Fix bug where a paragraph
was filled as if it were a single line, which led to garbled
output in the docstring.  (Bug#50839)

* test/lisp/subr-tests.el
(subr-test-internal--format-docstring-line): New test.
2021-09-27 11:47:55 +02:00
Eli Zaretskii
2403deca2b Minor fix in 'w32-find-non-USB-fonts'
* lisp/term/w32-win.el (w32--filter-USB-scripts): Handle
representative characters given as a vector, not a list.
2021-09-27 12:28:54 +03:00
Basil L. Contovounesios
129efd9c0b ; Fix compilation of doc/lispref/symbols.texi. 2021-09-27 10:25:02 +01:00
João Távora
93d200b23c * etc/NEWS (Shorthands for Lisp symbols): Reword. 2021-09-27 10:19:35 +01:00
Robert Pluim
a2a62f7105 Enhance font_range to check for emoji composition triggers
If the codepoint that triggered composition is from the emoji script,
use the emoji font to check the string being composed, rather than the
font of the first character of the string.  This makes e.g.

"emoji codepoint with Emoji_Presentation = No followed by VS-16 (FE0F)"

display the emoji version of the glyph for that codepoint.

* admin/unidata/blocks.awk: Add VS-1 through VS-16 to the emoji
script.
* src/composite.c (autocmp_chars): Accept additional argument CH for
the codepoint that triggered composition, pass it to font_range.
(composition_reseat_it, find_automatic_composition): Pass codepoint
that triggered composition to autocmp_chars.
* src/font.c (font_range): Accept additional argument CH for the
triggering codepoint.  If the codepoint is from the 'emoji' script,
use Vscript_representative_chars to find the font to use for the
composition attempt.
(syms_of_font): Add Qemoji symbol.
* src/font.h: Update font_range prototype for argument CH.
* etc/NEWS: Announce change.
2021-09-27 10:31:32 +02:00
Lars Ingebrigtsen
da4e58458f Fix checkdoc-related test failure 2021-09-27 09:33:56 +02:00
Lars Ingebrigtsen
5f6e88ec9b Fix two doc-related test failures 2021-09-27 09:28:58 +02:00
Michael Albinus
b023f25268 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2021-09-27 09:22:10 +02:00
Michael Albinus
2cef8c216a Optimize emba builds
* test/infra/Dockerfile.emba (emacs-base): Install also
libdbus-1-dev and libacl1-dev.

* test/infra/gitlab-ci.yml (prep-image-base): Comment out.  This
stage is activated by default in Dockerfile.emba.
2021-09-27 09:21:53 +02:00
Eli Zaretskii
00609b1a70 Minor stylistic fixes of shorthand code in C
* src/lread.c (oblookup_considering_shorthand): Now static.  Move
prototype to where it belongs.
(read1, Fintern, Fintern_soft, Funintern)
(oblookup_considering_shorthand, syms_of_lread): Fix style of
braces and indentation, comments, and doc strings.
2021-09-27 10:20:54 +03:00
Eli Zaretskii
d45b3e03c9 Minor fixes of Lisp doc strings for shorthands feature
* lisp/progmodes/elisp-mode.el (obarray-cache)
(elisp--completion-local-symbols):
* lisp/international/mule.el (hack-elisp-shorthands)
(load-with-shorthands-and-code-conversion): Doc string fixes.
2021-09-27 09:49:28 +03:00
Eli Zaretskii
106a95c8ab Minor fixes in documentation of shorthands
* etc/NEWS:
* doc/lispref/symbols.texi (Symbol Components, Creating Symbols)
(Shorthands): Improve wording, fix indexing and typos.
2021-09-27 09:37:33 +03:00
Lars Ingebrigtsen
00011c0ad2 Make comint understand the ccrypt password phrases
* lisp/comint.el (comint-password-prompt-regexp): Add the ccrypt
confirmation phrase (bug#50837).

* lisp/international/mule-conf.el (password-word-equivalents): Add
the ccrypt phrases.
2021-09-27 08:15:24 +02:00
Lars Ingebrigtsen
bec88ecc82 Add "passwd" (change password) prompt to comint
* lisp/comint.el (comint-password-prompt-regexp): Add "passwd" (to
change the password) first promp in Debian bullseye.
2021-09-27 07:55:37 +02:00
Lars Ingebrigtsen
44dbc11ff7 Note that the Packaging sub-nodes are mostly for maintainers
* doc/lispref/package.texi (Packaging): Note that the information
is mostly for ELPA maintainers (bug#50825).
2021-09-27 06:12:53 +02:00
dickmao
cc3b11480c Get a package-test-signed to work again
The test signing key succumbed to either expiration or bitrot.
I hope I didn't just publish my secret key to the world.

* test/lisp/emacs-lisp/package-resources/key.pub: Refresh.
* test/lisp/emacs-lisp/package-resources/key.sec: Refresh.
2021-09-27 06:00:46 +02:00
Lars Ingebrigtsen
d31e56046b Move test-cl-flet-indentation to the right file 2021-09-27 05:57:04 +02:00
Lars Ingebrigtsen
07ecd81ddd Improve describe-char buffer extremely slightly
* lisp/descr-text.el (describe-char): Add a colon to further
signify that we're talking about the following line (bug#50795).
2021-09-27 04:21:00 +02:00
João Távora
58055b5fc3 Document shorthands in the Elisp manual section on Symbols
* doc/lispref/symbols.texi (Symbol Components): Mentione "Shorthands".
(Creating Symbols): Mention shorthands.  Correct references to Common
Lisp.
(Shorthands): New section.

* etc/NEWS (Shorthands): New entry.
2021-09-27 01:07:11 +01:00
João Távora
66f3087530 Add #_ reader macro to escape shorthand renaming
* src/lread.c (read1): Add skip_shorthand variable.  Add a '#_'
case.  If skip_shorthand call oblookup instead of
oblookup_considering_shorthand.

* test/lisp/progmodes/elisp-mode-tests.el
(elisp-shorthand-escape): New test.

* test/lisp/progmodes/elisp-resources/simple-shorthand-test.el
(#_f-test4---): New fixture function.
2021-09-27 01:07:11 +01:00
João Távora
90cbf0cb8d Consider shorthands in Elisp's elisp-completion-at-point
Instead of referencing obarray directly, that function has to consider
a collection of completions which includes the shorthand versions of
some of the symbols.  That collection changes from buffer to buffer,
depending on the choice of elisp-shorthands.

To make this process efficient, and avoid needless recalculation of
the above collection, a new obarray-specific cache was invented.  The
Elisp variable obarray-cache is immediately nullified if something
touches the obarray.

* lisp/progmodes/elisp-mode.el : New helper.
(elisp-completion-at-point): Use new helpers.
(elisp--completion-local-symbols)
(elisp--fboundp-considering-shorthands)
(elisp--bboundp-considering-shorthands): New helpers

* src/lread.c (intern_driver): Nullify Qobarray_cache.
(syms_of_lread): Add Qobarray_cache.

* test/lisp/progmodes/elisp-mode-tests.el
(elisp-shorthand-completion-at-point): New test.

* test/lisp/progmodes/elisp-resources/simple-shorthand-test.el
(f-test-complete-me): New fixture.
2021-09-27 01:07:11 +01:00
João Távora
68d73eb154 Rework Elisp shorthands to only allow only prefix substitution
This simplification in requirements makes for more complex C code but
that code is much less wasteful in Lisp strings than the previous
implementation.

* src/lread.c (read1): Rework.
(Fintern): Rework.
(Fintern_soft): Rework.
(Funintern): Rework.
(oblookup_considering_shorthand): Rewrite.

* test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-read-buffer)
(elisp-shorthand-read-from-string): Use new format of
elisp-shorthands.

* test/lisp/progmodes/elisp-resources/simple-shorthand-test.el (f-test)
(f-test2, f-test3): Use new form of elisp-shorthands.
2021-09-27 01:07:11 +01:00
João Távora
71857d4106 Move most of the shorthand implementation to C code
It passes the tests designed for the previous Elisp implementation.

Likely, this isn't the final form of the implementation.  For one, the
reader is much slower and allocates a Lisp string for every atom read,
regardless if its already interned or not.  This has the potential to
be catastrophic in terms of GC.

Also rename the main variable to elisp-shorthands, from the
repetitive shorthand-shorthands.

For some reason, I had to put 'hack-elisp-shorthands' and
'load-with-shorthands-and-code-conversion', the new source-file
loading functions, in lisp/international/mule.el.

Otherwise, lisp/loadup.el wouldn't see them, for some reason that I
didn't investigate.  This should probably be fixed.

* lisp/shorthand.el: Remove.

* test/lisp/shorthand-tests.el: Remove.

* src/lread.c:
(read1, Fintern, Fintern_soft, Funintern): Use
oblookup_considering_shorthand.
(oblookup_considering_shorthand): New helper.
(syms_of_lread): Declare elisp-shorthands.

* lisp/progmodes/elisp-mode.el (elisp-shorthands):
Put a safe-local-variable spec.

* test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-read-buffer)
(elisp-shorthand-read-from-string)
(elisp-shorthand-byte-compile-a-file)
(elisp-shorthand-load-a-file): New tests.

* test/lisp/progmodes/elisp-resources/simple-shorthand-test.el: New file

* lisp/loadup.el (load-source-file-function): Set to
load-with-shorthands-and-code-conversion.

* lisp/international/mule.el (hack-elisp-shorthands): Move here.
(load-with-shorthands-and-code-conversion): And here.
2021-09-27 01:07:11 +01:00
João Távora
6237bad419 First Elisp version of lisp/shorthand.el, failing some tests
* lisp/shorthand.el: New file

* test/lisp/shorthand-tests.el: New file
2021-09-27 01:07:11 +01:00
Stefan Kangas
4a43b49885 Add 'doc-string' declaration to defcalcmodevar
* lisp/calc/calc.el (defcalcmodevar): Add 'doc-string' declaration.
2021-09-26 20:59:39 +02:00
Stefan Kangas
c00785cbab Move two incorrectly named test files
* test/lisp/emacs-lisp/tabulated-list-test.el: Move from here...
* test/lisp/emacs-lisp/tabulated-list-tests.el: ...to here.
* test/lisp/url/url-handlers-test.el: Move from here...
* test/lisp/url/url-handlers-tests.el: ...to here.
2021-09-26 20:45:07 +02:00
Stefan Kangas
77494628e2 checkdoc: Don't add "Commentary" header to test files
* lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine):
Don't add "Commentary:" header if it looks like a test file.
2021-09-26 20:23:59 +02:00
Robert Pluim
950831c369 Add glyphless-char-display-control for Variation Selectors
* lisp/international/characters.el (update-glyphless-char-display):
(glyphless-char-display-control): Add control knob for U+FE00 through
U+FE0F, defaulting to 'thin-space'.
* doc/lispref/display.texi (Glyphless Chars): Document it.
2021-09-26 18:54:49 +02:00
Stefan Kangas
dd60f94747 Explicitly make the rest of erc-compat.el obsolete
* lisp/obsolete/erc-compat.el (erc-decode-coding-string)
(erc-encode-coding-string, erc-set-write-file-functions)
(erc-emacs-build-time, erc-replace-match-subexpression-in-string)
(erc-member-if, erc-delete-if, erc-remove-if-not, erc-subseq):
Explicitly declare obsolete.
(erc-define-minor-mode): Make into obsolete function alias for
'define-minor-mode'.
(erc-user-emacs-directory): Make into obsolete variable alias for
'user-emacs-directory'.
2021-09-26 18:16:14 +02:00
Stefan Kangas
8bb28e740d ; Minor stylistic checkdoc fixes in test/**/*.el 2021-09-26 17:53:23 +02:00
Stephen Gildea
4cc4344943 ; Clarify and simplify time-stamp comments
* lisp/time-stamp.el (time-stamp-end, time-stamp-string-preprocess,
time-stamp-formatz-from-parsed-options): Simplify doc.
* test/lisp/time-stamp-tests.el (time-stamp-custom-pattern):
Refactor to set limit-number only once.
2021-09-26 08:23:29 -07:00
Eli Zaretskii
5b44e0511a ; Fix some recent fixes to doc strings
* lisp/whitespace.el (whitespace-empty-at-bob-regexp):
* lisp/vc/vc-dir.el (vc-dir-child-files-and-states):
* lisp/vc/vc-annotate.el
(vc-annotate-show-changeset-diff-revision-at-line):
* lisp/vc/ediff.el (ediff-merge-with-ancestor-command):
* lisp/gnus/nnvirtual.el (nnvirtual-update-xref-header)
(nnvirtual-map-article):
* lisp/emulation/viper-init.el (viper-ESC-keyseq-timeout):
* lisp/emulation/viper-cmd.el
(viper-set-parsing-style-toggling-macro):
* lisp/cedet/data-debug.el (data-debug-insert-hash-table-button):
"The first line of a doc string must be a complete sentence."
Also, fix some awkward wording in doc strings while at that.
2021-09-26 16:50:11 +03:00
Stefan Kangas
b8b1d8dee7 Add fast-path to ert--explain-string-equal
* lisp/emacs-lisp/ert.el (ert--explain-string-equal): Add fast-path to
avoid doing extra work.
Problem reported by Mattias Engdegård <mattiase@acm.org>.
2021-09-26 15:30:40 +02:00
Michael Albinus
94af99b298 * test/infra/gitlab-ci.yml (variables): Set DOCKER_BUILDKIT. 2021-09-26 15:28:17 +02:00
Stefan Kangas
3bab1476f6 Rename "Homepage" field to "Website" in package description
* lisp/emacs-lisp/package.el (describe-package-1): Rename
"Homepage" field to "Website".

* test/lisp/emacs-lisp/package-tests.el
(package-test-describe-package)
(package-test-describe-installed-multi-file-package)
(package-test-describe-non-installed-package)
(package-test-describe-non-installed-multi-file-package): Update tests.
2021-09-26 14:55:19 +02:00
Stefan Kangas
8ea1765fea Prefer https for other domains than gnu.org in package URL
* lisp/emacs-lisp/package.el (describe-package-1): Prefer https for
some other common domains in the package URL.
2021-09-26 14:55:19 +02:00
Stefan Kangas
a0d5de4fb9 Add test for lm-website
* lisp/emacs-lisp/lisp-mnt.el (lm-website): Use rx.
* test/lisp/emacs-lisp/lisp-mnt-tests.el
(lm--tests-lm-website): New test.
2021-09-26 14:55:19 +02:00
Mattias Engdegård
6e1de14e51 Rx documentation touch-ups (bug#46910)
* doc/lispref/searching.texi (Rx Constructs, Rx Functions):
Add clarifications and improve naming of arguments.  Add examples
illustrating the differences between `rx` and `rx-to-string`.
2021-09-26 14:44:06 +02:00
Stefan Kangas
c51b1c02db Warn about overly long docstring in lambda
* lisp/emacs-lisp/bytecomp.el
(byte-compile-docstring-length-warn): Warn about overly long
docstring in lambda.  (Bug#44858)

(byte-compile--wide-docstring-p): Improve comment.
* test/lisp/emacs-lisp/bytecomp-tests.el
("warn-wide-docstring-defun.el"): Update to test for the above new
warning.
2021-09-26 13:33:29 +02:00
Stefan Kangas
89bac05aaa Avoid warning about long docstring lines in defcustom
* lisp/custom.el (defcustom): Avoid warning about long docstring
lines.  This was caused by the value of the defcustom being treated as
docstring due to it being wrapped in a lambda.
2021-09-26 13:23:57 +02:00
Stefan Kangas
8c3ec4e3cc Fill some auto-generated docstring lines
* lisp/cedet/mode-local.el (define-mode-local-override):
* lisp/cedet/semantic/decorate/mode.el (define-semantic-decoration-style):
* lisp/cedet/semantic/idle.el (define-semantic-idle-service):
* lisp/emacs-lisp/derived.el (derived-mode-make-docstring):
* lisp/emacs-lisp/eieio.el (defclass): Fill auto-generated docstring
lines.
2021-09-26 13:23:57 +02:00
Stefan Kangas
f3a6fe2c7d Avoid false positives in bytecomp docstring width warning
* lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p):
Ignore more function argument lists.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests-byte-compile--wide-docstring-p): New test.
2021-09-26 13:23:57 +02:00
Stefan Kangas
44da8dd3e4 Improve filling of generated docstring lines
* lisp/subr.el (internal--fill-string-single-line): Improve filling to
use full width.  Fix bug where line was not wrapped correctly.
2021-09-26 13:23:57 +02:00
Stefan Kangas
c78e16962e ; Adjust overly long docstrings to fit 80 characters 2021-09-26 13:23:57 +02:00
Stefan Kangas
f4ea15907a ert: Add basic explainer for string-equal
* lisp/emacs-lisp/ert.el (ert--explain-string-equal): Add basic
explainer for 'string-equal' based on 'ert--explain-equal'.
2021-09-26 13:21:53 +02:00
Stefan Kangas
ce6cee4ca3 Unbreak ert tests
* test/lisp/emacs-lisp/tabulated-list-test.el (tabulated-list-print)
(tabulated-list-sort): Update tests for recent change.
2021-09-26 13:21:53 +02:00
Michael Albinus
2cd2fc74e4 ; More instrumentation in autorevert-tests.el 2021-09-26 12:40:55 +02:00
Stefan Kangas
68994995db Doc fix: mode name in local variables needs no suffix
* doc/emacs/custom.texi (Specifying File Variables): Clarify that a
mode name does not need the "-mode" suffix.  (Bug#50801)
2021-09-26 11:37:29 +02:00
Stefan Kangas
90948eb9d7 checkdoc: Library footer must match package.el requirement
* lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine):
Don't accept footer format unless it matches the requirement in
package.el.
2021-09-26 11:37:29 +02:00
Eli Zaretskii
cd0817a0f7 ; Improve documentation of 'with-environment-variables'
* lisp/env.el (with-environment-variables):
* doc/lispref/os.texi (System Environment): Improve the
documentation of 'with-environment-variables'.
2021-09-26 12:11:56 +03:00