aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
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
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')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/perl-mode.el6
2 files changed, 10 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 740d95c29e1..5ea2d4483c4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-04-03 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * progmodes/perl-mode.el (perl-syntax-propertize-function): Handle $'
4 used as a variable (bug#17174).
5
12014-04-02 Stefan Monnier <monnier@iro.umontreal.ca> 62014-04-02 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * progmodes/perl-mode.el (perl-indent-new-calculate): 8 * progmodes/perl-mode.el (perl-indent-new-calculate):
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