.emacs-my
changeset 994 4bc77d7283ea
parent 993 0a4851d1f516
child 995 9d2f14f723c4
--- a/.emacs-my	Mon Nov 12 16:58:37 2012 +0200
+++ b/.emacs-my	Tue Nov 13 19:43:23 2012 +0200
@@ -2085,9 +2085,10 @@
 (message "imenu")
 
 (defun my-imenu-to-menubar ()
-  (imenu-add-menubar-index)
-  (run-hooks 'menu-bar-update-hook)
-  )
+  (when (and (current-local-map)
+             (keymapp (lookup-key (current-local-map) [menu-bar index])))
+    (imenu-add-menubar-index)
+    (run-hooks 'menu-bar-update-hook) ))
 
 (require 'imenu)
 (mapc (lambda (hook) (add-hook hook 'my-imenu-to-menubar))
@@ -2419,11 +2420,9 @@
 (setq nxml-child-indent 2)
 (setq nxml-attribute-indent 4)
 
-(eval-after-load 'rng-loc
-  '(progn
-     (add-to-list 'rng-schema-locating-files "~/.emacs.d/rnc/schemas.xml")
-     (define-key nxml-mode-map [C-return] 'nxml-complete)
-     ))
+(eval-after-load 'nxml-mode '(define-key nxml-mode-map [C-return] 'nxml-complete))
+
+(eval-after-load 'rng-loc '(add-to-list 'rng-schema-locating-files "~/.emacs.d/rnc/schemas.xml"))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (message "psgml")