From 901e8d1dc5889073fe8acfcff3469ee32228a368 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 24 Aug 2002 01:08:28 +0000 Subject: [PATCH] (f90-imenu-flag): Deleted - use imenu--index-alist instead. --- lisp/ChangeLog | 1 + lisp/progmodes/f90.el | 17 ++++++----------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 295785f871d..328c310cf76 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -8,6 +8,7 @@ No longer (require 'imenu) when compiling. (f90-mark-subprogram, f90-indent-region, f90-fill-region) (f90-abbrev-start): Use fboundp. + (f90-imenu-flag): Deleted - use imenu--index-alist instead. 2002-08-23 Andre Spiegel diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 6dfcbd6c0b9..0a333c2f38d 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -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 @@ Can be overridden by the value of `font-lock-maximum-decoration'.") :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 @@ Can be overridden by the value of `font-lock-maximum-decoration'.") "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 @@ Can be overridden by the value of `font-lock-maximum-decoration'.") (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. -- 2.39.5