emacs-devel
[Top][All Lists]
Advanced

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

Re: Fwd: Patch for sgml-mode.el


From: Glenn Morris
Subject: Re: Fwd: Patch for sgml-mode.el
Date: Sun, 02 Dec 2007 16:59:59 -0500
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Stefan Monnier wrote:

> The obvious one: no need to manually recompute the string when one of
> its constituents changes.  I.e. sgml-xml-mode does not need to know that
> enabling/disabling it can change the mode-name from/to SGML/XML or
> HTML/XHTML.  Cleaner code, more obviously correct.


I don't see that it's any cleaner than the following, but I'm not
going to argue about it.


*** sgml-mode.el.~1.129.~       2007-08-14 00:36:28.000000000 -0700
--- sgml-mode.el        2007-12-02 13:55:42.000000000 -0800
***************
*** 408,414 ****
         (eq (char-before) ?<))))
  
  ;;;###autoload
! (define-derived-mode sgml-mode text-mode '(sgml-xml-mode "XML" "SGML")
    "Major mode for editing SGML documents.
  Makes > match <.
  Keys <, &, SPC within <>, \", / and ' can be electric depending on
--- 408,414 ----
         (eq (char-before) ?<))))
  
  ;;;###autoload
! (define-derived-mode sgml-mode text-mode "SGML"
    "Major mode for editing SGML documents.
  Makes > match <.
  Keys <, &, SPC within <>, \", / and ' can be electric depending on
***************
*** 462,468 ****
         'sgml-mode-facemenu-add-face-function)
    (set (make-local-variable 'sgml-xml-mode) (sgml-xml-guess))
    (if sgml-xml-mode
!       ()
      (set (make-local-variable 'skeleton-transformation-function)
           sgml-transformation-function))
    ;; This will allow existing comments within declarations to be
--- 462,468 ----
         'sgml-mode-facemenu-add-face-function)
    (set (make-local-variable 'sgml-xml-mode) (sgml-xml-guess))
    (if sgml-xml-mode
!       (setq mode-name "XML")
      (set (make-local-variable '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]