]> git.eshelyaron.com Git - emacs.git/log
emacs.git
19 months ago* Generate trampolines in a temporary directory if no other option is viable feature/inhibit-native-comp-cleanup
Andrea Corallo [Tue, 14 Feb 2023 10:21:45 +0000 (11:21 +0100)]
* Generate trampolines in a temporary directory if no other option is viable

* lisp/emacs-lisp/comp.el (comp--trampoline-abs-filename): Use
temporary file if no other option is viable.

19 months ago* Fix previous change
Andrea Corallo [Mon, 13 Feb 2023 16:00:31 +0000 (17:00 +0100)]
* Fix previous change

* lisp/emacs-lisp/generate-lisp-file.el (generate-lisp-file-trailer):
Fix previous change b6e2799aa1c.

19 months agoRename native-comp-deferred-compilation-deny-list
Andrea Corallo [Mon, 13 Feb 2023 15:40:02 +0000 (16:40 +0100)]
Rename native-comp-deferred-compilation-deny-list

* lisp/emacs-lisp/comp.el (native-comp-jit-compilation-deny-list)
(native-compile-async-skip-p): Rename
native-comp-deferred-compilation-deny-list into
native-comp-jit-compilation-deny-list.
(native-comp-deferred-compilation-deny-list): Mark it obsolete.

19 months agoRename native-comp-deferred-compilation into native-comp-jit-compilation
Andrea Corallo [Mon, 13 Feb 2023 15:37:43 +0000 (16:37 +0100)]
Rename native-comp-deferred-compilation into native-comp-jit-compilation

* src/comp.c (maybe_defer_native_compilation, syms_of_comp):
Rename native-comp-deferred-compilation into
native-comp-jit-compilation.

* lisp/subr.el (native-comp-deferred-compilation): Mark
native-comp-deferred-compilation as obsolete.

* lisp/startup.el (native-comp-deferred-compilation)
(normal-top-level): Rename native-comp-deferred-compilation into
native-comp-jit-compilation.

* lisp/progmodes/elisp-mode.el
(emacs-lisp-native-compile-and-load): Likewise.

* lisp/emacs-lisp/generate-lisp-file.el
(generate-lisp-file-trailer): Likewise.

19 months agoRename comp-enable-subr-trampolines into native-comp-enable-subr-trampolines
Andrea Corallo [Mon, 13 Feb 2023 15:33:40 +0000 (16:33 +0100)]
Rename comp-enable-subr-trampolines into native-comp-enable-subr-trampolines

* src/data.c (Ffset): Rename comp-enable-subr-trampolines into
native-comp-enable-subr-trampolines.

* src/comp.c (syms_of_comp): Likewise.

* lisp/subr.el (comp-enable-subr-trampolines): Make
comp-enable-subr-trampolines obsolete.

* lisp/startup.el (native-comp-enable-subr-trampolines)
(normal-top-level): Rename comp-enable-subr-trampolines into
native-comp-enable-subr-trampolines.

* lisp/loadup.el (dump-mode): Likewise.

* lisp/emacs-lisp/comp.el (comp-subr-trampoline-install)
(comp--trampoline-abs-filename): Likewise.

19 months ago* lisp/emacs-lisp/comp.el (native-comp-never-optimize-functions): Improve doc
Andrea Corallo [Mon, 13 Feb 2023 10:56:02 +0000 (11:56 +0100)]
* lisp/emacs-lisp/comp.el (native-comp-never-optimize-functions): Improve doc

19 months agoSupport `comp-enable-subr-trampolines' as string value
Andrea Corallo [Mon, 13 Feb 2023 10:09:46 +0000 (11:09 +0100)]
Support `comp-enable-subr-trampolines' as string value

* src/comp.c (syms_of_comp): Update `comp-enable-subr-trampolines'.

* lisp/emacs-lisp/comp.el (native-comp-never-optimize-functions)
(comp--trampoline-abs-filename): Support
`comp-enable-subr-trampolines' string value.

* src/data.c (Ffset): Use Vcomp_enable_subr_trampolines now.

19 months ago* Some more `inhibit-native-compile' clean-up
Andrea Corallo [Mon, 13 Feb 2023 09:26:03 +0000 (10:26 +0100)]
* Some more `inhibit-native-compile' clean-up

