home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: alt.lucid-emacs.help
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!cunews!nrcnet0!bnrgate!bwdls61!bwdls138!jsparkes
- From: jsparkes@bwdls138.bnr.ca (Jeff Sparkes)
- Subject: patches for Hyperbole redux
- Message-ID: <1992Jul27.153634.29716@bwdls61.bnr.ca>
- Sender: usenet@bwdls61.bnr.ca (Use Net)
- Nntp-Posting-Host: bwdls138
- Organization: Bell-Northern Research Ltd., Ottawa
- Date: Mon, 27 Jul 1992 15:36:34 GMT
- Lines: 589
-
- [I've been told that some lines were wrapped in my diffs, so I'm sending it
- out via news. (It's possible our mail gateway did it....)]
-
- Hi, I've made Hyperbole work under Lucid emacs 19.2, and I'd like some
- brave beta testers. :-). Actually, everything seems to work fine,
- with just one problem:
-
- KNOWN BUG/PROBLEMS
-
- 1. sm-mouse-toggle-bindings (commonly bound to C-ct) does not preserve
- mode specific bindings because it only records the "default"
- bindings once. Any advice on what to do for this is welcome. (I
- find it annoying that I can't use the popup menu in Info-mode.)
-
-
- Anyway, please try these patches and let me know if you have any problems.
-
- *** 1.1 1992/07/15 20:51:21
- --- hinit.el 1992/07/24 14:32:54
- ***************
- *** 38,44 ****
- ;;; Public variables
- ;;; ************************************************************************
-
- ! (defconst hyperb:version "3.04" "Hyperbole revision number.")
-
- (defvar hyperb:host-domain nil
- "<@domain-name> for current host. Set automatically by 'hyperb:init'.")
- --- 38,44 ----
- ;;; Public variables
- ;;; ************************************************************************
-
- ! (defconst hyperb:version "3.04+Lucid" "Hyperbole revision number.")
-
- (defvar hyperb:host-domain nil
- "<@domain-name> for current host. Set automatically by 'hyperb:init'.")
- ***************
- *** 107,112 ****
- --- 107,113 ----
- ;; Highlight explicit buttons whenever a file is read in.
- ;;
- (if hyperb:epoch-p (var:append 'find-file-hooks '(ep:but-create)))
- + (if hyperb:lucid-p (var:append 'find-file-hooks '(le:but-create)))
- ;;
- ;; Save button attribute file whenever same dir file is saved and
- ;; 'ebut:hattr-save' is non-nil.
- *** 1.1 1992/07/14 17:24:04
- --- hmouse-key.el 1992/07/24 14:34:12
- ***************
- *** 88,93 ****
- --- 88,98 ----
- (mouse::index mouse-right mouse-up)))
- (let ((wsys (sm-window-sys-term)))
- (cond
- + ;; Lucid emacs 19
- + ((string-match "Lucid" (emacs-version))
- + (mapcar '(lambda (key) (cons key (key-binding key)))
- + (list 'button2 'button2up 'button3 'button3up)))
- +
- ;; X
- ((equal wsys "xterm")
- (mapcar '(lambda (key) (cons key (lookup-key mouse-map key)))
- ***************
- *** 120,125 ****
- --- 125,135 ----
- (let ((wsys (sm-window-sys-term)))
- (cond
- ;; X
- + ((string-match "Lucid" (emacs-version))
- + (mapcar
- + '(lambda (key-and-binding)
- + (global-set-key (car key-and-binding) (cdr key-and-binding)))
- + key-binding-list))
- ((equal wsys "xterm")
- (mapcar
- '(lambda (key-and-binding)
- ***************
- *** 148,154 ****
- ;; Ensure Gillespie's Info mouse support is off since
- ;; Hyperbole handles that.
- (setq Info-mouse-support nil)
- ! (cond ((boundp 'epoch::version)
- (setq mouse-set-point-command 'mouse::set-point)
- (global-set-mouse mouse-middle mouse-down 'sm-depress)
- (global-set-mouse mouse-middle mouse-up 'smart-key-mouse)
- --- 158,171 ----
- ;; Ensure Gillespie's Info mouse support is off since
- ;; Hyperbole handles that.
- (setq Info-mouse-support nil)
- ! (cond ((string-match "Lucid" (emacs-version))
- ! (defun le:mouse-set-point() (mouse-set-point (copy-event last-input-event)
- ))
- ! (setq mouse-set-point-command 'le:mouse-set-point)
- ! (global-set-key 'button2 'sm-depress)
- ! (global-set-key 'button2up 'smart-key-mouse)
- ! (global-set-key 'button3 'sm-depress-meta)
- ! (global-set-key 'button3up 'smart-key-mouse-meta))
- ! ((boundp 'epoch::version)
- (setq mouse-set-point-command 'mouse::set-point)
- (global-set-mouse mouse-middle mouse-down 'sm-depress)
- (global-set-mouse mouse-middle mouse-up 'smart-key-mouse)
- *** 1.1 1992/07/15 15:32:51
- --- hmouse-tag.el 1992/07/15 16:34:50
- ***************
- *** 37,42 ****
- --- 37,43 ----
- ;; wtags is Bob Weiner's personal, unreleased changes to "tags.el" to
- ;; do exact tag matching. That package is not required to use this code.
- (or (load "wtags" t)
- + (and (string-match "Lucid" (emacs-version)) (load "etags"))
- (and (load "tags") (provide 'tags))))
-
- ;;; ************************************************************************
- *** 1.1 1992/07/24 14:53:05
- --- hsite-ex.el 1992/07/24 14:53:23
- ***************
- *** 1,5 ****
- ;;!emacs
- ! ;; $Id: hsite-ex.el,v 1.1 1992/07/24 14:53:05 jsparkes Exp jsparkes $
- ;;
- ;; FILE: hsite.el
- ;; SUMMARY: Site-specific setup for Hyperbole
- --- 1,5 ----
- ;;!emacs
- ! ;; $Id: hsite-ex.el,v 1.2 1992/05/14 10:11:45 rsw Exp $
- ;;
- ;; FILE: hsite.el
- ;; SUMMARY: Site-specific setup for Hyperbole
- ***************
- *** 127,132 ****
- --- 127,153 ----
- "Machine specific val for empty loop counter, Epoch but flash delay.")
- )
- (defun hui:but-flash ())
- + )
- + ;;; Support button highlighting and flashing under Lucid emacs 19.
- + ;;;
- + (defvar hyperb:lucid-p
- + (string-match "Lucid" (emacs-version))
- + "Non-nil value indicates running Lucid emacs 19.")
- +
- + (defvar hyperb:use-lucid-menubar t
- + "*Non-nil means to add the Hyperbole menu to the menubar under Lucid emacs."
- )
- +
- + (if hyperb:lucid-p
- + (progn
- + (require 'hui-lucid-b)
- + (fset 'hui:but-flash 'le:but-flash)
- + ;; This color cycling really must be done until a desired color is hit.
- + (le:cycle-but-color)
- + ;; If you use Epoch and find that the Hyperbole button flash time is
- + ;; too slow or too fast, adjust it here.
- + (defvar le:but-flash-time 1
- + "Time to flash button under Lucid emacs, in seconds.")
- + )
- )
-
- ;;; You may want to look at this file just to see what it does.
- *** 1.1 1992/07/24 14:30:56
- --- hui-lucid-b.el 1992/07/24 14:30:30
- ***************
- *** 0 ****
- --- 1,317 ----
- + ;;!emacs
- + ;; $Id: hui-ep-but.el,v 1.2 1992/05/14 10:12:14 rsw Exp $
- + ;;
- + ;; FILE: hui-lucid-b.el
- + ;; SUMMARY: Support for highlighting/flashing buttons under Lucid emacs 1
- 9.
- + ;; USAGE: Lucid emacs Lisp Library
- + ;;
- + ;; AUTHOR: Bob Weiner; Jeff Sparkes
- + ;; ORG: Brown U.; Bell-Northern Research
- + ;;
- + ;; ORIG-DATE: 27-Apr-91 at 05:37:10
- + ;; LAST-MOD:
- + ;;
- + ;; This file is part of Hyperbole.
- + ;; It is for use with Epoch, a modified version of GNU Emacs.
- + ;;
- + ;; Copyright (C) 1990, 1991, Brown University and Alan M. Carroll
- + ;; Developed with support from Motorola Inc.
- + ;; Available for use and distribution under the same terms as GNU Emacs.
- + ;;
- + ;; DESCRIPTION:
- + ;;
- + ;; This is truly prototype code.
- + ;;
- +
- + ;;; ************************************************************************
- + ;;; Other required Elisp libraries
- + ;;; ************************************************************************
- +
- + (require 'hbut)
- +
- + ;;; ************************************************************************
- + ;;; Public variables
- + ;;; ************************************************************************
- +
- + ;;; ************************************************************************
- + ;;; Public functions
- + ;;; ************************************************************************
- +
- + (fset 'le:but-add 'epoch::add-button)
- +
- + (defun le:but-color ()
- + "Return current color of buffer's buttons."
- + (if le:color-ptr
- + (car le:color-ptr)
- + (face-foreground (find-face 'default))))
- +
- + (defun le:but-create (&optional start-delim end-delim regexp-match)
- + "Mark all hyper-buttons in buffer as Lucid extents, for later highlighting.
- + Will use optional strings START-DELIM and END-DELIM instead of default values.
- + If END-DELIM is a symbol, e.g. t, then START-DELIM is taken as a regular
- + expression which matches an entire button string.
- + If REGEXP-MATCH is non-nil, only buttons matching this argument are
- + highlighted."
- + (save-excursion
- + (map-extents (function (lambda (x y) (delete-extent x)))
- + (current-buffer) (point-min) (point-max) nil))
- + (le:but-create-all start-delim end-delim regexp-match))
- +
- + (defun le:but-create-all (&optional start-delim end-delim regexp-match)
- + "Mark all hyper-buttons in buffer as Lucid extents, for later highlighting.
- + Will use optional strings START-DELIM and END-DELIM instead of default values.
- + If END-DELIM is a symbol, e.g. t, then START-DELIM is taken as a regular
- + expression which matches an entire button string.
- + If REGEXP-MATCH is non-nil, only buttons matching this argument are
- + highlighted."
- + (ebut:map '(lambda (lbl start end) (set-extent-attribute
- + (set-extent-face (make-extent start end)
- + 'le:but)
- + 'highlight))
- +
- + start-delim end-delim regexp-match 'include-delims))
- +
- + (defun le:but-delete (&optional pos)
- + (delete-extent (extent-at (or pos (point)))))
- +
- + ;;; ************************************************************************
- + ;;; Private functions
- + ;;; ************************************************************************
- +
- + (defmacro le:list-cycle (list-ptr list)
- + "Move LIST-PTR to next element in LIST or when at end to first element."
- + (` (or (and (, list-ptr)
- + (setq (, list-ptr) (cdr (, list-ptr))))
- + (setq (, list-ptr) (, list)))))
- +
- + ;;; ************************************************************************
- + ;;; Private variables
- + ;;; ************************************************************************
- +
- + (defconst le:color-list '( "red" "blue" "paleturquoise4" "mediumpurple2"
- + "lightskyblue3" "springgreen2" "salmon" "yellowgreen" "darkorchid2"
- + "aquamarine4" "slateblue4" "slateblue1" "olivedrab1" "goldenrod4"
- + "goldenrod3" "cadetblue2" "burlywood1" "slategrey" "mistyrose"
- + "limegreen" "lightcyan" "goldenrod" "gainsboro" "skyblue1" "honeydew"
- + "yellow2" "tomato3" "skyblue" "purple4" "orange3" "bisque3" "bisque2"
- + "grey34" "gray99" "gray63" "gray44" "gray37" "gray33" "gray26" "azure1"
- + "snow4" "peru" "red" "lightgoldenrod4" "mediumseagreen" "blush"
- + "mediumorchid2" "lightskyblue1" "darkslateblue" "midnightblue"
- + "lightsalmon1" "lemonchiffon" "yellow" "lightsalmon" "coral"
- + "dodgerblue3" "darkorange4" "blue" "royalblue4" "red" "green" "cyan"
- + "darkviolet" "darksalmon" "darkorange" "blue" "pink" "magenta2"
- + "sienna4" "khaki2" "grey75" "grey74" "grey73" "grey69" "grey68" "grey35"
- + "grey13" "gray90" "gray81" "gray55" "gray51" "gray31" "snow2" "pink3"
- + "grey7" "gray1" "red4" "red3" "tan" "red" "yellow" "mediumvioletred"
- + "lightslategrey" "lavenderblush4" "turquoise" "darkturquoise"
- + "darkslategrey" "lightskyblue" "lightsalmon4" "lightsalmon3"
- + "forestgreen" "dodgerblue4" "orchid" "rosybrown4" "brown" "peachpuff3"
- + "palegreen3" "orangered2" "rose" "lightcyan4" "indianred4" "indianred3"
- + "seagreen2" "indianred" "deeppink1" "navyblue" "lavender" "grey"
- + "deeppink" "salmon4" "salmon3" "oldlace" "grey78" "grey77" "grey54"
- + "grey45" "grey21" "gray97" "gray96" "gray95" "gray88" "gray87" "gray86"
- + "gray70" "gray57" "gray38" "gray12" "gray11" "plum3" "linen" "gray9"
- + "gray8" "blue4" "beige" "turquoise" "blue" "lemonchiffon4"
- + "darkseagreen1" "antiquewhite3" "mediumorchid" "springgreen"
- + "turquoise4" "steelblue3" "mistyrose2" "lightcyan2" "red" "firebrick2"
- + "royalblue" "cadetblue" "skyblue3" "yellow3" "salmon1" "orange4"
- + "hotpink" "grey90" "gray56" "gray39" "gray18" "gray14" "plum4" "grey6"
- + "gray6" "gold3" "gold1" "blue2" "tan2" "cyan" "mediumspringgreen"
- + "darkolivegreen2" "goldenrod" "lightsteelblue" "brown" "whip"
- + "chartreuse3" "violetred4" "royalblue2" "royalblue1" "papayawhip"
- + "mistyrose3" "lightcyan1" "aquamarine" "skyblue4" "hotpink4" "hotpink3"
- + "hotpink2" "dimgray" "tomato" "grey66" "grey65" "grey64" "grey33"
- + "grey27" "gray76" "gray69" "gray68" "grey0" "azure" "green"
- + "darkgoldenrod4" "darkgoldenrod3" "darkgoldenrod2" "darkgoldenrod"
- + "brown" "lightsalmon2" "deepskyblue4" "deepskyblue3" "deepskyblue2"
- + "deepskyblue" "darkorange1" "violetred3" "violetred2" "violetred1"
- + "slateblue3" "slateblue2" "drab" "indianred1" "firebrick1" "cadetblue4"
- + "violetred" "rosybrown" "blue" "firebrick" "grey100" "wheat4" "grey79"
- + "grey76" "grey61" "gray93" "gray84" "gray65" "gray36" "gray32" "gray13"
- + "gray10" "azure3" "snow1" "tan1" "gray" "darkolivegreen1" "blue"
- + "almond" "lavenderblush3" "lavenderblush2" "lavenderblush1"
- + "darkolivegreen" "lavenderblush" "aquamarine2" "red" "olivedrab2"
- + "mistyrose4" "mistyrose1" "lightcyan3" "lightcoral" "chartreuse"
- + "peachpuff" "palegreen" "mintcream" "skyblue2" "moccasin" "tomato1"
- + "orchid3" "maroon3" "salmon" "grey81" "grey62" "grey39" "grey38"
- + "grey37" "gray92" "gray83" "gray66" "gray54" "gray50" "gray30" "gray19"
- + "gray15" "azure4" "grey3" "tan3" "pink" "gray" "blue" "lightsteelblue2"
- + "lightsteelblue1" "green" "lightslategray" "lemonchiffon2"
- + "springgreen1" "greenyellow" "chartreuse2" "grey" "royalblue3"
- + "powderblue" "peachpuff2" "palegreen2" "cream" "slateblue" "seashell2"
- + "deeppink2" "darkkhaki" "maroon4" "sienna" "grey71" "grey67" "grey18"
- + "gray59" "gray43" "gray25" "bisque" "red1" "mediumslateblue"
- + "lightgoldenrod1" "goldenrod" "paleturquoise3" "lightskyblue4" "green"
- + "yellow" "smoke" "blue" "white" "steelblue4" "rosybrown3" "peachpuff1"
- + "palegreen1" "blueviolet" "seashell4" "sienna3" "grey40" "gray91"
- + "gray82" "gray5" "cyan2" "cyan1" "blue1" "snow" "lightgoldenrod2"
- + "lightslateblue" "mediumorchid3" "darkseagreen4" "springgreen3" "green"
- + "slategray4" "slategray3" "slategray2" "blue" "peachpuff4" "palegreen4"
- + "green" "orangered3" "goldenrod1" "ghostwhite" "firebrick4" "firebrick3"
- + "cadetblue3" "slategray" "seashell3" "honeydew3" "cornsilk4" "cornsilk2"
- + "purple1" "dimgrey" "khaki1" "ivory3" "grey70" "grey60" "grey32"
- + "grey22" "grey12" "gray98" "gray89" "gray71" "gray64" "gray60" "gray49"
- + "azure2" "gray3" "paleturquoise1" "mediumpurple1" "purple"
- + "lemonchiffon1" "blue" "navajowhite3" "darkorchid1" "orange"
- + "goldenrod2" "khaki" "chocolate2" "burlywood2" "honeydew1" "darkgreen"
- + "thistle3" "thistle2" "thistle1" "thistle" "maroon2" "maroon1" "grey53"
- + "grey44" "grey25" "gray74" "gray45" "gray41" "gray35" "gray27" "gray23"
- + "gray16" "brown4" "wheat" "coral" "tan4" "lightgoldenrodyellow" "blue"
- + "green" "gray" "palevioletred3" "mediumpurple4" "mediumpurple3"
- + "saddlebrown" "blue" "darkorchid4" "darkorchid3" "puff" "olivedrab4"
- + "lightblue4" "lightpink" "lightgray" "honeydew2" "cornsilk1" "lace"
- + "sienna1" "bisque4" "orchid" "khaki3" "grey84" "grey83" "grey82"
- + "grey72" "grey52" "grey43" "grey26" "grey14" "grey10" "gray75" "gray53"
- + "gray21" "gray20" "brown3" "grey8" "red2" "navy" "grey" "gold"
- + "mediumaquamarine" "lightgoldenrod" "darkslategray4" "darkseagreen3"
- + "darkseagreen2" "antiquewhite4" "white" "springgreen4" "lightyellow4"
- + "white" "aquamarine1" "turquoise3" "steelblue2" "rosybrown2" "pink"
- + "gray" "indianred2" "dodgerblue" "green" "seagreen1" "deeppink4"
- + "aliceblue" "magenta1" "pink" "sienna2" "orchid1" "gray100" "grey97"
- + "grey94" "grey87" "grey86" "grey51" "grey42" "grey19" "gray94" "gray85"
- + "gray61" "brown2" "khaki" "grey1" "gold4" "blue" "green" "grey"
- + "turquoise" "paleturquoise" "mediumorchid4" "antiquewhite2"
- + "lightyellow2" "violet" "salmon" "chartreuse1" "turquoise1" "sandybrown"
- + "orangered1" "lightpink1" "lightblue2" "lightblue1" "grey" "seagreen4"
- + "seagreen3" "lightblue" "deeppink3" "burlywood" "seashell" "hotpink1"
- + "gray" "yellow4" "yellow" "purple" "orange" "ivory4" "grey99" "grey89"
- + "grey63" "grey58" "grey49" "grey31" "grey24" "grey20" "green4" "green1"
- + "gray73" "gray67" "coral3" "coral2" "plum2" "pink4" "ivory" "gray4"
- + "gray2" "gold2" "aquamarine" "grey" "lightgoldenrod3" "darkolivegreen3"
- + "darkgoldenrod1" "goldenrod" "orchid" "chiffon" "navajowhite4"
- + "deepskyblue1" "lightyellow" "floralwhite" "blue" "mediumblue"
- + "chocolate4" "chocolate3" "burlywood4" "turquoise" "steelblue" "green"
- + "lawngreen" "honeydew4" "seagreen" "orchid4" "wheat1" "violet" "ivory1"
- + "grey88" "grey85" "grey57" "grey56" "grey55" "grey48" "grey47" "grey46"
- + "grey30" "grey17" "gray47" "gray29" "pink2" "grey5" "grey4" "green"
- + "gray0" "brown" "lightsteelblue4" "darkolivegreen4" "palevioletred4"
- + "blue" "darkslategray3" "darkslategray2" "darkslategray1"
- + "blanchedalmond" "palegoldenrod" "blue" "lightseagreen" "lemonchiffon3"
- + "darkslategray" "green" "darkseagreen" "antiquewhite" "darkorange2"
- + "chartreuse4" "blue" "rosybrown1" "olivedrab3" "lightpink2" "orangered"
- + "thistle4" "blue" "cornsilk" "salmon2" "orchid2" "ivory2" "grey93"
- + "grey92" "grey91" "grey36" "grey29" "grey28" "grey16" "gray79" "gray78"
- + "gray77" "gray48" "gray17" "coral4" "coral1" "plum1" "pink1" "grey9"
- + "grey2" "gray7" "cyan4" "blue3" "plum" "cornflowerblue" "lightskyblue2"
- + "antiquewhite1" "navajowhite2" "navajowhite1" "lightyellow3"
- + "navajowhite" "darkorange3" "whitesmoke" "turquoise2" "steelblue1"
- + "lightpink4" "lightblue3" "green" "chocolate1" "blue" "olivedrab"
- + "lightgrey" "chocolate" "magenta4" "magenta3" "yellow1" "purple3"
- + "purple2" "orange2" "orange1" "magenta" "bisque1" "wheat2" "maroon"
- + "khaki4" "grey96" "grey95" "grey80" "grey50" "grey41" "grey15" "grey11"
- + "gray80" "gray58" "gray40" "gray34" "gray22" "brown1" "snow3"
- + "mediumturquoise" "lightsteelblue3" "palevioletred2" "palevioletred1"
- + "paleturquoise2" "green" "palevioletred" "mediumorchid1" "white"
- + "mediumpurple" "lightyellow1" "dodgerblue2" "dodgerblue1" "violet"
- + "aquamarine3" "slategray1" "gray" "orangered4" "lightpink3" "blue"
- + "darkorchid" "cadetblue1" "burlywood3" "seashell1" "cornsilk3" "tomato4"
- + "tomato2" "wheat3" "grey98" "grey59" "grey23" "green3" "green2" "gray72"
- + "gray62" "gray52" "gray46" "gray42" "gray28" "gray24" "white" "cyan3"
- + "black" ))
- +
- + (defvar le:color-ptr nil
- + "Pointer to current color name table to use for Hyperbole buttons in Lucid e
- macs.")
- +
- + (defconst le:good-colors
- + '(
- + "medium violet red" "indianred4" "firebrick1" "DarkGoldenrod" "NavyBlue"
- + "darkorchid" "tomato3" "mediumseagreen" "deeppink" "forestgreen"
- + "mistyrose4" "slategrey" "purple4" "dodgerblue3" "mediumvioletred"
- + "lightsalmon3" "orangered2" "turquoise4" "Gray55"
- + )
- + "Good colors for contrast against wheat background and black foreground.")
- +
- +
- + (defvar le:item-highlight-color (face-foreground (find-face 'default))
- + "Color with which to highlight list/menu selections.
- + Call (le:set-item-highlight <color>) to change value.")
- +
- + ;;; ************************************************************************
- + ;;; Public functions
- + ;;; ************************************************************************
- +
- + (defun le:cycle-but-color (&optional color)
- + (interactive)
- + (if (not (x-color-display-p))
- + nil
- + (if color (setq le:color-ptr nil))
- + (set-face-foreground
- + 'le:but (or color (car (le:list-cycle le:color-ptr le:good-colors))))
- + (set-face-background 'le:flash (le:but-color))
- + (redraw-display)
- + t))
- +
- + (defun le:but-flash ()
- + "Flash a Hyperbole button at point to indicate selection, when using Epoch."
- + (interactive)
- + (let ((ibut) (prev)
- + (start (hattr:get 'hbut:current 'lbl-start))
- + (end (hattr:get 'hbut:current 'lbl-end)))
- + (and start end (setq prev (extent-at (point))
- + ibut t)
- + (if (not prev) (set-extent-face (make-extent start end) 'le:but)))
- + (let* ((b (extent-at (point))))
- + (if b
- + (progn
- + (set-extent-face b 'le:flash)
- + (redraw-display)
- + (add-timeout le:but-flash-time
- + (function (lambda(b) (set-extent-face b 'le:but))) b)
- + (redraw-display)
- + )))
- + (if (and ibut (not prev)) (le:but-delete))
- + ))
- +
- + (defun le:set-item-highlight (&optional color-name)
- + "Setup or reset item highlight style using optional color-name.
- + Currently does nothing so as not to intere with Lucid emacs highlighting."
- + )
- +
- + (defun le:select-item (&optional pnt)
- + "Select item in current buffer at optional position PNT using le:item-style.
- "
- + (or le:item-button
- + (setq le:item-button (set-extent-face (make-extent (point) (point))
- + 'le:item-style)))
- + (set-extent-attribute le:item-button 'highlight)
- + (if pnt (goto-char pnt))
- + (skip-chars-forward " \t")
- + (skip-chars-backward "^ \t\n")
- + (let ((start (point)))
- + (save-excursion
- + (skip-chars-forward "^ \t\n")
- + (update-extent le:item-button start (point))
- + ))
- + (redraw-display)
- + )
- +
- + (defun le:select-line (&optional pnt)
- + "Select line in current buffer at optional position PNT using le:item-style.
- "
- + (or le:item-button
- + (setq le:item-button (set-extent-face (make-extent (point) (point))
- + 'le:item-style)))
- + (if pnt (goto-char pnt))
- + (save-excursion
- + (beginning-of-line)
- + (update-extent le:item-button (point) (progn (end-of-line) (point)))
- + )
- + (redraw-display)
- + )
- +
- + ;;; ************************************************************************
- + ;;; Private variables
- + ;;; ************************************************************************
- +
- + (or (find-face 'le:but) (copy-face 'default 'le:but))
- + (or (find-face 'le:flash) (copy-face 'default 'le:flash))
- +
- + (set-face-foreground 'le:but (le:but-color))
- + (set-face-background 'le:but (face-background (find-face 'default)))
- + (set-face-background 'le:flash (le:but-color))
- + (set-face-foreground 'le:flash (face-foreground (find-face 'default)))
- + (if (not (x-color-display-p))
- + (make-face-bold 'le:but))
- +
- + (make-variable-buffer-local 'le:item-button)
- + (copy-face 'le:but 'le:item-style)
- +
- + (provide 'hui-lucid-b)
- *** 1.1 1992/07/15 18:52:15
- --- hui-menus.el 1992/07/24 14:46:23
- ***************
- *** 207,221 ****
- Suitable for binding to a key, e.g. {C-h h}.
- Non-interactively, returns t if menu is actually invoked by call, else nil."
- (interactive)
- ! (condition-case ()
- ! (if hui:menu-p
- ! nil
- ! (setq hui:menu-p t)
- ! (hui:menu-act 'hyperbole)
- ! (setq hui:menu-p nil)
- ! t)
- ! (quit (setq hui:menu-p nil))
- ! (error (setq hui:menu-p nil))))
-
- (defun hui:menu-act (menu)
- "Prompts user with Hyperbole MENU (a symbol) and performs selected item."
- --- 207,227 ----
- Suitable for binding to a key, e.g. {C-h h}.
- Non-interactively, returns t if menu is actually invoked by call, else nil."
- (interactive)
- ! (let ((minibuffer-confirm-complete nil))
- ! (condition-case ()
- ! (if hui:menu-p
- ! nil
- ! ;; Attempt to work around a difference in Lucid emacs 19. Hitting
- ! ;; C-G at the minibuffer prompt does not invoke the quit case in
- ! ;; this code. I don't really know why there even is a flag, but
- ! ;; not setting it seems to work here. -Jeff Sparkes
- ! (if (not hyperb:lucid-p)
- ! (setq hui:menu-p t))
- ! (hui:menu-act 'hyperbole)
- ! (setq hui:menu-p nil)
- ! t)
- ! (quit (setq hui:menu-p nil))
- ! (error (setq hui:menu-p nil)))))
-
- (defun hui:menu-act (menu)
- "Prompts user with Hyperbole MENU (a symbol) and performs selected item."
- ***************
- *** 252,258 ****
- "Uses CHAR-STR or last input character as minibuffer argument."
- (interactive)
- (erase-buffer)
- ! (insert (or char-str (substring (recent-keys) -1)))
- (exit-minibuffer))
-
- (defun hui:menu-help (help-str)
- --- 258,268 ----
- "Uses CHAR-STR or last input character as minibuffer argument."
- (interactive)
- (erase-buffer)
- ! (if hyperb:lucid-p
- ! (insert (char-to-string
- ! (event-to-character
- ! (car (last (append (recent-keys) nil))))))
- ! (insert (or char-str (substring (recent-keys) -1))))
- (exit-minibuffer))
-
- (defun hui:menu-help (help-str)
- ***************
- *** 360,364 ****
- --- 370,397 ----
- (while (<= i 126)
- (define-key hui:menu-mode-map (char-to-string i) 'hui:menu-enter)
- (setq i (1+ i)))))
- +
- + (defun hui:menubar-do-menu (menus path)
- + "Add the menu and it's entries to the menubar in Lucid emacs."
- + (if (and menus (listp menus))
- + (hui:menubar-do-menu-entry (cdr (cdr menus)) path)))
- +
- + (defun hui:menubar-do-menu-entry (menu path)
- + "Process the list of Hyperbole MENUS for Lucid emacs menubar."
- + (if menu
- + (progn
- + (let* ((entry (car menu))
- + (name (car entry))
- + (function (car (cdr entry))))
- + (if (and (listp function)
- + (assq (cdr function) hui:menus)) ; is this a submenu?
- + (hui:menubar-do-menu (assq (cdr function) hui:menus)
- + (append path (list name)))
- + (add-menu-item path name function t)))
- + (hui:menubar-do-menu-entry (cdr menu) path))))
- +
- + (if hyperb:lucid-p
- + (hui:menubar-do-menu (assq 'hyperbole hui:menus) '("Hyperbole")))
- +
-
- (provide 'hui-menus)
- --
- Jeff Sparkes
- jsparkes@bnr.ca Bell-Northern Research, Ottawa, Ontario, Canada
-
-
-
- --
- --
- Jeff Sparkes jsparkes@bnr.ca Bell-Northern Research, Ottawa (613)765-2503
- "For better gas mileage, do not drive with the parking brake on."
- - paraphrased from the owners manual of my Integra.
-