Mercurial > emacs
changeset 47012:978b0db16be0
(f90-imenu-flag): Deleted - use imenu--index-alist instead.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sat, 24 Aug 2002 01:06:52 +0000 |
parents | a28bcfb1c116 |
children | fbf686ff4765 |
files | lisp/progmodes/f90.el |
diffstat | 1 files changed, 6 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/f90.el Sat Aug 24 00:50:42 2002 +0000 +++ b/lisp/progmodes/f90.el Sat Aug 24 01:06:52 2002 +0000 @@ -158,7 +158,8 @@ (eval-when-compile (defvar comment-auto-fill-only-comments) - (defvar font-lock-keywords)) + (defvar font-lock-keywords) + (defvar imenu--index-alist)) ;; User options @@ -499,7 +500,8 @@ :style toggle] ["Toggle abbrev-mode" abbrev-mode :active t :selected abbrev-mode :style toggle] - ["Add imenu Menu" f90-add-imenu-menu :active (not f90-imenu-flag) + ["Add imenu Menu" f90-add-imenu-menu + :active (or (not (boundp 'imenu--index-alist)) (not imenu--index-alist)) :visible (fboundp 'imenu-add-to-menubar)] )) @@ -570,10 +572,6 @@ "Temporary position used to speed up region operations.") (make-variable-buffer-local 'f90-cache-position) -(defvar f90-imenu-flag nil - "Non-nil means this buffer already has an imenu.") -(make-variable-buffer-local 'f90-imenu-flag) - ;; Imenu support. (defvar f90-imenu-generic-expression @@ -605,13 +603,10 @@ (defun f90-add-imenu-menu () "Add an imenu menu to the menubar." (interactive) - (if f90-imenu-flag + (if (and (boundp 'imenu--index-alist) imenu--index-alist) (message "%s" "F90-imenu already exists.") (imenu-add-to-menubar "F90-imenu") - (redraw-frame (selected-frame)) - (setq f90-imenu-flag t))) - -(put 'f90-add-imenu-menu 'menu-enable '(not f90-imenu-flag)) + (redraw-frame (selected-frame)))) ;; Abbrevs have generally two letters, except standard types `c, `i, `r, `t.