From 401f70a57e722da0e16107c6c869fd172fc8128d Mon Sep 17 00:00:00 2001 From: wlott <wlott> Date: Sun, 27 Oct 1991 08:29:17 +0000 Subject: [PATCH] Moved the lisp mode specific parts of paren highlighting into here from highlight.lisp. --- hemlock/lispmode.lisp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/hemlock/lispmode.lisp b/hemlock/lispmode.lisp index ddea7a536..3c490b402 100644 --- a/hemlock/lispmode.lisp +++ b/hemlock/lispmode.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/lispmode.lisp,v 1.1.1.12 1991/10/21 15:09:41 chiles Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/lispmode.lisp,v 1.1.1.13 1991/10/27 08:29:17 wlott Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1726,6 +1726,23 @@ :mode "Lisp") +(defhvar "Open Paren Finder Function" + "Should be a function that takes a mark for input and returns either NIL + if the mark is not after a close paren, or two (temporary) marks + surrounding the corresponding open paren." + :mode "Lisp" + :value 'lisp-open-paren-finder-function) + +(defun lisp-open-paren-finder-function (mark) + (when (eq (character-attribute :lisp-syntax (previous-character mark)) + :close-paren) + (with-mark ((mark mark)) + (pre-command-parse-check mark) + (if (not (and (valid-spot mark nil) (list-offset mark -1))) + (values nil nil) + (values mark (mark-after (copy-mark mark))))))) + + ;;;; Some mode variables to coordinate with other stuff. -- GitLab