On Sun, Jun 25, 2000 at 03:22:25PM -0500, Peter Winson wrote:

> Does anyone know how to make the cursor stay in place while the
> scroll bar is used to scroll the buffer?

This isn't possible in (x)emacsen.

> The reason why I asked is I've turned on the highlighting for
> matching braces.  This works great; but if the matching brace is not
> within the display area, there is no way to see it.

The following function will allow you to jump between end and start
braces. Just add this code to your .emacs, possibly changing the bound
key to one you like more.

----------------8<-------------

;;*========================
;;* VI-style matching parenthesis
;;  From Eric Hendrickson edh @ med.umn.edu
(defun match-paren (arg)
  "Go to the matching parenthesis if on parenthesis otherwise insert %."
  (interactive "p")
  (cond ((looking-at "[([{]") (forward-sexp 1) (backward-char))
        ((looking-at "[])}]") (forward-char) (backward-sexp 1))))

;; Bind function to Meta-p
(global-set-key '(meta p) 'match-paren)

-------------8<----------------

Jesper

-- 
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
-- Benjamin Franklin, 1759

Reply via email to