summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--misc/ruby-electric.el4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d8605f8942..8c638fec76 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Oct 23 14:20:43 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * misc/ruby-electric.el using variable `last-command-event' instead of
+ obsolete `last-command-char', so that work with Emacs trunk.
+ a patch by Victor Deryagin <vderyagin AT gmail.com>.
+
Tue Oct 23 14:06:47 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (visibility_option): visibility attribute is not
diff --git a/misc/ruby-electric.el b/misc/ruby-electric.el
index 6c1ad9a88a..c41593bb67 100644
--- a/misc/ruby-electric.el
+++ b/misc/ruby-electric.el
@@ -142,7 +142,7 @@ strings. Note that you must have Font Lock enabled."
(defun ruby-electric-is-last-command-char-expandable-punct-p()
(or (memq 'all ruby-electric-expand-delimiters-list)
- (memq last-command-char ruby-electric-expand-delimiters-list)))
+ (memq last-command-event ruby-electric-expand-delimiters-list)))
(defun ruby-electric-space-can-be-expanded-p()
(if (ruby-electric-code-at-point-p)
@@ -188,7 +188,7 @@ strings. Note that you must have Font Lock enabled."
(and (ruby-electric-is-last-command-char-expandable-punct-p)
(ruby-electric-code-at-point-p)
(save-excursion
- (insert (cdr (assoc last-command-char
+ (insert (cdr (assoc last-command-event
ruby-electric-matching-delimeter-alist))))))
(defun ruby-electric-bar(arg)