annotate lisp/hyperbole/hui-menu.el @ 143:50e7fedfe353

Added tag r20-2b5 for changeset 1856695b1fa9
author cvs
date Mon, 13 Aug 2007 09:33:20 +0200
parents 8619ce7e4c50
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;!emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 ;; FILE: hui-menu.el
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 ;; SUMMARY: InfoDock/Emacs menubar menu of Hyperbole commands.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;; USAGE: GNU Emacs Lisp Library
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 ;; KEYWORDS: hypermedia, mouse
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 ;; AUTHOR: Bob Weiner
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
9 ;; ORG: InfoDock Associates
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;; ORIG-DATE: 28-Oct-94 at 10:59:44
114
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 100
diff changeset
12 ;; LAST-MOD: 14-Mar-97 at 01:35:02 by Bob Weiner
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;;
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
14 ;; Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;; This file is part of Hyperbole.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;; DESCRIPTION:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 ;; DESCRIP-END.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 ;;; Other required Elisp libraries
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 (require 'wrolo-menu)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 ;;; Public functions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 ;; Add Hyperbole menu to menubar.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 (defun hyperbole-menubar-menu ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 "Add the Hyperbole menu to the global menubar."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 (if hyperb:emacs19-p (require 'lmenu))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 (if (and (boundp 'current-menubar)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 (or hyperb:emacs19-p current-menubar)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 (not (car (find-menu-item current-menubar '("Hyperbole")))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 (let ((add-before (if (and (boundp 'infodock-menubar-type)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 (eq infodock-menubar-type 'menubar-infodock))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 "Key" nil)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 (if (fboundp 'add-submenu)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 (add-submenu nil infodock-hyperbole-menu add-before)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 (add-menu nil (car infodock-hyperbole-menu)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 (cdr infodock-hyperbole-menu) add-before)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 ;;; Public variables
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
50 ;; Ensure that this variable is defined to avert any error within
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
51 ;; the Customization menu.
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
52 (defvar highlight-headers-follow-url-netscape-new-window nil
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
53 "*Whether to make Netscape create a new window when a URL is sent to it.")
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
54
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
55 (defconst hui-menu-options
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
56 (append '("Display-Referents-in"
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
57 "----"
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
58 "----")
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
59 (mapcar (function (lambda (sym)
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
60 (vector
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
61 (capitalize (symbol-name sym))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
62 (` (setq hpath:display-where '(, sym)))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
63 :style 'radio
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
64 :selected (` (eq hpath:display-where
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
65 '(, sym))))))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
66 (mapcar 'car hpath:display-where-alist))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
67 '("----"
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
68 "Display-URLs-in"
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
69 "----"
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
70 "----"
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
71 ["Here"
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
72 (setq action-key-url-function 'w3-fetch
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
73 highlight-headers-follow-url-function
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
74 action-key-url-function)
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
75 :style radio
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
76 :selected (eq action-key-url-function 'w3-fetch)]
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
77 ["Current-Netscape-Window"
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
78 (setq action-key-url-function
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
79 'highlight-headers-follow-url-netscape
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
80 highlight-headers-follow-url-function
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
81 action-key-url-function
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
82 highlight-headers-follow-url-netscape-new-window
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
83 nil)
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
84 :style radio
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
85 :selected
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
86 (and (eq action-key-url-function
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
87 'highlight-headers-follow-url-netscape)
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
88 (not highlight-headers-follow-url-netscape-new-window))]
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
89 ["New-Netscape-Window"
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
90 (setq action-key-url-function
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
91 'highlight-headers-follow-url-netscape
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
92 highlight-headers-follow-url-function
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
93 action-key-url-function
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
94 highlight-headers-follow-url-netscape-new-window
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
95 t)
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
96 :style radio
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
97 :selected
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
98 (and (eq action-key-url-function
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
99 'highlight-headers-follow-url-netscape)
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
100 highlight-headers-follow-url-netscape-new-window)]
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
101 ["Mosaic"
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
102 (setq action-key-url-function
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
103 'highlight-headers-follow-url-mosaic
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
104 highlight-headers-follow-url-function
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
105 action-key-url-function)
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
106 :style radio
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
107 :selected (eq action-key-url-function
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
108 'highlight-headers-follow-url-mosaic)]
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
109 )
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
110 '("----"
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
111 "Smart-Key-Press-at-Eol"
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
112 "----"
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
113 "----"
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
114 ["Scrolls-a-Windowful"
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
115 (setq smart-scroll-proportional nil)
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
116 :style radio :selected (null smart-scroll-proportional)]
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
117 ["Scrolls-Proportionally"
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
118 (setq smart-scroll-proportional t)
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
119 :style radio :selected smart-scroll-proportional]
114
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 100
diff changeset
120 )
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 100
diff changeset
121 '("----"
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 100
diff changeset
122 ["Toggle-Rolodex-Dates" rolo-toggle-datestamps
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 100
diff changeset
123 :style toggle :selected (and (boundp 'wrolo-add-hook)
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 100
diff changeset
124 (listp wrolo-add-hook)
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 100
diff changeset
125 (memq 'rolo-set-date wrolo-add-hook))]
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
126 ))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
127 "Untitled menu of Hyperbole options.")
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
128
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 ;;; Don't change this name; doing so will break the way InfoDock
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 ;;; initializes the Hyperbole menu.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 (defconst infodock-hyperbole-menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 (delq nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 (list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 "Hyperbole"
114
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 100
diff changeset
135 :config 'Hyperbole
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
136 '["About" (hypb:display-file-with-logo
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
137 (expand-file-name "ABOUT" hyperb:dir)) t]
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
138 '["Manual" (id-info "(hyperbole.info)Top") t]
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 "----"
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
140 '["Activate-Button-at-Point" hui:hbut-current-act t]
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 '["Back-to-Prior-Location" (hhist:remove current-prefix-arg) t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 '("Button-File"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 ["Manual" (id-info "(hyperbole.info)Button Files") t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 "----"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 ["Edit-Per-Directory-File" (find-file hbmap:filename) t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 ["Edit-Personal-File" (find-file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 (expand-file-name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 hbmap:filename hbmap:dir-user)) t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 )
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
150 (cons "Customization" hui-menu-options)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 '("Documentation"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 ["Manual" (id-info "(hyperbole.info)Top") t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 "----"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 ["Copyright" (id-info "(hyperbole.info)Top") t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 ["Demonstration" (find-file-read-only
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 (expand-file-name "DEMO" hyperb:dir)) t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 ["Manifest" (find-file-read-only
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 (expand-file-name "MANIFEST" hyperb:dir)) t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 ["Glossary" (id-info "(hyperbole.info)Glossary") t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 ["Mail-Lists" (id-info "(hyperbole.info)Mail Lists") t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 ["New-Features" (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 (hact 'link-to-regexp-match
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 "\\*[ \t]+What's New" 2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 (expand-file-name "README" hyperb:dir))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 (setq buffer-read-only nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 (toggle-read-only)) t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 ["Smart-Key-Summary" (id-browse-file (hypb:mouse-help-file)) t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 '("Explicit-Button"
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
170 :filter hui-menu-explicit-buttons
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
171 ["Activate" hui:hbut-act t]
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 ["Create" hui:ebut-create t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 ["Delete" hui:ebut-delete t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 ["Edit" hui:ebut-modify t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 ("Help"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 ["Manual" (id-info "(hyperbole.info)Location") t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 "----"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 ["Buffer-Buttons" (hui:hbut-report -1) t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 ["Current-Button" (hui:hbut-report) t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 ["Ordered-Buttons" (hui:hbut-report 1) t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 ["Modify" hui:ebut-modify t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 ["Rename" hui:ebut-rename t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 ["Search" hui:ebut-search t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 '("Global-Button"
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
187 :filter hui-menu-global-buttons
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 ["Create" hui:gbut-create t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 ["Edit" hui:gbut-modify t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190 ["Help" gbut:help t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 ["Modify" hui:gbut-modify t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 '("Implicit-Button"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 ["Manual" (id-info "(hyperbole.info)Implicit Buttons") t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 "----"
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
196 ["Activate-at-Point" hui:hbut-current-act t]
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 ["Delete-Type" (hui:htype-delete 'ibtypes) t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 ["Help" hui:hbut-help t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 ["Types" (hui:htype-help 'ibtypes 'no-sort) t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 '("Mail-Lists"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 ["Manual" (id-info "(hyperbole.info)Suggestion or Bug Reporting")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 "----"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 ["Change-Hyperbole-Address"
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
206 (hmail:compose "hyperbole-request@infodock.com"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 '(hact 'hyp-request)) t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 ["Change-Hyperbole-Announce-Address"
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
209 (hmail:compose "hyperbole-request@infodock.com"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 '(hact 'hyp-request)) t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 ["Mail-to-Hyperbole-List"
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
212 (hmail:compose "hyperbole@infodock.com" '(hact 'hyp-config)) t]
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 (if hyperb:kotl-p
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215 '("Outline"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 ["Manual" (id-info "(hyperbole.info)Outliner") t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 ["Example" (find-file-read-only
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218 (expand-file-name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219 "EXAMPLE.kotl" (concat hyperb:dir "kotl/")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221 "----"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222 ["Create-File" kfile:find t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223 ["View-File" kfile:view t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224 "----"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225 ["Collapse-Tree" (progn (kotl-mode:is-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226 (kotl-mode:hide-tree
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227 (kcell-view:label))) t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228 ["Create-Link" klink:create t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
229 ["Expand-All-Trees" kotl-mode:show-all t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230 ["Expand-Tree" (progn (kotl-mode:is-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
231 (kotl-mode:show-tree
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 (kcell-view:label))) t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233 ["Show-Top-Level-Only" kotl-mode:hide-body t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 infodock-wrolo-menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236 '("Types"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237 ["Action-Types-Manual"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238 (id-info "(hyperbole.info)Action Types") t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239 ["Implicit-Button-Types-Manual"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
240 (id-info "(hyperbole.info)Implicit Buttons") t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
241 "----"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242 ["Action-Types" (hui:htype-help 'actypes) t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243 ["Implicit-Button-Types" (hui:htype-help 'ibtypes 'no-sort) t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245 '("Window-Configuration"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
246 ["Manual" (id-info "(hyperbole.info)Window Configurations") t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247 "----"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248 ["Name-Configuration" wconfig-add-by-name t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249 ["Delete-Name" wconfig-delete-by-name t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250 ["Restore-Name" wconfig-restore-by-name t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251 "----"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
252 ["Pop-from-Ring" wconfig-delete-pop t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
253 ["Save-to-Ring" wconfig-ring-save t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
254 ["Yank-from-Ring" wconfig-yank-pop t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
255 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
256 '["Quit" (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
257 ;; Delete Hyperbole menu item from all menubars.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
258 (mapcar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
259 (function
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
260 (lambda (buf)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
261 (set-buffer buf)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
262 (if (assoc "Hyperbole" current-menubar)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
263 (delete-menu-item '("Hyperbole")))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
264 (buffer-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
265 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
266 ;; Remove Hyperbole button comment from future
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
267 ;; outgoing mail.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
268 (if (boundp 'smail:comment)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
269 (setq smail:comment "")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
270 t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
271 )))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
272
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
273 ;;; ************************************************************************
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
274 ;;; Private functions
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
275 ;;; ************************************************************************
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
276
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
277 (defvar hui-menu-max-list-length 24
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
278 "Positive integer that caps the length of a dynamic menu list.")
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
279
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
280 (defvar hui-menu-order-explicit-buttons t
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
281 "When non-nil (default), explicit button menu list is lexicographically ordered.
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
282 Otherwise, explicit buttons are listed in their order of appearance within
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
283 the current buffer.")
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
284
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
285 ;; List explicit buttons in the current buffer for menu activation.
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
286 (defun hui-menu-explicit-buttons (rest-of-menu)
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
287 (delq nil
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
288 (append
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
289 '(["Manual" (id-info "(hyperbole.info)Explicit Buttons") t]
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
290 "----")
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
291 (let ((labels (ebut:list))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
292 (cutoff))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
293 (if labels
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
294 (progn
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
295 ;; Cutoff list if too long.
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
296 (if (setq cutoff (nthcdr (1- hui-menu-max-list-length) labels))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
297 (setcdr cutoff nil))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
298 (delq nil
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
299 (append
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
300 '("----"
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
301 ["Alphabetize-List"
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
302 (setq hui-menu-order-explicit-buttons
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
303 (not hui-menu-order-explicit-buttons))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
304 :style toggle :selected hui-menu-order-explicit-buttons]
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
305 "Activate:")
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
306 (mapcar (function (lambda (label)
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
307 (vector label `(ebut:act ,label) t)))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
308 (if hui-menu-order-explicit-buttons
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
309 (sort labels 'string-lessp)
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
310 labels))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
311 (if cutoff '(". . ."))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
312 '("----" "----"))))))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
313 rest-of-menu)))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
314
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
315 ;; List existing global buttons for menu activation.
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
316 (defun hui-menu-global-buttons (rest-of-menu)
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
317 (delq nil
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
318 (append
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
319 '(["Manual" (id-info "(hyperbole.info)Global Buttons") t]
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
320 "----")
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
321 (let ((labels (gbut:label-list))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
322 (cutoff))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
323 (if labels
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
324 (progn
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
325 ;; Cutoff list if too long.
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
326 (if (setq cutoff (nthcdr (1- hui-menu-max-list-length) labels))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
327 (setcdr cutoff nil))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
328 (delq nil
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
329 (append
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
330 '("----" "Activate:")
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
331 (mapcar (function (lambda (label)
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
332 (vector label `(gbut:act ,label) t)))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
333 (sort labels 'string-lessp))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
334 (if cutoff '(". . ."))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
335 '("----" "----"))))))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
336 rest-of-menu)))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
337
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
338 ;;; ************************************************************************
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
339 ;;; Private variables
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
340 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
341
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
342 (provide 'hui-menu)