all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: David Carlisle <davidc@nag.co.uk>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 32897@debbugs.gnu.org
Subject: bug#32897: 26.1; nxml-mode indentation
Date: Fri, 19 Apr 2019 13:42:36 -0400	[thread overview]
Message-ID: <87pnphvqlv.fsf@gmail.com> (raw)
In-Reply-To: <f7d5ea73-ab25-a9f4-31a7-e75311b7a7b9@nag.co.uk> (David Carlisle's message of "Mon, 1 Oct 2018 10:44:37 +0100")

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

retitle 32897 nxml-mode nxml-char-ref-extra-display for &#10; (newline) is unwanted
severity 32897 minor
tags 32897 + patch
quit

[For the indentation aspect of this bug, see Bug#32003.]

David Carlisle <davidc@nag.co.uk> writes:

> Also it does not show a visual newline for #10, even when other numeric
> references to printable characters do display the character, which was
> the desired behaviour.

I assume this was changed by [1: 930f8e8377].  I guess can just special
case newline, it's the only character that has this problem that I can
think of.  This would be for emacs-26 since it's a regression.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1101 bytes --]

From 689e90314f73fef3b2a7bdda183ca78101a5d449 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Fri, 19 Apr 2019 13:28:00 -0400
Subject: [PATCH] Disable extra display of &#10; in nxml-mode (Bug#32897)

* lisp/nxml/nxml-mode.el (nxml-char-ref-display-extra): Don't put
display for the newline, it makes the indentation look wrong.
---
 lisp/nxml/nxml-mode.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el
index f17f5843b8..14748d5c56 100644
--- a/lisp/nxml/nxml-mode.el
+++ b/lisp/nxml/nxml-mode.el
@@ -2378,7 +2378,9 @@ (defun nxml-toggle-char-ref-extra-display (arg)
 (put 'nxml-char-ref 'evaporate t)
 
 (defun nxml-char-ref-display-extra (start end n)
-  (when nxml-char-ref-extra-display
+  (when (and ;; Displaying literal newline is unhelpful.
+             (not eql n ?\n)
+             nxml-char-ref-extra-display)
     (let ((name (or (get-char-code-property n 'name)
                     (get-char-code-property n 'old-name)))
 	  (glyph-string (and nxml-char-ref-display-glyph-flag
-- 
2.11.0


[-- Attachment #3: Type: text/plain, Size: 208 bytes --]


[1: 930f8e8377]: 2016-01-15 10:29:20 -0500
  Update nXML to use Emacs's Unicode support, and lexical-binding
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=930f8e8377e40ba161bd16ea4d612cb4c570ee1b

  reply	other threads:[~2019-04-19 17:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-01  9:44 bug#32897: 26.1; nxml-mode indentation David Carlisle
2019-04-19 17:42 ` Noam Postavsky [this message]
2019-05-09 11:45   ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pnphvqlv.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=32897@debbugs.gnu.org \
    --cc=davidc@nag.co.uk \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.