ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am very frustrated.
I like emacs and especially like how when I write a perl script it does the automatic indenting. However, something happened and it no longer does this for me. Help. I want it back.
It does work when I write C programs though. But that is a different mode.
The various major-modes are loaded based on the extension of a file. Your ~/.emacs file ought to provide the link between the extension and the desired mode to use.
So, make sure the file you're working on has the right extension (I think the default is .pl for perl). If you obtained a perl-mode off the net somewhere, then you need to verify it's still on your machine. I thik major-mode files are located in ~/.elisp, and you'll need to make sure your .emacs file loads the right one.
I can't provide you with specific commands simply because I don't know them. Sorry...
Come to think of it. When the auto-indent feature worked I did call the script yadayada.pl. It was after I changed the name to a more Linux type name, meaning one without an extension, that it stopped working. I thought emacs seen the #!/us/bin/perl. Now it makes sense since all my C programs are .c.
Thank you very much. I am constantly learning about Linux.
Jeem
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.