home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / alt / lucidem / help / 135 < prev    next >
Encoding:
Text File  |  1992-07-26  |  19.8 KB  |  533 lines

  1. Path: sparky!uunet!mcsun!corton!loria!news.loria.fr!bosch
  2. From: bosch@loria.fr (Guido Bosch)
  3. Newsgroups: alt.lucid-emacs.help
  4. Subject: Re: patches for Hyperbole to run on lemacs19.2
  5. Message-ID: <BOSCH.92Jul27031513@moebius.loria.fr>
  6. Date: 27 Jul 92 01:15:13 GMT
  7. Sender: news@news.loria.fr
  8. Distribution: alt
  9. Organization: INRIA-Lorraine / CRIN, Nancy, France
  10. Lines: 521
  11.  
  12. In article <9207241926.AA02186@gateway.bnr.ca> JSPARKES%BNR.CA@lucid.com (J.D.) writes:
  13.  
  14.  >   Hi, I've made Hyperbole work under Lucid emacs 19.2, and I'd like some
  15.  >   brave beta testers. :-).  Actually, everything seems to work fine,
  16.  >   with just one problem:
  17.  >
  18.  >   KNOWN BUG/PROBLEMS
  19.  >
  20.  >   1. sm-mouse-toggle-bindings (commonly bound to C-ct) does not preserve
  21.  >      mode specific bindings because it only records the "default"
  22.  >      bindings once.  Any advice on what to do for this is welcome.  (I
  23.  >      find it annoying that I can't use the popup menu in Info-mode.)
  24.  >
  25.  
  26. The problem is a more general one, after my opinon: For Emacs 19, the
  27. Hyperbole user interface should be modified taking advantage of the
  28. new features:
  29.  
  30.     - The user interface menu (`hui::menu') should be implemented 
  31.       as a popup-menu, accessable in the menu bar (I already
  32.       hacked it around, it was rather straightforward, see at the
  33.       end of this mailing).
  34.  
  35.     - The smart-key stuff should be bound to buttons with
  36.       modifiers (shift/control/meta/...). At least button3 has to
  37.       be kept free for mode specific menus. This is because
  38.       Emacses running under X11 come with a lot of packages that
  39.       do their own (maybe mode local) mouse handling.
  40.  
  41.       Another solution would be to intergrate Hyperbole as an
  42.       essential part of Emacs 19's user interface and to use it
  43.       for all kind of hypertext like mouse actions. This is maybe a
  44.       better, but also a more expensive solution. 
  45.  
  46.       For the moment, I use the following key bindings for
  47.       Hyperbole, and this also solves your problem with the info
  48.       menu. (I use the Control Shift modifier for smart keys,
  49.       because there are few chances that other packages could use
  50.       this also)
  51.             
  52.     (cond ((string-match "Lucid" (emacs-version))
  53.        (defun le:mouse-set-point()
  54.          (mouse-set-point (copy-event last-input-event)))
  55.        (setq mouse-set-point-command 'le:mouse-set-point)
  56.        (global-set-key '(control shift button2) 'sm-depress)
  57.        (global-set-key '(control shift button2up) 'smart-key-mouse)
  58.        (global-set-key '(control shift button2) 'sm-depress-meta)
  59.        (global-set-key '(control shift button3up) 'smart-key-mouse-meta))
  60.  
  61.       
  62. Another point for the TODO list: 
  63.  
  64.     - Highlighting extents for explicit (and maybe implicit) buttons
  65.       
  66.  
  67. -- Guido
  68.  
  69. ------------------------------ hui-menu.el ------------------------------
  70. ;;!emacs
  71. ;; $Id: hui-menus.el,v 1.2 1992/05/14 10:12:25 rsw Exp $
  72. ;;
  73. ;; FILE:         hui-menus.el
  74. ;; SUMMARY:      One line command menus for Hyperbole
  75. ;; USAGE:        GNU Emacs Lisp Library
  76. ;;
  77. ;; AUTHOR:       Bob Weiner
  78. ;; ORG:          Brown U.
  79. ;;
  80. ;; ORIG-DATE:    15-Oct-91 at 20:13:17
  81. ;; LAST-MOD:     25-Feb-92 at 06:08:14 by Bob Weiner
  82. ;;
  83. ;; This file is part of Hyperbole.
  84. ;; 
  85. ;; Copyright (C) 1991, 1992  Brown University, Providence, RI
  86. ;; Developed with support from Motorola Inc.
  87. ;; 
  88. ;; Permission to use, modify and redistribute this software and its
  89. ;; documentation for any purpose other than its incorporation into a
  90. ;; commercial product is hereby granted without fee.  A distribution fee
  91. ;; may be charged with any redistribution.  Any distribution requires
  92. ;; that the above copyright notice appear in all copies, that both that
  93. ;; copyright notice and this permission notice appear in supporting
  94. ;; documentation, and that neither the name of Brown University nor the
  95. ;; author's name be used in advertising or publicity pertaining to
  96. ;; distribution of the software without specific, written prior permission.
  97. ;; 
  98. ;; Brown University makes no representations about the suitability of this
  99. ;; software for any purpose.  It is provided "as is" without express or
  100. ;; implied warranty.
  101. ;;
  102. ;;
  103. ;; DESCRIPTION:  
  104. ;; DESCRIP-END.
  105.  
  106. ;;; ************************************************************************
  107. ;;; Other required Elisp libraries
  108. ;;; ************************************************************************
  109.  
  110. (require 'hui)
  111.  
  112. ;;; ************************************************************************
  113. ;;; Public variables
  114. ;;; ************************************************************************
  115.  
  116. (defvar hui:menu-select "\C-m"
  117.   "*Upper case char-string which select Hyperbole menu item at point.")
  118. (defvar hui:menu-quit   "Q"
  119.   "*Upper case char-string which quits from selecting a Hyperbole menu item.")
  120. (defvar hui:menu-abort  "\C-g"
  121.   "*Same function as 'hui:menu-quit'.")
  122. (defvar hui:menu-top    "\C-t"
  123.   "*Character which returns to top Hyperbole menu.")
  124.  
  125. (defvar hui:menu-p nil
  126.   "Non-nil iff a current Hyperbole menu activation exists.")
  127.  
  128. (defvar hui:menus nil
  129.   "Command menus for use with the default Hyperbole user interface.")
  130.  
  131.  
  132. (defvar hui:lucid-p (string-match "Lucid" emacs-version))
  133.  
  134. (setq hui:menus
  135.       (if hui:lucid-p
  136.       ;; Lucid Emacs popup menus
  137.       '("Hyperbole"
  138.         ["Action" hui:hbut-act t]
  139.         ("Button File"
  140.          ["Directory File" (find-file hbmap:filename) t]
  141.          ["Personal File" (find-file (concat hbmap:dir-user hbmap:filename)) t])
  142.         ("Documentation"
  143.          ["Demo" (find-file-read-only (concat hyperb:dir "DEMO")) t]
  144.          ["Files" (find-file (concat hyperb:dir "MANIFEST")) t]
  145.          ["Glossary" (progn
  146.                (or (featurep 'info)
  147.                    (progn (load "info") (provide 'info)))
  148.                (hact 'link-to-Info-node "(hypb.info)Glossary")) t]
  149.          ["Copyright" (hact 'link-to-string-match "* Copyright" 2
  150.                    (concat hyperb:dir "README")) t]
  151.          ["Info Manual" (progn (or (featurep 'info)
  152.                       (progn (load "info") (provide 'info)))
  153.                   (hact 'link-to-Info-node "(hypb.info)")) t]
  154.          ["Mailing Lists" (hact 'link-to-string-match "* Mail Lists" 2
  155.                 (concat hyperb:dir "README")) t]
  156.          ["News" (hact 'link-to-string-match "* What's New" 2
  157.               (concat hyperb:dir "README")) t]
  158.          ["Smart Key" (find-file (concat hyperb:dir "hmouse-doc")) t])
  159.         ("Explicit Buttons"
  160.          ["Action" hui:hbut-act t]
  161.          ["Create"hui:ebut-create t]
  162.          ["Delete" hui:ebut-delete t]
  163.          ["Edit" hui:ebut-modify t]
  164.          ("Help"
  165.           ["Buffer Buttons" (hui:hbut-report -1) t]
  166.           ["Current Button" (hui:hbut-report) t]
  167.           ["Ordered Buttons" (hui:hbut-report 1) t])
  168.          ["Modify" hui:ebut-modify t]
  169.          ["Rename" hui:ebut-rename t]
  170.          ["Search" hui:ebut-search t])
  171.         ("Global] Buttons"
  172.          ["Action" gbut:act t]
  173.          ["Create" hui:gbut-create t]
  174.          ["Help" gbut:help t])
  175.         ["History" (hhist:remove current-prefix-arg) t]
  176.         ("Implicit Buttons"
  177.          ["Action" hui:hbut-act t]
  178.          ["Help" hui:hbut-help t]
  179.          ["Types" (hui:htype-help 'ibtypes 'no-sort) t])
  180.         ("Messages"
  181.          ["Compose Hyperbole Mail" (progn
  182.                     (mail) (insert "hyperbole@cs.brown.edu")
  183.                     (forward-line 1) (end-of-line)
  184.                     (save-excursion
  185.                       (insert
  186.                        "Use a full *sentence* here.  Make a statement or ask a question."))
  187.                     (hact 'hyp-config)
  188.                     (message "Edit and then mail.")) t]
  189.          ["Edit Hypebol Mailing List Entry" (progn (mail) (insert "hyperbole-request@cs.brown.edu")
  190.                          (forward-line 1) (end-of-line)
  191.                          (hact 'hyp-request)
  192.                          (message "Edit and then mail.")) t])
  193.         ("Rolodex"
  194.          ["Add" rolo-add t]
  195.          ["Display-again" rolo-display-matches t]
  196.          ["Edit" rolo-edit t]
  197.          ["Kill" rolo-kill t]
  198.          ["Order" rolo-sort t]
  199.          ["Regexp-find" rolo-grep t]
  200.          ["String-find" rolo-fgrep t]
  201.          ["Yank" rolo-yank t])
  202.  
  203.         ("Types"
  204.          ["Action Types" (hui:htype-help   'actypes) t]
  205.          ["Delete Implicit Button Type" (hui:htype-delete 'ibtypes) t]
  206.          ["Doc on Implicit Button Types" (hui:htype-help   'ibtypes 'no-sort) t]))
  207.  
  208.     ;; Hyperbol hui menus
  209.     (list (cons
  210.            'hyperbole
  211.            (append
  212.         (list (list (concat "Hypb" hyperb:version ">")))
  213.         '(("Act"         hui:hbut-act
  214.            "Activates button at point or prompts for explicit button.")
  215.           ("ButFile/"    (menu . butfile)
  216.            "Quick access button files menus.")
  217.           ("Doc/"        (menu . doc)
  218.            "Quick access to Hyperbole documentation.")
  219.           ("EBut/"       (menu . ebut)
  220.            "Explicit button commands.")
  221.           ("GBut/"       (menu . gbut)
  222.            "Global button commands.")
  223.           ("Hist"        (hhist:remove current-prefix-arg)
  224.            "Jumps back to location prior to last Hyperbole button follow.")
  225.           ("IBut/"       (menu . ibut)
  226.            "Implicit button and button type commands.")
  227.           ("Msg/"        (menu . msg)
  228.            "Mail and News messaging facilities.")
  229.           ("Rolo/"       (progn (or (fboundp 'rolo-kill) (require 'wrolo))
  230.                     (hui:menu-act 'rolo))
  231.            "Hierarchical, multi-file rolodex lookup and edit commands.")
  232.           ("Types/"      (menu . types)
  233.            "Provides documentation on Hyperbole types.")
  234.           )))
  235.           '(butfile .
  236.             (("ButFile>")
  237.              ("DirFile"      (find-file hbmap:filename)
  238.               "Edits directory-specific button file.")
  239.              ("PersonalFile" (find-file (concat hbmap:dir-user hbmap:filename))
  240.               "Edits user-specific button file.")
  241.              ))
  242.           '(doc .
  243.             (("Doc>")
  244.              ("Demo"         (find-file-read-only (concat hyperb:dir "DEMO"))
  245.               "Demonstrates Hyperbole features.")
  246.              ("Files"        (find-file (concat hyperb:dir "MANIFEST"))
  247.               "Summarizes Hyperbole system files.  Click on an entry to view it.")
  248.              ("Glossary"     (progn
  249.                        (or (featurep 'info)
  250.                        (progn (load "info") (provide 'info)))
  251.                        (hact 'link-to-Info-node "(hypb.info)Glossary"))
  252.               "Glossary of Hyperbole terms.")
  253.              ("HypbCopy"  (hact 'link-to-string-match "* Copyright" 2
  254.                     (concat hyperb:dir "README"))
  255.               "Displays general Hyperbole copyright and license details.")
  256.              ("InfoManual"   (progn (or (featurep 'info)
  257.                         (progn (load "info") (provide 'info)))
  258.                         (hact 'link-to-Info-node "(hypb.info)"))
  259.               "Online Info version of Hyperbole manual.")
  260.              ("MailLists"    (hact 'link-to-string-match "* Mail Lists" 2
  261.                        (concat hyperb:dir "README"))
  262.               "Details on Hyperbole mail list subscriptions.")
  263.              ("New"          (hact 'link-to-string-match "* What's New" 2
  264.                        (concat hyperb:dir "README"))
  265.               "Recent changes to Hyperbole.")
  266.              ("SmartKy"      (find-file (concat hyperb:dir "hmouse-doc"))
  267.               "Summarizes Smart Key mouse or keyboard handling.")
  268.              ))
  269.           '(ebut .
  270.              (("EButton>")
  271.               ("Act"    hui:hbut-act
  272.                "Activates button at point or prompts for explicit button.")
  273.               ("Create" hui:ebut-create)
  274.               ("Delete" hui:ebut-delete)
  275.               ("Edit"   hui:ebut-modify "Modifies any desired button attributes.")
  276.               ("Help/" (menu . ebut-help) "Summarizes button attributes.")
  277.               ("Modify" hui:ebut-modify "Modifies any desired button attributes.")
  278.               ("Rename" hui:ebut-rename "Relabels an explicit button.")
  279.               ("Search" hui:ebut-search
  280.                "Locates and displays personally created buttons in context.")
  281.               ))
  282.           '(ebut-help .
  283.               (("Help on>")
  284.                ("BufferButs"   (hui:hbut-report -1)
  285.                 "Summarizes all explicit buttons in buffer.")
  286.                ("CurrentBut"   (hui:hbut-report)
  287.                 "Summarizes only current button in buffer.")
  288.                ("OrderedButs"  (hui:hbut-report 1)
  289.                 "Summarizes explicit buttons in lexicographically order.")
  290.                ))
  291.           '(gbut .
  292.              (("GButton>")
  293.               ("Act"    gbut:act        "Activates global button by name.") 
  294.               ("Create" hui:gbut-create "Adds a global button to gbut:file.")
  295.               ("Help"   gbut:help       "Reports on a global button by name.") 
  296.               ))
  297.           '(ibut .
  298.              (("IButton>")
  299.               ("Act"    hui:hbut-act    "Activates implicit button at point.") 
  300.               ("Help"   hui:hbut-help   "Reports on button's attributes.")
  301.               ("Types"  (hui:htype-help 'ibtypes 'no-sort)
  302.                "Displays documentation for one or all implicit button types.")
  303.               ))
  304.           '(msg .
  305.             (("Msg>")
  306.              ("Compose-Hypb-Mail"
  307.               (progn
  308.             (mail) (insert "hyperbole@cs.brown.edu")
  309.             (forward-line 1) (end-of-line)
  310.             (save-excursion
  311.               (insert
  312.                "Use a full *sentence* here.  Make a statement or ask a question."))
  313.             (hact 'hyp-config)
  314.             (message "Edit and then mail."))
  315.               "Send a message to the Hyperbole discussion list.")
  316.              ("Edit-Hypb-Mail-List-Entry"
  317.               (progn (mail) (insert "hyperbole-request@cs.brown.edu")
  318.                  (forward-line 1) (end-of-line)
  319.                  (hact 'hyp-request)
  320.                  (message "Edit and then mail."))
  321.               "Add, remove or change your entry on a hyperbole mail list.")
  322.              ))
  323.           '(rolo .
  324.              (("Rolo>")
  325.               ("Add"              rolo-add      "Add a new rolo entry.")
  326.               ("Display-again"    rolo-display-matches
  327.                "Display last found rolodex matches again.")
  328.               ("Edit"             rolo-edit   "Edit an existing rolo entry.")
  329.               ("Kill"             rolo-kill   "Kill an existing rolo entry.")
  330.               ("Order"            rolo-sort   "Order rolo entries in a file.")
  331.               ("Regexp-find"      rolo-grep   "Find entries containing a regexp.")
  332.               ("String-find"      rolo-fgrep  "Find entries containing a string.")
  333.               ("Yank"             rolo-yank
  334.                "Find an entry containing a string and insert it at point.")
  335.               ))
  336.           '(types .
  337.               (("Types>")
  338.                ("ActionTypes"      (hui:htype-help   'actypes)
  339.             "Displays documentation for one or all action types.")
  340.                ("DeleteIButType"   (hui:htype-delete 'ibtypes)
  341.             "Deletes specified button type.")
  342.                ("IButTypes"        (hui:htype-help   'ibtypes 'no-sort)
  343.             "Displays documentation for one or all implicit button types.")
  344.                )))))
  345.  
  346. (if hui:lucid-p
  347.     (let ((menubar-rest default-menubar))
  348.       (if;; There  is already a hyperbole menu
  349.       (setq menubar-rest (assoc (car hui:menus) default-menubar))
  350.       ;; update the existing one
  351.       (rplacd menubar-rest (cdr hui:menus))
  352.     ;; otherwise append append destructively the hui:menu
  353.     (nconc default-menubar (list hui:menus)))
  354.       ;; Redisplay
  355.       (set-screen-menubar default-menubar)))
  356.  
  357.  
  358. ;;; ************************************************************************
  359. ;;; Public functions
  360. ;;; ************************************************************************
  361.  
  362. (defun hui:menu ()
  363.   "Invokes default Hyperbole menu user interface when not already active.
  364. Suitable for binding to a key, e.g. {C-h h}.
  365. Non-interactively, returns t if menu is actually invoked by call, else nil."
  366.   (interactive)
  367.   (if hui:lucid-p
  368.       (popup-menu hui:menus)
  369.     (condition-case ()
  370.     (if hui:menu-p
  371.         nil
  372.       (setq hui:menu-p t)
  373.       (hui:menu-act 'hyperbole)
  374.       (setq hui:menu-p nil)
  375.       t)
  376.       (quit (setq hui:menu-p nil))
  377.       (error (setq hui:menu-p nil)))))
  378.  
  379. (defun hui:menu-act (menu)
  380.   "Prompts user with Hyperbole MENU (a symbol) and performs selected item."
  381.   (let ((set-menu '(or (and menu (symbolp menu)
  382.                 (setq menu-alist (cdr (assq menu hui:menus))))
  383.                (error "(hui:menu-act): Invalid menu symbol arg: %s"
  384.                   menu)))
  385.     (show-menu t)
  386.     (rtn)
  387.     menu-alist act-form)
  388.     (while (and show-menu (eval set-menu))
  389.       (cond ((and (consp (setq act-form (hui:menu-select menu-alist)))
  390.           (cdr act-form)
  391.           (symbolp (cdr act-form)))
  392.          ;; Display another menu
  393.          (setq menu (cdr act-form)))
  394.         (act-form
  395.          (let ((prefix-arg current-prefix-arg))
  396.            (cond ((symbolp act-form)
  397.               (if (eq act-form t)
  398.               nil
  399.             (setq show-menu nil
  400.                   rtn (call-interactively act-form))))
  401.              ((stringp act-form)
  402.               (hui:menu-help act-form)
  403.               ;; Loop and show menu again.
  404.               )
  405.              (t (setq show-menu nil
  406.                   rtn (eval act-form))))))
  407.         (t (setq show-menu nil))))
  408.     rtn))
  409.  
  410. (defun hui:menu-enter (&optional char-str)
  411.   "Uses CHAR-STR or last input character as minibuffer argument."
  412.   (interactive)
  413.   (erase-buffer)
  414.   (insert (or char-str (substring (recent-keys) -1)))
  415.   (exit-minibuffer))
  416.  
  417. (defun hui:menu-help (help-str)
  418.   "Displays HELP-STR in a small window.  HELP-STR must be a string."
  419.   (let* ((window-min-height 2)
  420.      (owind (selected-window))
  421.      (buf-name (hypb:help-buf-name "Menu")))
  422.     (unwind-protect
  423.     (progn
  424.       (save-window-excursion
  425.         (smart-key-help-show buf-name)) ;; Needed to save screen config.
  426.       (if (eq (selected-window) (minibuffer-window))
  427.           (other-window 1))
  428.       (if (= (length (hypb:window-list 'no-mini)) 1)
  429.           (split-window-vertically nil))
  430.       (let* ((winds (hypb:window-list 'no-mini))
  431.          (bot-list (mapcar
  432.                 '(lambda (wind)
  433.                    (nth 3 (window-edges wind))) winds))
  434.          (bot (apply 'max bot-list)))
  435.         (select-window
  436.          (nth (- (length winds) (length (memq bot bot-list))) winds)))
  437.       (switch-to-buffer (get-buffer-create buf-name))
  438.       (setq buffer-read-only nil)
  439.       (erase-buffer)
  440.       (insert "\n" help-str)
  441.       (set-buffer-modified-p nil)
  442.       (shrink-window
  443.        (- (window-height)
  444.           (+ 3 (length
  445.             (delq nil
  446.               (mapcar '(lambda (chr) (= chr ?\n)) help-str)))))))
  447.       (select-window owind))))
  448.  
  449. (defun hui:menu-select (menu-alist)
  450.   "Prompts user to choose the first character of any item from MENU-ALIST.
  451. Case is not significant.  If chosen by direct selection with the secondary
  452. Smart Key, returns any help string for item, else returns the action form for
  453. the item."
  454.   (let* ((menu-prompt (concat (car (car menu-alist)) "  "))
  455.      (menu-items (mapconcat 'car (cdr menu-alist) "  "))
  456.      (set:equal-op 'eq)
  457.      (select-char (string-to-char hui:menu-select))
  458.      (quit-char (string-to-char hui:menu-quit))
  459.      (abort-char (string-to-char hui:menu-abort))
  460.      (top-char  (string-to-char hui:menu-top))
  461.      (item-keys (mapcar '(lambda (item) (aref item 0))
  462.                 (mapcar 'car (cdr menu-alist))))
  463.      (keys (apply 'list select-char quit-char abort-char
  464.               top-char item-keys))
  465.      (key 0)
  466.      (hargs:reading-p 'hmenu)
  467.      sublist)
  468.     (while (not (memq (setq key (upcase
  469.                  (string-to-char
  470.                   (read-from-minibuffer
  471.                    "" (concat menu-prompt menu-items)
  472.                    hui:menu-mode-map))))
  473.               keys))
  474.       (beep)
  475.       (setq hargs:reading-p 'hmenu)
  476.       (discard-input))
  477.     (cond ((eq key quit-char) nil)
  478.       ((eq key abort-char) (beep) nil)
  479.       ((eq key top-char) '(menu . hyperbole))
  480.       ((and (eq key select-char)
  481.         (save-excursion
  482.           (if (search-backward " " nil t)
  483.               (progn (skip-chars-forward " ")
  484.                  (setq key (following-char))
  485.                  nil)  ;; Drop through.
  486.             t))))
  487.       (t (if (setq sublist (memq key item-keys))
  488.          (let* ((label-act-help-list
  489.              (nth (- (1+ (length item-keys)) (length sublist))
  490.                   menu-alist))
  491.             (act-form (car (cdr label-act-help-list))))
  492.            (if (eq hargs:reading-p 'hmenu-help)
  493.                (let ((help-str
  494.                   (or (car (cdr (cdr label-act-help-list)))
  495.                   "No help documentation for this item.")))
  496.              (concat (car label-act-help-list) "\n  "
  497.                  help-str "\n    Action: "
  498.                  (prin1-to-string act-form)))
  499.              act-form)))))))
  500.  
  501. ;;; ************************************************************************
  502. ;;; Private variables
  503. ;;; ************************************************************************
  504.  
  505. ;; Hyperbole menu mode is suitable only for specially formatted data.
  506. (put 'hui:menu-mode 'mode-class 'special)
  507.  
  508. (defvar hui:menu-mode-map nil
  509.   "Keymap containing hui:menu commands.")
  510. (if hui:menu-mode-map
  511.     nil
  512.   (setq hui:menu-mode-map (make-keymap))
  513.   (suppress-keymap hui:menu-mode-map)
  514.   (define-key hui:menu-mode-map hui:menu-quit   'hui:menu-enter)
  515.   (define-key hui:menu-mode-map hui:menu-abort  'hui:menu-enter)
  516.   (define-key hui:menu-mode-map hui:menu-top    'hui:menu-enter)
  517.   (define-key hui:menu-mode-map hui:menu-select 'hui:menu-enter)
  518.   (let ((i 32))
  519.     (while (<= i 126)
  520.       (define-key hui:menu-mode-map (char-to-string i) 'hui:menu-enter)
  521.       (setq i (1+ i)))))
  522.  
  523. (provide 'hui-menus)
  524. --
  525. Guido BOSCH, INRIA-Lorraine/CRIN
  526. Institut National de Recherche en Informatique et en Automatique (INRIA)
  527. Centre de Recherche en Informatique de Nancy (CRIN)
  528. Campus scientifique, B.P. 239            
  529. 54506 Vandoeuvre-les-Nancy CEDEX           
  530. Tel.: (+33) 83.91.24.24
  531. Fax.: (+33) 83.41.30.79                    
  532. email: bosch@loria.fr                 
  533.