Skip to content
This repository has been archived by the owner on Apr 18, 2021. It is now read-only.

Commit

Permalink
changed deprecated last-command-char to last-command-event
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Kuźma committed May 16, 2010
1 parent da8ceb7 commit b3d3294
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ruby-electric.el
Expand Up @@ -111,7 +111,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)
Expand Down Expand Up @@ -157,12 +157,12 @@ 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-close-matching-char(arg)
(interactive "P")
(if (looking-at (string last-command-char))
(if (looking-at (string last-command-event))
(forward-char 1)
(self-insert-command (prefix-numeric-value arg))))

Expand Down

0 comments on commit b3d3294

Please sign in to comment.