jrockway / cperl-mode

cperl-mode with 5.10 fixes, mx-declare support, perl6 support, etc.
102 stars 33 forks source link

cperl-mode as is can't be installed with emacs 26.1 #50

Closed choroba closed 6 years ago

choroba commented 6 years ago

49 compiles without problems. The minimal set of changes needed seems to be

modified   cperl-mode.el
@@ -1011,7 +1011,7 @@ In regular expressions (except character classes):
                unrecognized escape sequences
   `cperl-nonoverridable-face'  Modifiers, as gism in m/REx/gism
   `font-lock-type-face'        POSIX classes inside charclasses,
-               escape sequences with arguments (\x \23 \p \N)
+               escape sequences with arguments (\\x \\23 \\p \\N)
                and others match-a-char escape sequences
   `font-lock-keyword-face' Capturing parens, and |
   `font-lock-function-name-face' Special symbols: $ ^ . [ ] [^ ] (?{ }) (??{ })
@@ -2189,8 +2189,8 @@ See `cperl-electric-parens'."
      (insert (make-string
           (prefix-numeric-value arg)
           (cdr (assoc last-command-event '((?{ .?})
-                          (?[ . ?])
-                          (?( . ?))
+                          (?\[ . ?\])
+                          (?\( . ?\))
                           (?< . ?>))))))
      (forward-char (- (prefix-numeric-value arg))))
       (self-insert-command (prefix-numeric-value arg)))))
renormalist commented 6 years ago

Does that change still work with slightly older versions? I'm happy to press merge something, just not sure if there is already a PR for #49 or #50.

choroba commented 6 years ago

It seems to work OK with emacs 24.3.1 which comes with my OpenSUSE. Or do you mean even more slightly older? ;-) When switching to magit from vc, I needed to upgrade emacs to get all the bells and whistles.

renormalist commented 6 years ago

Thanks. 24.* is what I mean. :-)

So where is that change that #49 refers to. I can press the Merge button, just can't do anything time consuming.

choroba commented 6 years ago

The change that #49 refers to is here: http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=1bcbcb7e486008d4fc449088e49da6c52ba88bee i.e. nothing for you to press :-) Merging the changes back would require analysing all the differences which is definitely time consuming. I've created the PR #51 that implements the minimal changes to make cperl-mode work with emacs 26.1.

renormalist commented 6 years ago

Yeah, that's exactly the kind of complexity I expected. I did have merge orgies back in 2007 when I tried to fork it for Perl6, but that's not on my time budget anymore. Thanks for #51.