From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: Fwd: Patch for sgml-mode.el Date: Sun, 02 Dec 2007 16:59:59 -0500 Message-ID: <8qodd8g3kw.fsf@fencepost.gnu.org> References: <0o4pfcvird.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1196632837 20410 80.91.229.12 (2 Dec 2007 22:00:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Dec 2007 22:00:37 +0000 (UTC) Cc: Martin Pohlack , rms@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 02 23:00:45 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Iywrl-0003fS-Aq for ged-emacs-devel@m.gmane.org; Sun, 02 Dec 2007 23:00:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IywrV-00057y-6p for ged-emacs-devel@m.gmane.org; Sun, 02 Dec 2007 17:00:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iywr5-0004mz-81 for emacs-devel@gnu.org; Sun, 02 Dec 2007 17:00:03 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iywr3-0004l0-Du for emacs-devel@gnu.org; Sun, 02 Dec 2007 17:00:02 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iywr3-0004km-9Y for emacs-devel@gnu.org; Sun, 02 Dec 2007 17:00:01 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Iywr2-0003fY-Rg for emacs-devel@gnu.org; Sun, 02 Dec 2007 17:00:01 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1Iywr1-0000pe-Nj; Sun, 02 Dec 2007 16:59:59 -0500 X-Spook: Kh-11 defense information warfare basement Uzi Mole X-Ran: -sy>#q]G)_EE0XqOXeiS)(}iqiIP,!izrueKmT!rg+lieu;qTl2)ilz^>sE%IYkr5ZvF@M X-Hue: black X-Attribution: GM In-Reply-To: (Stefan Monnier's message of "Fri, 30 Nov 2007 22:16:20 -0500") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:84513 Archived-At: 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