unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7769: Void variable nxml-mode-map when running nXhtml tests
@ 2011-01-02  9:36 Lennart Borgman
  2011-01-08  0:08 ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Lennart Borgman @ 2011-01-02  9:36 UTC (permalink / raw)
  To: 7769

I found a problem with nxml-mode.el when testing nXhtml. If nXhtml is
not byte compiled it works fine, but when it is byte compiled some
tests fails with "void variable nxml-mode-map".

With an Emacs checkout from 2010-11-23 all tests pass, but with a
checkout from 2010-12-15 some tests fail as above.

I think the problem is caused by a small part of this change:

  2010-12-03  Glenn Morris  <rgm@gnu.org>

	* nxml/nxml-mode.el: Require rng-nxml.
	(rng-nxml-mode-init, nxml-enable-unicode-char-name-sets):
	Remove declarations.

This change moved the (provide 'nxml-mode) statement to the beginning
of nxml-mode.el. Since eval-after-load is run at the provide the
statement

(eval-after-load 'nxml-mode
  '(progn
     (define-key nxml-mode-map [C-M-left]  'nxml-backward-element)
     (define-key nxml-mode-map [C-M-right] 'nxml-forward-element)
     (define-key nxml-mode-map [C-M-up]    'nxml-backward-up-element)
     (define-key nxml-mode-map [C-M-down]  'nxml-down-element)))

in the nXhtml file nxhtml-mode.el will now be run before nxml-mode-map
is defined.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#7769: Void variable nxml-mode-map when running nXhtml tests
  2011-01-02  9:36 bug#7769: Void variable nxml-mode-map when running nXhtml tests Lennart Borgman
@ 2011-01-08  0:08 ` Glenn Morris
  2011-01-11  3:24   ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2011-01-08  0:08 UTC (permalink / raw)
  To: 7769-done


This kind of thing is explained in the doc-string of eval-after-load.
Use a string instead of a symbol for the FILE argument.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#7769: Void variable nxml-mode-map when running nXhtml tests
  2011-01-08  0:08 ` Glenn Morris
@ 2011-01-11  3:24   ` Stefan Monnier
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2011-01-11  3:24 UTC (permalink / raw)
  To: 7769

> This kind of thing is explained in the doc-string of eval-after-load.
> Use a string instead of a symbol for the FILE argument.

BTW, I've just installed a change in the trunk to fix this problem
(i.e. so that eval-after-load evals *after-load* even for features that
are provided at the beginning (or in the middle) of the file).


        Stefan





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-11  3:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-02  9:36 bug#7769: Void variable nxml-mode-map when running nXhtml tests Lennart Borgman
2011-01-08  0:08 ` Glenn Morris
2011-01-11  3:24   ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).