* lisp/emacs-lisp/generate-lisp-file.el (generate-lisp-file-trailer):
Use `native-comp-deferred-compilation'.

19 months agoRevert "Add new variable 'inhibit-native-compilation'"
Andrea Corallo [Mon, 13 Feb 2023 09:19:31 +0000 (10:19 +0100)]
Revert "Add new variable 'inhibit-native-compilation'"

This reverts commit 5fec9182dbeffa88cef6651d8c798ef9665d6681.

19 months agoRevert "Rename to inhibit-automatic-native-compilation"
Andrea Corallo [Mon, 13 Feb 2023 09:15:33 +0000 (10:15 +0100)]
Revert "Rename to inhibit-automatic-native-compilation"

This reverts commit f97993ee667f9be7589825f3a4fbc095d6944ec6.

19 months agoFix spurious display of eclipses in Calendar
Ulrich Müller [Sun, 12 Feb 2023 19:57:49 +0000 (20:57 +0100)]
Fix spurious display of eclipses in Calendar

* lisp/calendar/lunar.el (eclipse-check): Don't show an eclipse
unless the phase is new moon or full moon. (bug#61460)
* test/lisp/calendar/lunar-tests.el (lunar-test-eclipse-check)
(lunar-test-phase-list): Update tests.

19 months agoFix indentation for closing bracket in c-ts-mode (bug#61398)
Yuan Fu [Mon, 13 Feb 2023 03:49:47 +0000 (19:49 -0800)]
Fix indentation for closing bracket in c-ts-mode (bug#61398)

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--indent-styles): Move the rule earlier.
(c-ts-base-mode): Add move block type.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: New tests.

19 months ago; * src/pdumper.c (dump_buffer): Update hash.
Basil L. Contovounesios [Sun, 12 Feb 2023 21:07:45 +0000 (21:07 +0000)]
; * src/pdumper.c (dump_buffer): Update hash.

This follows commit 8f3091defb3 of 2023-02-12
"; Fix typo in buffer.h".

19 months agoUpdate to Org 9.6.1-31-gaf1bb1
Kyle Meyer [Sun, 12 Feb 2023 20:43:07 +0000 (15:43 -0500)]
Update to Org 9.6.1-31-gaf1bb1

19 months ago* src/.gdbinit (nextcons): Amend $.u.cdr to $.u.s.u.cdr (bug#61453).
Alan Mackenzie [Sun, 12 Feb 2023 19:06:50 +0000 (19:06 +0000)]
* src/.gdbinit (nextcons): Amend $.u.cdr to $.u.s.u.cdr (bug#61453).

(cherry picked from commit dde023b63ab82c38d33815409de5552f5bf349d1)

19 months agoAdd lambda_expression to c-ts-common-indent-type-regexp-alist
Theodor Thornhill [Sun, 12 Feb 2023 17:57:40 +0000 (18:57 +0100)]
Add lambda_expression to c-ts-common-indent-type-regexp-alist

* lisp/progmodes/java-ts-mode.el (java-ts-mode): Tweak regexp.

19 months ago; Use the right name when specifying VC packages
Philip Kaludercic [Sun, 12 Feb 2023 13:29:26 +0000 (14:29 +0100)]
; Use the right name when specifying VC packages

* lisp/emacs-lisp/package-vc.el
(package-vc-install-selected-packages): Generate dummy package
descriptors in here, if necessary.
(package-vc--unpack): Remove dummy-descriptor generation.

19 months agoTolerate missing elpa-packages.eld files
Philip Kaludercic [Sun, 12 Feb 2023 12:25:54 +0000 (13:25 +0100)]
Tolerate missing elpa-packages.eld files

* lisp/emacs-lisp/package-vc.el
(package-vc--download-and-read-archives): Replace
'condition-case-unless-debug' with a regular 'condition-case'.

It appears a few people using third-party archives that don't serve
package specifications have been having issues with package-vc, when
toggle-on-error is enabled.  In their case, package-vc would raise an
error in its first invocation, but it would go on working normally
afterwards.  As this behaviour is confusing and the user can't do much
about a missing elpa-packages.eld to begin with, we satisfy ourselves
with printing out a message and continuing on.

19 months agoAvoid warning about 'load-path' in non-interactive sessions
Eli Zaretskii [Sun, 12 Feb 2023 12:20:48 +0000 (14:20 +0200)]
Avoid warning about 'load-path' in non-interactive sessions

* lisp/startup.el (command-line): Emit the warning about
'user-emacs-directory' in 'load-path' only in interactive
sessions.  (Bug#61014)

19 months ago; Fix installation of dependencies for VC packages
Philip Kaludercic [Sun, 12 Feb 2023 12:10:04 +0000 (13:10 +0100)]
; Fix installation of dependencies for VC packages

* lisp/emacs-lisp/package-vc.el (package-vc-install-dependencies):
Maintain a list of package-desc objects instead of package names to
install.

19 months ago; Mention Hunspell private-dictionary misfeature in doc strings
Eli Zaretskii [Sun, 12 Feb 2023 12:05:44 +0000 (14:05 +0200)]
; Mention Hunspell private-dictionary misfeature in doc strings

* lisp/textmodes/ispell.el (ispell-personal-dictionary)
(ispell-local-pdict): Mention Hunspell misfeatures in doc
strings.  (Bug#61190)

19 months agoSupport webkit2gtk-4.1
Ulrich Müller [Thu, 9 Feb 2023 09:58:48 +0000 (10:58 +0100)]
Support webkit2gtk-4.1

* configure.ac: Check for webkit2gtk API version 4.1 first, then
fall back to 4.0.

19 months ago; Fix typo
Stefan Kangas [Sun, 12 Feb 2023 06:47:09 +0000 (07:47 +0100)]
; Fix typo

19 months ago; Fix typo in buffer.h
Daniel Martín [Sun, 12 Feb 2023 00:32:20 +0000 (01:32 +0100)]
; Fix typo in buffer.h

19 months ago; Fix typos
Stefan Kangas [Sun, 12 Feb 2023 02:23:13 +0000 (03:23 +0100)]
; Fix typos

19 months ago; Fix doc strings in lisp/image/ directory
Eli Zaretskii [Sat, 11 Feb 2023 14:49:54 +0000 (16:49 +0200)]
; Fix doc strings in lisp/image/ directory

* lisp/image/wallpaper.el (wallpaper-setter)
(wallpaper--find-command, wallpaper--x-monitor-name)
(wallpaper--format-arg):
* lisp/image/image-dired-util.el
(image-dired-associated-dired-buffer)
(image-dired--with-dired-buffer):
* lisp/image/image-dired-tags.el (image-dired--with-db-file)
(image-dired-remove-tag, image-dired-list-tags)
(image-dired-tag-files, image-dired-write-comments)
(image-dired-update-property):
* lisp/image/image-dired-external.el (image-dired-cmd-pngnq-options)
(image-dired-cmd-pngcrush-program)
(image-dired-cmd-pngcrush-options)
(image-dired-cmd-optipng-options)
(image-dired-cmd-create-standard-thumbnail-options)
(image-dired-cmd-rotate-original-program)
(image-dired-cmd-rotate-original-options)
(image-dired-cmd-write-exif-data-options, image-dired-queue)
(image-dired-queue-active-limit, image-dired-pngnq-thumb)
(image-dired-pngcrush-thumb, image-dired-optipng-thumb)
(image-dired-thumb-queue-run, image-dired-get-exif-file-name)
(image-dired-thumbnail-set-image-description):
* lisp/image/image-dired.el (image-dired-thumbnail-storage)
(image-dired-tags-db-file)
(image-dired-rotate-original-ask-before-overwrite)
(image-dired-line-up-method, image-dired-track-movement)
(image-dired-display-properties-format)
(image-dired-external-viewer)
(image-dired-show-all-from-dir-max-files)
(image-dired-insert-image)
(image-dired-dired-with-window-configuration)
(image-dired-restore-window-configuration)
(image-dired-track-original-file)
(image-dired-toggle-movement-tracking)
(image-dired-format-properties-string)
(image-dired--on-file-in-dired-buffer)
(image-dired-thumbnail-display-external)
(image-dired-display-image, image-dired-copy-filename-as-kill):
* lisp/image/image-dired-dired.el
(image-dired-dired-toggle-marked-thumbs)
(image-dired-dired-after-readin-hook)
(image-dired-next-line-and-display)
(image-dired-previous-line-and-display)
(image-dired-mark-and-display-next, image-dired-track-thumbnail)
(image-dired-dired-next-line, image-dired-dired-previous-line)
(image-dired-dired-display-external)
(image-dired-copy-with-exif-file-name)
(image-dired-mark-tagged-files)
(image-dired-dired-display-properties):
* lisp/image/image-crop.el (image-crop-exif-rotate)
(image-crop-resize-command, image-crop-cut-command)
(image-crop-crop-command, image-crop-rotate-command)
(image-crop-buffer-text-function, image-cut-color):
* lisp/image/image-converter.el (image-converter)
(image-convert-to-format, image-converter-regexp)
(image-converter--converters, image-convert-p, image-convert)
(image-converter--value, image-converter--probe)
(image-converter--find-converter, image-converter--convert)
(image-converter-add-handler):
* lisp/image/exif.el (exif-parse-buffer, exif-field)
(exif-orientation, exif--direct-ascii-value)
(exif--process-value, exif--read-chunk, exif--read-number-be)
(exif--read-number-le, exif--read-number): Fix doc strings.

19 months ago; Improve documentation of hash functions.
Eli Zaretskii [Sat, 11 Feb 2023 10:28:43 +0000 (12:28 +0200)]
; Improve documentation of hash functions.

* src/fns.c (Fsecure_hash, Fmd5): Document the length of the
return values.

* lisp/subr.el (sha1): Describe the return value in more detail.

* doc/lispref/text.texi (Checksum/Hash): Document 'sha1'.
Document the length of the strings returned by each hashing
algorithm.

19 months ago; Remove extraneous local variables from image-dired-*.el files
Eli Zaretskii [Sat, 11 Feb 2023 09:48:48 +0000 (11:48 +0200)]
; Remove extraneous local variables from image-dired-*.el files

These cause annoying prompts when visiting these files, and evidently
belong to a third-party package.
* lisp/image/image-dired-external.el:
* lisp/image/image-dired-tags.el:
* lisp/image/image-dired-dired.el:
* lisp/image/image-dired-util.el: Remove unsafe local-variables.

19 months agobug-reference: prevent match-data clobbering (bug#61395)
Tassilo Horn [Fri, 10 Feb 2023 18:22:56 +0000 (19:22 +0100)]
bug-reference: prevent match-data clobbering (bug#61395)

* lisp/progmodes/bug-reference.el (bug-reference-fontify): Wrap call
to syntax-ppss in save-match-data since it can clobber our
match-data (bug#61395).

19 months ago; * admin/notes/tree-sitter/starter-guide: Typos.
Basil L. Contovounesios [Fri, 10 Feb 2023 15:24:45 +0000 (15:24 +0000)]
; * admin/notes/tree-sitter/starter-guide: Typos.

Reported by Romanos Skiadas <rom.skiad@gmail.com>.

19 months ago; Fix recent changes in treesit docs
Eli Zaretskii [Fri, 10 Feb 2023 12:14:05 +0000 (14:14 +0200)]
; Fix recent changes in treesit docs

* doc/lispref/parsing.texi (Accessing Node Information): Fix
wording and indexing, and add cross-reference.

19 months agoRename LIMIT to DEPTH in tree-sitter functions (bug#61231)
Yuan Fu [Fri, 10 Feb 2023 07:25:57 +0000 (23:25 -0800)]
Rename LIMIT to DEPTH in tree-sitter functions (bug#61231)

I only changed the Lisp functions, internal functions are left
unchanged.

* doc/lispref/parsing.texi (Retrieving Nodes): Update manual.
* src/treesit.c (Ftreesit_search_subtree)
(Ftreesit_induce_sparse_tree): Change LIMIT to DEPTH.

19 months ago; Fix incorrect function name in treesit manual
Simon Pugnet [Thu, 9 Feb 2023 11:33:31 +0000 (11:33 +0000)]
; Fix incorrect function name in treesit manual

An example in the documentation uses the function
'treesit-get-parser-create' which does not exist.  Replace this with
'treesit-parser-create'.

* admin/notes/tree-sitter/html-manual/Multiple-Languages.html:
* doc/lispref/parsing.texi (Multiple Languages):
Change example.

Copyright-paperwork-exempt: yes

19 months agoAdd 'live' property to treesit-node-check (bug#61235)
Yuan Fu [Mon, 6 Feb 2023 04:22:52 +0000 (20:22 -0800)]
Add 'live' property to treesit-node-check (bug#61235)

* doc/lispref/parsing.texi (Accessing Node Information): Document.
* src/treesit.c (treesit_parser_live_p): New function.
(Ftreesit_node_check): Add 'live' property.
* test/src/treesit-tests.el (treesit-node-api): Add tests.

19 months agoUpdate to Transient v0.3.7-205-gb8ad0da
Jonas Bernoulli [Thu, 9 Feb 2023 22:53:33 +0000 (23:53 +0100)]
Update to Transient v0.3.7-205-gb8ad0da

19 months agoFix 'rmail-summary-output'
Eli Zaretskii [Thu, 9 Feb 2023 15:34:19 +0000 (17:34 +0200)]
Fix 'rmail-summary-output'

* lisp/mail/rmailsum.el (rmail-summary-output): Fix deletion of
messages when 'rmail-output-reset-deleted-flag' is non-nil.
(Bug#61380)

19 months agolisp-mode: add docstring recognition for more common lisp symbols
Nicolas Martyanoff [Thu, 9 Feb 2023 10:39:14 +0000 (11:39 +0100)]
lisp-mode: add docstring recognition for more common lisp symbols

* lisp/emacs-lisp/lisp-mode.el (define-compiler-macro)
(define-setf-expander, deftype): Add the 'doc-string-elt'
property for proper docstring highlighting in Common Lisp.

19 months ago; Improve discoverability of empty file names handling
Eli Zaretskii [Thu, 9 Feb 2023 14:06:55 +0000 (16:06 +0200)]
; Improve discoverability of empty file names handling

* doc/lispref/files.texi (Relative File Names)
(Testing Accessibility, File Name Expansion): Document and index
the behavior with empty strings as file names.

19 months agoUpdate to Transient v0.3.7-204-gecff8c2
Jonas Bernoulli [Thu, 9 Feb 2023 12:28:05 +0000 (13:28 +0100)]
Update to Transient v0.3.7-204-gecff8c2

19 months agoFix Scala entry in Eglot's DB of LSP servers
Eli Zaretskii [Thu, 9 Feb 2023 10:17:18 +0000 (12:17 +0200)]
Fix Scala entry in Eglot's DB of LSP servers

* lisp/progmodes/eglot.el (eglot-server-programs): Support Scala
LSP named "metals", in addition to "metals-emacs".  (Bug#61312)

19 months agoruby-ts-mode: Also don't reindent 'identifier' when inside ERROR
Dmitry Gutov [Thu, 9 Feb 2023 02:48:25 +0000 (04:48 +0200)]
ruby-ts-mode: Also don't reindent 'identifier' when inside ERROR

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules):
Also don't reindent 'identifier' when inside ERROR.

19 months agoruby-ts-mode: Fix indentation inside empty if/unless/case/def
Dmitry Gutov [Thu, 9 Feb 2023 02:15:41 +0000 (04:15 +0200)]
ruby-ts-mode: Fix indentation inside empty if/unless/case/def

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules):
Add new rule.

* test/lisp/progmodes/ruby-ts-mode-tests.el
(ruby-ts-indent-empty-if-else): New test.

19 months ago* lisp/iimage.el (iimage-mode-buffer): Handle multiple regexps.
LensPlaysGames [Wed, 8 Feb 2023 18:56:48 +0000 (20:56 +0200)]
* lisp/iimage.el (iimage-mode-buffer): Handle multiple regexps.

Go to the beginning of the buffer before searching every regexp in
iimage-mode-image-regex-alist.

Copyright-paperwork-exempt: yes

19 months ago; Fix memory leak in treesit.c
Eli Zaretskii [Wed, 8 Feb 2023 16:40:50 +0000 (18:40 +0200)]
; Fix memory leak in treesit.c

* src/treesit.c (treesit_load_language): Fix a memory leak.
Reported by Eric Gillespie <epg@pretzelnet.org>.

19 months ago* lisp/edmacro.el (edit-kbd-macro): Fix thinko (bug#61333)
Stefan Monnier [Tue, 7 Feb 2023 23:10:33 +0000 (18:10 -0500)]
* lisp/edmacro.el (edit-kbd-macro): Fix thinko (bug#61333)

Backported from commit 2273cdb40e1939f7c29a669f6a64e6a27738c1a5.

19 months ago; Fix doc strings in iimage.el
Eli Zaretskii [Wed, 8 Feb 2023 12:56:42 +0000 (14:56 +0200)]
; Fix doc strings in iimage.el

* lisp/iimage.el (iimage-mode-image-regex-alist)
(iimage-modification-hook): Doc fixes.

19 months agoFix crashes inside 'xfree' called from treesit.c
Eli Zaretskii [Tue, 7 Feb 2023 19:53:05 +0000 (21:53 +0200)]
Fix crashes inside 'xfree' called from treesit.c

* src/treesit.c (treesit_load_language): Always xstrdup 'c_name',
to avoid crashes inside xfree.  (Bug#61351)

19 months agoMake java-ts-mode use the c-ts-common-indent-type-regexp-alist
Yuan Fu [Tue, 7 Feb 2023 02:48:04 +0000 (18:48 -0800)]
Make java-ts-mode use the c-ts-common-indent-type-regexp-alist

* lisp/progmodes/java-ts-mode.el:
(java-ts-mode): Setup c-ts-common-indent-type-regexp-alist.

19 months agoFix c-ts-mode indentation
Yuan Fu [Mon, 6 Feb 2023 03:32:24 +0000 (19:32 -0800)]
Fix c-ts-mode indentation

Sign, ok, there's another edge case: else if statements.  Because
"else if" is usually implemented as just another if statement nested
in the else branch, this creates additional levels that indentation
needs to ignore.

I converted c-ts-common-indent-block-type-regexp +
c-ts-common-indent-bracketless-type-regexp into a new, more flexible
variable, c-ts-common-indent-type-regexp-alist, to avoid adding yet
more variables in order to recognize else and if statements.

* lisp/progmodes/c-ts-common.el:
(c-ts-common-indent-type-regexp-alist): New variable.
(c-ts-common-indent-block-type-regexp)
(c-ts-common-indent-bracketless-type-regexp): Remove variables.
(c-ts-common--node-is): New function.
(c-ts-common-statement-offset): Use the new variable, and add the
"else if" special case.  Also merge the code of
c-ts-mode--fix-bracketless-indent, because now the code is much more
succinct.
(c-ts-mode--fix-bracketless-indent): Merge into
c-ts-common-statement-offset.

* lisp/progmodes/c-ts-mode.el:
(c-ts-base-mode): Setup c-ts-common-indent-type-regexp-alist.

* test/lisp/progmodes/c-ts-mode-resources/indent.erts: New test.

19 months agoFix c-ts-mode indentation
Yuan Fu [Mon, 6 Feb 2023 01:05:21 +0000 (17:05 -0800)]
Fix c-ts-mode indentation

Turns out I shouldn't have removed the explicit rules.  Anyway, now it
indents properly.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Add rules.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: Add tests

19 months agoFix c-ts-mode indentation (bug#61291)
Yuan Fu [Sun, 5 Feb 2023 23:20:52 +0000 (15:20 -0800)]
Fix c-ts-mode indentation (bug#61291)

Fix indentation for the semicolon in

while (str_a[i++] == str_b[j++])
  ;

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): New rule.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: New test.

19 months ago(eglot-completion-at-point): Return correct values in :company-kind
Dmitry Gutov [Mon, 6 Feb 2023 22:28:25 +0000 (00:28 +0200)]
(eglot-completion-at-point): Return correct values in :company-kind

* lisp/progmodes/eglot.el (eglot-completion-at-point): Return the
correct values in :company-kind for "EnumMember" and "TypeParameter".
The convention is to use kebab case rather than plain downcasing.
Reported in https://github.com/company-mode/company-mode/issues/1370.

19 months agoTighten and simplify typescript compilation-mode regexps (bug#61104)
Mattias Engdegård [Mon, 6 Feb 2023 10:45:33 +0000 (11:45 +0100)]
Tighten and simplify typescript compilation-mode regexps (bug#61104)

* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Tighten regexps and simplify.  Translate to rx.
* etc/compilation.txt: Add examples.

In collaboration with Jostein Kjønigsen.

19 months ago; * lisp/progmodes/c-ts-common.el (treesit-node-prev-sibling): Declare.
Eli Zaretskii [Mon, 6 Feb 2023 16:34:39 +0000 (18:34 +0200)]
; * lisp/progmodes/c-ts-common.el (treesit-node-prev-sibling): Declare.

19 months agoClarify bug-reference-auto-setup-functions docstring.
Tassilo Horn [Mon, 6 Feb 2023 16:09:40 +0000 (17:09 +0100)]
Clarify bug-reference-auto-setup-functions docstring.

* lisp/progmodes/bug-reference.el (bug-reference-auto-setup-functions):
Add clarification to docstring that this variable is for packages, not
for users.

19 months ago* lisp/treesit.el (treesit): Fix shortdoc example form (bug#61318).
Aleksandr Vityazev [Mon, 6 Feb 2023 10:39:10 +0000 (13:39 +0300)]
* lisp/treesit.el (treesit): Fix shortdoc example form (bug#61318).

19 months agoUse c-ts-common-statement-offset in java-ts-mode (bug#61142)
Theodor Thornhill [Sun, 5 Feb 2023 07:49:08 +0000 (08:49 +0100)]
Use c-ts-common-statement-offset in java-ts-mode (bug#61142)

* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): Add new
matchers to enable c-ts-common machinery.
(java-ts-mode): Add regexps.
* lisp/progmodes/c-ts-common.el (c-ts-common-statement-offset): Fix
typo in documentation and use the new if statement helpers.
(c-ts-common-if-statement-regexp): New defvar.
(c-ts-common-nestable-if-statement-p): New defvar.
(c-ts-common--fix-nestable-if-statement): New helper.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: Add test for
complicated bracket matching indentation.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Add indent
rules for bracketless statements.

19 months agoAdd array_initializer to java-ts-mode
Theodor Thornhill [Sun, 5 Feb 2023 07:24:14 +0000 (08:24 +0100)]
Add array_initializer to java-ts-mode

Indent strings inside arrray_initializer one step:

public class Java {
    void foo() {
        return new String[]{
            "foo", // These
            "bar"
        }
    }
}

* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): New
matcher.

19 months agogo-ts-mode: Highlight variable declarations
Dmitry Gutov [Mon, 6 Feb 2023 02:42:12 +0000 (04:42 +0200)]
go-ts-mode: Highlight variable declarations

* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
Highlight variable declarations in 'definition' feature.

19 months agogo-ts-mode: Fix highlighting of function name in call_expression
Dmitry Gutov [Mon, 6 Feb 2023 02:12:25 +0000 (04:12 +0200)]
go-ts-mode: Fix highlighting of function name in call_expression

* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
Remove :override from the 'property' rules and move them above
'variable' (bug#61302).  Just like in rust-ts-mode.

19 months agoc-ts-mode: Highlight "property functions" as functions
Dmitry Gutov [Mon, 6 Feb 2023 02:05:19 +0000 (04:05 +0200)]
c-ts-mode: Highlight "property functions" as functions

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings):
Highlight "property functions" as functions (bug#61302).

19 months agorust-ts-mode: Fix highlighting of function name in call_expression
Dmitry Gutov [Sun, 5 Feb 2023 21:42:18 +0000 (23:42 +0200)]
rust-ts-mode: Fix highlighting of function name in call_expression

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
Remove :override from the 'property' rules and move them above
'variable' (bug#61302).

19 months agorust-ts-mode--font-lock-settings: Improve consistency
Dmitry Gutov [Sun, 5 Feb 2023 19:34:12 +0000 (21:34 +0200)]
rust-ts-mode--font-lock-settings: Improve consistency

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
Remove the rule that highlighted scope identifier in a function call
as type.  The existing rules will handle it when it does look like a
type (capitalized).

19 months agoMake sure 'M-x show-paren-local-mode' turns on right away
Dmitry Gutov [Sun, 5 Feb 2023 19:07:45 +0000 (21:07 +0200)]
Make sure 'M-x show-paren-local-mode' turns on right away

* lisp/paren.el (show-paren--enabled-p): Extract from
'show-paren-function'.
(show-paren-local-mode): Use it in the :variable getter (bug#61098).

19 months agoAdd to bug-reference-auto-setup-functions after its declaring defvar
Tassilo Horn [Sun, 5 Feb 2023 18:54:17 +0000 (19:54 +0100)]
Add to bug-reference-auto-setup-functions after its declaring defvar

If it's the init-value of the defvar, add-hook from a third-party
package will suppress the default functions if it takes place before
bug-reference is loaded.

* lisp/progmodes/bug-reference.el (bug-reference-auto-setup-functions):
Add to bug-reference-auto-setup-functions after its declaring defvar.

19 months ago* lisp/vc/vc.el (vc-find-revision-no-save): Fix parens (bug#61256).
Juri Linkov [Sun, 5 Feb 2023 18:23:57 +0000 (20:23 +0200)]
* lisp/vc/vc.el (vc-find-revision-no-save): Fix parens (bug#61256).

Move '(setq failed nil)' from UNWINDFORMS of 'unwind-protect' to BODYFORM.

19 months ago; Fix byte-compilation warning
Eli Zaretskii [Sun, 5 Feb 2023 17:10:39 +0000 (19:10 +0200)]
; Fix byte-compilation warning

* lisp/progmodes/rust-ts-mode.el (treesit-query-compile): Avoid
byte-compilation warning.

19 months agoFix inability to turn show-paren-local-mode on manually (bug#61098)
Dmitry Gutov [Sun, 5 Feb 2023 17:06:47 +0000 (19:06 +0200)]
Fix inability to turn show-paren-local-mode on manually (bug#61098)

* lisp/paren.el (show-paren-local-mode): Don't kill the local
value when both local and global are t.  Because the
show-paren-predicate check in show-paren-function also checks
whether a local (non-nil) value of this variable exists.

19 months ago; go-ts-mode--indent-rules: Indent to 0 at top level
Dmitry Gutov [Sun, 5 Feb 2023 16:52:57 +0000 (18:52 +0200)]
; go-ts-mode--indent-rules: Indent to 0 at top level

19 months agoMerge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
Eli Zaretskii [Sun, 5 Feb 2023 16:53:36 +0000 (18:53 +0200)]
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29

19 months ago; Fix whitespace of last change
Eli Zaretskii [Sun, 5 Feb 2023 16:52:59 +0000 (18:52 +0200)]
; Fix whitespace of last change

19 months ago; Fix trivial mistake in emoji--choose-emoji
Jonas Bernoulli [Sun, 5 Feb 2023 16:50:10 +0000 (17:50 +0100)]
; Fix trivial mistake in emoji--choose-emoji

* lisp/international/emoji.el (emoji--choose-emoji): The derived
versions are in the cdr not cadr.

19 months ago; * lisp/isearch.el (emoji--read-emoji): Avoid compilation warning.
Eli Zaretskii [Sun, 5 Feb 2023 16:51:11 +0000 (18:51 +0200)]
; * lisp/isearch.el (emoji--read-emoji): Avoid compilation warning.

19 months agorust-ts-mode: Highlight variable declarations
Dmitry Gutov [Sun, 5 Feb 2023 16:49:24 +0000 (18:49 +0200)]
rust-ts-mode: Highlight variable declarations

(rust-ts-mode--font-lock-settings): Change scoped_type_identifier
highlight to match similar cases.  Highlight variable declarations
inside all kinds of destructuring patterns, not just function
definitions.
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--fontify-pattern):
Rename from 'rust-ts-mode--fontify-parameter'.  Check the id node's
parent to avoid touching type identifiers.

19 months agorust-ts-mode--indent-rules: Indent to 0 at top level
Dmitry Gutov [Sun, 5 Feb 2023 16:19:04 +0000 (18:19 +0200)]
rust-ts-mode--indent-rules: Indent to 0 at top level

19 months ago; Move misplaces parenthesis in emoji--choose-emoji
Jonas Bernoulli [Sun, 5 Feb 2023 16:19:15 +0000 (17:19 +0100)]
; Move misplaces parenthesis in emoji--choose-emoji

* lisp/international/emoji.el (emoji--choose-emoji): Move misplaced
parenthesis.

19 months agoEnsure upper bound of font-lock region is less than point-max
Alan Mackenzie [Sun, 5 Feb 2023 15:59:44 +0000 (15:59 +0000)]
Ensure upper bound of font-lock region is less than point-max

This fixes bug #61298.  The new long-lines code may have narrowed a buffer
before font-lock-default-fontify-region gets called.

* lisp/font-lock.el (font-lock-default-fontify-region): Set `end' to point-max
if it is greater that it.

