home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / alt / lucidem / bug / 334 < prev    next >
Encoding:
Text File  |  1992-11-10  |  5.5 KB  |  137 lines

  1. x-gateway: rodan.UU.NET from bug-lucid-emacs to alt.lucid-emacs.bug; Tue, 10 Nov 1992 09:25:40 EST
  2. Date: Tue, 10 Nov 1992 09:23:45 EST
  3. From: ex594bw@pts4.pts.mot.com (Bob Weiner)
  4. Message-ID: <9211101423.AA28757@pts4.pts.mot.com>
  5. Subject: Patch to make Hyperbole modeline presses work under Lucid Emacs.
  6. Newsgroups: alt.lucid-emacs.bug
  7. Path: sparky!uunet!wendy-fate.uu.net!bug-lucid-emacs
  8. Sender: bug-lucid-emacs-request@lucid.com
  9. Lines: 126
  10.  
  11. [As noted in the Hyperbole documentation, Lucid Emacs modeline event handling
  12. is buggy.  I have figured out how to work around the bugs though so that one
  13. can have complete Hyperbole mouse support under Lucid Emacs.
  14.  
  15. If you use Lucid Emacs, you can either wait for a new Hyperbole release later
  16. this week or apply the patches below.  Two files are patched.  You must apply
  17. the patches for each file separately.  The files are separated by a few
  18. lines of equal signs.  -- Bob Weiner   <bob_weiner@pts.mot.com>]
  19.  
  20.  
  21.  
  22. *** h-skip-bytec.lsp~    Mon Oct 12 20:07:10 1992
  23. --- h-skip-bytec.lsp    Mon Nov  9 17:19:25 1992
  24. ***************
  25. *** 50,56 ****
  26.   Returns arg list including x and y screen coords."
  27.     (and (car args) (listp (car args)) (setq args (car args)))
  28.     (let ((point-set-val (smart-key-set-point args)))
  29. !     (cond (hyperb:lemacs-p (copy-event current-mouse-event))
  30.         ((equal hyperb:window-system "apollo") point-set-val)
  31.         (t args))))
  32.   
  33. --- 50,60 ----
  34.   Returns arg list including x and y screen coords."
  35.     (and (car args) (listp (car args)) (setq args (car args)))
  36.     (let ((point-set-val (smart-key-set-point args)))
  37. !     (cond (hyperb:lemacs-p
  38. !         ;; Modeline clicks return nil for X and Y event positions.
  39. !         (if (event-x current-mouse-event)
  40. !         (copy-event current-mouse-event)
  41. !           (read-mouse-position (selected-screen))))
  42.         ((equal hyperb:window-system "apollo") point-set-val)
  43.         (t args))))
  44.   
  45. ===========================================================================
  46. ===========================================================================
  47. ===========================================================================
  48.  
  49. *** hui-window.el~    Mon Nov  9 10:16:25 1992
  50. --- hui-window.el    Mon Nov  9 17:29:18 1992
  51. ***************
  52. *** 83,89 ****
  53.   (if (not (boundp 'smart-key-mouse-alist))
  54.       (error
  55.         "\"hui-modeln.el\": smart-key-mouse-alist must be defined before loading this.")
  56. !   (or (memq 'sm-mouse-drag-between-windows
  57.           (mapcar (function (lambda (elt) (let ((pred (car elt)))
  58.                             (if (listp pred) (car pred)))))
  59.               smart-key-mouse-alist))
  60. --- 83,89 ----
  61.   (if (not (boundp 'smart-key-mouse-alist))
  62.       (error
  63.         "\"hui-modeln.el\": smart-key-mouse-alist must be defined before loading this.")
  64. !   (or (memq 'sm-mouse-drag-window-side
  65.           (mapcar (function (lambda (elt) (let ((pred (car elt)))
  66.                             (if (listp pred) (car pred)))))
  67.               smart-key-mouse-alist))
  68. ***************
  69. *** 93,105 ****
  70.           ((sm-mouse-drag-window-side) .
  71.            ((sm-mouse-resize-window-side) .
  72.             (sm-mouse-resize-window-side 'meta)))
  73. !         ((sm-mouse-drag-between-windows) .
  74. !          ((sm-mouse-swap-buffers) .
  75. !           (sm-mouse-swap-windows 'meta)))
  76. !         ((setq smart-key-value (sm-mouse-drag-horizontally)) .
  77.            ((sm-mouse-horizontal) . (sm-mouse-horizontal-meta)))
  78.           ((sm-mouse-depress-in-modeline) .
  79.            ((sm-mouse-modeline) . (sm-mouse-modeline-meta)))
  80.           ((sm-mouse-drag-vertically) .
  81.            ((sm-split-window-horizontally) .
  82.             (sm-split-window-horizontally)))
  83. --- 93,107 ----
  84.           ((sm-mouse-drag-window-side) .
  85.            ((sm-mouse-resize-window-side) .
  86.             (sm-mouse-resize-window-side 'meta)))
  87. !         ((setq smart-key-value 
  88. !                (and (not (sm-mouse-drag-between-windows))
  89. !                 (sm-mouse-drag-horizontally))) .
  90.            ((sm-mouse-horizontal) . (sm-mouse-horizontal-meta)))
  91.           ((sm-mouse-depress-in-modeline) .
  92.            ((sm-mouse-modeline) . (sm-mouse-modeline-meta)))
  93. +         ((sm-mouse-drag-between-windows) .
  94. +          ((sm-mouse-swap-buffers) .
  95. +           (sm-mouse-swap-windows 'meta)))
  96.           ((sm-mouse-drag-vertically) .
  97.            ((sm-split-window-horizontally) .
  98.             (sm-split-window-horizontally)))
  99. ***************
  100. *** 566,572 ****
  101.     "Returns x coordinate in chars from window system dependent ARGS."
  102.     (let ((x (eval (cdr (assoc hyperb:window-system
  103.                    '(("epoch"  .  (nth 1 args))   ;; Epoch V4
  104. !                    ("lemacs" .  (event-x args))
  105.                      ("xterm"  .  (car args))
  106.                      ("sun"    .  (nth 1 args))
  107.                      ("next"   .  (nth 1 args))
  108. --- 568,576 ----
  109.     "Returns x coordinate in chars from window system dependent ARGS."
  110.     (let ((x (eval (cdr (assoc hyperb:window-system
  111.                    '(("epoch"  .  (nth 1 args))   ;; Epoch V4
  112. !                    ("lemacs" .  (if (eventp args)
  113. !                         (event-x args)
  114. !                           (car args)))
  115.                      ("xterm"  .  (car args))
  116.                      ("sun"    .  (nth 1 args))
  117.                      ("next"   .  (nth 1 args))
  118. ***************
  119. *** 578,584 ****
  120.     "Returns y coordinate in screen lines from window system dependent ARGS."
  121.     (let ((y (eval (cdr (assoc hyperb:window-system
  122.                    '(("epoch"  .  (nth 2 args))   ;; Epoch V4
  123. !                    ("lemacs" .  (event-y args))
  124.                      ("xterm"  .  (nth 1 args))
  125.                      ("sun"    .  (nth 2 args))
  126.                      ("next"   .  (nth 2 args))
  127. --- 582,590 ----
  128.     "Returns y coordinate in screen lines from window system dependent ARGS."
  129.     (let ((y (eval (cdr (assoc hyperb:window-system
  130.                    '(("epoch"  .  (nth 2 args))   ;; Epoch V4
  131. !                    ("lemacs" .  (if (eventp args)
  132. !                         (event-y args)
  133. !                           (cdr args)))
  134.                      ("xterm"  .  (nth 1 args))
  135.                      ("sun"    .  (nth 2 args))
  136.                      ("next"   .  (nth 2 args))
  137.