From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Espen Newsgroups: gmane.emacs.help Subject: Re: While editing a CMake file, how to turn off smart indentation? Date: Thu, 16 Jul 2015 21:14:07 -0400 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1437095724 20798 80.91.229.3 (17 Jul 2015 01:15:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Jul 2015 01:15:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 17 03:15:19 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 1ZFuFA-0006iO-OR for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Jul 2015 03:15:16 +0200 Original-Received: from localhost ([::1]:42475 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFuF9-0002sS-M3 for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Jul 2015 21:15:15 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 47 Injection-Info: mx02.eternal-september.org; posting-host="ad871ce417d1fb2ea3c87e49e48c0ae1"; logging-data="24209"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/1oBUyGaNpuyL3+Cr90EapM4NPtMtIK3g=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:XYvn7JSczRErhXPtNhfopGKuJ6U= Original-Xref: usenet.stanford.edu gnu.emacs.help:213481 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:105767 Archived-At: Emanuel Berg writes: > Yaron Cohen-Tal writes: >> In my `.emacs`, but for CMake files Emacs just >> indents the lines automatically according to its own >> rules, and TAB has no effect at all. > > What is CMake? I don't get any apropos matches and > there isn't anything in the Emacs documentation > according to my razor-sharp tools for finding out. CMake files have the suffix ".cmake". Emacs does not appear to handle them, you end up in Fundamental mode. GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.14.12) of 2015-05-07 on buildvm-08.phx2.fedoraproject.org They look like a script with '#' comments so there might be a mode that would come close: # Install script for directory: /home/me/src/libomron # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") So, tab should just self insert. For the original poster: In Emacs, the tab key works differently depending on the mode. The mode is often set automatically based on the file extension. You can see the mode inside () on the mode line, its the first word. If you are in fundamental mode, the tab key should insert a tab. Emacs by default tabs by 8. All of this can be changed, but don't do it to fundamental mode. Try this: http://www.emacswiki.org/emacs/CMakeMode -- Dan Espen