emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r116897: * lisp/progmodes/perl-mode.el (perl-synt


From: Stefan Monnier
Subject: [Emacs-diffs] emacs-24 r116897: * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Handle $'
Date: Thu, 03 Apr 2014 00:41:23 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116897
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17174
committer: Stefan Monnier <address@hidden>
branch nick: emacs-24
timestamp: Wed 2014-04-02 20:41:09 -0400
message:
  * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Handle $'
  used as a variable.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/progmodes/perl-mode.el    perlmode.el-20091113204419-o5vbwnq5f7feedwu-402
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  test/indent/perl.perl          perl.perl-20121031024456-cjjxr53eeyg5rvml-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-04-02 19:50:05 +0000
+++ b/lisp/ChangeLog    2014-04-03 00:41:09 +0000
@@ -1,3 +1,8 @@
+2014-04-03  Stefan Monnier  <address@hidden>
+
+       * progmodes/perl-mode.el (perl-syntax-propertize-function): Handle $'
+       used as a variable (bug#17174).
+
 2014-04-02  Stefan Monnier  <address@hidden>
 
        * progmodes/perl-mode.el (perl-indent-new-calculate):

=== modified file 'lisp/progmodes/perl-mode.el'
--- a/lisp/progmodes/perl-mode.el       2014-04-02 19:50:05 +0000
+++ b/lisp/progmodes/perl-mode.el       2014-04-03 00:41:09 +0000
@@ -250,7 +250,11 @@
       ;; Catch ${ so that ${var} doesn't screw up indentation.
       ;; This also catches $' to handle 'foo$', although it should really
       ;; check that it occurs inside a '..' string.
-      ("\\(\\$\\)[{']" (1 ". p"))
+      ("\\(\\$\\)[{']" (1 (unless (and (eq ?\' (char-after (match-end 1)))
+                                       (save-excursion
+                                         (not (nth 3 (syntax-ppss
+                                                      (match-beginning 0))))))
+                            (string-to-syntax ". p"))))
       ;; Handle funny names like $DB'stop.
       ("\\$ ?{?^?[_[:alpha:]][_[:alnum:]]*\\('\\)[_[:alpha:]]" (1 "_"))
       ;; format statements

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-04-02 14:33:33 +0000
+++ b/src/ChangeLog     2014-04-03 00:41:09 +0000
@@ -4231,7 +4231,7 @@
        * frame.c (delete_frame): Block/unblock input to overcome race
        condition (Bug#15475).
 
-2013-09-29  Andreas Politz  <address@hidden>  (tiny change)
+2013-09-29  Andreas Politz  <address@hidden>
 
        * frame.c (delete_frame): Record selected frame only after
        calling Qdelete_frame_functions (Bug#15477).

=== modified file 'test/indent/perl.perl'
--- a/test/indent/perl.perl     2013-05-06 19:33:56 +0000
+++ b/test/indent/perl.perl     2014-04-03 00:41:09 +0000
@@ -16,5 +16,9 @@
 bar
 EOF2
 
+print $'; # This should not start a string!
+
+print "hello" for /./;
+
 $fileType_filesButNot           # bug#12373?
     = join( '|', map { quotemeta($_).'$' } @{$fileType->{filesButNot}} );


reply via email to

[Prev in Thread] Current Thread [Next in Thread]