From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Skip Montanaro Newsgroups: gmane.emacs.help Subject: Re: Indentation with spaces Date: Wed, 8 Jun 2022 20:57:33 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1943"; mail-complaints-to="usenet@ciao.gmane.io" Cc: goncholden via Users list for the GNU Emacs text editor To: goncholden Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 09 03:59:06 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 1nz7Rx-0000Mg-0g for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 09 Jun 2022 03:59:05 +0200 Original-Received: from localhost ([::1]:42806 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nz7Rv-0008LD-Gn for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 08 Jun 2022 21:59:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nz7Qx-0008L4-4a for help-gnu-emacs@gnu.org; Wed, 08 Jun 2022 21:58:03 -0400 Original-Received: from mail-yb1-xb2f.google.com ([2607:f8b0:4864:20::b2f]:34472) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nz7Qv-0002Nx-NN for help-gnu-emacs@gnu.org; Wed, 08 Jun 2022 21:58:02 -0400 Original-Received: by mail-yb1-xb2f.google.com with SMTP id p13so39448662ybm.1 for ; Wed, 08 Jun 2022 18:58:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FZ71snrDzS/dvXzh2wwV9qHErOkmZDlMC8p+udVNO6c=; b=nHJWoeZj6x3s+lVZOhULQmkYNl3/YEo2pmXIztt0gSMYEW5kNMhvv5MluyZASzdPri 0WoIpPsFN6AvIKDSqccaack0ele1ED4j1lQtm4qsE3WxebQW5jYxK4wxSCrnu/Ubtu7U mQV/gXO5XtV3k88vA/o7PJLffyD9J/FXMkX+PdP3lXB9uGKBuOBdaf2vd6wVMGBXFpIF C6OoOqGsbbxr+DW46lMTfwM+1NMY5H0oJHb35G7GW12NDSeibKp6xlW+8BEnCUvcPPnf oIM3cOKyVVfckbzoIouIy1CWuiDOoGpYrl0J+qKVjfc2gc3dnR7mG726u6QSjcoi0yPW jKDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FZ71snrDzS/dvXzh2wwV9qHErOkmZDlMC8p+udVNO6c=; b=0B7ROy28KclPTxB4Zg6lI6jtaujl089VdjWGvkSUnoOCC1KQxoa8I6IMv/qaxj58pi ZhOQuQLvY5NflrGK0rXnRYJwqPeAjfYChnSQuCd938nqkN7ldeYUbGXWIWMkPAr7O/wN 43SUh9W8ii/D8UP8lCOdBcIvUGT6SwBSt/Sjz1TKHwb4h34fNaAbFzeu0YWdw6NeM6vt S9fD9zODXpSP1SqYUvadLjFWnND8uCwLXdkD2b8qo5NGFCv4xT1q4YOAajiBJh5UGdFt 20cuilATiQCoeX5WbW3FaSJ1dcgYYVXciJ6hhPr1GvyfQUz5hlWsfOHeZNE7Sk7nQpO6 h32g== X-Gm-Message-State: AOAM532mnhgavlq3Xp6c9gPApCpLgT7aCWoznmJ56+1EiDV6DIVk4VCY 4ggs9BGBI111B6f60+I1pgb4F0lP9AeGVjHIgA7Ea58= X-Google-Smtp-Source: ABdhPJwWbxGGAulnSQxZjidzlCan6wtnQkxANIS4+CMrkvG14iVSQ4rXL+hYJ4HNQdt4ZMAYUiJGtZBMzSL/FE2AgZQ= X-Received: by 2002:a5b:10b:0:b0:654:74c1:61cf with SMTP id 11-20020a5b010b000000b0065474c161cfmr38648814ybx.42.1654739880008; Wed, 08 Jun 2022 18:58:00 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::b2f; envelope-from=skip.montanaro@gmail.com; helo=mail-yb1-xb2f.google.com 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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:137538 Archived-At: > Have written the following function, but tabs and trailing spaces are not being 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"))))) > ) > I'm no whiz with highlighting things. You could say I'm a face dunce. I let the major mode do that. I'm rarely dissatisfied enough with its settings to investigate a change in behavior. As for TAB not inserting a literal TAB character, indentation is controlled by the major mode. I believe that for ELisp, the default indentation is just two spaces. (Don't quote me on that though.) Skip