emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 3e727cf: sgml-mode: Only set sgml-xml-mode if guessed to be an XM


From: Stefan Kangas
Subject: master 3e727cf: sgml-mode: Only set sgml-xml-mode if guessed to be an XML file
Date: Wed, 21 Apr 2021 09:28:12 -0400 (EDT)

branch: master
commit 3e727cf20baf33ae77e1955a1751c4d86a32af98
Author: Philip K <philipk@posteo.net>
Commit: Stefan Kangas <stefan@marxist.se>

    sgml-mode: Only set sgml-xml-mode if guessed to be an XML file
    
    * lisp/textmodes/sgml-mode.el (sgml-mode): Don't override
    sgml-xml-mode if the result of the guess is used as the buffer local
    value.  (Bug#47877)
---
 lisp/textmodes/sgml-mode.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 67f7319..d5930e8 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -623,7 +623,8 @@ Do \\[describe-key] on the following bindings to discover 
what they do.
   (setq-local syntax-propertize-function #'sgml-syntax-propertize)
   (setq-local syntax-ppss-table sgml-tag-syntax-table)
   (setq-local facemenu-add-face-function 'sgml-mode-facemenu-add-face-function)
-  (setq-local sgml-xml-mode (sgml-xml-guess))
+  (when (sgml-xml-guess)
+    (setq-local sgml-xml-mode t))
   (unless sgml-xml-mode
     (setq-local skeleton-transformation-function sgml-transformation-function))
   ;; This will allow existing comments within declarations to be



reply via email to

[Prev in Thread] Current Thread [Next in Thread]