Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register "cperl" as an alias of Perl 5 #4067

Merged
merged 2 commits into from
Apr 6, 2018
Merged

Register "cperl" as an alias of Perl 5 #4067

merged 2 commits into from
Apr 6, 2018

Conversation

Alhadis
Copy link
Collaborator

@Alhadis Alhadis commented Mar 13, 2018

This PR enables recognition of Perl files containing cperl modelines:

#!/usr/bin/env perl
# -*- cperl -*-

Description

Emacs ships with an enhanced major-mode for editing Perl 5 with embedded C sections (called cperl-mode, appropriately enough). One of the sample files added in #4066 reminded me about the mode, and I noticed it isn't being picked up by Linguist.

Since the mode has to be manually activated per file (since it isn't the default), the odds of it being used in embedded modeline are pretty high.

Emacs ships with an enhanced major-mode for editing Perl with embedded C
sections (called `cperl-mode`). This commit enables Linguist to identify
Perl files containing cperl modelines.
@Alhadis Alhadis changed the title Register cperl as an alias of Perl 5 Register "cperl" as an alias of Perl 5 Mar 13, 2018
Copy link
Contributor

@JJ JJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's cperl (a CPanel version of Perl https://github.com/perl11/cperl), and there's cperl mode: https://www.emacswiki.org/emacs/CPerlMode which is the better Perl mode for emacs. In a roundabout way, you're right in asking for cperl to be added. I don't know what adding an alias entails, though. It's basically a different implementation, but it uses the same name for the interpreter, "perl".

@Alhadis
Copy link
Collaborator Author

Alhadis commented Mar 13, 2018

Oh right, I forgot there was a fork of Perl called "CPerl". 😀 (I remember being confused by timestamps before realising the major-mode was unrelated to the fork...)

Will update.

Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Alhadis Alhadis merged commit 324bc83 into master Apr 6, 2018
@Alhadis Alhadis deleted the cperl branch April 6, 2018 15:43
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants