home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume31 / bam / part03 < prev    next >
Encoding:
Text File  |  1992-07-30  |  33.4 KB  |  948 lines

  1. Newsgroups: comp.sources.misc
  2. From: sbo@vlsi.polymtl.ca (Stephane Boucher)
  3. Subject:  v31i059:  bam - [OpenLook|Athena] menu system for [GNU|Epoch|Lucid] Emacs, Part03/07
  4. Message-ID: <1992Jul31.042519.23714@sparky.imd.sterling.com>
  5. X-Md4-Signature: aa42fb16736398bbfd890c9669af161c
  6. Date: Fri, 31 Jul 1992 04:25:19 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: sbo@vlsi.polymtl.ca (Stephane Boucher)
  10. Posting-number: Volume 31, Issue 59
  11. Archive-name: bam/part03
  12. Environment: Lex, Yacc, SunOS 4.x with XView or BSD Unix with Athena Widget
  13. Supersedes: bam: Volume 27, Issue 68-69
  14.  
  15. #! /bin/sh
  16. # This is a shell archive.  Remove anything before this line, then unpack
  17. # it by saving it into a file and typing "sh file".  To overwrite existing
  18. # files, type "sh file -c".  You can also feed this as standard input via
  19. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  20. # will see the following message at the end:
  21. #        "End of archive 3 (of 7)."
  22. # Contents:  bam-2.0/README bam-2.0/athena.c bam-2.0/command-process.el
  23. #   bam-2.0/menus/emacs-base-ol bam-2.0/menus/latex
  24. #   bam-2.0/menus/rmail-menus
  25. # Wrapped by sbo@froh on Mon Jul 27 20:11:49 1992
  26. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  27. if test -f 'bam-2.0/README' -a "${1}" != "-c" ; then 
  28.   echo shar: Will not clobber existing file \"'bam-2.0/README'\"
  29. else
  30. echo shar: Extracting \"'bam-2.0/README'\" \(4303 characters\)
  31. sed "s/^X//" >'bam-2.0/README' <<'END_OF_FILE'
  32. XOverview
  33. X********
  34. X
  35. XThis is BAM (Born Again Menus) a menu system for GNU
  36. XEmacs.  It provides a GUI front-end to GNU Emacs.  In it's
  37. Xcurrent state, it is not a full fledge GUI, but it is easilly
  38. Xcustomizable and extensible.  Note however that this package
  39. Xdoes not provide direct mouse support in the Emacs window (i.e.
  40. Xno scrollbar, no cut-and-paste, no pop-up menu, ...).
  41. X
  42. XIt is most useful to ease the transition from other
  43. Xtext-editors to GNU Emacs, since basic commands are mouse
  44. Xselectable.  First-timers won't be overwhelmed by GNU Emacs
  45. Xapparent complexity and system administrator will spend less
  46. Xtime repeating all the time "Press `C-h i m emacs RET' and
  47. XRTFM" (Dream on... :-)
  48. X
  49. XBam is based on Dick van Soest's Buttons package, from which
  50. Xit borrows some elisp code.  The C and the elisp code is
  51. Xprotected by the copyleft.  There is however no restriction
  52. Xfor the file `command-process.el' which came with the Buttons
  53. Xpackage.  The menu files are not covered by the copyleft.
  54. XPlease read the file COPYING that describes the COPYLEFT
  55. Xbefore using bam.
  56. X
  57. XThis version of bam has a few bug fixes, and incorporate some
  58. Xenhancement. Some of the changes are:
  59. X
  60. X   * minor modifications to the menu files that cause
  61. X     some incompatibilites. The incompatibilities are
  62. X     trivial to correct;
  63. X
  64. X   * A set of new elisp functions to ease the use of bam. Some of the
  65. X     new functions are (`bam-load-menu', `bam-open-menu',
  66. X     `bam-set-mode-hook', `bam-set-menu-args', `bam-font-option',
  67. X     `bam-geometry-option', `bam-grab-option').  By using these function
  68. X     you can now associate a menu with a mode (`bam-set-mode-hook') so
  69. X     that the appropriate menu gets openned upon entering a given mode;
  70. X
  71. X   * Support for a menus path and an X bitmaps path;
  72. X
  73. X   * A trial makefile option that will allow you to
  74. X     quickly view what bam looks like so that you don't
  75. X     have to go through the whole installation before
  76. X     deciding if you want bam.
  77. X
  78. XIf you add something that you find interesting to bam, please
  79. Xremember to contact me so that we can coordinate the
  80. Xmodifications to be added to the distribution package.  This
  81. Xway more people will benefit from everybody's contributions.
  82. X
  83. XInstallation
  84. X************
  85. X
  86. X  1. `cd' to the directory where bam's sources are;
  87. X
  88. X  2. Edit the file `Makefile.in' to select your various
  89. X     installation directories (located at the beginning of
  90. X     the file.
  91. X
  92. X  3. Run the shell script withthe following command: 
  93. X     `sh ./configure.sh'
  94. X
  95. X     Note: I have compiled successfuly the program on sun3 and
  96. X     sun4.  You may have to experiment with the Makefile on other
  97. X     kind of machine.
  98. X
  99. X     A known problem is that cc, lex and the athena toolkit doesn't work
  100. X     together on sun3's so you have to use a substitute for cc or athena
  101. X     (gcc or xview).
  102. X
  103. X  4. type `make all'
  104. X
  105. X  5. type `make install'
  106. X     You now have a a command bemacs that gives you emacs with menus.
  107. X     So the following two items are not necessary. It is probably
  108. X     worthwhile to rename bemacs to xemacs if you plan on using it.
  109. X
  110. X  6. (You can skip this item if you are satisfied with the bemacs)
  111. X
  112. X     put in your `.emacs' the content of emacs_init.
  113. X      
  114. X     (To do this you can simply do 
  115. X     `cat /usr/local/lib/bam/emacs_init >> .emacs') where 
  116. X     `/usr/local/lib/bam' should be replaced by the
  117. X     directory name where you placed bam libraries.
  118. X
  119. X     >>>> Notice the >> redirection.  DON'T USE > or you WILL LOOSE <<<<
  120. X     >>>> YOUR PREVIOUS .emacs file.                                <<<<
  121. X
  122. X     Note:
  123. X         Make sure that the elisp librairies are accessible
  124. X         via Emacs' LOAD-PATH.  One way to do this is to put
  125. X         the elisp files in a given directory, for example
  126. X         `/usr/something/elispdir', and add that directory in
  127. X         Emacs' LOAD-PATH by including the following lisp 
  128. X         sentence in your initialization file (`~/.emacs'):
  129. X
  130. X            (setq load-path (cons "/usr/something/elispdir" load-path))
  131. X
  132. X  7. (You can skip this item if you are satisfied with bemacs)
  133. X
  134. X     If you are using the Athena version you have to change the
  135. X     normal emacs startup so that the the emacs windows are
  136. X     named(or bam can't place emacs inside of itself):
  137. X          emacs -wn Emacs`date +%T`
  138. X
  139. X  8. If you have lisp problems, consult your local Emacs guru.
  140. X
  141. END_OF_FILE
  142. if test 4303 -ne `wc -c <'bam-2.0/README'`; then
  143.     echo shar: \"'bam-2.0/README'\" unpacked with wrong size!
  144. fi
  145. # end of 'bam-2.0/README'
  146. fi
  147. if test -f 'bam-2.0/athena.c' -a "${1}" != "-c" ; then 
  148.   echo shar: Will not clobber existing file \"'bam-2.0/athena.c'\"
  149. else
  150. echo shar: Extracting \"'bam-2.0/athena.c'\" \(5644 characters\)
  151. sed "s/^X//" >'bam-2.0/athena.c' <<'END_OF_FILE'
  152. X/*   bam - the Born Again Menus for GNU Emacs.
  153. X   Copyright (C) 1992 Hans Olsson.
  154. X
  155. X    This program is free software; you can redistribute it and/or modify
  156. X    it under the terms of the GNU General Public License as published by
  157. X    the Free Software Foundation; either version 1, or (at your option)
  158. X    any later version.
  159. X
  160. X    This program is distributed in the hope that it will be useful,
  161. X    but WITHOUT ANY WARRANTY; without even the implied warranty of
  162. X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  163. X    GNU General Public License for more details.
  164. X
  165. X    You should have received a copy of the GNU General Public License
  166. X    along with this program; if not, write to the Free Software
  167. X    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  168. X
  169. X  In other words, you are welcome to use, share and improve this program.
  170. X  You are forbidden to forbid anyone else to use, share and improve
  171. X  what you give them.   Help stamp out software-hoarding!
  172. X*/
  173. X/* $Id: athena.c,v 1.2 1992/07/27 22:53:17 sbo Exp $ */
  174. X
  175. X#include "bam.h"
  176. X#include "athena.h"
  177. X
  178. XWidget gam=NULL;
  179. Xint grab=1;
  180. Xchar *windowName=NULL;
  181. XXtTranslations button_xt;
  182. XXtAppContext app_con;
  183. XWidget mainFrame=NULL;
  184. XWidget pops[200];
  185. Xint pops_nr=0;
  186. X
  187. Xstatic int popped=0;
  188. Xstatic Widget popupList[100];
  189. X
  190. Xstatic String fallback_resources[] = { 
  191. X  "*shapeStyle:Oval\n",
  192. X  "*cornerRoundPercent:25\n",       
  193. X NULL
  194. X};
  195. X
  196. Xstatic char bam_translations[]=
  197. X" <BtnDown>      : PopupMenu() \n";
  198. X
  199. Xvoid popdownAll() 
  200. X{
  201. X  while(popped) {
  202. X    XtPopdown(popupList[--popped]);
  203. X  }
  204. X}
  205. X
  206. Xstatic void popdownSubmenus(w,event,params,num_params)
  207. X     Widget w;
  208. X     XEvent *event;
  209. X     String *params;
  210. X     Cardinal *num_params;
  211. X{
  212. X popdownAll();
  213. X}
  214. X
  215. XXtActionsRec trial_actions[]= {
  216. X  {"popdownSubmenus",popdownSubmenus}
  217. X};
  218. X  
  219. X
  220. X
  221. Xvoid popdownSubMenu(w,event,params,num_params)
  222. X     Widget w;
  223. X     XEvent *event;
  224. X     String *params;
  225. X     Cardinal *num_params;
  226. X{
  227. X  Widget theWidget = XtNameToWidget(mainFrame,params[0]);
  228. X    if (theWidget!=NULL)
  229. X      XtPopdown(theWidget);
  230. X}
  231. X
  232. Xvoid doMove(g) 
  233. X     Widget g;
  234. X{
  235. X  Window getwindow,junkwin;
  236. X  XWindowAttributes app_win_attr;
  237. X  Position outX,outY;
  238. X  int rx,ry;
  239. X  Dimension outW,outH;
  240. X
  241. X  Window mywin=XtWindow(g);
  242. X  if (gam!=NULL) {
  243. X    Arg args[4];
  244. X    XtSetArg(args[0],XtNwinX,&outX);
  245. X    XtSetArg(args[1],XtNwinY,&outY);
  246. X    XtSetArg(args[2],XtNwinWidth,&outW);
  247. X    XtSetArg(args[3],XtNwinHeight,&outH);
  248. X    XtGetValues(gam,args,4);
  249. X
  250. X  } else 
  251. X  if (windowName && 
  252. X      (getwindow= Window_With_Name(XtDisplay(g),
  253. X                                   DefaultRootWindow(XtDisplay(g)),
  254. X                                   windowName))) {
  255. X    XGetWindowAttributes(XtDisplay(g),getwindow,&app_win_attr);
  256. X    outW=app_win_attr.width;
  257. X    XTranslateCoordinates(XtDisplay(g),getwindow,app_win_attr.root,
  258. X                           -app_win_attr.border_width,
  259. X                           -app_win_attr.border_width,
  260. X                           &rx,&ry,&junkwin);
  261. X    outX=rx;
  262. X    XGetWindowAttributes(XtDisplay(g),mywin,&app_win_attr);
  263. X    outY=ry-app_win_attr.height;
  264. X    outH=app_win_attr.height;
  265. X  } else return;
  266. X  XMoveResizeWindow(XtDisplay(g),mywin,outX,outY-20,outW,outH);
  267. X/* the -20 is a kludge,caused by titlebars */
  268. X  
  269. X}
  270. X
  271. Xint window_main_loop(w) 
  272. X     Widget w;
  273. X{
  274. X  Screen *scr=XtScreen(mainFrame);
  275. X  int maxw=scr->width;
  276. X  int maxh=scr->height;
  277. X  
  278. X  XtRealizeWidget(mainFrame);
  279. X  doMove(mainFrame);
  280. X  {
  281. X    /* The following code pops up all the submenus,
  282. X     * so that they automagically will stay on the screen afterwards.
  283. X     */
  284. X    int i;
  285. X    for(i=0;i<pops_nr;i++) {
  286. X      Arg args[2];
  287. X      XtSetArg(args[0],XtNx,maxw+10);
  288. X      XtSetArg(args[1],XtNy,maxh+10);
  289. X      XtSetValues(pops[i],args,2);
  290. X      XtPopup(pops[i],XtGrabNone);
  291. X      XtPopdown(pops[i]);
  292. X    }
  293. X  }
  294. X  XtAppMainLoop(app_con);
  295. X  return 0;
  296. X}
  297. X
  298. Xint do_init(argc_p,argv) 
  299. X     int *argc_p;
  300. X     char**argv;
  301. X{
  302. X  mainFrame=XtAppInitialize(&app_con,"bam",NULL,0,
  303. X                            argc_p,argv,
  304. X                            fallback_resources,NULL,0);
  305. X  XtAppAddActions(app_con,trial_actions,XtNumber(trial_actions));
  306. X  button_xt=XtParseTranslationTable(bam_translations);
  307. X  return 0;
  308. X}
  309. X
  310. Xvoid menuProc (w,what,garbage)
  311. X     Widget w;
  312. X     XtPointer what;
  313. X     XtPointer garbage;
  314. X{
  315. X  sendToEmacs(what);
  316. X  popdownAll();
  317. X}
  318. X
  319. Xvoid menuUp (w,what,garbage)
  320. X     Widget w;
  321. X     XtPointer what;
  322. X     XtPointer garbage;
  323. X{
  324. X  Window root_ret,child_ret;
  325. X  int x,y;
  326. X  int winx,winy;
  327. X  unsigned int mask;
  328. X  Display *dpy=XtDisplay(mainFrame);
  329. X  Window win=XtWindow(mainFrame);
  330. X  Screen *scr=XtScreen(mainFrame);
  331. X  Widget w2=(Widget)what;
  332. X  int maxw=scr->width;/* DisplayWidth(dpy,dpy->default_screen); */
  333. X  int maxh=scr->height; /* DisplayHeight(dpy,dpy->default_screen); */
  334. X  Dimension height,width;
  335. X  if (XQueryPointer(dpy,win,&root_ret,&child_ret,&x,&y,&winx,&winy,
  336. X                    &mask)) {
  337. X    x=(x<20)?0:x-20;
  338. X    y=(y<20)?0:y-20;
  339. X    {
  340. X      Arg args[2];
  341. X      XtSetArg(args[0],XtNheight, &height);
  342. X      XtSetArg(args[1],XtNwidth, &width);
  343. X      XtGetValues(w2,args,2);
  344. X    }
  345. X#ifdef DEBUG
  346. X  printf("Height=%d,width=%d\nmaxw=%d,maxh=%d\n",height,width,maxw,maxh);
  347. X#endif
  348. X
  349. X    if (x+width>=maxw) x=maxw-width;
  350. X    if (y+height>=maxh) y=maxh-height;
  351. X#ifdef DEBUG
  352. X  printf("x=%d,y=%d\n",x,y);
  353. X#endif
  354. X    {
  355. X      Arg args[2];
  356. X      XtSetArg(args[0],XtNx,x);
  357. X      XtSetArg(args[1],XtNy,y);
  358. X      
  359. X      XtSetValues(w2,args,2);
  360. X    }
  361. X    while (XtAppPending(app_con)) { 
  362. X      XEvent xev;
  363. X      XtAppNextEvent(app_con,&xev);
  364. X      XtDispatchEvent(&xev);
  365. X    }
  366. X    XtPopup(w2, XtGrabNone);
  367. X    popupList[popped++]=w2;
  368. X  } else {
  369. X    sendErrorToEmacs("Sorry, wrong screen %s\n","");
  370. X  }
  371. X}
  372. END_OF_FILE
  373. if test 5644 -ne `wc -c <'bam-2.0/athena.c'`; then
  374.     echo shar: \"'bam-2.0/athena.c'\" unpacked with wrong size!
  375. fi
  376. # end of 'bam-2.0/athena.c'
  377. fi
  378. if test -f 'bam-2.0/command-process.el' -a "${1}" != "-c" ; then 
  379.   echo shar: Will not clobber existing file \"'bam-2.0/command-process.el'\"
  380. else
  381. echo shar: Extracting \"'bam-2.0/command-process.el'\" \(4578 characters\)
  382. sed "s/^X//" >'bam-2.0/command-process.el' <<'END_OF_FILE'
  383. X;   bam - the Born Again Menus for GNU Emacs.
  384. X;   Copyright (C) 1992 Dick Van Soest.
  385. X;
  386. X;    This program is free software; you can redistribute it and/or modify
  387. X;    it under the terms of the GNU General Public License as published by
  388. X;    the Free Software Foundation; either version 1, or (at your option)
  389. X;    any later version.
  390. X;
  391. X;    This program is distributed in the hope that it will be useful,
  392. X;    but WITHOUT ANY WARRANTY; without even the implied warranty of
  393. X;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  394. X;    GNU General Public License for more details.
  395. X;
  396. X;    You should have received a copy of the GNU General Public License
  397. X;    along with this program; if not, write to the Free Software
  398. X;    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  399. X;
  400. X;  In other words, you are welcome to use, share and improve this program.
  401. X;  You are forbidden to forbid anyone else to use, share and improve
  402. X;  what you give them.   Help stamp out software-hoarding!
  403. X
  404. X;;;  --------------------------------------------------------------------------
  405. X
  406. X;;(defvar escape-read-p nil
  407. X;;  "T if backslash is read from process.")
  408. X;;
  409. X;;(defvar in-string-p nil
  410. X;;  "T if process output is currently a string.")
  411. X;;
  412. X;;(defvar paren-level 0
  413. X;;  "Level of lists in process output.")
  414. X;;
  415. X;;(defvar process-output ""
  416. X;;  "Output of process.")
  417. X(defun command-process (command &rest args)
  418. X  "*Starts separate process COMMAND running in background.
  419. XOutput of this process is handled by function collect-output.
  420. XCollect-output is reset by command reset-command-process."
  421. X  (interactive "sCommand to run: ")
  422. X  (let* ((proc (apply 'start-process 
  423. X              (cons command 
  424. X                (cons ()
  425. X                  (cons command args)))))
  426. X     (proc-sym (intern (process-name proc))))
  427. X    (put proc-sym 'escape-read-p nil)
  428. X    (put proc-sym 'in-string-p nil)
  429. X    (put proc-sym 'paren-level 0)
  430. X    (put proc-sym 'process-output "")
  431. X    (set-process-filter proc 'collect-output)
  432. X    (set-process-sentinel proc 'ignore)
  433. X    proc))
  434. X
  435. X(defun reset-command-process (proc-name)
  436. X  "Resets command process with name PROC-NAME."
  437. X  (interactive "sProcess: ")
  438. X  (let ((proc-sym (intern proc)))
  439. X    (put proc-sym 'escape-read-p nil)
  440. X    (put proc-sym 'in-string-p nil)
  441. X    (put proc-sym 'paren-level 0)
  442. X    (put proc-sym 'process-output "")))
  443. X(defun collect-output (proc msg)
  444. X  "Function that collects output of PROC until a lisp list is complete.
  445. XIt then eval's that list."
  446. X  (let ((processed-upto-incl
  447. X     (1+ (foreach msg (function 
  448. X               (lambda (x) 
  449. X                 (change-state-depending-on-char proc x))))))
  450. X    (proc-sym (intern (process-name proc))))
  451. X    (if (not (zerop (get proc-sym 'paren-level)))
  452. X    (put proc-sym 'process-output
  453. X         (concat (get proc-sym 'process-output) msg))
  454. X      (progn 
  455. X    (eval (car (read-from-string 
  456. X            (concat (get proc-sym 'process-output)
  457. X                (substring msg 0 processed-upto-incl)))))
  458. X    (put proc-sym 'process-output "")
  459. X    (if (< processed-upto-incl (length msg))
  460. X        (collect-output proc (substring msg processed-upto-incl)))))))
  461. X
  462. X(defun change-state-depending-on-char (proc char)
  463. X  (let ((proc-sym (intern (process-name proc))))
  464. X    (cond
  465. X     ((get proc-sym 'escape-read-p)
  466. X      (put proc-sym 'escape-read-p nil))
  467. X     ((and (not (get proc-sym 'escape-read-p)) (get proc-sym 'in-string-p))
  468. X      (put proc-sym 'in-string-p (not (equal char ?\")))
  469. X      (put proc-sym 'escape-read-p (equal char ?\\)))
  470. X     ((and (not (get proc-sym 'escape-read-p)) (not (get proc-sym 'in-string-p)))
  471. X      (cond
  472. X       ((eq char ?\\)
  473. X    (put proc-sym 'escape-read-p t))
  474. X       ((eq char ?\")
  475. X    (put proc-sym 'in-string-p t))
  476. X       ((eq char ?\()
  477. X    (put proc-sym 'paren-level (1+ (get proc-sym 'paren-level))))
  478. X       ((eq char ?\))
  479. X    (put proc-sym 'paren-level (1- (get proc-sym 'paren-level)))))))
  480. X    (zerop (get proc-sym 'paren-level))))
  481. X
  482. X(defun foreach (seq fun)
  483. X  (let ((i 0)
  484. X    (seqlength (length seq)))
  485. X    (while (and (< i seqlength)
  486. X           (not (apply fun (list (elt seq i)))))
  487. X      (setq i (1+ i)))
  488. X    i))
  489. X      
  490. X(defun command-process-error (str)
  491. X  (with-output-to-temp-buffer "*command-process-errors*"
  492. X    (princ str)
  493. X    (message "Error in command-process")))
  494. X
  495. X(defun print-state (proc)
  496. X  (interactive  "sProcess: ")
  497. X  (let ((proc-sym (if (stringp proc)
  498. X              (intern-soft proc)
  499. X            (intern-soft (process-name proc)))))
  500. X    (format 
  501. X     "escape-read-p %s
  502. Xin-string-p %s
  503. Xparen-level %d
  504. Xprocess-output %s\n" 
  505. X     (get proc-sym 'escape-read-p)
  506. X     (get proc-sym 'in-string-p)
  507. X     (get proc-sym 'paren-level)
  508. X     (get proc-sym 'process-output))))
  509. X
  510. X(provide 'command-process)
  511. END_OF_FILE
  512. if test 4578 -ne `wc -c <'bam-2.0/command-process.el'`; then
  513.     echo shar: \"'bam-2.0/command-process.el'\" unpacked with wrong size!
  514. fi
  515. # end of 'bam-2.0/command-process.el'
  516. fi
  517. if test -f 'bam-2.0/menus/emacs-base-ol' -a "${1}" != "-c" ; then 
  518.   echo shar: Will not clobber existing file \"'bam-2.0/menus/emacs-base-ol'\"
  519. else
  520. echo shar: Extracting \"'bam-2.0/menus/emacs-base-ol'\" \(4826 characters\)
  521. sed "s/^X//" >'bam-2.0/menus/emacs-base-ol' <<'END_OF_FILE'
  522. X# @(#)emacs-base-ol    1.4 92/03/31
  523. X
  524. XFRAME
  525. XTITLE "Emacs Menu"
  526. XICON_LABEL "Bam Emacs"
  527. X    PANEL
  528. X        BUTTON "File" ""
  529. X        MENU PUSHPIN TRUE
  530. X        TITLE "Emacs: File"    
  531. X            TEXT "Load    C-x C-f" "(bam-emacs-base-ol:find-file)"
  532. X            TEXT "Browse  C-x d"   "(bam-emacs-base-ol:dired)"
  533. X            TEXT "Save    C-x C-s" "(bam-emacs-base-ol:save-buffer)"
  534. X            TEXT "Save As C-x C-w" "(bam-emacs-base-ol:write-file)"
  535. X            TEXT "Insert  C-x i" "(bam-emacs-base-ol:insert-file)"
  536. X            TEXT "" ""
  537. X            TEXT "Quit    C-x C-c" "(call-interactively 'save-buffers-kill-emacs)"
  538. X        END
  539. X        BUTTON "View" ""
  540. X        MENU
  541. X        TITLE "Emacs: View"
  542. X            TEXT "Split Window Horizontally C-x 5" "(split-window-horizontally)"
  543. X            TEXT "Split Window Vertically   C-x 2" "(split-window-vertically)"
  544. X            TEXT "Delete Window             C-x 0" "(call-interactively 'delete-window)"
  545. X            TEXT "Delete All Other Windows" "(delete-other-windows)"
  546. X            TEXT "" ""
  547. X            TEXT "Shrink Window Shorter" "(shrink-window 1)"
  548. X                TEXT "Grow Window Taller        C-x ^" "(enlarge-window 1)"
  549. X                   TEXT "Shrink Window Narrower" "(shrink-window-horizontally 1)"
  550. X            TEXT "Grow Window Wider" "(enlarge-window-horizontally 1)"
  551. X            TEXT "" ""
  552. X            TEXT "Switch To Other Window    C-x o" "(other-window 1)"
  553. X            TEXT "Select Buffer" "(call-interactively 'switch-to-buffer)"
  554. X            TEXT "List Buffers" "(call-interactively 'electric-buffer-list)"
  555. X            TEXT "Kill Buffer" "(call-interactively 'kill-buffer)"
  556. X         END
  557. X        BUTTON "Edit" ""
  558. X        MENU
  559. X        TITLE "Emacs: Edit"
  560. X            TEXT "Undo       C-x u" "(undo)"
  561. X            TEXT "" ""
  562. X            TEXT "Cut        C-w" "(call-interactively 'kill-region)"
  563. X            TEXT "Cut Word   M-d" "(kill-word 1)"
  564. X            TEXT "Cut To EOL C-k" "(kill-line)"
  565. X            TEXT "" ""
  566. X            TEXT "Copy"           "(call-interactively 'copy-region-as-kill)"
  567. X            TEXT "Paste      C-y" "(yank)"
  568. X        END
  569. X        BUTTON "Help" ""
  570. X        MENU
  571. X        TITLE "Emacs: Help"
  572. X            TEXT "Tutorial             C-h t" "(help-with-tutorial)"
  573. X            TEXT "Manual               C-h i" "(info)"
  574. X            TEXT "Mode Description     C-h m" "(describe-mode)"
  575. X            TEXT "Key Description      C-h k" "(call-interactively 'describe-key)"
  576. X            TEXT "Function Description C-h f" "(call-interactively 'describe-function)"
  577. X            TEXT "Match Command Names  C-h a" "(call-interactively 'command-apropos)"
  578. X        END
  579. X        BUTTON "Error" ""
  580. X        MENU
  581. X        TITLE "Emacs: Error"
  582. X            TEXT "Abort        C-g" "(progn (if (> (recursion-depth) 0) (abort-recursive-edit)) (setq cursor-in-echo-area nil) (keyboard-quit))"
  583. X            TEXT "Recover file" "(call-interactively 'recover-file)"
  584. X        END
  585. X        BUTTON "Search/Replace" ""
  586. X        MENU
  587. X        TITLE "Emacs: Search/Replace"
  588. X            TEXT "Forward Search            C-s" "(isearch-forward)"
  589. X            TEXT "Backward Search           C-r" "(isearch-backward)"
  590. X            TEXT "Search Regular Expression M-C-s" "(isearch-forward-regexp)"
  591. X            TEXT "Abort Search" "(if (> (recursion-depth) 0) (abort-recursive-edit))(keyboard-quit)"
  592. X            TEXT "Query Replace             M-%" "(call-interactively 'query-replace)"
  593. X                   TEXT "Reg Exp Query Replace" "(call-interactively 'query-replace-regexp)"
  594. X        END
  595. X        BUTTON "Motion" ""
  596. X        MENU
  597. X        TITLE "Emacs: Motion"
  598. X            TEXT "Page Down                 C-v" "(scroll-up)"
  599. X                   TEXT "Page Up                   M-v" "(scroll-down)"
  600. X            TEXT "Forward Paragraph" "(forward-paragraph)"
  601. X                TEXT "Backward Paragraph" "(backward-paragraph)"
  602. X            TEXT "Left Scroll" "(call-interactively 'scroll-left)"
  603. X            TEXT "Right Scroll" "(call-interactively 'scroll-right)"
  604. X            TEXT "Begin Of Document         M-<" "(beginning-of-buffer)"
  605. X            TEXT "End Of Document           M->" "(end-of-buffer)"
  606. X            TEXT "Go To Last Position       C-x C-x"
  607. X                   "(exchange-point-and-mark)"
  608. X            TEXT "Go To Previous Position   C-u C-<space>"
  609. X                   "(set-mark-command 1)"
  610. X            TEXT "Go To Line Number" "(call-interactively 'goto-line)"
  611. X        END
  612. X             BUTTON "Formatting" ""
  613. X        MENU
  614. X        TITLE "Emacs: Formatting"
  615. X            TEXT "Delete Whitespace" "(delete-horizontal-space)"
  616. X            TEXT "Delete Blank Lines" "(delete-blank-lines)"
  617. X             TEXT "Fill Paragraph" "(call-interactively 'fill-paragraph)"
  618. X            TEXT "Set Mark            C-<space>" "(push-mark)"
  619. X            TEXT "Fill From Mark" 
  620. X            "(fill-region (region-beginning) (region-end))"
  621. X            TEXT "Set Fill Column" "(call-interactively 'set-fill-column)"
  622. X            TEXT "Uppercase From Mark" 
  623. X            "(upcase-region (region-beginning) (region-end))"
  624. X            TEXT "Lowercase From Mark"
  625. X            "(downcase-region (region-beginning) (region-end))"
  626. X            TEXT "Capitalize From Mark"
  627. X            "(capitalize-region (region-beginning) (region-end))"
  628. X               END
  629. X        BUTTON "Applications" ""
  630. X        MENU
  631. X        TITLE "Emacs: Applications"
  632. X             TEXT "Read Mail" "(progn (rmail) (bam-open-menu \"rmail-menus\"))"
  633. X            TEXT "Compose Mail" "(mail)"
  634. X            TEXT "Usenet News" "(gnus)"
  635. X            TEXT "Info" "(info)"
  636. X            TEXT "Shell" "(shell)"
  637. X            TEXT "Compile" "(call-interactively 'compile)"
  638. X#            TEXT "Spell" "(ispell)"
  639. X            TEXT "Debug" "(call-interactively 'gdb)"
  640. X           END
  641. X    END
  642. XEND
  643. END_OF_FILE
  644. if test 4826 -ne `wc -c <'bam-2.0/menus/emacs-base-ol'`; then
  645.     echo shar: \"'bam-2.0/menus/emacs-base-ol'\" unpacked with wrong size!
  646. fi
  647. # end of 'bam-2.0/menus/emacs-base-ol'
  648. fi
  649. if test -f 'bam-2.0/menus/latex' -a "${1}" != "-c" ; then 
  650.   echo shar: Will not clobber existing file \"'bam-2.0/menus/latex'\"
  651. else
  652. echo shar: Extracting \"'bam-2.0/menus/latex'\" \(4743 characters\)
  653. sed "s/^X//" >'bam-2.0/menus/latex' <<'END_OF_FILE'
  654. X# $Id: latex,v 1.4 1992/07/27 22:56:24 sbo Exp $
  655. X
  656. XFRAME TITLE "Latex Menu"
  657. XICON_LABEL "Latex"
  658. XPANEL
  659. X
  660. XBUTTON "Command" ""
  661. XMENU 
  662. XTITLE "Latex: Command"
  663. X    TEXT "TeX buffer" "(TeX-buffer)"
  664. X    TEXT "TeX region" "(TeX-region (region-beginning) (region-end))"
  665. X    TEXT "recenter output" "(TeX-recenter-output-buffer ())"
  666. X    TEXT "preview" "(TeX-preview)"
  667. XEND
  668. X
  669. XBUTTON "Environments" ""
  670. XMENU
  671. XTITLE "Latex: Environments"
  672. X    TEXT "general..."  "(call-interactively 'latex-env-insrt)"
  673. X    TEXT "abstract"    "(latex-env-insrt \"abstract\")"
  674. X    TEXT "center"      "(latex-env-insrt \"center\")"
  675. X    TEXT "document"    "(latex-env-insrt \"document\")"
  676. X    TEXT "equation"    "(latex-env-insrt \"equation\")"
  677. X    TEXT "enumerate"   "(latex-env-and-item-insrt \"enumerate\")"
  678. X    TEXT "figure"    "(latex-env-insrt \"figure\")"
  679. X    TEXT "itemize"    "(latex-env-and-item-insrt \"itemize\")"
  680. X    TEXT "Others" ""
  681. X        MENU
  682. X            TEXT "picture"   "(latex-env-insrt \"picture\")"
  683. X            TEXT "quote"     "(latex-env-insrt \"quote\")"
  684. X            TEXT "quotation" "(latex-env-insrt \"quotation\")"
  685. X            TEXT "verbatim"  "(latex-env-insrt \"verbatim\")"
  686. X        END
  687. XEND
  688. X
  689. XBUTTON "Formatting" ""
  690. XMENU
  691. XTITLE "Latex: Formatting"
  692. X    TEXT "set fill prefix"          "(set-fill-prefix)"
  693. X    TEXT "set fill prefix 2 spaces" "(setq fill-prefix \"  \")"
  694. X    TEXT "set fill prefix 4 sp."    "(setq fill-prefix \"    \")"
  695. X    TEXT "incr fill prefix 2 sp."   "(setq fill-prefix (concat fill-prefix \"  \"))"
  696. X    TEXT "reset fill prefix"        "(setq fill-prefix ())"
  697. X    TEXT "set fill column"          "(set-fill-column)"
  698. X    TEXT "reset fill column"        "(setq fill-column 70)"
  699. XEND
  700. X
  701. XBUTTON "Misc" ""
  702. XMENU 
  703. XTITLE "Latex: Misc"
  704. X    TEXT "insertplot" "(strings-to-buffer \"\\\\insertplot{\" \"}{}{}{}{}{}\n% Arguments:\n% 1. Offset from left margin\n% 2. File name\n% 3. Vertical space to leave for figure\n% 4. Horizontal scaling\n% 5. Vertical scaling\n% 6. Original orientation of figure:\n%    0 = original has landscape orientation\n%    1 = original has portrait orientation\n\")"
  705. X    TEXT "verb" "(strings-to-buffer \"\\\\verb+\" \"+\")"
  706. XEND
  707. X
  708. XBUTTON "Sectioning" ""
  709. XMENU
  710. XTITLE "Latex: Sectioning"
  711. X    TEXT "part"           "(strings-to-buffer \"\\\\part{\" \"}\n\n\")"
  712. X    TEXT "chapter"        "(strings-to-buffer \"\\\\chapter{\" \"}\n\n\")"
  713. X    TEXT "section"        "(strings-to-buffer \"\\\\section{\" \"}\n\n\")"
  714. X    TEXT "subsection"     "(strings-to-buffer \"\\\\subsection{\" \"}\n\n\")"
  715. X    TEXT "subsubsection"  "(strings-to-buffer \"\\\\subsubsection{\" \"}\n\n\")"
  716. X    TEXT "paragraph"      "(strings-to-buffer \"\\\\paragraph{\" \"}\n\")"
  717. X    TEXT "subparagraph"   "(strings-to-buffer \"\\\\subparagraph{\" \"}\n\")"
  718. X    TEXT "par"            "(strings-to-buffer \"\\\\par\n\" \"\")"
  719. X    TEXT "chapter*"       "(strings-to-buffer \"\\\\chapter*{\" \"}\n\n\")"
  720. X    TEXT "section*"       "(strings-to-buffer \"\\\\section*{\" \"}\n\n\")"
  721. X    TEXT "subsection*"    "(strings-to-buffer \"\\\\subsection*{\" \"}\n\n\")"
  722. X    TEXT "subsubsection*" "(strings-to-buffer \"\\\\subsubsection*{\" \"}\n\n\")"
  723. X    TEXT "paragraph*"     "(strings-to-buffer \"\\\\paragraph*{\" \"}\n\")"
  724. X    TEXT "subparagraph*"  "(strings-to-buffer \"\\\\subparagraph*{\" \"}\n\")"
  725. X    TEXT "par*"           "(strings-to-buffer \"\\\\par\n\" \"\")"
  726. XEND
  727. X
  728. X
  729. XBUTTON "Style" ""
  730. XMENU 
  731. XTITLE "Latex: Style"
  732. X    TEXT "empty sheet file" "(strings-to-buffer \"\\\\documentstyle[11pt,sheet]{article}\n\\\\sheetbottomleft{\" \"}\n\\\\sheetbottomright{}\n\\\\begin{document}\n\n%*****************************************************************\n%                         new sheet\n%*****************************************************************\n\n\\\\sheettop{}\n\\\\sheetitem{}\n\\\\sheetbottom\n\n\\\\end{document}\n\")"
  733. X    TEXT "sheetpage" "(strings-to-buffer \"%*****************************************************************\n%                         new sheet\n%*****************************************************************\n\n\\\\sheettop{\" \"}\n\\\\sheetitem{}\n\\\\sheetbottom\n\n\")"
  734. X    TEXT "subsheets" "(strings-to-buffer \"\\\\begin{subsheets}\n\" \"\n\\\\end{subsheets}\n\")"
  735. X    TEXT "sheetitem" "(strings-to-buffer \"\\\\sheetitem{\" \"}\n\")"
  736. XEND
  737. X
  738. XBUTTON "Typesizes" ""
  739. XMENU
  740. XTITLE "Latex: Typesizes"
  741. X    TEXT "Huge" "(strings-to-buffer \"\\\\Huge \" \"\")"
  742. X    TEXT "huge" "(strings-to-buffer \"\\\\huge \" \"\")"
  743. X    TEXT "LARGE" "(strings-to-buffer \"\\\\LARGE \" \"\")"
  744. X    TEXT "Large" "(strings-to-buffer \"\\\\Large \" \"\")"
  745. X    TEXT "large" "(strings-to-buffer \"\\\\large \" \"\")"
  746. X    TEXT "normalsize" "(strings-to-buffer \"\\\\normalsize \" \"\")"
  747. X    TEXT "small" "(strings-to-buffer \"\\\\small \" \"\")"
  748. X    TEXT "footnotesize" "(strings-to-buffer \"\\\\footnotesize \" \"\")"
  749. X    TEXT "scriptsize" "(strings-to-buffer \"\\\\scriptsize \" \"\")"
  750. X    TEXT "tiny" "(strings-to-buffer \"\\\\tiny \" \"\")"
  751. XEND
  752. X
  753. XEND 
  754. XEND
  755. X
  756. X
  757. X
  758. X
  759. END_OF_FILE
  760. if test 4743 -ne `wc -c <'bam-2.0/menus/latex'`; then
  761.     echo shar: \"'bam-2.0/menus/latex'\" unpacked with wrong size!
  762. fi
  763. # end of 'bam-2.0/menus/latex'
  764. fi
  765. if test -f 'bam-2.0/menus/rmail-menus' -a "${1}" != "-c" ; then 
  766.   echo shar: Will not clobber existing file \"'bam-2.0/menus/rmail-menus'\"
  767. else
  768. echo shar: Extracting \"'bam-2.0/menus/rmail-menus'\" \(4959 characters\)
  769. sed "s/^X//" >'bam-2.0/menus/rmail-menus' <<'END_OF_FILE'
  770. XFRAME TITLE "Rmail Menu"
  771. XPANEL 
  772. XBUTTON "File" "" MENU TITLE "Rmail: File"
  773. X    TEXT "Get New Mail           g"
  774. X         "(bam-rmail-menus:rmail-get-new-mail)"
  775. X    TEXT "Open Rmail File" 
  776. X         "(bam-rmail-menus:rmail)"
  777. X       MENU TITLE "Rmail: Open"
  778. X       TEXT "RMAIL File"
  779. X        "(bam-rmail-menus:rmail)"
  780. X       TEXT "Other In-Box File"
  781. X        "(bam-rmail-menus:rmail-input)"
  782. X    END
  783. X    TEXT "Copy into Rmail File   o" 
  784. X         "(bam-rmail-menus:rmail-output-to-rmail-file)"
  785. X    TEXT "Save changes           s"
  786. X         "(bam-rmail-menus:rmail-expunge-and-save)"
  787. X    TEXT "Done                   q"
  788. X         "(bam-rmail-menus:rmail-quit)"
  789. XEND
  790. XBUTTON "View" "" MENU TITLE "Rmail: View"
  791. X    TEXT "Next" 
  792. X         "(bam-rmail-menus:rmail-next-undeleted-message)"
  793. X        MENU TITLE "Rmail: Next" 
  794. X        TEXT "non-deleted message       n" 
  795. X             "(bam-rmail-menus:rmail-next-undeleted-message)"
  796. X        TEXT "Message With Label" 
  797. X             "(bam-rmail-menus:rmail-next-labeled-message)"
  798. X        TEXT "any message             M-n" 
  799. X             "(bam-rmail-menus:rmail-next-message)"
  800. X    END
  801. X    TEXT "Previous" "(bam-rmail-menus:rmail-previous-undeleted-message)"
  802. X        MENU TITLE "Rmail: Previous" 
  803. X        TEXT "non-deleted message       p" 
  804. X             "(bam-rmail-menus:rmail-previous-undeleted-message)"
  805. X        TEXT "Message With Label" 
  806. X             "(bam-rmail-menus:rmail-previous-labeled-message)"
  807. X        TEXT "any message             M-p" 
  808. X             "(bam-rmail-menus:rmail-previous-message)"
  809. X    END
  810. X    TEXT "Last Message" "(bam-rmail-menus:rmail-last-message)"
  811. X    TEXT "" ""
  812. X    TEXT "Next Page" "(bam-rmail-menus:rmail-scroll-message-up)"
  813. X    TEXT "Previous Page" "(bam-rmail-menus:rmail-scroll-message-down)"
  814. X    TEXT "Beginning of Message" 
  815. X         "(bam-rmail-menus:rmail-beginning-of-message)"
  816. X    TEXT "" ""
  817. X    TEXT "Message Number"
  818. X         "(bam-rmail-menus:rmail-message-number)"
  819. X    TEXT "Toggle Header"
  820. X         "(bam-rmail-menus:rmail-toggle-header)"
  821. X    TEXT "" ""
  822. X        TEXT "Summary" "(bam-rmail-menus:rmail-summary)"
  823. X         MENU TITLE "Rmail: Summary"
  824. X         TEXT "All messages"
  825. X          "(bam-rmail-menus:rmail-summary)"
  826. X         TEXT "Select by Label"
  827. X          "(bam-rmail-menus:rmail-summary-by-labels)"
  828. X         TEXT "Select by Recipients"
  829. X          "(bam-rmail-menus:rmail-summary-by-recipients)"
  830. X    END
  831. XEND
  832. XBUTTON "Edit" "" MENU TITLE "Rmail: Edit"
  833. X        TEXT "Current Message" 
  834. X         "(bam-rmail-menus:rmail-edit-current-message)"
  835. X    TEXT "Delete" "(bam-rmail-menus:rmail-delete-forward)" 
  836. X    MENU TITLE "Rmail: Delete"
  837. X         TEXT "Move Forward after delete"
  838. X        "(bam-rmail-menus:rmail-delete-forward)"
  839. X         TEXT "Stay on it after delete"
  840. X        "(bam-rmail-menus:rmail-delete-message)"
  841. X         TEXT "Move Backward after delete"
  842. X        "(bam-rmail-menus:rmail-delete-backward)"
  843. X    END
  844. X    TEXT "Label" "(bam-rmail-menus:rmail-add-label)"
  845. X    MENU TITLE "Rmail: Label"
  846. X         TEXT "Add"
  847. X          "(bam-rmail-menus:rmail-add-label)"
  848. X         TEXT "Remove"
  849. X          "(bam-rmail-menus:rmail-kill-label)"
  850. X    END
  851. X    TEXT "Undelete" "(bam-rmail-menus:rmail-undelete)"
  852. X    MENU TITLE "Rmail: Undelete"
  853. X         TEXT "Stay on it after Undelete"
  854. X        "(bam-rmail-menus:rmail-undelete)"
  855. X         TEXT "Move Forward after Undelete"
  856. X        "(bam-rmail-menus:undelete-and-forward)"
  857. X         TEXT "Move Backward after Undelete"
  858. X        "(bam-rmail-menus:undelete-and-backward)"
  859. X    END
  860. X
  861. XEND
  862. XBUTTON "Search" "" MENU TITLE "Rmail: Search"
  863. X    TEXT "In this Message"
  864. X         "(bam-rmail-menus:isearch-forward)"
  865. X    MENU TITLE "Rmail: Search In Message"
  866. X           TEXT "Forward" 
  867. X            "(bam-rmail-menus:isearch-forward)"
  868. X       MENU TITLE "Rmail: Search Forward"
  869. X            TEXT "Incremental"
  870. X             "(bam-rmail-menus:isearch-forward)"
  871. X             TEXT "Normal"
  872. X              "(bam-rmail-menus:search-forward)"
  873. X       END
  874. X           TEXT "Backward" 
  875. X            "(bam-rmail-menus:isearch-backward)"
  876. X       MENU TITLE "Rmail: Search Backward"
  877. X            TEXT "Incremental"
  878. X             "(bam-rmail-menus:isearch-backward)"
  879. X            TEXT "Normal"
  880. X             "(bam-rmail-menus:search-backward)"
  881. X       END
  882. X       TEXT "Regular Expression"
  883. X            "(bam-rmail-menus:rmail-search)"
  884. X       MENU TITLE "Rmail: Search Regexp"
  885. X           TEXT "Forward" 
  886. X            "(bam-rmail-menus:isearch-forward-regexp)"
  887. X           TEXT "Backward" 
  888. X            "(bam-rmail-menus:isearch-backward-regexp)"
  889. X       END
  890. X    END
  891. X    TEXT "In other Messages"
  892. X         "(bam-rmail-menus:rmail-search)"
  893. X    MENU TITLE "Rmail: Search Other Messages"
  894. X           TEXT "Forward" 
  895. X            "(bam-rmail-menus:rmail-search)"
  896. X           TEXT "Backward" 
  897. X            "(bam-rmail-menus:rmail-search 'backward)"
  898. X    END
  899. XEND
  900. XBUTTON "Compose" "" MENU TITLE "Rmail: Compose"
  901. X        TEXT "New" 
  902. X         "(bam-rmail-menus:mail)"
  903. X    TEXT "Reply" "(bam-rmail-menus:rmail-reply nil nil)" 
  904. X    MENU TITLE "Rmail: Reply"
  905. X         TEXT "To Sender"
  906. X        "(bam-rmail-menus:rmail-reply nil nil)"
  907. X         TEXT "To All"
  908. X        "(bam-rmail-menus:rmail-reply nil 'to-all)"
  909. X         TEXT "To Sender, Include this Message"
  910. X        "(bam-rmail-menus:rmail-reply 'include-message nil)"
  911. X         TEXT "To All, Include this Message"
  912. X        "(bam-rmail-menus:rmail-reply 'include-message 'to-all)"
  913. X    END
  914. X    TEXT "Forward" "(bam-rmail-menus:rmail-forward)"
  915. XEND
  916. X
  917. XEND
  918. XEND
  919. X
  920. X
  921. END_OF_FILE
  922. if test 4959 -ne `wc -c <'bam-2.0/menus/rmail-menus'`; then
  923.     echo shar: \"'bam-2.0/menus/rmail-menus'\" unpacked with wrong size!
  924. fi
  925. # end of 'bam-2.0/menus/rmail-menus'
  926. fi
  927. echo shar: End of archive 3 \(of 7\).
  928. cp /dev/null ark3isdone
  929. MISSING=""
  930. for I in 1 2 3 4 5 6 7 ; do
  931.     if test ! -f ark${I}isdone ; then
  932.     MISSING="${MISSING} ${I}"
  933.     fi
  934. done
  935. if test "${MISSING}" = "" ; then
  936.     echo You have unpacked all 7 archives.
  937.     rm -f ark[1-9]isdone
  938. else
  939.     echo You still need to unpack the following archives:
  940.     echo "        " ${MISSING}
  941. fi
  942. ##  End of shell archive.
  943. exit 0
  944.  
  945. exit 0 # Just in case...
  946.