0
|
1 ;;!emacs
|
|
2 ;;
|
|
3 ;; FILE: hui-menu.el
|
|
4 ;; SUMMARY: InfoDock/Emacs menubar menu of Hyperbole commands.
|
|
5 ;; USAGE: GNU Emacs Lisp Library
|
|
6 ;; KEYWORDS: hypermedia, mouse
|
|
7 ;;
|
|
8 ;; AUTHOR: Bob Weiner
|
|
9 ;; ORG: Motorola, Inc., PPG
|
|
10 ;;
|
|
11 ;; ORIG-DATE: 28-Oct-94 at 10:59:44
|
|
12 ;; LAST-MOD: 26-Oct-95 at 23:10:38 by Bob Weiner
|
|
13 ;;
|
|
14 ;; Copyright (C) 1994-1995 Free Software Foundation, Inc.
|
|
15 ;;
|
|
16 ;; This file is part of Hyperbole.
|
|
17 ;;
|
|
18 ;; DESCRIPTION:
|
|
19 ;; DESCRIP-END.
|
|
20
|
|
21 ;;; ************************************************************************
|
|
22 ;;; Other required Elisp libraries
|
|
23 ;;; ************************************************************************
|
|
24
|
|
25 (require 'wrolo-menu)
|
|
26
|
|
27 ;;; ************************************************************************
|
|
28 ;;; Public functions
|
|
29 ;;; ************************************************************************
|
|
30
|
|
31 ;; Add Hyperbole menu to menubar.
|
|
32 (defun hyperbole-menubar-menu ()
|
|
33 "Add the Hyperbole menu to the global menubar."
|
|
34 (if hyperb:emacs19-p (require 'lmenu))
|
|
35 (if (and (boundp 'current-menubar)
|
|
36 (or hyperb:emacs19-p current-menubar)
|
|
37 (not (car (find-menu-item current-menubar '("Hyperbole")))))
|
|
38 (let ((add-before (if (and (boundp 'infodock-menubar-type)
|
|
39 (eq infodock-menubar-type 'menubar-infodock))
|
|
40 "Key" nil)))
|
|
41 (if (fboundp 'add-submenu)
|
|
42 (add-submenu nil infodock-hyperbole-menu add-before)
|
|
43 (add-menu nil (car infodock-hyperbole-menu)
|
|
44 (cdr infodock-hyperbole-menu) add-before)))))
|
|
45
|
|
46 ;;; ************************************************************************
|
|
47 ;;; Public variables
|
|
48 ;;; ************************************************************************
|
|
49
|
|
50 ;;; Don't change this name; doing so will break the way InfoDock
|
|
51 ;;; initializes the Hyperbole menu.
|
|
52 (defconst infodock-hyperbole-menu
|
|
53 (delq nil
|
|
54 (list
|
|
55 "Hyperbole"
|
|
56 '["Browse-Manual" (id-info "(hyperbole.info)Top") t]
|
|
57 "----"
|
|
58 '["Activate-Button-at-Point" hui:hbut-act t]
|
|
59 '["Back-to-Prior-Location" (hhist:remove current-prefix-arg) t]
|
|
60 '("Button-File"
|
|
61 ["Manual" (id-info "(hyperbole.info)Button Files") t]
|
|
62 "----"
|
|
63 ["Edit-Per-Directory-File" (find-file hbmap:filename) t]
|
|
64 ["Edit-Personal-File" (find-file
|
|
65 (expand-file-name
|
|
66 hbmap:filename hbmap:dir-user)) t]
|
|
67 )
|
|
68 '("Documentation"
|
|
69 ["Manual" (id-info "(hyperbole.info)Top") t]
|
|
70 "----"
|
|
71 ["Copyright" (id-info "(hyperbole.info)Top") t]
|
|
72 ["Demonstration" (find-file-read-only
|
|
73 (expand-file-name "DEMO" hyperb:dir)) t]
|
|
74 ["Manifest" (find-file-read-only
|
|
75 (expand-file-name "MANIFEST" hyperb:dir)) t]
|
|
76 ["Glossary" (id-info "(hyperbole.info)Glossary") t]
|
|
77 ["Mail-Lists" (id-info "(hyperbole.info)Mail Lists") t]
|
|
78 ["New-Features" (progn
|
|
79 (hact 'link-to-regexp-match
|
|
80 "\\*[ \t]+What's New" 2
|
|
81 (expand-file-name "README" hyperb:dir))
|
|
82 (setq buffer-read-only nil)
|
|
83 (toggle-read-only)) t]
|
|
84 ["Smart-Key-Summary" (id-browse-file (hypb:mouse-help-file)) t]
|
|
85 )
|
|
86 '("Explicit-Button"
|
|
87 ["Manual" (id-info "(hyperbole.info)Explicit Buttons") t]
|
|
88 "----"
|
|
89 ["Activate-at-Point" hui:hbut-act t]
|
|
90 ["Create" hui:ebut-create t]
|
|
91 ["Delete" hui:ebut-delete t]
|
|
92 ["Edit" hui:ebut-modify t]
|
|
93 ("Help"
|
|
94 ["Manual" (id-info "(hyperbole.info)Location") t]
|
|
95 "----"
|
|
96 ["Buffer-Buttons" (hui:hbut-report -1) t]
|
|
97 ["Current-Button" (hui:hbut-report) t]
|
|
98 ["Ordered-Buttons" (hui:hbut-report 1) t]
|
|
99 )
|
|
100 ["Modify" hui:ebut-modify t]
|
|
101 ["Rename" hui:ebut-rename t]
|
|
102 ["Search" hui:ebut-search t]
|
|
103 )
|
|
104 '("Global-Button"
|
|
105 ["Manual" (id-info "(hyperbole.info)Global Buttons") t]
|
|
106 "----"
|
|
107 ["Activate" gbut:act t]
|
|
108 ["Create" hui:gbut-create t]
|
|
109 ["Edit" hui:gbut-modify t]
|
|
110 ["Help" gbut:help t]
|
|
111 ["Modify" hui:gbut-modify t]
|
|
112 )
|
|
113 '("Implicit-Button"
|
|
114 ["Manual" (id-info "(hyperbole.info)Implicit Buttons") t]
|
|
115 "----"
|
|
116 ["Activate-at-Point" hui:hbut-act t]
|
|
117 ["Delete-Type" (hui:htype-delete 'ibtypes) t]
|
|
118 ["Help" hui:hbut-help t]
|
|
119 ["Types" (hui:htype-help 'ibtypes 'no-sort) t]
|
|
120 )
|
|
121 '("Mail-Lists"
|
|
122 ["Manual" (id-info "(hyperbole.info)Suggestion or Bug Reporting")
|
|
123 t]
|
|
124 "----"
|
|
125 ["Change-Hyperbole-Address"
|
|
126 (hmail:compose "hyperbole-request@hub.ucsb.edu"
|
|
127 '(hact 'hyp-request)) t]
|
|
128 ["Change-Hyperbole-Announce-Address"
|
|
129 (hmail:compose "hyperbole-request@hub.ucsb.edu"
|
|
130 '(hact 'hyp-request)) t]
|
|
131 ["Mail-to-Hyperbole-List"
|
|
132 (hmail:compose "hyperbole@hub.ucsb.edu" '(hact 'hyp-config)) t]
|
|
133 )
|
|
134 (if hyperb:kotl-p
|
|
135 '("Outline"
|
|
136 ["Manual" (id-info "(hyperbole.info)Outliner") t]
|
|
137 ["Example" (find-file-read-only
|
|
138 (expand-file-name
|
|
139 "EXAMPLE.kotl" (concat hyperb:dir "kotl/")))
|
|
140 t]
|
|
141 "----"
|
|
142 ["Create-File" kfile:find t]
|
|
143 ["View-File" kfile:view t]
|
|
144 "----"
|
|
145 ["Collapse-Tree" (progn (kotl-mode:is-p)
|
|
146 (kotl-mode:hide-tree
|
|
147 (kcell-view:label))) t]
|
|
148 ["Create-Link" klink:create t]
|
|
149 ["Expand-All-Trees" kotl-mode:show-all t]
|
|
150 ["Expand-Tree" (progn (kotl-mode:is-p)
|
|
151 (kotl-mode:show-tree
|
|
152 (kcell-view:label))) t]
|
|
153 ["Show-Top-Level-Only" kotl-mode:hide-body t]
|
|
154 ))
|
|
155 infodock-wrolo-menu
|
|
156 '("Types"
|
|
157 ["Action-Types-Manual"
|
|
158 (id-info "(hyperbole.info)Action Types") t]
|
|
159 ["Implicit-Button-Types-Manual"
|
|
160 (id-info "(hyperbole.info)Implicit Buttons") t]
|
|
161 "----"
|
|
162 ["Action-Types" (hui:htype-help 'actypes) t]
|
|
163 ["Implicit-Button-Types" (hui:htype-help 'ibtypes 'no-sort) t]
|
|
164 )
|
|
165 '("Window-Configuration"
|
|
166 ["Manual" (id-info "(hyperbole.info)Window Configurations") t]
|
|
167 "----"
|
|
168 ["Name-Configuration" wconfig-add-by-name t]
|
|
169 ["Delete-Name" wconfig-delete-by-name t]
|
|
170 ["Restore-Name" wconfig-restore-by-name t]
|
|
171 "----"
|
|
172 ["Pop-from-Ring" wconfig-delete-pop t]
|
|
173 ["Save-to-Ring" wconfig-ring-save t]
|
|
174 ["Yank-from-Ring" wconfig-yank-pop t]
|
|
175 )
|
|
176 '["Quit" (progn
|
|
177 ;; Delete Hyperbole menu item from all menubars.
|
|
178 (mapcar
|
|
179 (function
|
|
180 (lambda (buf)
|
|
181 (set-buffer buf)
|
|
182 (if (assoc "Hyperbole" current-menubar)
|
|
183 (delete-menu-item '("Hyperbole")))))
|
|
184 (buffer-list))
|
|
185 ;;
|
|
186 ;; Remove Hyperbole button comment from future
|
|
187 ;; outgoing mail.
|
|
188 (if (boundp 'smail:comment)
|
|
189 (setq smail:comment "")))
|
|
190 t]
|
|
191 )))
|
|
192
|
|
193 ;;; ************************************************************************
|
|
194 ;;; Private variables
|
|
195 ;;; ************************************************************************
|
|
196
|
|
197 (provide 'hui-menu)
|