home *** CD-ROM | disk | FTP | other *** search
- x-gateway: rodan.UU.NET from help-lucid-emacs to alt.lucid-emacs.help; Fri, 11 Sep 1992 08:16:48 EDT
- From: dmason%plg.uwaterloo.ca@lucid.com (Dave Mason)
- Subject: Simple optimization for blink-paren
- Message-ID: <92Sep11.081631edt.28714@plg.uwaterloo.ca>
- Date: Fri, 11 Sep 1992 08:16:30 -0400
- Newsgroups: alt.lucid-emacs.help
- Path: sparky!uunet!wendy-fate.uu.net!help-lucid-emacs
- Sender: help-lucid-emacs-request@lucid.com
- Lines: 48
-
- Every day I uncover more nifty things!
-
- blink-paren is pretty neat, but it is a real network hog, so I
- thought of highlighting the paren rather than having it constantly
- change, so I tried setting the -on and -off fonts the same:
-
- Emacs*default.attributeFont: -*-courier-medium-r-*-*-20-*-*-*-*-*-*-*
- Emacs*blink-paren-off.attributeFont: -*-courier-medium-r-*-*-20-*-*-*-*-*-*-*
- Emacs*blink-paren-off.attributeBackgroundPixmap: gray3
- Emacs*blink-paren-on.attributeFont: -*-courier-medium-r-*-*-20-*-*-*-*-*-*-*
- Emacs*blink-paren-on.attributeBackgroundPixmap: gray3
-
- However the set-extent-face code doesn't check to see if the new
- face is the same as the old face, and you get all the extra timer
- interrupts anyway, so I made blink-paren-post-command do the check.
- Here is the diff:
- *** /usr/local/src/lemacs/lemacs-19.3/lisp/packages/blink-paren.el Fri Sep 4 05:42:38 1992
- --- Emacs/blink-paren.el Thu Sep 10 19:07:57 1992
- ***************
- *** 79,84 ****
- --- 79,88 ----
- (defun blink-paren-post-command ()
- (blink-paren-pre-command)
- (if (and (setq blink-paren-extent (blink-paren-make-extent))
- + (not (and (face-equal 'blink-paren-on 'blink-paren-off)
- + (progn
- + (set-extent-face blink-paren-extent 'blink-paren-on)
- + t)))
- (or (floatp blink-paren-timeout)
- (integerp blink-paren-timeout)))
- (setq blink-paren-timeout-id
-
- This might be worth putting in the distribution with a comment about
- the amount of network activity that plain blink-paren produces.
-
- A couple of other useful font changes that I've found:
-
- This works well for isearch, even when using hilite, etc.:
- Emacs*isearch.attributeForeground: black
- Emacs*isearch.attributeBackground: white
- Emacs*highlight.attributeBackgroundPixmap: dimple3
-
- This makes for quieter modelines:
- Emacs*modeline.attributeForeground: white
- Emacs*modeline.attributeBackground: black
- Emacs*modeline.attributeBackgroundPixmap: dimple3
-
- ../Dave
-