home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / alt / lucidem / help / 406 < prev    next >
Encoding:
Text File  |  1992-09-11  |  2.3 KB  |  59 lines

  1. x-gateway: rodan.UU.NET from help-lucid-emacs to alt.lucid-emacs.help; Fri, 11 Sep 1992 08:16:48 EDT
  2. From: dmason%plg.uwaterloo.ca@lucid.com (Dave Mason)
  3. Subject: Simple optimization for blink-paren
  4. Message-ID: <92Sep11.081631edt.28714@plg.uwaterloo.ca>
  5. Date: Fri, 11 Sep 1992 08:16:30 -0400
  6. Newsgroups: alt.lucid-emacs.help
  7. Path: sparky!uunet!wendy-fate.uu.net!help-lucid-emacs
  8. Sender: help-lucid-emacs-request@lucid.com
  9. Lines: 48
  10.  
  11.  Every day I uncover more nifty things!
  12.  
  13.  blink-paren is pretty neat, but it is a real network hog, so I
  14. thought of highlighting the paren rather than having it constantly
  15. change, so I tried setting the -on and -off fonts the same:
  16.  
  17. Emacs*default.attributeFont: -*-courier-medium-r-*-*-20-*-*-*-*-*-*-*
  18. Emacs*blink-paren-off.attributeFont: -*-courier-medium-r-*-*-20-*-*-*-*-*-*-*
  19. Emacs*blink-paren-off.attributeBackgroundPixmap: gray3
  20. Emacs*blink-paren-on.attributeFont: -*-courier-medium-r-*-*-20-*-*-*-*-*-*-*
  21. Emacs*blink-paren-on.attributeBackgroundPixmap: gray3
  22.  
  23.   However the set-extent-face code doesn't check to see if the new
  24. face is the same as the old face, and you get all the extra timer
  25. interrupts anyway, so I made blink-paren-post-command do the check.
  26. Here is the diff:
  27. *** /usr/local/src/lemacs/lemacs-19.3/lisp/packages/blink-paren.el    Fri Sep  4 05:42:38 1992
  28. --- Emacs/blink-paren.el    Thu Sep 10 19:07:57 1992
  29. ***************
  30. *** 79,84 ****
  31. --- 79,88 ----
  32.   (defun blink-paren-post-command ()
  33.     (blink-paren-pre-command)
  34.     (if (and (setq blink-paren-extent (blink-paren-make-extent))
  35. +        (not (and (face-equal 'blink-paren-on 'blink-paren-off)
  36. +              (progn
  37. +                (set-extent-face blink-paren-extent 'blink-paren-on)
  38. +                t)))
  39.          (or (floatp blink-paren-timeout)
  40.              (integerp blink-paren-timeout)))
  41.         (setq blink-paren-timeout-id
  42.  
  43. This might be worth putting in the distribution with a comment about
  44. the amount of network activity that plain blink-paren produces.
  45.  
  46. A couple of other useful font changes that I've found:
  47.  
  48. This works well for isearch, even when using hilite, etc.:
  49. Emacs*isearch.attributeForeground: black
  50. Emacs*isearch.attributeBackground: white
  51. Emacs*highlight.attributeBackgroundPixmap: dimple3
  52.  
  53. This makes for quieter modelines:
  54. Emacs*modeline.attributeForeground: white
  55. Emacs*modeline.attributeBackground: black
  56. Emacs*modeline.attributeBackgroundPixmap: dimple3
  57.  
  58.     ../Dave
  59.