19 months ago; * lisp/paren.el (show-paren-predicate): Doc fix. (Bug#61098)
Eli Zaretskii [Sun, 5 Feb 2023 15:27:43 +0000 (17:27 +0200)]
; * lisp/paren.el (show-paren-predicate): Doc fix.  (Bug#61098)

19 months agoHighlight more complex function parameters
Dmitry Gutov [Sun, 5 Feb 2023 14:43:59 +0000 (16:43 +0200)]
Highlight more complex function parameters

* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode--fontify-parameter): New function.
(rust-ts-mode--font-lock-settings): Use it.

19 months agoNo longer use transient in isearch-emoji-by-name
Jonas Bernoulli [Wed, 1 Feb 2023 19:25:15 +0000 (20:25 +0100)]
No longer use transient in isearch-emoji-by-name

* lisp/isearch.el (isearch-emoji-by-name): Use 'emoji--read-emoji'
and if that returns derivations, 'completing-read' to select one
of them.  This fixes bug#60740.
* lisp/international/emoji.el (emoji--init): Autoload.
(emoji--read-emoji): New function, which doesn't use transient
and returns a list of the glyph and all derivations, if any.
(emoji--choose-emoji): Use 'emoji--read-emoji'.

19 months agoMake highlighting more regular across TS modes (bug#61205)
Dmitry Gutov [Sun, 5 Feb 2023 13:46:28 +0000 (15:46 +0200)]
Make highlighting more regular across TS modes (bug#61205)

* doc/emacs/display.texi (Parser-based Font Lock):
Update description of treesit-font-lock-level, moving 'property' to
level 4.

* lisp/treesit.el (treesit-font-lock-level): Likewise, in docstring.

* lisp/progmodes/c-ts-mode.el (c-ts-base-mode): Do that here.

* lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode): Add a comment.

* lisp/progmodes/go-ts-mode.el (go-ts-mode): Add 'definition' to
level 1.  Move 'function', 'property' and 'variable' to level 4.
(go-ts-mode--font-lock-settings): Move a bunch of existing rules
to 'definition'.  Add highlighting of function parameters.

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode)
(rust-ts-mode--font-lock-settings): Same.  And also change "scoped
identifiers" highlights to only match capitalized names.

19 months ago; Improve documentation of 'proper-list-p'
Eli Zaretskii [Sun, 5 Feb 2023 13:15:35 +0000 (15:15 +0200)]
; Improve documentation of 'proper-list-p'

* doc/lispref/lists.texi (Cons Cells): Add cross-reference
to 'proper-list-p' documentation.

19 months agoDocument 'plistp'
Eli Zaretskii [Sun, 5 Feb 2023 12:09:35 +0000 (14:09 +0200)]
Document 'plistp'

* doc/lispref/lists.texi (Property Lists): Document 'plistp'.
(Bug#61293)

19 months agoFix display of raised/lowered composed text
Eli Zaretskii [Sun, 5 Feb 2023 11:57:10 +0000 (13:57 +0200)]
Fix display of raised/lowered composed text

* src/xdisp.c (fill_gstring_glyph_string): Adjust the base line of
the glyph string due to subscript/superscript.  (Bug#61290)

19 months agoFix installation of tree-sitter grammar on MS-Windows
Eli Zaretskii [Sun, 5 Feb 2023 09:14:25 +0000 (11:14 +0200)]
Fix installation of tree-sitter grammar on MS-Windows

* lisp/treesit.el (treesit--install-language-grammar-1): Fix a
failure on MS-Windows when the old DLL is still being used.
(Bug#61289)

19 months agoUpdate the Emacs FAQ for Emacs 29
Eli Zaretskii [Sun, 5 Feb 2023 08:50:12 +0000 (10:50 +0200)]
Update the Emacs FAQ for Emacs 29

* doc/misc/efaq.texi (New in Emacs 29, History of Emacs): Add new
section about Emacs 29.

19 months agoFix byte-compilation of *-ts-mode.el files
Eli Zaretskii [Sun, 5 Feb 2023 06:24:32 +0000 (08:24 +0200)]
Fix byte-compilation of *-ts-mode.el files

* lisp/treesit.el (treesit-font-lock-settings): Move to before
use, to prevent failure in byte-compiling modes which require this
file.  (Bug#61282)

19 months ago; ruby-ts--syntax-propertize: Amend commentary
Dmitry Gutov [Sun, 5 Feb 2023 00:42:52 +0000 (02:42 +0200)]
; ruby-ts--syntax-propertize: Amend commentary

19 months agoMake c-ts-mode-set-style's effect local (bug#61245)
Yuan Fu [Sat, 4 Feb 2023 02:35:33 +0000 (18:35 -0800)]
Make c-ts-mode-set-style's effect local (bug#61245)

Now c-ts-mode-set-style's effect is local, and there is a new function
c-ts-mode-set-global-style that changes the global setting.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--indent-style-setter): Use c-ts-mode-set-style.
(c-ts-mode-indent-style)
(c-ts-mode--prompt-for-style): Minor change in docstring.
(c-ts-mode-set-global-style): New function (from c-ts-mode-set-style).
(c-ts-mode-set-local-style): Remove function (became c-ts-mode-set-style).
(c-ts-mode-set-style): Renamed from c-ts-mode-set-local-style.
* test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts:
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: Use
c-ts-mode-set-style.

19 months ago; * lisp/treesit.el (treesit--font-lock-level-setter): Minor change.
Yuan Fu [Fri, 3 Feb 2023 02:54:49 +0000 (18:54 -0800)]
; * lisp/treesit.el (treesit--font-lock-level-setter): Minor change.

19 months agoc-ts-mode: Highlight name in parameter declarations
Dmitry Gutov [Sat, 4 Feb 2023 20:46:41 +0000 (22:46 +0200)]
c-ts-mode: Highlight name in parameter declarations

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings):
Uncomment parameter declaration highlighting (bug#61275).
(c-ts-mode--fontify-declarator): Check that identifier was found.
Some declarations can miss identifier name.

19 months agoFix switch statement indentation for go-ts-mode (bug#61238)
Davide Masserut [Thu, 2 Feb 2023 20:00:02 +0000 (21:00 +0100)]
Fix switch statement indentation for go-ts-mode (bug#61238)

* lisp/progmodes/go-ts-mode.el (go-ts-mode--indent-rules): Add
indentation for type switch and select case blocks
* test/lisp/progmodes/go-ts-mode-resources/indent.erts: New .erts file
to test indentation of Go constructs and prevent regression of bug
fixes.
* test/lisp/progmodes/go-ts-mode-tests.el: New file with go-ts-mode
tests.

19 months agoFix bidi reordering of sequence of whitespace characters before a TAB
Eli Zaretskii [Sat, 4 Feb 2023 11:34:42 +0000 (13:34 +0200)]
Fix bidi reordering of sequence of whitespace characters before a TAB

* src/bidi.c (bidi_level_of_next_char): Test the current level
only for characters whose original type is BN.  (Bug#61269)

19 months agoAdd tests for compilation support for TypeScript (bug#61104)
Theodor Thornhill [Fri, 3 Feb 2023 08:05:13 +0000 (09:05 +0100)]
Add tests for compilation support for TypeScript (bug#61104)

* test/lisp/progmodes/compile-tests.el
(compile-tests--test-regexps-data): Add new test-cases.
(compile-test-error-regexps): Increase expected errors

19 months agoAdd support for TypeScript compilation to compile.el (bug#61104)
Jostein Kjønigsen [Sat, 28 Jan 2023 14:23:11 +0000 (15:23 +0100)]
Add support for TypeScript compilation to compile.el (bug#61104)

* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Add regexps.

19 months agoDon't clobber match data in 'y-or-n-p'
Eli Zaretskii [Sat, 4 Feb 2023 08:15:18 +0000 (10:15 +0200)]
Don't clobber match data in 'y-or-n-p'

* lisp/subr.el (y-or-n-p): Avoid clobbering caller's match data.
(Bug#61091)

19 months agoRefine the previous change
Dmitry Gutov [Sat, 4 Feb 2023 02:16:55 +0000 (04:16 +0200)]
Refine the previous change

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--s-p-query): Fix a typo.
(ruby-ts--syntax-propertize): Use pcase-exhaustive to avoid typos.
Put the last s-t property after heredoc's end (apparently
parse-partial-sexp likes that more).  Move first s-t property on
percent literals to the very beginning (to be refined later).
Differentiate the %r{} literals from /.../ ones -- tree-sitter
parses them exactly the same.

19 months agoAdd syntax-propertize-function to ruby-ts-mode
Dmitry Gutov [Sat, 4 Feb 2023 01:34:22 +0000 (03:34 +0200)]
Add syntax-propertize-function to ruby-ts-mode

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--s-p-query):
New variable.
(ruby-ts--syntax-propertize): New function.
(ruby-ts--parser-after-change): New function.
(ruby-ts-mode): Use both of them.

19 months ago; Fix typos
Stefan Kangas [Fri, 3 Feb 2023 17:02:53 +0000 (18:02 +0100)]
; Fix typos

19 months agoImprove documentation of 'header-line-indent-mode'
Eli Zaretskii [Fri, 3 Feb 2023 14:45:56 +0000 (16:45 +0200)]
Improve documentation of 'header-line-indent-mode'

* doc/lispref/modes.texi (Header Lines): Rewrite the documentation
of 'header-line-indent-mode' and its two variables.  Fix the
example.
* doc/lispref/display.texi (Pixel Specification): More accurate
description of what happens with :align-to in header-lines.
Improve indexing.  (Bug#61239)

* src/buffer.c (syms_of_buffer) <header-line-format>:
* lisp/display-line-numbers.el (header-line-indent)
(header-line-indent-width, header-line-indent-mode): Doc fixes.

* etc/NEWS: Enhance the announcement of 'header-line-indent-mode'.