summaryrefslogtreecommitdiff
path: root/lisp/progmodes/perl-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/perl-mode.el')
-rw-r--r--lisp/progmodes/perl-mode.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index 241521bef4d..7ed87e8f033 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -301,7 +301,7 @@
;; sub tr {...}
(3 (ignore
(if (save-excursion (goto-char (match-beginning 0))
- (forward-word -1)
+ (forward-word-strictly -1)
(looking-at-p "sub[ \t\n]"))
;; This is defining a function.
nil
@@ -404,7 +404,8 @@
(skip-syntax-backward " ")
(skip-syntax-backward "w")
(member (buffer-substring
- (point) (progn (forward-word 1) (point)))
+ (point) (progn (forward-word-strictly 1)
+ (point)))
'("tr" "s" "y"))))
(close (cdr (assq char perl-quote-like-pairs)))
(st (perl-quote-syntax-table char)))
@@ -993,7 +994,7 @@ Returns (parse-state) if line starts inside a string."
((memq c '(?\) ?\] ?\} ?\"))
(forward-sexp -1) (forward-comment (- (point))) t)
((eq ?w (char-syntax c))
- (forward-word -1) (forward-comment (- (point))) t)
+ (forward-word-strictly -1) (forward-comment (- (point))) t)
(t (forward-char -1) (forward-comment (- (point))) t)))))
;; note: this may be slower than the c-mode version, but I can understand it.