aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--oni-php/oni-php.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/oni-php/oni-php.el b/oni-php/oni-php.el
index 603f028..6505802 100644
--- a/oni-php/oni-php.el
+++ b/oni-php/oni-php.el
@@ -131,7 +131,8 @@ Do the insert N times."
(skip-syntax-forward " ")
(nth 3 (syntax-ppss (1+ (point))))))
(self-insert-command N)
- (let ((op (if (looking-back (rx "$" (minimal-match (one-or-more alnum))))
+ (let ((op (if (looking-back (rx "$" (minimal-match (one-or-more (any alnum "->"))))
+ (line-beginning-position))
"->"
"::")))
(dotimes (_ N) (insert op)))))