| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/progmodes/c-ts-mode.el:
* lisp/progmodes/cmake-ts-mode.el:
* lisp/progmodes/csharp-mode.el:
* lisp/progmodes/dockerfile-ts-mode.el:
* lisp/progmodes/elixir-ts-mode.el:
* lisp/progmodes/go-ts-mode.el:
* lisp/progmodes/heex-ts-mode.el:
* lisp/progmodes/java-ts-mode.el:
* lisp/progmodes/js.el:
* lisp/progmodes/json-ts-mode.el:
* lisp/progmodes/lua-ts-mode.el:
* lisp/progmodes/php-ts-mode.el:
* lisp/progmodes/python.el:
* lisp/progmodes/ruby-ts-mode.el:
* lisp/progmodes/rust-ts-mode.el:
* lisp/progmodes/sh-script.el:
* lisp/progmodes/typescript-ts-mode.el:
* lisp/textmodes/css-mode.el:
* lisp/textmodes/markdown-ts-mode.el:
* lisp/textmodes/mhtml-ts-mode.el:
* lisp/textmodes/toml-ts-mode.el:
* lisp/textmodes/yaml-ts-mode.el: In autoload forms replace
'(treesit-available-p)' with (boundp 'treesit-major-mode-remap-alist).
Calling 'treesit-available-p' in loaddefs.el is too early
since the tree-sitter library might not be loaded yet.
Checking if 'treesit-major-mode-remap-alist' is bound is
equivalent to checking if Emacs is compiled with tree-sitter support.
(bug#79622)
|
| |
|
|
| |
Add mentions of `treesit-enabled-modes' to the docstrings (bug#79627).
|
| |
|
|
|
|
|
| |
* lisp/progmodes/elisp-mode.el (elisp-major-mode-name)
(elisp-symbol-role, elisp-symbol-role-definition, elisp-rx):
Use a lighter foreground color when background color is dark
to improve legibility.
|
| | |
|
| |
|
|
|
| |
* lisp/progmodes/elisp-mode.el (elisp-unknown-call): Use a
lighter foreground color on dark backgrounds for legibility.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/progmodes/elisp-mode.el (elisp)
(elisp-fontify-semantically, elisp-symbol-at-mouse)
(elisp-free-variable, elisp-special-variable-declaration)
(elisp-condition, elisp-major-mode-name, elisp-face)
(elisp-symbol-role, elisp-symbol-role-definition)
(elisp-function, elisp-non-local-exit, elisp-unknown-call)
(elisp-macro, elisp-special-form, elisp-throw-tag)
(elisp-feature, elisp-rx, elisp-theme, elisp-binding-variable)
(elisp-bound-variable, elisp-shadowing-variable)
(elisp-shadowed-variable, elisp-variable-at-point)
(elisp-warning-type, elisp-function-property-declaration)
(elisp-thing, elisp-slot, elisp-widget-type, elisp-type)
(elisp-group, elisp-nnoo-backend, elisp-ampersand)
(elisp-constant, elisp-defun, elisp-defmacro, elisp-defvar)
(elisp-defface, elisp-icon, elisp-deficon, elisp-oclosure)
(elisp-defoclosure, elisp-coding, elisp-defcoding)
(elisp-charset, elisp-defcharset, elisp-completion-category)
(elisp-completion-category-definition, elisp-add-help-echo)
(elisp-fontify-symbol-precedence-function): Add :version tags.
* lisp/emacs-lisp/elisp-scope.el: Fix references to meta-syntactic
variables in the commentary.
(elisp-scope-describe-symbol-role, coding, defcoding, charset)
(defcharset): Doc fixes.
(elisp-scope-safe-macros): Add :version tag. Doc fix.
* doc/emacs/display.texi (Semantic Font Lock): Fix punctuation and
wording, improve cross-references and indexing.
|
| |
|
|
|
|
|
| |
* lisp/progmodes/elisp-mode.el (elisp-free-variable)
(elisp-bound-variable): Reset the foreground face (to avoid
inheriting it from 'font-lock-variable-use-face') instead of
hardcoding it to "black".
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rename a couple of faces to solidify the convention that the
face name 'elisp-foo' implies "references to foo", not "foo
definitions". For definitions we use 'elisp-deffoo' if foo is
only one word, or 'elisp-bar-baz-definition' otherwise.
* lisp/progmodes/elisp-mode.el (elisp-function-reference):
Rename to 'elisp-function'.
(elisp-macro-call): Rename to 'elisp-macro'.
(elisp-non-local-exit):
(elisp-unknown-call):
(elisp-special-form):
* lisp/emacs-lisp/elisp-scope.el:
* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Update references to renamed faces.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* lisp/progmodes/elisp-mode.el (elisp-fontify-semantically):
Fix typo in doc string.
(elisp--annotate-symbol-with-help-echo): Accept plain string
as value of ':help' symbol role property.
* lisp/emacs-lisp/elisp-scope.el: Remove unused symbol role
properties from all defined symbol roles. Use plain strings
for ':help' instead of wrapping them with 'cl-constantly'.
Cease 'require'ing 'cl-lib', no longer needed in runtime.
(elisp-scope-define-symbol-role): Update doc string.
|
| | |
| |
| |
| |
| |
| |
| | |
* lisp/progmodes/elisp-mode.el (elisp-symbol-role)
(elisp-symbol-role-definition, elisp-non-local-exit)
(elisp-shadowing-variable, elisp-shadowed-variable)
(elisp-icon): Fix docstring.
|
| | |
| |
| |
| |
| |
| |
| | |
* lisp/progmodes/elisp-mode.el (elisp-bound-variable)
(elisp-free-variable): Inherit from
'font-lock-variable-use-face', override foreground face to
keep current appearance.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* lisp/emacs-lisp/elisp-scope.el
(special-variable-declaration): New symbol role.
(defvar): Update analyzer to distinguish between
declarations and definitions.
(defconst): Add a separate analyzer.
* lisp/progmodes/elisp-mode.el
(elisp-special-variable-declaration): New face.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* lisp/emacs-lisp/elisp-scope.el
(elisp-scope-get-symbol-role-property)
(elisp-scope-set-symbol-role-property)
(elisp-scope-safe-macro-p, elisp-scope-report-s)
(elisp-scope-1, elisp-scope-n): Add docstring.
(elisp-scope-analyze-form):
* lisp/progmodes/elisp-mode.el (elisp-fontify-semantically):
Expand docstring.
* etc/NEWS: Refer to 'elisp-fontify-semantically' for
documentation.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Hook semantic highlighting into 'font-lock-keywords' instead
of 'font-lock-fontify-region-function'. See discussion at
https://yhetil.org/emacs/jwvseg2mnkx.fsf-monnier+emacs@gnu.org/T/#t
* lisp/progmodes/elisp-mode.el (elisp-fontify-region)
(elisp-fontify-region-semantically): Remove, no longer used.
(elisp-fontify-symbols): New function.
(elisp-semantic-font-lock-keywords): New 'defconst'.
(emacs-lisp-mode): Use it as the new highest
'font-lock-keywords' level.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
* lisp/emacs-lisp/elisp-scope.el (declaration): Rename to
'function-property-declaration'.
(elisp-scope-lambda):
* lisp/progmodes/elisp-mode.el
(elisp-function-property-declaration): Update accordingly.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change the terminology used in elisp-scope.el to call the
symbols we use to categorizes the use of (other) symbols
"symbol roles" instead of "symbol types".
* lisp/emacs-lisp/elisp-scope.el:
* lisp/progmodes/elisp-mode.el: Change all occurrences of
"symbol type" say "role" instead.
|
| | |
| |
| |
| |
| |
| | |
* scope.el: Rename it to...
* elisp-scope: New file.
* lisp/progmodes/elisp-mode.el: Update accordingly.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* lisp/emacs-lisp/scope.el: New file.
* lisp/progmodes/elisp-mode.el (elisp): New 'defgroup'.
(elisp-add-help-echo, elisp-fontify-semantically)
(elisp-fontify-symbol-precedence-function): New options.
(elisp-symbol-at-mouse, elisp-free-variable, elisp-condition)
(elisp-major-mode-name, elisp-face, elisp-symbol-type)
(elisp-symbol-type-definition, elisp-function-reference)
(elisp-non-local-exit, elisp-unknown-call, elisp-macro-call)
(elisp-special-form, elisp-throw-tag, elisp-feature)
(elisp-rx, elisp-theme, elisp-binding-variable)
(elisp-bound-variable, elisp-shadowing-variable)
(elisp-shadowed-variable, elisp-variable-at-point)
(elisp-warning-type, elisp-declaration, elisp-thing)
(elisp-slot, elisp-widget-type, elisp-type, elisp-group)
(elisp-nnoo-backend, elisp-ampersand, elisp-constant)
(elisp-defun, elisp-defmacro, elisp-defvar, elisp-defface)
(elisp-icon, elisp-deficon, elisp-oclosure)
(elisp-defoclosure, elisp-coding, elisp-defcoding)
(elisp-charset, elisp-defcharset, elisp-completion-category)
(elisp-completion-category-definition): New faces.
(elisp-local-references, elisp-highlight-variable)
(elisp-unhighlight-variable, elisp-cursor-sensor)
(elisp--function-help-echo, elisp--help-echo-1)
(elisp--help-echo, elisp--annotate-symbol-with-help-echo)
(elisp-extend-region-to-whole-defuns, elisp-fontify-symbol)
(elisp-fontify-region-semantically, elisp-fontify-region):
New functions.
(emacs-lisp-mode): Set 'font-lock-extra-managed-props',
'font-lock-fontify-region-function' and
'font-lock-extend-region-functions'.
* etc/NEWS: Announce new feature.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* lisp/keymap.el (keymap-read-only-bind): Rename from
`read-only-keymap-bind`. Improve docstring.
(keymap--read-only-filter): Rename from `read-only-keymap-filter`.
* lisp/net/goto-addr.el (goto-address-highlight-keymap):
* lisp/progmodes/bug-reference.el (bug-reference-map):
* lisp/net/browse-url.el (browse-url-button-map):
* lisp/ansi-osc.el (ansi-osc-hyperlink-map): Adjust accordingly.
|
| | |
| |
| |
| |
| |
| | |
(hs-allow-nesting): Turn defvar into defcustom.
(hs-indicator-hide): Use BLACK DOWN-POINTING SMALL TRIANGLE
as a counterpart for the BLACK RIGHT-POINTING SMALL TRIANGLE.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
bug#79580
* lisp/progmodes/hideshow.el (hs--make-indicators-overlays): Add
'cursor' property to the EOL indicator, so it will not conflict
with flymake EOL indicators.
|
| | |
| |
| |
| |
| |
| |
| | |
* lisp/progmodes/eglot.el (eglot-server-programs): Add LSP server
for TOML. (Bug#79605)
Copyright-paperwork-exempt: yes
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
(flymake--resize-margins): Move checking for a non-displayable
character to the loop over all supported symbols.
(flymake-margin-indicators-string): Mention the character name
in the docstring.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
* lisp/progmodes/flymake.el (flymake-margin-indicators-string):
Replace two-character error indicator "!!" with one character "‼".
Update the docstring.
(flymake--resize-margins): Use "!!" when "‼" is not displayable.
Calculate the margin width depending on the indicator string width.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix font lock in csharp-ts-mode when the tree-sitter grammar is
automatically installed (Bug#79363).
* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
Evaluate the rules only after the tree-sitter grammar is installed.
(csharp-ts-mode): Call the new `csharp-ts-mode--font-lock-settings'
function.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix font lock in java-ts-mode when the tree-sitter grammar is
automatically installed (Bug#79363).
* lisp/progmodes/java-ts-mode.el (java-ts-mode--font-lock-settings):
Evaluate the rules only after the tree-sitter grammar is installed.
(java-ts-mode): Call the new `java-ts-mode--font-lock-settings'
function.
|
| | |
| |
| |
| |
| |
| |
| | |
* lisp/progmodes/hideshow.el (hs-hide-block-at-point): Try to restore
old semantics. Do nothing when no block positions are found.
Co-authored-by: Elijah Gabe Pérez <eg642616@gmail.com>
|
| | |
| |
| |
| | |
* lisp/progmodes/hideshow.el (hs-hideable-region-p): Simplify
|
| | |
| |
| |
| |
| |
| |
| |
| | |
* lisp/progmodes/hideshow.el (hs-hideable-region-p): New
function.
(hs--make-indicators-overlays, hs--add-indicators)
(hs-hide-block-at-point, hs-hide-all, hs-hide-block)
(hs-hide-initial-comment-block): Use it. (Bug#79533)
|
| | |
| |
| |
| |
| | |
* lisp/progmodes/dockerfile-ts-mode.el: Also match Containerfile
and Containerfile.* in the 'auto-mode-alist' entry. (Bug#79524)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We use gfm-view-mode to render Markdown before we hand over the string
to ElDoc (which usually put it in a 'special' mode "*eldoc*" buffer).
'gfm-view-mode' adds keymap text properties to make links clickable. It
also makes some of the markup invisible with a special 'invisible'
property value which is specific to 'gfm-view-mode'. We used to delete
the latter, therefore breaking the link-clicking. Simply resetting the
regions with non-nil 'invisible' to 't' instead of deleting them fixes
this. See also https://github.com/joaotavora/eglot/discussions/1238
* lisp/progmodes/eglot.el: Make invisible markup invisible
instead of deleting it.
* etc/EGLOT-NEWS: Mention bugfix.
Co-authored-by: João Távora <joaotavora@gmail.com>
|
| | | |
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/progmodes/project.el (project-prompter)
(project-prompt-project-dir, project-prompt-project-name):
* lisp/vc/vc.el (vc--prompt-other-working-tree): New ALLOW-EMPTY
optional argument.
(delete-working-tree, move-working-tree): Specify that callers
must ensure DIRECTORY is not the current working tree.
(vc-delete-working-tree, vc-move-working-tree): Pass ALLOW-EMPTY
non-nil to vc--prompt-other-working-tree. Bind
'default-directory' to another working tree when operating on
the current working tree.
(vc-delete-working-tree): Extra prompt when asked to delete the
current working tree. When deleting the current working tree,
call 'bury-buffer' one or more times at the end.
|
| |
|
|
|
|
|
|
|
| |
* lisp/progmodes/etags-regen.el
(etags-regen--process-file-region): New function.
(etags-regen--tags-generate, etags-regen--append-tags): Use the
new helper function to run the program, and use relative file
name if TAGS file is in the project root.
(etags-regen--update-file): Use relative file name if possible.
|
| |
|
|
|
| |
* lisp/progmodes/peg.el (peg--detect-cycles): Accept args.
(peg--detect-cycles) <funcall>: New method.
|
| |
|
|
|
|
|
|
|
| |
* lisp/progmodes/peg.el (peg--merge-error): Provide a default method.
(peg--merge-error) <call>: Handle calls with arguments.
(peg--merge-error) <any, not>: Remove methods, now redundant with the
default method.
(peg--merge-error) <guard>: Delegate to the default method if we can't
do better.
|
| |
|
|
|
| |
* lisp/progmodes/python.el (treesit-node-prev-sibling)
(treesit-node-field-name-for-child): Declare.
|
| |
|
|
|
| |
* lisp/progmodes/python.el (python--treesit-fontify-string):
Make sure there's no infloop.
|
| |
|
|
|
| |
* lisp/progmodes/python.el (python--treesit-fontify-string): Use
new algorithm.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix font lock in php-ts-mode when the tree-sitter grammars are
automatically installed. Also, update php-ts-mode to call the new
`mhtml-ts-mode--treesit-font-lock-settings' function.
* lisp/progmodes/php-ts-mode.el (php-ts-mode--keywords)
(php-ts-mode--operators): Generate the lists after the tree-sitter
grammars are installed.
(php-ts-mode--font-lock-settings, php-ts-mode--font-lock-settings-cached)
(php-ts-mode--custom-html-font-lock-settings)
(php-ts-mode--custom-html-font-lock-settings-cached): Evaluate the rules
after the tree-sitter grammars are installed. Also, add cache for the
rules.
(php-ts-mode): Call the new
`php-ts-mode--custom-html-font-lock-settings' function. (Bug#79363)
|
| |
|
|
|
|
|
|
|
|
| |
* lisp/keymap.el (read-only-keymap-filter)
(read-only-keymap-bind): New functions, removed from
browse-url.el.
* lisp/net/browse-url.el (browse-url-keymap-filter)
(browse-url-keymap-bind): Move to keymap.el. All callers
changed.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* lisp/net/browse-url.el (browse-url-keymap-filter)
(browse-url-keymap-bind): New functions.
(browse-url-button-map): Bind "C-c RET" to 'browse-url-button-open'
and rebind "RET" with the filter 'browse-url-keymap-bind'.
* lisp/ansi-osc.el (ansi-osc-hyperlink-map):
* lisp/net/goto-addr.el (goto-address-highlight-keymap):
* lisp/progmodes/bug-reference.el (bug-reference-map):
Bind "RET" with the filter 'browse-url-keymap-bind'.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode--indent-rules)
(cmake-ts-mode--indent-rules-cached, cmake-ts-mode--font-lock-settings)
(cmake-ts-mode--font-lock-settings-cached):
* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings)
(go-ts-mode--font-lock-settings-cached):
* lisp/progmodes/js.el (js--treesit-indent-rules)
(js--treesit-indent-rules-cached, js--treesit-font-lock-settings)
(js--treesit-font-lock-settings-cached): Suffix tree-sitter cache
variables with "-cached" (bug#79363).
|
| |
|
|
|
|
|
| |
(js--treesit-sexp-nodes): Set the default value to nil and make obsolete.
(js--treesit-thing-settings): Instead of using
'js--treesit-sexp-nodes', define a list of named and anonymous nodes
that don't match the 'sexp' thing (bug#79465).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/emacs/programs.texi (Hideshow): Update documentation.
* etc/NEWS: Announce changes.
* lisp/progmodes/hideshow.el (hs-show-indicators)
(hs-indicator-type, hs-indicator-maximum-buffer-size): New user
options.
(hs-indicator-hide, hs-indicator-show): New icons.
(hs-block-positions, hs--make-indicators-overlays)
(hs-indicator-mouse-toggle-hidding, hs--add-indicators)
(hs--refresh-indicators): New functions.
(hs-hide-block-at-point): Use hs-block-positions.
(hs-inside-comment-p): Use 'get-char-property' instead of
'hs-overlay-at'.
(hs-minor-mode): Rework.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes bug#79438.
* lisp/progmodes/cc-align.el (c-lineup-class-field-cont): New
function.
* lisp/progmodes/cc-vars.el (c-offsets-alist): Change the
entry for class-field-cont from + to
c-lineup-class-field-cont.
* doc/misc/cc-mode.texi (Misc Line-Up): Add a new entry for
c-lineup-class-field-cont.
|
| |
|
|
|
|
|
|
|
|
| |
Fix font lock and indentation in js-ts-mode when the tree-sitter grammar
is automatically installed (Bug#79363).
* lisp/progmodes/js.el (js--treesit-indent-rules)
(js--treesit-font-lock-settings): Evaluate the rules only after the
tree-sitter grammar is installed.
(js-ts-mode): Call the new `js--treesit-indent-rules' and
`js--treesit-font-lock-settings' functions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- hightlight reserved keywords agressively, dont allow misuse as
variables etc (the compiler will fail!)
- highlight lambda-valued variables as funtions.
- improve semantics of function/class annotations using attributes
(maps closer to using-something than declaring it). also: rename to
"attribute". "property" has a different, defined meaning in C#.
- better highlight variable-use in different scenarios (function-calls,
if-statements, assignment-expressions, property-use, anonymous object
initializers).
- better highlight for property-use (anonymous object initializers).
- highlight field-declaration using font-lock-variable-face.
- fontify attributes using new face csharp-ts-mode-attribute-face
(defaults to font-lock-property-use-face).
- remove extensive use of "override" making evalutation hard-to-reason about.
* lisp/progmodes/csharp-mode.el (csharp-ts-mode--indent-rules):
Update indent rules.
(csharp-ts-mode-faces): New group.
(csharp-ts-mode-attribute-face): New face.
(csharp-ts-mode--font-lock-settings): Rule updates.
(csharp-ts-mode): Change property feature to attribute
|