diff options
Diffstat (limited to 'lisp/nxml/nxml-mode.el')
-rw-r--r-- | lisp/nxml/nxml-mode.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el index 4859bbc7a77..47f806693df 100644 --- a/lisp/nxml/nxml-mode.el +++ b/lisp/nxml/nxml-mode.el @@ -449,6 +449,8 @@ reference.") (when rng-validate-mode (rng-validate-while-idle (current-buffer))))) +(defvar tildify-space-string) + ;;;###autoload (define-derived-mode nxml-mode text-mode "nXML" ;; We use C-c C-i instead of \\[nxml-balanced-close-start-tag-inline] @@ -505,6 +507,14 @@ be treated as a single markup item, set the variable Many aspects this mode can be customized using \\[customize-group] nxml RET." ;; (kill-all-local-variables) + ;; If encoding does not allow non-break space character, use reference. + ;; FIXME: This duplicates code from sgml-mode, perhaps derive from it? + ;; FIXME: Perhaps use if possible (e.g. XHTML)? + (setq-local tildify-space-string + (if (equal (decode-coding-string + (encode-coding-string " " buffer-file-coding-system) + buffer-file-coding-system) " ") + " " " ")) (set (make-local-variable 'mode-line-process) '((nxml-degraded "/degraded"))) ;; We'll determine the fill prefix ourselves (make-local-variable 'adaptive-fill-mode) |