Commit graph

339 commits

Author SHA1 Message Date
Dmitry Gutov
746507dc3b ruby-syntax-methods-before-regexp: Drop this whitelist
* lisp/progmodes/ruby-mode.el (ruby-syntax-before-regexp-re):
Match only based on keywords and operators.
(ruby-syntax-methods-before-regexp): Delete.
(ruby-syntax-propertize): Use the new heuristic based on spaces
instead of checking for method names before (bug#67569).

* test/lisp/progmodes/ruby-mode-tests.el
(ruby-regexp-not-division-when-only-space-before):
Use non-whitelisted method name.

* test/lisp/progmodes/ruby-mode-resources/ruby.rb:
Adjust two examples.
2023-12-16 04:58:35 +02:00
Eli Zaretskii
0da2a4650c Merge from origin/emacs-29
2773cf9e01 ; Fix typos
020aff95fa ; Fix typos in ChangeLog files
5e03a621ef ; * lisp/progmodes/c-ts-mode.el (c-ts-mode--else-heuristi...
f0734e1c0d Fix c-ts-mode indent heuristic (bug#67417)
08fc6bace2 Fix c-ts-mode indentation (bug#67357)
71bc2815cc Add font-locking for hash-bang lines in typescript-ts-mode.
db8347c8c8 Add font-locking for hash-bang lines in js-ts-mode
91f2ade57b ruby-mode: Better detect regexp vs division (bug#67569)
2023-12-10 10:35:54 -05:00
Dmitry Gutov
91f2ade57b ruby-mode: Better detect regexp vs division (bug#67569)
* lisp/progmodes/ruby-mode.el (ruby-syntax-before-regexp-re):
Add grouping around methods from the whitelist.
(ruby-syntax-propertize): Also look for spaces around the slash.
2023-12-09 19:04:55 +02:00
Mauro Aranda
ce3ed6e019 Fix a defcustom :type
* lisp/progmodes/ruby-mode.el (ruby-insert-encoding-magic-comment):
Allow always-utf8.  (Bug#66498)
2023-10-12 19:10:58 +03:00
Stefan Kangas
0c2152222a Register more Ruby files in auto-mode-alist
* lisp/progmodes/ruby-mode.el (auto-mode-alist): Add fastlane and
Caxlsx files.
2023-08-03 19:40:22 +02:00
Stefan Kangas
1f30404ebc Don't hardcode ruby version in interpreter-mode-alist
* lisp/progmodes/ruby-mode.el (interpreter-mode-alist): Don't hardcode
ruby version.  This adds support for modern versions of Ruby like
"ruby2.7", instead of the previously hardcoded "ruby1.9".
2023-08-02 21:46:55 +02:00
Eli Zaretskii
7191318b71 Merge from origin/emacs-29
864a4dc236 Fix compilation of w32.c with old MinGW system headers
a22eb9ae0f ruby-add-log-current-method: Reduce the use of 'nreverse'
17d803d0a7 Fix detection of WebP images by their signature
43290391ce ; Eglot: make version parseable by version-to-list
6e6e8b5c97 Add more documentation for the keys of `package-vc-select...
7972b76c2c ; vc-checkout: Wrap var lookup in 'bound-and-true-p'
e9fef1d70f vc-checkout: Try to use the vc-dir's backend first
372e024acc ; Fix wallpaper-tests on XFCE
7055fd8e43 Improve documentation related to 'ispell-complete-word'
61fd017abd * configure.ac: Add -lbsd on Haiku.
05971c4d9a Add menu to 'c-ts-mode' and 'c++-ts-mode'

# Conflicts:
#	lisp/progmodes/eglot.el
#	lisp/progmodes/ruby-mode.el
2023-04-15 13:02:04 -04:00
Dmitry Gutov
a22eb9ae0f ruby-add-log-current-method: Reduce the use of 'nreverse'
* lisp/progmodes/ruby-mode.el (ruby-add-log-current-method):
Reduce the use of 'nreverse' (bug#62761).

* test/lisp/progmodes/ruby-mode-tests.el
(ruby-add-log-current-method-singleton-referencing-outer):
New test.
2023-04-13 00:46:11 +03:00
Mattias Engdegård
7f740b87d8 Remove ineffective uses of condition-case
* lisp/gnus/message.el (message-setup-1):
* lisp/progmodes/cc-engine.el (c-forward-single-comment):
* lisp/progmodes/ruby-mode.el (ruby-add-log-current-method):
Eliminate uses of condition-case without handlers.  These seem to have
been there for quite a long time.  This change does not affect the
behaviour of the code and makes some warnings go away.
2023-03-03 11:36:09 +01:00
Dmitry Gutov
48a0804d10 ruby-mode: Fix method call indentation in rhs of multiple assignment
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Special-case
assignment that follows a comma-separated list (bug#61871).

* test/lisp/progmodes/ruby-mode-resources/ruby.rb: Add case.
2023-02-28 23:01:04 +02:00
Dmitry Gutov
267fc6d00c ruby-smie-rules: Fix misindentation of a method call after assignment
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Fix indentation of a
method call after assignment with ruby-after-operator-indent=nil
(bug#61822).

* test/lisp/progmodes/ruby-mode-resources/ruby-after-operator-indent.rb:
Add corresponding example.
2023-02-27 02:06:20 +02:00
Dmitry Gutov
ae7e28a437 ruby-mode.el: Expand some docstrings with examples
* lisp/progmodes/ruby-mode.el (ruby-align-chained-calls)
(ruby-method-params-indent): Expand docstrings with examples.
2023-01-22 04:40:40 +02:00
Dmitry Gutov
d66ac5285f ruby-ts-mode: Highlight builtin methods
* lisp/progmodes/ruby-mode.el (ruby-builtin-methods-with-reqs)
(ruby-builtin-methods-no-reqs): New constants, extracted.
(ruby-font-lock-keywords): Replace values with references.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--builtin-methods): New
variable.  Construct regexp from aforementioned constants' values.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Use it.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Add new font-lock feature: builtin-functions.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--predefined-constants)
(ruby-ts--predefined-variables): Unrelated to the rest of the
patch, add string-start and string-end anchors.
2023-01-20 03:58:03 +02:00
Dmitry Gutov
a0ce569d3b ruby-toggle-block: Fix in ruby-ts-mode
* lisp/progmodes/ruby-mode.el (ruby-toggle-block): Make it work
with ruby-ts-mode.  ruby-forward-sexp checks ruby-use-smie.
2023-01-19 19:44:10 +02:00
Dmitry Gutov
6dd3e352f4 Extract common code into ruby-base-mode to derive from
* lisp/progmodes/ruby-mode.el (ruby-base-mode):
New major base mode, to set up common vars and hooks.
(ruby-mode-variables): Delete.  Move most code to ruby-base-mode.
And some -- to ruby-mode body.
(ruby-mode): Derive from ruby-base-mode.  Also move some setup
to there.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Derive from ruby-base-mode.  Remove duplicating settings.
2023-01-03 03:10:49 +02:00
Eli Zaretskii
cae528457c ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
Dmitry Gutov
724da28763 Add version tags and mention the new options in NEWS
* etc/NEWS: Mention the new options (bug#60186).

* lisp/progmodes/ruby-mode.el (ruby-block-indent)
(ruby-after-operator-indent, ruby-method-call-indent)
(ruby-parenless-call-arguments-indent): Add version tags.
2022-12-31 00:13:17 +02:00
Dmitry Gutov
8675f4136c Add new options for Ruby code indentation
* lisp/progmodes/ruby-mode.el (ruby-block-indent)
(ruby-after-operator-indent, ruby-method-call-indent)
(ruby-parenless-call-arguments-indent): New options (bug#60186).
(ruby-smie-grammar): Specify associativity for "?".
(ruby-smie--indent-to-stmt): Add optional argument.

* test/lisp/progmodes/ruby-mode-resources/ruby.rb: New cases.

* test/lisp/progmodes/ruby-mode-resources/ruby-method-call-indent.rb:
* test/lisp/progmodes/ruby-mode-resources/ruby-block-indent.rb:
* test/lisp/progmodes/ruby-mode-resources/ruby-after-operator-indent.rb:
* test/lisp/progmodes/ruby-mode-resources/
ruby-parenless-call-arguments-indent.rb: New files.

* test/lisp/progmodes/ruby-mode-tests.el: Add indentation tests for new files.
2022-12-31 00:00:21 +02:00
Xi Lu
9a3b08061f Fix ruby-mode.el local command injection vulnerability (bug#60268)
* lisp/progmodes/ruby-mode.el
(ruby-find-library-file): Fix local command injection vulnerability.
2022-12-24 01:42:42 +02:00
Dmitry Gutov
fb7f3999c5 ; Fix ruby-method-params-indent's :version value 2022-12-20 02:58:48 +02:00
Dmitry Gutov
2b1fdbffcb ruby-method-params-indent: New user option
* lisp/progmodes/ruby-mode.el (ruby-method-params-indent):
New option (bug#60110).

(ruby-smie-rules): Use it.

* etc/NEWS: Mention it.

* test/lisp/progmodes/ruby-mode-resources/ruby.rb:
Ensure the var's value is default.

* test/lisp/progmodes/ruby-mode-resources/ruby-method-params-indent.rb:
New file.

* test/lisp/progmodes/ruby-mode-tests.el (ruby-deftest-indent):
New macro, use it to run the indentation test using the new file.
Disable the :expensive-test tag, because neither runs for "longer
than some few seconds", both take significantly below 1s.
2022-12-19 21:06:07 +02:00
Dmitry Gutov
b9e813f79f ; ruby-indent-level: Improve the docstring 2022-12-19 21:06:07 +02:00
Dmitry Gutov
9a751e0a38 ruby-mode: Support endless singleton method definitions too
* lisp/progmodes/ruby-mode.el (ruby-endless-method-head-re):
Update to match not only 'self.' but 'xyz.' as well (bug#54702).

* test/lisp/progmodes/ruby-mode-resources/ruby.rb (Bar#foo=):
Update example.
2022-12-19 02:22:53 +02:00
Dmitry Gutov
6f88de109c ruby-mode: Support endless methods (bug#54702)
* lisp/progmodes/ruby-mode.el (ruby-endless-method-head-re):
New constant.
(ruby-smie-grammar): New token.
(ruby-smie--forward-token, ruby-smie--backward-token):
Recognize it.
(ruby-smie-rules): Indentation support.
(ruby-add-log-current-method): Support here too.

* test/lisp/progmodes/ruby-mode-tests.el
(ruby-add-log-current-method-after-endless-method): New test.

* test/lisp/progmodes/ruby-mode-resources/ruby.rb: New examples.
2022-12-18 14:04:17 +02:00
Dmitry Gutov
1c0b90e5f7 ruby-mode: Recognize instance or global var as first arg in parenless call
* lisp/progmodes/ruby-mode.el (ruby-smie--args-separator-p):
Recognize instance or global var as first arg in parenless call.

* test/lisp/progmodes/ruby-mode-resources/ruby.rb: Add example.
2022-12-17 03:31:11 +02:00
Dmitry Gutov
3356c0cb16 Fix end-of-defun in ruby-mode
* lisp/progmodes/ruby-mode.el (ruby-beginning-of-defun):
Return t in case of success.
2022-12-17 03:31:11 +02:00
Dmitry Gutov
fd403a5c5a Fix ruby-add-log-current-method after nested class definition
* lisp/progmodes/ruby-mode.el (ruby--add-log-current-indent):
New function.
(ruby-add-log-current-method): Use it.
Check for "class" and "module" indentation to filter out the
definitions which don't include the given position.  Also try to
match "def" only once (for performance), because if the closest
one doesn't include the given position, none will.

* test/lisp/progmodes/ruby-mode-tests.el
(ruby-add-log-current-method-after-inner-class-outside-methods)
(ruby-add-log-current-method-after-inner-class-outside-methods-with-text):
New tests.
2022-12-15 03:21:44 +02:00
Basil L. Contovounesios
38bcad5451 Pacify recent unused/ignored lexvar warnings
Lexvars with special names like 'ignored' or 'unused' are no longer
treated specially.

* lisp/ansi-color.el (ansi-color-process-output):
* lisp/cus-edit.el (customize-apropos-options):
* lisp/cus-theme.el (customize-create-theme):
* lisp/dired-aux.el (dired-hide-all):
* lisp/emacs-lisp/crm.el (crm--choose-completion-string):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-revert):
* lisp/ido.el (ido-choose-completion-string):
* lisp/international/mule-diag.el (describe-font-internal):
* lisp/mail/sendmail.el (sendmail-user-agent-compose):
* lisp/progmodes/fortran.el (fortran-uncomment-region):
* lisp/progmodes/prolog.el (prolog-inferior-guess-flavor):
* lisp/progmodes/ruby-mode.el (ruby-indent-line, ruby-indent-exp):
* lisp/url/url.el (url-mm-callback):
* lisp/xwidget.el (xwidget-webkit-history-reload): Prepend an
underscore to unused function parameter names.
* lisp/emacs-lisp/cconv.el (cconv--dummy-var): Remove unused
constant.
* lisp/files.el (hack-local-variables-filter): Remove unused lexvar.
2022-10-26 16:35:59 +03:00
Stefan Kangas
b7e867b841 Make point-at-eol and point-at-bol obsolete
* lisp/subr.el (point-at-eol, point-at-bol): Make XEmacs compat
aliases obsolete in favor of `pos-bol'/'line-beginning-position' or
'pos-eol'/'line-end-position'.  Update callers.
Ref: https://lists.gnu.org/r/emacs-devel/2022-08/msg00853.html
2022-08-23 04:54:57 +02:00
Juri Linkov
033d370a51 * lisp/progmodes/ruby-mode.el (ruby-mode): Set outline-regexp, outline-level.
Suggested by Yilkal Argaw <yilkalargawworkneh@gmail.com>.
2022-07-08 20:17:29 +03:00
Dmitry Gutov
39646c822b Fix Ruby indentation with double splat as first block param
* lisp/progmodes/ruby-mode.el (ruby-smie--forward-token)
(ruby-smie--backward-token): Tokenize "**" separately from "|".
Problem reported at https://github.com/dgutov/robe/issues/136.
2022-04-26 05:36:35 +03:00
Dmitry Gutov
f0e8f4a4ca Support indentation of Ruby pattern matching expressions
* lisp/progmodes/ruby-mode.el (ruby-smie-grammar, ruby-smie-rules)
(ruby-block-mid-keywords): Treat 'in' token similarly to 'when'.

* test/lisp/progmodes/ruby-mode-resources/ruby.rb:
Add indentation example.
2022-03-21 03:20:36 +02:00
Dmitry Gutov
9a0842dffe ruby-toggle-block-space-before-parameters: New user option
* lisp/progmodes/ruby-mode.el (ruby-toggle-block-space-before-parameters):
New user option (bug#53321).
(ruby-do-end-to-brace): Handle it.

* test/lisp/progmodes/ruby-mode-tests.el
(ruby-toggle-block-to-brace-no-space): New test.
2022-01-21 04:59:39 +02:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Stefan Kangas
63f419f133 ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
Dmitry Gutov
44ba8278a6 * lisp/progmodes/ruby-mode.el (ruby-current-indentation): Tweak obsoletion. 2021-09-10 03:44:49 +03:00
Stefan Monnier
8c023e5ea1 Change ruby-align-chained-calls indendation
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Align with the
first sibling on the previous line instead of the last (bug#32496).

That is, before it used to be

one.two.three
       .four

and now it is

one.two.three
   .four
2021-09-09 16:24:57 +02:00
Dmitry Gutov
9e2cc406d3 ruby-mode imenu: Support methods with modifiers
* lisp/progmodes/ruby-mode.el (ruby-imenu-create-index-in-block):
Support methods with modifiers (visibility or otherwise)
(bug#50079).
2021-08-17 04:07:19 +03:00
Mattias Engdegård
051434fdef Use string-replace instead of replace-regexp-in-string
`string-replace` is easier to understand, less error-prone, much
faster, and results in shorter Lisp and byte code.  Use it where
applicable and obviously safe (erring on the conservative side).

* admin/authors.el (authors-scan-change-log):
* lisp/autoinsert.el (auto-insert-alist):
* lisp/calc/calc-prog.el (calc-edit-macro-combine-alg-ent)
(calc-edit-macro-combine-ext-command)
(calc-edit-macro-combine-var-name):
* lisp/calc/calc-units.el (math-make-unit-string):
* lisp/calendar/cal-html.el (cal-html-comment):
* lisp/calendar/cal-tex.el (cal-tex-comment):
* lisp/calendar/icalendar.el (icalendar--convert-string-for-export)
(icalendar--convert-string-for-import):
* lisp/calendar/iso8601.el (iso8601--concat-regexps)
(iso8601--full-time-match, iso8601--combined-match):
* lisp/calendar/time-date.el (format-seconds):
* lisp/calendar/todo-mode.el (todo-filter-items-filename):
* lisp/cedet/cedet-files.el (cedet-directory-name-to-file-name)
(cedet-file-name-to-directory-name):
* lisp/comint.el (comint-watch-for-password-prompt):
* lisp/dired-aux.el (dired-do-chmod):
* lisp/dired-x.el (dired-man):
* lisp/dired.el (dired-insert-directory, dired-goto-file-1):
* lisp/emacs-lisp/comp.el (comp-c-func-name):
* lisp/emacs-lisp/re-builder.el (reb-copy):
* lisp/erc/erc-dcc.el (erc-dcc-unquote-filename):
* lisp/erc/erc.el (erc-quit-reason-zippy, erc-part-reason-zippy)
(erc-update-mode-line-buffer, erc-message-english-PART):
* lisp/files.el (make-backup-file-name-1, files--transform-file-name)
(read-file-modes):
* lisp/fringe.el (fringe-mode):
* lisp/gnus/gnus-art.el (gnus-button-handle-info-url):
* lisp/gnus/gnus-group.el (gnus-group-completing-read):
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-event-from-ical):
* lisp/gnus/gnus-mlspl.el (gnus-group-split-fancy):
* lisp/gnus/gnus-search.el (gnus-search-query-parse-date)
(gnus-search-transform-expression, gnus-search-run-search):
* lisp/gnus/gnus-start.el (gnus-dribble-enter):
* lisp/gnus/gnus-sum.el (gnus-summary-refer-article):
* lisp/gnus/gnus-util.el (gnus-mode-string-quote):
* lisp/gnus/message.el (message-put-addresses-in-ecomplete)
(message-parse-mailto-url, message-mailto-1):
* lisp/gnus/mml-sec.el (mml-secure-epg-sign):
* lisp/gnus/mml-smime.el (mml-smime-epg-verify):
* lisp/gnus/mml2015.el (mml2015-epg-verify):
* lisp/gnus/nnmaildir.el (nnmaildir--system-name)
(nnmaildir-request-list, nnmaildir-retrieve-groups)
(nnmaildir-request-group, nnmaildir-retrieve-headers):
* lisp/gnus/nnrss.el (nnrss-node-text):
* lisp/gnus/spam-report.el (spam-report-gmane-internal)
(spam-report-user-mail-address):
* lisp/ibuffer.el (name):
* lisp/image-dired.el (image-dired-pngnq-thumb)
(image-dired-pngcrush-thumb, image-dired-optipng-thumb)
(image-dired-create-thumb-1):
* lisp/info.el (Info-set-mode-line):
* lisp/international/mule-cmds.el (describe-language-environment):
* lisp/mail/rfc2231.el (rfc2231-parse-string):
* lisp/mail/rfc2368.el (rfc2368-parse-mailto-url):
* lisp/mail/rmail.el (rmail-insert-inbox-text)
(rmail-simplified-subject-regexp):
* lisp/mail/rmailout.el (rmail-output-body-to-file):
* lisp/mail/undigest.el (rmail-digest-rfc1153):
* lisp/man.el (Man-default-man-entry):
* lisp/mouse.el (minor-mode-menu-from-indicator):
* lisp/mpc.el (mpc--debug):
* lisp/net/browse-url.el (browse-url-mail):
* lisp/net/eww.el (eww-update-header-line-format):
* lisp/net/newst-backend.el (newsticker-save-item):
* lisp/net/rcirc.el (rcirc-sentinel):
* lisp/net/soap-client.el (soap-decode-date-time):
* lisp/nxml/rng-cmpct.el (rng-c-literal-2-re):
* lisp/nxml/xmltok.el (let*):
* lisp/obsolete/nnir.el (nnir-run-swish-e, nnir-run-hyrex)
(nnir-run-find-grep):
* lisp/play/dunnet.el (dun-doassign):
* lisp/play/handwrite.el (handwrite):
* lisp/proced.el (proced-format-args):
* lisp/profiler.el (profiler-report-header-line-format):
* lisp/progmodes/gdb-mi.el (gdb-mi-quote):
* lisp/progmodes/make-mode.el (makefile-bsdmake-rule-action-regex)
(makefile-make-font-lock-keywords):
* lisp/progmodes/prolog.el (prolog-guess-fill-prefix):
* lisp/progmodes/ruby-mode.el (ruby-toggle-string-quotes):
* lisp/progmodes/sql.el (sql-remove-tabs-filter, sql-str-literal):
* lisp/progmodes/which-func.el (which-func-current):
* lisp/replace.el (query-replace-read-from)
(occur-engine, replace-quote):
* lisp/select.el (xselect--encode-string):
* lisp/ses.el (ses-export-tab):
* lisp/subr.el (shell-quote-argument):
* lisp/term/pc-win.el (msdos-show-help):
* lisp/term/w32-win.el (w32--set-selection):
* lisp/term/xterm.el (gui-backend-set-selection):
* lisp/textmodes/picture.el (picture-tab-search):
* lisp/thumbs.el (thumbs-call-setroot-command):
* lisp/tooltip.el (tooltip-show-help-non-mode):
* lisp/transient.el (transient-format-key):
* lisp/url/url-mailto.el (url-mailto):
* lisp/vc/log-edit.el (log-edit-changelog-ours-p):
* lisp/vc/vc-bzr.el (vc-bzr-status):
* lisp/vc/vc-hg.el (vc-hg--glob-to-pcre):
* lisp/vc/vc-svn.el (vc-svn-after-dir-status):
* lisp/xdg.el (xdg-desktop-strings):
* test/lisp/electric-tests.el (defun):
* test/lisp/term-tests.el (term-simple-lines):
* test/lisp/time-stamp-tests.el (formatz-mod-del-colons):
* test/lisp/wdired-tests.el (wdired-test-bug32173-01)
(wdired-test-unfinished-edit-01):
* test/src/json-tests.el (json-parse-with-custom-null-and-false-objects):
Use `string-replace` instead of `replace-regexp-in-string`.
2021-08-08 19:25:26 +02:00
Lars Ingebrigtsen
0eb0fe987b Add lambda to the pretty Ruby symbols list
* lisp/progmodes/ruby-mode.el (ruby--prettify-symbols-alist): Add
lambda (bug#48681).
2021-05-29 08:09:34 +02:00
William Denton
90cd4d6cae Add pretty symbols to ruby-mode
* lisp/progmodes/ruby-mode.el (ruby--prettify-symbols-alist): Add
pretty symbols (bug#48681).
(ruby-mode): Use them.
2021-05-29 08:08:35 +02:00
Steve Purcell
81fc95bf22 ruby-mode.el: puts and printf do not require args
* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): puts and
printf can be called without arguments, so the font locking of
"bare" calls to either is incorrect.  The fix is to font-lock them
as for other kernel methods which accepts zero or more arguments
(bug#48180).
2021-05-03 09:41:44 +02:00
Dmitry Gutov
6a078097c9 Don't add magic comment to Ruby files for utf-8 encoding
* lisp/progmodes/ruby-mode.el (ruby-encoding-map):
Add entry for utf-8 (bug#48043).
(ruby--detect-encoding): Don't convert to string too early, so
that returning nil is meaningful.
(ruby-mode-set-encoding): Convert to string here.
2021-04-28 05:11:36 +03:00
Stefan Kangas
8b07994e20 Convert many more links to use HTTPS 2021-03-24 10:20:18 +01:00
Dmitry Gutov
6dee194535 (ruby-find-library-file): Also recognize 'gem' statements
* lisp/progmodes/ruby-mode.el (ruby-find-library-file):
Also recognize 'gem' statements.
2021-03-02 15:16:34 +02:00
Dmitry Gutov
83efac6477 ruby-syntax-propertize: Fix certain cases following ::
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
Make sure to backtrack if the "symbols with special characters"
rule is aborted because of preceding colon.
2021-02-02 03:48:04 +02:00
Mattias Engdegård
1433a12014 ruby-mode: eliminate redundant regexp branch
* lisp/progmodes/ruby-mode.el (ruby-add-log-current-method):
Since ruby-operator-re matches dot, don't include both in regexp.
This pacifies relint.
2021-01-05 12:01:32 +01:00
Dmitry Gutov
1e776d7d6a ruby-add-log-current-method: Support methods with symbolic names
* lisp/progmodes/ruby-mode.el (ruby-add-log-current-method):
Support methods with symbolic names.
2021-01-04 21:13:53 +02:00
Dmitry Gutov
0f561ee553 ruby-smie-rules: Avoid one case of infinite recursion
* lisp/progmodes/ruby-mode.el (ruby-smie-rules):
Avoid one case of infinite recursion (bug#29107).
2021-01-02 04:19:09 +02:00
Dmitry Gutov
3ea7cec4c0 ; ruby-smie--bosp: Fix the breakage 2021-01-01 14:36:37 +02:00