[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/inf-ruby 1d6fef6eba 171/265: Wrap SMIE tokenizer functions
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/inf-ruby 1d6fef6eba 171/265: Wrap SMIE tokenizer functions to bind inhibit-field-text-motion |
Date: |
Sat, 9 Jul 2022 21:59:23 -0400 (EDT) |
branch: elpa/inf-ruby
commit 1d6fef6eba227f72632de858e4702947fc2e476d
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Wrap SMIE tokenizer functions to bind inhibit-field-text-motion
Fixes #85
---
inf-ruby.el | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/inf-ruby.el b/inf-ruby.el
index 214d192e99..196b82c9e9 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -237,6 +237,11 @@ The following commands are available:
(setq mode-line-process orig-mode-line-process)))
(setq comint-prompt-regexp inf-ruby-prompt-pattern)
(ruby-mode-variables)
+ (when (bound-and-true-p ruby-use-smie)
+ (set (make-local-variable 'smie-forward-token-function)
+ #'inf-ruby-smie--forward-token)
+ (set (make-local-variable 'smie-backward-token-function)
+ #'inf-ruby-smie--backward-token))
(setq major-mode 'inf-ruby-mode)
(setq mode-name "Inf-Ruby")
(use-local-map inf-ruby-mode-map)
@@ -793,6 +798,14 @@ Gemfile, it should use the `gemspec' instruction."
(match-string match-group)
t))))
+(defun inf-ruby-smie--forward-token ()
+ (let ((inhibit-field-text-motion t))
+ (ruby-smie--forward-token)))
+
+(defun inf-ruby-smie--backward-token ()
+ (let ((inhibit-field-text-motion t))
+ (ruby-smie--backward-token)))
+
;;;###autoload (dolist (mode ruby-source-modes) (add-hook (intern (format
"%s-hook" mode)) 'inf-ruby-minor-mode))
(provide 'inf-ruby)
- [nongnu] elpa/inf-ruby fd8d392fef 224/265: ruby-print-result: Fallback to inf-ruby-buffer, (continued)
- [nongnu] elpa/inf-ruby fd8d392fef 224/265: ruby-print-result: Fallback to inf-ruby-buffer, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 03dd9c9d4e 246/265: Avoid creating duplicates in inf-ruby-buffers, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 3cdf30dc73 251/265: Apply code review - remove cl-lib and optional args, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 3e16215cb2 128/265: Document changing C-c C-s to call inf-ruby-console-auto, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby b3ee3093b5 105/265: Autoloading inf-ruby-minor-mode is more important, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby c5bfcf59eb 112/265: Turn string into a choice, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby f1ea8f8a69 103/265: Restore compatibility with Emacs < 24.4, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 6d7f1dc10a 085/265: Merge remote-tracking branch 'bbatsov/style', ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 409fd736d4 104/265: Complete on an empty line, too, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 5759a9187c 132/265: Recommend setting Pry.config.correct_indent to false, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 1d6fef6eba 171/265: Wrap SMIE tokenizer functions to bind inhibit-field-text-motion,
ELPA Syncer <=
- [nongnu] elpa/inf-ruby 12f7f0750c 159/265: Automatically returning to the previous compilation mode after typing, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby df014b0717 177/265: Merge pull request #90 from codeasone/support-single-quoted-gemspec-name, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 74ca3a7f97 191/265: in a{, new} buffer, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 5aaa7e879c 193/265: Only launch one console per project, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 62c1c72d8e 205/265: Add autoload, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 86db14c315 022/265: Rename: inf-ruby-keys -> inf-ruby-setup-keybindings, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby dfc1d4f19f 033/265: Delete obsolete TODO comment, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 6aba85ea70 042/265: inf-ruby-fix-completions-on-windows: Fix free variable compilation warning, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 5cf94a2dd1 010/265: Fix completion string insertion so that it doesn't swallow newlines when used outside of inf-ruby buffers., ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 0f0eb184f0 088/265: Bump the version, ELPA Syncer, 2022/07/09