From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Steinar Bang Newsgroups: gmane.emacs.help Subject: Comment indentation problems in nxml Date: Sun, 11 Nov 2018 15:51:45 +0100 Message-ID: <86r2frhdku.fsf@dod.no> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1541947832 14710 195.159.176.226 (11 Nov 2018 14:50:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 11 Nov 2018 14:50:32 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (windows-nt) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 11 15:50:28 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLr4C-0003fh-LX for geh-help-gnu-emacs@m.gmane.org; Sun, 11 Nov 2018 15:50:24 +0100 Original-Received: from localhost ([::1]:42441 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLr6J-0007fa-8C for geh-help-gnu-emacs@m.gmane.org; Sun, 11 Nov 2018 09:52:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLr5p-0007fI-88 for help-gnu-emacs@gnu.org; Sun, 11 Nov 2018 09:52:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gLr5m-0006GI-1N for help-gnu-emacs@gnu.org; Sun, 11 Nov 2018 09:52:05 -0500 Original-Received: from cadalora.default.sbang.uk0.bigv.io ([2001:41c9:1:424::90]:33402 helo=cadalora.bang.priv.no) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLr5l-0006C8-Ql for help-gnu-emacs@gnu.org; Sun, 11 Nov 2018 09:52:01 -0500 Original-Received: from mccoy (cm-84.212.50.160.getinternet.no [84.212.50.160]) by cadalora.bang.priv.no (Postfix) with ESMTPSA id AD8DDCD661 for ; Sun, 11 Nov 2018 14:51:46 +0000 (GMT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:41c9:1:424::90 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:118645 Archived-At: Emacs version: GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-09-15, modified by Debian (I'm using the version of nxml delivered with emacs) I recently changed the copyright headers in XML files in one of my projects from the massive to the more "airy" an (I think) estetic However, this doesn't play well with my formatting fixup function: (defun ide-fix () "Remove trailing spaces and fix indentation" (interactive) (save-excursion (goto-char (point-min)) (replace-regexp "[ \t]+$" "") (goto-char (point-min)) (replace-string "\t" " ") (indent-region (point-min) (point-max)))) After running "ide-fix", the indentation of the first line is kept, but all of the other lines are moved to the left margin: Is it possible to make nxml preserve the original indentation in these comments? (Or should I just bite the bullet and go back to the old copyright headers?) Thanks! - Steinar