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:17:53 -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 1434395887 26507 80.91.229.3 (15 Jun 2015 19:18:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Jun 2015 19:18:07 +0000 (UTC) To: 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:18:07 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 1Z4ZtW-0004MS-Pd for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jun 2015 21:18:06 +0200 Original-Received: from localhost ([::1]:36110 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4ZtV-0000mL-UC for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jun 2015 15:18:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52435) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4ZtL-0000mE-Ik for help-gnu-emacs@gnu.org; Mon, 15 Jun 2015 15:17:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4ZtK-0000Dg-Ei for help-gnu-emacs@gnu.org; Mon, 15 Jun 2015 15:17:55 -0400 Original-Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:37261) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4ZtK-0000DS-7C for help-gnu-emacs@gnu.org; Mon, 15 Jun 2015 15:17:54 -0400 Original-Received: by wifx6 with SMTP id x6so88782436wif.0 for ; Mon, 15 Jun 2015 12:17:53 -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 :content-type; bh=5HZ1FTAcJ7pjrO7In16JElZ3Lm6oRb+oonITkuD1aao=; b=GCzHFO3QVaYuw5m5qX4BdX0crOhLPX/Bfp3VdI+44bGk1X8gBBuq9RBj8LV1Db1aus HsZmXVEmKMqqOkpG6cGLjUxhyOB+XQCuVJqvkfj/5o49FkAUSLPwEngUr8Sww3YHZfYz iKN9axdYtadhdPMhjZmqUhKrbZtZ5p01k7heO63XKynCCe/jgDVyeADTGy+YEmoVk/wE ueRqSazpSKlhS1BOJUuvR3jdw0r7tv0e3SUHweslvLzH3pK+iht7v+LJ0V0oVuBQXvjO SGgLC3PUDDNQRfaw4OkzJqEL1rDgr55TWNU0Ut/BEBaUhDjE3byQL5E9yyxQAfh4Plug XtMw== X-Received: by 10.180.78.136 with SMTP id b8mr32956032wix.89.1434395873604; Mon, 15 Jun 2015 12:17:53 -0700 (PDT) Original-Received: by 10.28.135.20 with HTTP; Mon, 15 Jun 2015 12:17:53 -0700 (PDT) In-Reply-To: <87d20wx1wz.fsf@debian.uxu> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::233 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:104954 Archived-At: On Mon, Jun 15, 2015 at 11:27 AM, Emanuel Berg wrote: > Kenneth Wolcott writes: > >> I'd like to change the default indentation of the >> Emacs Perl mode from four spaces (and tabs?) to be >> two spaces and no tabs. How do I do this? >> >> I'd also like to do this for my bash (bourne?) >> shell scripts. > > I agree tabs shouldn't be used in source - except for > Makefiles, because there it won't work otherwise. > > Try this: > > (setq-default tab-width 2) > (setq-default indent-tabs-mode nil) > > -- > underground experts united > http://user.it.uu.se/~embe8573 Hi Emanuel; Thank you for your response! However, it looks like bash mode and perl mode seem to overrule these two lines when I place them in my ~/.emacs file as I see the same four space indentation when typing in new text in new files. So, either I placed these lines in the wrong file or these lines need to be within the context of the mode (or both). 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. Thanks, Ken Wolcott