* lilypond-mode.el, lilypond-indent.el: fix XEmacs paren-match.
+ * lilypond-mode.el (LilyPond-add-imenu-menu): new function,
+ imenu is not added by default; adapted from f90.el,
+ makes Help-menu, which does not fit, visible in XEmacs.
+
2003-06-16 Heikki Junes <hjunes@cc.hut.fi>
* lilypond-mode.el: Set show-paren-mode local; minor-mode
'(("\\([a-zA-Z]?:?[^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2))
"Regexp used to match LilyPond errors. See `compilation-error-regexp-alist'.")
+(defvar LilyPond-imenu nil
+ "A flag to tell whether LilyPond-imenu is turned on.")
+(make-variable-buffer-local 'LilyPond-imenu)
+
(defcustom LilyPond-include-path ".:/tmp"
"* LilyPond include path."
:type 'string
'(("Miscellaneous"
["(Un)comment Region" LilyPond-comment-region t]
["Refontify buffer" font-lock-fontify-buffer t]
+ ["Add index menu" LilyPond-add-imenu-menu]
))
'(("Info"
["LilyPond" LilyPond-info t]
(LilyPond-command-region (mark t) (point))))
(funcall LilyPond-command-current))))
+(defun LilyPond-add-imenu-menu ()
+ (interactive)
+ "Add an imenu menu to the menubar."
+ (if (not LilyPond-imenu)
+ (progn
+ (imenu-add-to-menubar "Index")
+ (redraw-frame (selected-frame))
+ (setq LilyPond-imenu t))
+ (message "%s" "LilyPond-imenu already exists.")))
+(put 'LilyPond-add-imenu-menu 'menu-enable '(not LilyPond-imenu))
+
(defun LilyPond-mode ()
"Major mode for editing LilyPond music files.
;; In XEmacs imenu was synched up with: FSF 20.4
(make-local-variable 'imenu-generic-expression)
(setq imenu-generic-expression LilyPond-imenu-generic-expression)
- (imenu-add-to-menubar "Index")
+ ;; (imenu-add-to-menubar "Index") ; see LilyPond-add-imenu-menu
;; In XEmacs one needs to use 'easy-menu-add'.
(if (string-match "XEmacs\\|Lucid" emacs-version)