all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: joakim@verona.se
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 6776@debbugs.gnu.org
Subject: bug#6776: 24.0.50; nxml mode binds completion to c-return
Date: Tue, 03 Aug 2010 00:42:52 +0200	[thread overview]
Message-ID: <m3sk2w4owj.fsf@verona.se> (raw)
In-Reply-To: <jwveieh47i9.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 02 Aug 2010 12:49:37 +0200")

Stefan Monnier <monnier@iro.umontreal.ca> 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





  reply	other threads:[~2010-08-02 22:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-02  7:52 bug#6776: 24.0.50; nxml mode binds completion to c-return joakim
2010-08-02 10:49 ` Stefan Monnier
2010-08-02 22:42   ` joakim [this message]
2010-08-04 12:46     ` Stefan Monnier
2012-03-12  3:59       ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3sk2w4owj.fsf@verona.se \
    --to=joakim@verona.se \
    --cc=6776@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.