From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenneth Wolcott Newsgroups: gmane.emacs.help Subject: Re: How to change Perl mode indentation to two spaces and no tabs? Date: Mon, 15 Jun 2015 12:58:07 -0700 Message-ID: References: <87d20wx1wz.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1434398303 2247 80.91.229.3 (15 Jun 2015 19:58:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Jun 2015 19:58:23 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: John Mastro Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 15 21:58:21 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z4aWR-0000X9-Qf for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jun 2015 21:58:19 +0200 Original-Received: from localhost ([::1]:36253 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4aWR-0001xY-Dh for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jun 2015 15:58:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4aWH-0001xN-MA for help-gnu-emacs@gnu.org; Mon, 15 Jun 2015 15:58:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4aWG-0001gO-TO for help-gnu-emacs@gnu.org; Mon, 15 Jun 2015 15:58:09 -0400 Original-Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]:36201) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4aWG-0001fN-ML for help-gnu-emacs@gnu.org; Mon, 15 Jun 2015 15:58:08 -0400 Original-Received: by wigg3 with SMTP id g3so88799787wig.1 for ; Mon, 15 Jun 2015 12:58:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Y6e6vqnUMNG9qwd0rvA7bM4p2bSpbfYwvTGsui8kWzI=; b=qELJ0FtkVmKbYa/cXgMJbh4nduJuy1DtE/fRR4KQUGz654m4D9Z1r5PqIE3faHq4tw CnrlsbuLQpwZz+V4VpeavmL0Pu9+dzDepxYbTRaugaZ2tUrXdbZND0++A8fexyCwUmR/ JYQP9eeXbVO+LlCHKlegc4MKP3MJm5yE+zbwZpij9mSSXy6FsbQlF4PLTpo30EiH6vhK NOtA9mod6IQiuWVcCa+uJgS4WOHSXjRLtelwhd7c1hHuTQTbO+EvqeVm9hRl4QneBkPi mW+v/SjJRNMoDlV5ISEKW6j8A7ux0Y+Gv1SHf0NEfnfZTjQgFNEH7nWr2sG/CwNDemGE iyBQ== X-Received: by 10.194.192.166 with SMTP id hh6mr53262343wjc.127.1434398287933; Mon, 15 Jun 2015 12:58:07 -0700 (PDT) Original-Received: by 10.28.135.20 with HTTP; Mon, 15 Jun 2015 12:58:07 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::232 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104956 Archived-At: On Mon, Jun 15, 2015 at 12:47 PM, John Mastro wrote: >> I like the syntax highlighting and the formatting (in general) of >> the perl mode, I just want multiples of two spaces for indentation >> rather than multiples of four. > > Then it looks like you'll want something like: > > (defun my-init-perl-mode () > (setq perl-indent-level 2 > perl-continued-statement-offset 2 > perl-continued-brace-offset -2)) > > (eval-after-load 'perl-mode > '(add-hook 'perl-mode-hook #'my-init-perl-mode)) > > See `C-h f perl-mode RET' for more information on those, and other, > options. I based the above on the "LW" style (the default) with every 4 > replaced by a 2. > > -- > john Thanks, John! I did as you suggested, looking at the built-in help for perl-mode. I'm now experimenting with these lines in my ~/.emacs file. Well, initial experiments still show that the default perl-mode still seems to override what I have in the ~/.emacs file, as the four-space indentation is still occurring. I'm still googling for this as well; haven't found the right info yet. Thanks, Ken Wolcott