diff options
| author | Stefan Kangas | 2022-12-21 02:37:17 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2022-12-21 02:37:17 +0100 |
| commit | 2bbc554db63cc5cc140ade5bfcbbf53ecd18f5ae (patch) | |
| tree | 044d6aa99d0ef54ace6c01583231c1ae286c8865 /lisp/progmodes | |
| parent | 1424342225ef5b18c630364dd88e004f4ebb1c7f (diff) | |
| parent | d3a76db88b4357fe1c92f240796ea9b522b97a8e (diff) | |
| download | emacs-2bbc554db63cc5cc140ade5bfcbbf53ecd18f5ae.tar.gz emacs-2bbc554db63cc5cc140ade5bfcbbf53ecd18f5ae.zip | |
Merge from origin/emacs-29
d3a76db88b4 * lisp/repeat.el: Fix repeat-keep-prefix to allow customi...
8ef3777d544 Correct capitalization of Lisp in the manual (bug#60222)
d03ea893780 eglot.el: Add vscode-json-languageserver to eglot-server-...
8550a993785 ; * src/emacs-module.h.in (enum emacs_funcall_exit): Fix ...
fb7f3999c59 ; Fix ruby-method-params-indent's :version value
cfbfd393b45 * lisp/progmodes/project.el (project--read-file-cpd-relat...
2b1fdbffcb5 ruby-method-params-indent: New user option
b9e813f79f2 ; ruby-indent-level: Improve the docstring
399433cc2b9 * lisp/progmodes/project.el: Filter out empty strings fro...
23f7c9c2a92 Fix storing email into nnmail by Gnus
63cdbd986bb ; Really respect browse-url var in erc-compat
64163618d21 whitespace: Fix unintended change in buffer modification ...
a75d1da911c Make emacsclient add abbreviated file names to file-name-...
b3e7768a0ee Repair setopt test after error demotion to warning
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/eglot.el | 1 | ||||
| -rw-r--r-- | lisp/progmodes/project.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 28 |
3 files changed, 28 insertions, 5 deletions
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index ce4ca4f3d92..0f1bfd0447d 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el | |||
| @@ -190,6 +190,7 @@ chosen (interactively or automatically)." | |||
| 190 | '("pylsp" "pyls" ("pyright-langserver" "--stdio") "jedi-language-server"))) | 190 | '("pylsp" "pyls" ("pyright-langserver" "--stdio") "jedi-language-server"))) |
| 191 | ((js-json-mode json-mode json-ts-mode) | 191 | ((js-json-mode json-mode json-ts-mode) |
| 192 | . ,(eglot-alternatives '(("vscode-json-language-server" "--stdio") | 192 | . ,(eglot-alternatives '(("vscode-json-language-server" "--stdio") |
| 193 | ("vscode-json-languageserver" "--stdio") | ||
| 193 | ("json-languageserver" "--stdio")))) | 194 | ("json-languageserver" "--stdio")))) |
| 194 | ((js-mode js-ts-mode tsx-ts-mode typescript-ts-mode typescript-mode) | 195 | ((js-mode js-ts-mode tsx-ts-mode typescript-ts-mode typescript-mode) |
| 195 | . ("typescript-language-server" "--stdio")) | 196 | . ("typescript-language-server" "--stdio")) |
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 559da6dd649..c2633798473 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el | |||
| @@ -1040,12 +1040,14 @@ by the user at will." | |||
| 1040 | (setq substrings (cons "./" substrings)))) | 1040 | (setq substrings (cons "./" substrings)))) |
| 1041 | (new-collection (project--file-completion-table substrings)) | 1041 | (new-collection (project--file-completion-table substrings)) |
| 1042 | (abbr-cpd (abbreviate-file-name common-parent-directory)) | 1042 | (abbr-cpd (abbreviate-file-name common-parent-directory)) |
| 1043 | (abbr-cpd-length (length abbr-cpd)) | ||
| 1043 | (relname (cl-letf ((history-add-new-input nil) | 1044 | (relname (cl-letf ((history-add-new-input nil) |
| 1044 | ((symbol-value hist) | 1045 | ((symbol-value hist) |
| 1045 | (mapcan | 1046 | (mapcan |
| 1046 | (lambda (s) | 1047 | (lambda (s) |
| 1047 | (and (string-prefix-p abbr-cpd s) | 1048 | (and (string-prefix-p abbr-cpd s) |
| 1048 | (list (substring s (length abbr-cpd))))) | 1049 | (not (eq abbr-cpd-length (length s))) |
| 1050 | (list (substring s abbr-cpd-length)))) | ||
| 1049 | (symbol-value hist)))) | 1051 | (symbol-value hist)))) |
| 1050 | (project--completing-read-strict prompt | 1052 | (project--completing-read-strict prompt |
| 1051 | new-collection | 1053 | new-collection |
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index fa51597697f..1f3e9b6ae7b 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -212,7 +212,7 @@ It should match the part after \"def\" and until \"=\".") | |||
| 212 | :safe 'booleanp) | 212 | :safe 'booleanp) |
| 213 | 213 | ||
| 214 | (defcustom ruby-indent-level 2 | 214 | (defcustom ruby-indent-level 2 |
| 215 | "Indentation of Ruby statements." | 215 | "Number of spaces for each indentation step in `ruby-mode'." |
| 216 | :type 'integer | 216 | :type 'integer |
| 217 | :safe 'integerp) | 217 | :safe 'integerp) |
| 218 | 218 | ||
| @@ -268,6 +268,23 @@ Only has effect when `ruby-use-smie' is t." | |||
| 268 | :safe 'booleanp | 268 | :safe 'booleanp |
| 269 | :version "24.4") | 269 | :version "24.4") |
| 270 | 270 | ||
| 271 | (defcustom ruby-method-params-indent t | ||
| 272 | "Indentation of multiline method parameters. | ||
| 273 | |||
| 274 | When t, the parameters list is indented to the method name. | ||
| 275 | |||
| 276 | When a number, indent the parameters list this many columns | ||
| 277 | against the beginning of the method (the \"def\" keyword). | ||
| 278 | |||
| 279 | The value nil means the same as 0. | ||
| 280 | |||
| 281 | Only has effect when `ruby-use-smie' is t." | ||
| 282 | :type '(choice (const :tag "Indent to the method name" t) | ||
| 283 | (number :tag "Indent specified number of columns against def") | ||
| 284 | (const :tag "Indent to def" nil)) | ||
| 285 | :safe (lambda (val) (or (memq val '(t nil)) (numberp val))) | ||
| 286 | :version "29.1") | ||
| 287 | |||
| 271 | (defcustom ruby-deep-arglist t | 288 | (defcustom ruby-deep-arglist t |
| 272 | "Deep indent lists in parenthesis when non-nil. | 289 | "Deep indent lists in parenthesis when non-nil. |
| 273 | Also ignores spaces after parenthesis when `space'. | 290 | Also ignores spaces after parenthesis when `space'. |
| @@ -660,9 +677,12 @@ This only affects the output of the command `ruby-toggle-block'." | |||
| 660 | (unless (or (eolp) (forward-comment 1)) | 677 | (unless (or (eolp) (forward-comment 1)) |
| 661 | (cons 'column (current-column))))) | 678 | (cons 'column (current-column))))) |
| 662 | ('(:before . " @ ") | 679 | ('(:before . " @ ") |
| 663 | (save-excursion | 680 | (if (or (eq ruby-method-params-indent t) |
| 664 | (skip-chars-forward " \t") | 681 | (not (smie-rule-parent-p "def" "def="))) |
| 665 | (cons 'column (current-column)))) | 682 | (save-excursion |
| 683 | (skip-chars-forward " \t") | ||
| 684 | (cons 'column (current-column))) | ||
| 685 | (smie-rule-parent (or ruby-method-params-indent 0)))) | ||
| 666 | ('(:before . "do") (ruby-smie--indent-to-stmt)) | 686 | ('(:before . "do") (ruby-smie--indent-to-stmt)) |
| 667 | ('(:before . ".") | 687 | ('(:before . ".") |
| 668 | (if (smie-rule-sibling-p) | 688 | (if (smie-rule-sibling-p) |