Mercurial > emacs
changeset 45213:162082d00c8f
(ibuffer-mode-map): Add :enable guards for `ibuffer-filter-disable',
`ibuffer-pop-filter', `ibuffer-or-filter', `ibuffer-negate-filter',
`ibuffer-decompose-filter', `ibuffer-save-filters',
`ibuffer-switch-to-saved-filters', `ibuffer-delete-saved-filters',
`ibuffer-save-filter-groups', `ibuffer-switch-to-saved-filter-groups',
`ibuffer-delete-saved-filter-groups'.
author | Colin Walters <walters@gnu.org> |
---|---|
date | Thu, 09 May 2002 21:30:21 +0000 |
parents | 580bcb04cd4f |
children | 793403e94381 |
files | lisp/ibuffer.el |
diffstat | 1 files changed, 19 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ibuffer.el Thu May 09 21:29:20 2002 +0000 +++ b/lisp/ibuffer.el Thu May 09 21:30:21 2002 +0000 @@ -515,7 +515,8 @@ (cons "Filter" (make-sparse-keymap "Filter"))) (define-key-after map [menu-bar view filter filter-disable] - '(menu-item "Disable all filtering" ibuffer-filter-disable)) + '(menu-item "Disable all filtering" ibuffer-filter-disable + :enable (and (featurep 'ibuf-ext) ibuffer-filtering-qualifiers))) (define-key-after map [menu-bar view filter filter-by-mode] '(menu-item "Add filter by major mode..." ibuffer-filter-by-mode)) (define-key-after map [menu-bar view filter filter-by-name] @@ -531,29 +532,38 @@ (define-key-after map [menu-bar view filter filter-by-predicate] '(menu-item "Add filter by Lisp predicate..." ibuffer-filter-by-predicate)) (define-key-after map [menu-bar view filter pop-filter] - '(menu-item "Remove top filter" ibuffer-pop-filter)) + '(menu-item "Remove top filter" ibuffer-pop-filter + :enable (and (featurep 'ibuf-ext) ibuffer-filtering-qualifiers))) (define-key-after map [menu-bar view filter or-filter] '(menu-item "OR top two filters" ibuffer-or-filter + :enable (and (featurep 'ibuf-ext) ibuffer-filtering-qualifiers) :help "Create a new filter which is the logical OR of the top two filters")) (define-key-after map [menu-bar view filter negate-filter] - '(menu-item "Negate top filter" ibuffer-negate-filter)) + '(menu-item "Negate top filter" ibuffer-negate-filter + :enable (and (featurep 'ibuf-ext) ibuffer-filtering-qualifiers))) (define-key-after map [menu-bar view filter decompose-filter] '(menu-item "Decompose top filter" ibuffer-decompose-filter + :enable (and (featurep 'ibuf-ext) ibuffer-filtering-qualifiers) :help "Break down a complex filter like OR or NOT")) (define-key-after map [menu-bar view filter exchange-filters] - '(menu-item "Swap top two filters" ibuffer-exchange-filters)) + '(menu-item "Swap top two filters" ibuffer-exchange-filters + :enable (and (featurep 'ibuf-ext) ibuffer-filtering-qualifiers))) (define-key-after map [menu-bar view filter save-filters] '(menu-item "Save current filters permanently..." ibuffer-save-filters + :enable (and (featurep 'ibuf-ext) ibuffer-filtering-qualifiers) :help "Use a mnemnonic name to store current filter stack")) (define-key-after map [menu-bar view filter switch-to-saved-filters] '(menu-item "Restore permanently saved filters..." ibuffer-switch-to-saved-filters + :enable (and (featurep 'ibuf-ext) ibuffer-saved-filters) :help "Replace current filters with a saved stack")) (define-key-after map [menu-bar view filter add-saved-filters] '(menu-item "Add to permanently saved filters..." ibuffer-add-saved-filters + :enable (and (featurep 'ibuf-ext) ibuffer-filtering-qualifiers) :help "Include already saved stack with current filters")) (define-key-after map [menu-bar view filter delete-saved-filters] '(menu-item "Delete permanently saved filters..." - ibuffer-delete-saved-filters)) + ibuffer-delete-saved-filters + :enable (and (featurep 'ibuf-ext) ibuffer-saved-filters))) ;; Filter groups @@ -594,14 +604,17 @@ (define-key-after groups-map [save-filter-groups] '(menu-item "Save current filter groups permanently..." ibuffer-save-filter-groups + :enable (and (featurep 'ibuf-ext) ibuffer-filter-groups) :help "Use a mnemnonic name to store current filter groups")) (define-key-after groups-map [switch-to-saved-filter-groups] '(menu-item "Restore permanently saved filters..." ibuffer-switch-to-saved-filter-groups + :enable (and (featurep 'ibuf-ext) ibuffer-saved-filter-groups) :help "Replace current filters with a saved stack")) (define-key-after groups-map [delete-saved-filter-groups] '(menu-item "Delete permanently saved filter groups..." - ibuffer-delete-saved-filter-groups)) + ibuffer-delete-saved-filter-groups + :enable (and (featurep 'ibuf-ext) ibuffer-saved-filter-groups))) (define-key-after groups-map [set-filter-groups-by-mode] '(menu-item "Set current filter groups to filter by mode" ibuffer-set-filter-groups-by-mode))