home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / alt / lucidem / help / 277 < prev    next >
Encoding:
Internet Message Format  |  1992-08-15  |  1.9 KB

  1. Date: Sat, 15 Aug 1992 17:14:45 +0200
  2. From: Guido.Bosch%loria.fr@lucid.com (Guido Bosch)
  3. Message-ID: <9208151514.AA24797@moebius.loria.fr>
  4. Subject: Re: mode-motion package
  5. References: <25143.713890091@margaux.inria.fr>
  6.     <BOSCH.92Aug5135209@moebius.loria.fr>
  7. Reply-To: bosch%loria.fr@lucid.com (Guido BOSCH)
  8. Newsgroups: alt.lucid-emacs.help
  9. Path: sparky!uunet!wendy-fate.uu.net!help-lucid-emacs
  10. Sender: help-lucid-emacs-request@lucid.com
  11. Lines: 47
  12.  
  13. Chet.Murthy@inria.fr writes:
  14.  > 
  15.  > Dear Guido,
  16.  > 
  17.  > I just FTP'd your mode-motion package, and it works like a charm in
  18.  > dired, but nothing happens in emacs-lisp mode (nor in lisp-mode, for
  19.  > that matter).
  20.  > 
  21.  > I verified that the local variable mode-motion-hook was indeed set to
  22.  > mouse-track-highlight-thing.
  23.  > 
  24.  
  25. I guess youre using a bold font as default in your Emacs.  But
  26. `mouse-track-highlight-thing' just turns things into bold. Use the
  27. following motion handler to get the same highlighting effect as for
  28. the line motion handlers (this will be the default in the next
  29. version):
  30.  
  31. (defun mouse-track-highlight-thing (event)
  32.     "Track the mouse motion by highlighting the smallest syntactic structure
  33. mouse is over.  This function can be used as value of the variable
  34. `mouse-motion-handler'.  Takes One Argument: EVENT"
  35.  
  36.   (mouse-track-highlight-region
  37.    event
  38.    (function thing-boundaries)
  39.    't))
  40.  
  41. And use this one for highlighting things in bold (You will see, it
  42. looks better if you do not use a bold font as default):
  43.  
  44. (defun mouse-track-highlight-thing-bold (event) 
  45.   "Track the mouse motion by highlighting the smallest syntactic
  46. structure mouse is over.  Highlighting is done by using a bold face.
  47. This function can be used as value of the variable
  48. `mouse-motion-handler'.  Takes One Argument: EVENT"
  49.  
  50.   (mouse-track-highlight-region
  51.    event
  52.    (function thing-boundaries)))
  53.  
  54.  
  55. Try also the Meta Button2 copy facility on highlighted things. 
  56.  
  57. Enjoy, 
  58.  
  59.     Guido
  60.