]> git.rkrishnan.org Git - .emacs.d.git/blob - emacs/nxhtml/util/appmenu-fold.el
submodulized .emacs.d setup
[.emacs.d.git] / emacs / nxhtml / util / appmenu-fold.el
1 ;;; appmenu-fold.el --- Support form fold-dwim in AppMenu
2 ;;
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)
7 ;; Keywords:
8 ;; Compatibility:
9 ;;
10 ;; Features that might be required by this library:
11 ;;
12 ;;   None
13 ;;
14
15 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16 ;;
17 ;;; Commentary:
18 ;;
19 ;;
20 ;;
21
22 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
23 ;;
24 ;;; Change log:
25 ;;
26 ;;
27
28 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29 ;;
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)
33 ;; any later version.
34 ;;
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.
39 ;;
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.
44
45 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
46 ;;
47 ;;; Code:
48
49 (require 'fold-dwim nil t)
50 (eval-when-compile (require 'appmenu))
51
52 (when (featurep 'fold-dwim)
53
54   (defun appmenu-fold-no-hs-minor-mode ()
55     t)
56   (defun appmenu-fold-no-outline-minor-mode ()
57     t)
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)
69       )
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)))
74     )
75   )
76
77 (provide 'appmenu-fold)
78 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
79 ;;; appmenu-fold.el ends here