From: Geoff Gole <geoffgole@gmail.com>
To: 6622@debbugs.gnu.org, misty@redhat.com
Subject: bug#6622: [PATCH] 23.2; nxml-mode Indentation Behavior
Date: Wed, 14 Jul 2010 11:51:56 +0800 [thread overview]
Message-ID: <AANLkTimcLaWp3Znsg_YSsUVY9EsRX2Hkf_3y8x65pCb7@mail.gmail.com> (raw)
In-Reply-To: <156989106.198531278985551802.JavaMail.root@zmail02.collab.prod.int.phx2.redhat.com>
We discussed a workaround on #emacs already. But in case somebody else
has this bug, this might help:
(defadvice nxml-electric-slash (after indentation-bug-workaround activate)
;; fixme - workaround for indentation bug, remove once fixed
(funcall indent-line-function))
And here's a patch:
*** /usr/local/share/emacs/23.2/lisp/nxml/nxml-mode.el.gz
--- /tmp/buffer-content-33187GX
*************** on the line, reindent the line."
*** 1212,1218 ****
(eq (point) (1- slash-pos)))))
(self-insert-command (prefix-numeric-value arg))
(unless arg
! (if nxml-slash-auto-complete-flag
(if end-tag-p
(condition-case err
(let ((start-tag-end
--- 1212,1218 ----
(eq (point) (1- slash-pos)))))
(self-insert-command (prefix-numeric-value arg))
(unless arg
! (when nxml-slash-auto-complete-flag
(if end-tag-p
(condition-case err
(let ((start-tag-end
*************** on the line, reindent the line."
*** 1232,1240 ****
(nxml-scan-error nil))
(when (and (eq (nxml-token-before) (point))
(eq xmltok-type 'partial-empty-element))
! (insert ">")))
(when (and end-tag-p at-indentation)
! (nxml-indent-line))))))
(defun nxml-balanced-close-start-tag-block ()
"Close the start-tag before point with `>' and insert a balancing end-tag.
--- 1232,1240 ----
(nxml-scan-error nil))
(when (and (eq (nxml-token-before) (point))
(eq xmltok-type 'partial-empty-element))
! (insert ">"))))
(when (and end-tag-p at-indentation)
! (nxml-indent-line)))))
(defun nxml-balanced-close-start-tag-block ()
"Close the start-tag before point with `>' and insert a balancing end-tag.
next prev parent reply other threads:[~2010-07-14 3:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-13 1:45 bug#6622: 23.2; nxml-mode Indentation Behavior Misty Stanley-Jones
2010-07-14 3:51 ` Geoff Gole [this message]
2016-02-26 6:51 ` bug#6622: [PATCH] " Lars Ingebrigtsen
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=AANLkTimcLaWp3Znsg_YSsUVY9EsRX2Hkf_3y8x65pCb7@mail.gmail.com \
--to=geoffgole@gmail.com \
--cc=6622@debbugs.gnu.org \
--cc=misty@redhat.com \
/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.