From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.bugs Subject: bug#6776: 24.0.50; nxml mode binds completion to c-return Date: Tue, 03 Aug 2010 00:42:52 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1280790493 29524 80.91.229.12 (2 Aug 2010 23:08:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 2 Aug 2010 23:08:13 +0000 (UTC) Cc: 6776@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 03 01:08:12 2010 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.69) (envelope-from ) id 1Og477-0005Ml-AX for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Aug 2010 01:08:09 +0200 Original-Received: from localhost ([127.0.0.1]:57260 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Og476-0002Gr-QQ for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Aug 2010 19:08:08 -0400 Original-Received: from [140.186.70.92] (port=60767 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Og470-0002Gl-Ja for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 19:08:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Og46z-0005wH-4G for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 19:08:02 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54986) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og46z-0005w4-13 for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 19:08:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Og3io-0003Gm-HR; Mon, 02 Aug 2010 18:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: joakim@verona.se Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Aug 2010 22:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6776 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6776-submit@debbugs.gnu.org id=B6776.128078895212561 (code B ref 6776); Mon, 02 Aug 2010 22:43:02 +0000 Original-Received: (at 6776) by debbugs.gnu.org; 2 Aug 2010 22:42:32 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og3iJ-0003GX-UL for submit@debbugs.gnu.org; Mon, 02 Aug 2010 18:42:32 -0400 Original-Received: from iwfs.imcode.com ([82.115.149.64] helo=gate.verona.se) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og3iH-0003GS-RO for 6776@debbugs.gnu.org; Mon, 02 Aug 2010 18:42:30 -0400 Original-Received: from localhost.localdomain (IDENT:1005@localhost [127.0.0.1]) by gate.verona.se (8.13.4/8.11.4) with ESMTP id o72MgqmJ017496; Tue, 3 Aug 2010 00:42:52 +0200 In-Reply-To: (Stefan Monnier's message of "Mon, 02 Aug 2010 12:49:37 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 02 Aug 2010 18:43:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org 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:39187 Archived-At: Stefan Monnier writes: >> nxml mode does this: >> (define-key map [C-return] 'nxml-complete) >> which isnt exactly a bug, but its annoying. > > Agreed. It should add to completion-at-point-functions instead. > >> Its annoying because mode >> specific completions should go somewhere consistent, such as M-tab, a > > Actually, I just noticed that completion-at-point is globally bound to M-tab. > > > Stefan So, maybe something like this then? === modified file 'lisp/nxml/nxml-mode.el' *** lisp/nxml/nxml-mode.el 2010-06-14 01:43:11 +0000 --- lisp/nxml/nxml-mode.el 2010-08-02 22:37:47 +0000 *************** *** 415,423 **** (define-key map "\C-c\C-o" nxml-outline-prefix-map) (define-key map [S-mouse-2] 'nxml-mouse-hide-direct-text-content) (define-key map "/" 'nxml-electric-slash) - (define-key map [C-return] 'nxml-complete) - (when nxml-bind-meta-tab-to-complete-flag - (define-key map "\M-\t" 'nxml-complete)) map) "Keymap for nxml-mode.") --- 415,420 ---- *************** *** 525,531 **** (nxml-scan-prolog))))) (add-hook 'after-change-functions 'nxml-after-change nil t) (add-hook 'change-major-mode-hook 'nxml-cleanup nil t) ! ;; Emacs 23 handles the encoding attribute on the xml declaration ;; transparently to nxml-mode, so there is no longer a need for the below ;; hook. The hook also had the drawback of overriding explicit user --- 522,528 ---- (nxml-scan-prolog))))) (add-hook 'after-change-functions 'nxml-after-change nil t) (add-hook 'change-major-mode-hook 'nxml-cleanup nil t) ! (add-hook 'completion-at-point-functions 'nxml-complete nil 'local) ;; Emacs 23 handles the encoding attribute on the xml declaration ;; transparently to nxml-mode, so there is no longer a need for the below ;; hook. The hook also had the drawback of overriding explicit user -- Joakim Verona