1 ;;; appmenu-fold.el --- Support form fold-dwim in AppMenu
3 ;; Author: Lennart Borgman (lennart O borgman A gmail O com)
4 ;; Created: Wed Jan 11 21:48:02 2006
5 (defconst appmenu-fold:version "0.51") ;; Version:
6 ;; Last-Updated: Mon Jan 15 03:10:59 2007 (3600 +0100)
10 ;; Features that might be required by this library:
15 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
22 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
28 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
30 ;; This program is free software; you can redistribute it and/or modify
31 ;; it under the terms of the GNU General Public License as published by
32 ;; the Free Software Foundation; either version 2, or (at your option)
35 ;; This program is distributed in the hope that it will be useful,
36 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
37 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 ;; GNU General Public License for more details.
40 ;; You should have received a copy of the GNU General Public License
41 ;; along with this program; see the file COPYING. If not, write to the
42 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
43 ;; Boston, MA 02111-1307, USA.
45 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
49 (require 'fold-dwim nil t)
50 (eval-when-compile (require 'appmenu))
52 (when (featurep 'fold-dwim)
54 (defun appmenu-fold-no-hs-minor-mode ()
56 (defun appmenu-fold-no-outline-minor-mode ()
58 (defun appmenu-fold-setup ()
59 "Adds some tweaks for using fold-dwim in AppMenu."
60 (let ((fd-map (make-sparse-keymap)))
61 (define-key fd-map [fold-dwim-toggle]
62 (list 'menu-item "Fold Dwin Toggle" 'fold-dwim-toggle))
63 (define-key fd-map [fold-dwim-hide-all]
64 (list 'menu-item "Fold Dwin Hide All" 'fold-dwim-hide-all))
65 (define-key fd-map [fold-dwim-show-all]
66 (list 'menu-item "Fold Dwin Show All" 'fold-dwim-show-all))
67 ;;(add-to-list 'appmenu-alist (cons t (cons "Folding" fd-map)))
68 (appmenu-add 'appmenu-fold nil t "Folding" fd-map)
70 ;;; (add-to-list 'appmenu-minor-modes-exclude
71 ;;; '(hs-minor-mode appmenu-fold-no-hs-minor-mode))
72 ;;; (add-to-list 'appmenu-minor-modes-exclude
73 ;;; '(outline-minor-mode appmenu-fold-no-outline-minor-mode)))
77 (provide 'appmenu-fold)
78 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
79 ;;; appmenu-fold.el ends here