From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Mastro Newsgroups: gmane.emacs.help Subject: Re: How to change Perl mode indentation to two spaces and no tabs? Date: Mon, 15 Jun 2015 12:47:05 -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 1434397659 24037 80.91.229.3 (15 Jun 2015 19:47:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Jun 2015 19:47:39 +0000 (UTC) To: Kenneth Wolcott , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 15 21:47:38 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 1Z4aM5-0000rY-KQ for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jun 2015 21:47:37 +0200 Original-Received: from localhost ([::1]:36208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4aM4-0006Wy-RA for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jun 2015 15:47:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4aLv-0006Wp-S6 for help-gnu-emacs@gnu.org; Mon, 15 Jun 2015 15:47:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4aLu-00044E-Nq for help-gnu-emacs@gnu.org; Mon, 15 Jun 2015 15:47:27 -0400 Original-Received: from mail-oi0-x22e.google.com ([2607:f8b0:4003:c06::22e]:36813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4aLu-00043I-J2 for help-gnu-emacs@gnu.org; Mon, 15 Jun 2015 15:47:26 -0400 Original-Received: by oial131 with SMTP id l131so33365902oia.3 for ; Mon, 15 Jun 2015 12:47:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=pEgA7UqB7Ki++EVcbtLfX8+mQU4xB/Sjr//aD5U6A68=; b=GWto8q1gOxXkNjkm73VvkvsFmtWmtDj7Jya5pshCuz8ZrFMprf2uUyp+GcdCjY8VkR D9dUylNsMFZ00zH/lFGFmQ6/QqKW+juuGoDq5YAmbEPeBcjqCCXXSWPeR4QkgRxUhLxB zspMhzkFzxnFxNjyy+nbPKwDAsM+D3339Wq7RyFGO27ummiOXZD/3gdqsns3pJP3bzFZ XwvFWFmPxRz2R7d4aYK4DptNH1IEuiM+HRUFGG6PNBBtXEV4uwn5Bp4B2c8sjuxcqu1w /jVoN6SoULfqI9TcFoOZZsPJeLzWH55AtyEpw5FGcDCC0rJL9O/G2/F8hhM5ItFa7LB3 XMLw== X-Received: by 10.202.210.148 with SMTP id j142mr8601317oig.68.1434397645820; Mon, 15 Jun 2015 12:47:25 -0700 (PDT) Original-Received: by 10.76.168.70 with HTTP; Mon, 15 Jun 2015 12:47:05 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c06::22e 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:104955 Archived-At: > 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