From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: goncholden Newsgroups: gmane.emacs.help Subject: Re: Indentation with spaces Date: Wed, 08 Jun 2022 23:40:38 +0000 Message-ID: References: Reply-To: goncholden Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32479"; mail-complaints-to="usenet@ciao.gmane.io" Cc: goncholden via Users list for the GNU Emacs text editor To: Skip Montanaro Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 09 01:41:32 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nz5Iq-0008Fz-3N for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 09 Jun 2022 01:41:32 +0200 Original-Received: from localhost ([::1]:55986 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nz5Io-0001GH-FE for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 08 Jun 2022 19:41:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49310) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nz5IC-0001Fx-S5 for help-gnu-emacs@gnu.org; Wed, 08 Jun 2022 19:40:52 -0400 Original-Received: from mail-40137.protonmail.ch ([185.70.40.137]:31245) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nz5IA-0000uu-E3 for help-gnu-emacs@gnu.org; Wed, 08 Jun 2022 19:40:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1654731647; x=1654990847; bh=dvADdW3+QMKNNHz5NnEeyLSJfZTlKpdqBvfl86iM3MA=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=Lv1cCCxgfFJGj3m+kbqzYmp+aSnlDlWCiQlDxDooHuG0JPvychq9pHIJXPalKwKH7 ZbWb35I1P3JcIVqyCv32XwOExLvcyf03Z96TBHiEwBGwTs5dhq5AqX2c73nPUC31QU f3dQstN01O7MlBdzoz/elTnsBddsr2WULoggtcPP9oKgQZSG23NsQt7zIBdY5Go5WX kKaVawlGz7G8nliH4KOL2jL7jbdNz5ULkNMSd+3hbhOJmjE9fnrvaNo/k+HmxI5RQE 51W4A+Zxs9nZgc1ouLqjaJk7+BvI+awbls38HCg10H/L6jU8m/412RK8LMMP1F6THu XKwGTzKNurH3w== In-Reply-To: Feedback-ID: 43053548:user:proton Received-SPF: pass client-ip=185.70.40.137; envelope-from=goncholden@protonmail.com; helo=mail-40137.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:137532 Archived-At: ------- Original Message ------- On Thursday, June 9th, 2022 at 10:52 AM, Skip Montanaro wrote: > > When using indentation, emacs uses tabs at the front. Can spaces be use= d > > instead, and is it a good thing to do? > > Check the docs for indent-tabs-mode. When nil, spaces will be used instea= d > of tabs. > > Skip Montanaro Have written the following function, but tabs and trailing spaces are not b= eing highlighted. For some reason, hitting the tab key does not introduce = a tab. (defun indent-tabs () "TODO" (setq custom-tab-width 2) (setq whitespace-style '(face tabs tab-mark trailing)) (setq-default indent-tabs-mode nil) (custom-set-faces '(whitespace-tab ((t (:background "#636363"))))) )