aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorStefan Monnier2014-04-02 20:41:09 -0400
committerStefan Monnier2014-04-02 20:41:09 -0400
commit062e286b7ccf2b23cfafef1bf1128eaf91e0ec94 (patch)
treeae8c241903261aca39d953c8b3399a72fbc71d79 /lisp/progmodes
parent8a7fd442120979132a5c7beb0ac910ea3fae165d (diff)
downloademacs-062e286b7ccf2b23cfafef1bf1128eaf91e0ec94.tar.gz
emacs-062e286b7ccf2b23cfafef1bf1128eaf91e0ec94.zip
* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Handle $'
used as a variable. Fixes: debbugs:17174
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/perl-mode.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index cf9347d0e6d..3486c0a1983 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -250,7 +250,11 @@
250 ;; Catch ${ so that ${var} doesn't screw up indentation. 250 ;; Catch ${ so that ${var} doesn't screw up indentation.
251 ;; This also catches $' to handle 'foo$', although it should really 251 ;; This also catches $' to handle 'foo$', although it should really
252 ;; check that it occurs inside a '..' string. 252 ;; check that it occurs inside a '..' string.
253 ("\\(\\$\\)[{']" (1 ". p")) 253 ("\\(\\$\\)[{']" (1 (unless (and (eq ?\' (char-after (match-end 1)))
254 (save-excursion
255 (not (nth 3 (syntax-ppss
256 (match-beginning 0))))))
257 (string-to-syntax ". p"))))
254 ;; Handle funny names like $DB'stop. 258 ;; Handle funny names like $DB'stop.
255 ("\\$ ?{?^?[_[:alpha:]][_[:alnum:]]*\\('\\)[_[:alpha:]]" (1 "_")) 259 ("\\$ ?{?^?[_[:alpha:]][_[:alnum:]]*\\('\\)[_[:alpha:]]" (1 "_"))
256 ;; format statements 260 ;; format statements