From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ross Patterson Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#2034: 23.0.60; c-subword-mode incompatible with xml-mode Date: Sun, 25 Jan 2009 10:48:36 -0800 Message-ID: <878wozxlvf.fsf@transitory.lefae.org> References: <87skn8xhia.fsf@transitory.lefae.org> Reply-To: Ross Patterson , 2034@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1232910290 10081 80.91.229.12 (25 Jan 2009 19:04:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 25 Jan 2009 19:04:50 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, 2034@emacsbugs.donarmstrong.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 25 20:06:02 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LRAIf-0006SZ-9v for geb-bug-gnu-emacs@m.gmane.org; Sun, 25 Jan 2009 20:05:54 +0100 Original-Received: from localhost ([127.0.0.1]:58296 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LRAHN-0007GC-B6 for geb-bug-gnu-emacs@m.gmane.org; Sun, 25 Jan 2009 14:04:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LRAGe-0006vU-UF for bug-gnu-emacs@gnu.org; Sun, 25 Jan 2009 14:03:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LRAGb-0006tu-Ey for bug-gnu-emacs@gnu.org; Sun, 25 Jan 2009 14:03:35 -0500 Original-Received: from [199.232.76.173] (port=50654 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LRAGb-0006tk-3R for bug-gnu-emacs@gnu.org; Sun, 25 Jan 2009 14:03:33 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:55832) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LRAGZ-0003zq-SQ for bug-gnu-emacs@gnu.org; Sun, 25 Jan 2009 14:03:32 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0PJ3TPm017860; Sun, 25 Jan 2009 11:03:29 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n0PIt5Dt015600; Sun, 25 Jan 2009 10:55:05 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Ross Patterson Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 25 Jan 2009 18:55:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 2034 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: notabug wontfix Original-Received: via spool by 2034-submit@emacsbugs.donarmstrong.com id=B2034.123290935014190 (code B ref 2034); Sun, 25 Jan 2009 18:55:05 +0000 Original-Received: (at 2034) by emacsbugs.donarmstrong.com; 25 Jan 2009 18:49:10 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lefae.org (rpatterson.net [69.12.174.198]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0PIn7uj014184 for <2034@emacsbugs.donarmstrong.com>; Sun, 25 Jan 2009 10:49:09 -0800 Original-Received: from transitory.lefae.org (c-24-130-37-71.hsd1.ca.comcast.net [::ffff:24.130.37.71]) (AUTH: PLAIN xen, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by lefae.org with esmtp; Sun, 25 Jan 2009 10:49:06 -0800 id 00CE419C.497CB422.000058A4 In-Reply-To: (Stefan Monnier's message of "Sun, 25 Jan 2009 10:44:44 -0500") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sun, 25 Jan 2009 14:03:35 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:24520 gmane.emacs.pretest.bugs:23764 Archived-At: Stefan Monnier writes: >> Running "M-x c-subword-mode" in a buffer using xml-mode will raise the >> following error: > >> c-update-modeline: Wrong type argument: stringp, (sgml-xml-mode "XML" "SGML") > > c-subword-mode is obviously written specifically for modes provided by > the cc-*.el files. It may accidentally work in some other modes, but at > least c-update-modeline makes several assumptions about the format used > for `mode-name'. Well I find it very useful to use c-subword-mode in pretty much all my buffers. Here's the patched version of this function I'm using to work around this issue: (defun c-update-modeline () (let* ((fmt (format "/%s%s%s%s" (if c-electric-flag "l" "") (if (and c-electric-flag c-auto-newline) "a" "") (if c-hungry-delete-key "h" "") (if (and ;; cc-subword might not be loaded. (boundp 'c-subword-mode) (symbol-value 'c-subword-mode)) "w" ""))) (str-mode-name (if (listp mode-name) (nth 1 mode-name) mode-name)) (bare-mode-name (if (string-match "\\(^[^/]*\\)/" str-mode-name) (substring str-mode-name (match-beginning 1) (match-end 1)) str-mode-name))) ;; (setq c-submode-indicators ;; (if (> (length fmt) 1) ;; fmt)) (setq mode-name (if (> (length fmt) 1) (concat bare-mode-name fmt) bare-mode-name)) (force-mode-line-update))) Ross