comparison lisp/packages/paren.el @ 126:1370575f1259 xemacs-20-1p1

Import from CVS: tag xemacs-20-1p1
author cvs
date Mon, 13 Aug 2007 09:27:39 +0200
parents 9b50b4588a93
children 489f57a838ef
comparison
equal deleted inserted replaced
125:8b0638b347ec 126:1370575f1259
52 ;; If paren-mode is `sexp', entire S-expressions are highlighted instead of 52 ;; If paren-mode is `sexp', entire S-expressions are highlighted instead of
53 ;; just matching parens. 53 ;; just matching parens.
54 54
55 ;;; Code: 55 ;;; Code:
56 56
57 (defgroup paren nil
58 "Highlight (un)matching parens and whole expressions"
59 :group 'matching)
60
61
62 (defcustom paren-message-offscreen t 57 (defcustom paren-message-offscreen t
63 "*Display message if matching open paren is offscreen." 58 "*Display message if matching open paren is offscreen."
64 :type 'boolean 59 :type 'boolean
65 :group 'paren) 60 :group 'paren-matching)
66 61
67 (defcustom paren-ding-unmatched nil 62 (defcustom paren-ding-unmatched nil
68 "*Make noise if the cursor is at an unmatched paren. 63 "*Make noise if the cursor is at an unmatched paren.
69 64
70 If T, then typing or passing over an unmatched paren will ring the bell 65 If T, then typing or passing over an unmatched paren will ring the bell
72 unmatched paren is typed. If neither T or NIL, then the bell will not ring 67 unmatched paren is typed. If neither T or NIL, then the bell will not ring
73 when the cursor moves over unmatched parens but will ring if one is typed." 68 when the cursor moves over unmatched parens but will ring if one is typed."
74 :type '(choice (const :tag "off" nil) 69 :type '(choice (const :tag "off" nil)
75 (const :tag "on" t) 70 (const :tag "on" t)
76 (const :tag "other" other)) 71 (const :tag "other" other))
77 :group 'paren) 72 :group 'paren-matching)
78 73
79 ;;;###autoload 74 ;;;###autoload
80 (defcustom paren-mode nil 75 (defcustom paren-mode nil
81 "*Sets the style of parenthesis highlighting. 76 "*Sets the style of parenthesis highlighting.
82 Valid values are nil, `blink-paren', `paren', and `sexp'. 77 Valid values are nil, `blink-paren', `paren', and `sexp'.
90 85
91 This variable is global by default, but you can make it buffer-local and 86 This variable is global by default, but you can make it buffer-local and
92 highlight parentheses differently in different major modes." 87 highlight parentheses differently in different major modes."
93 :type '(radio (const nil) (const blink-paren) (const paren) 88 :type '(radio (const nil) (const blink-paren) (const paren)
94 (const sexp) (const nested)) 89 (const sexp) (const nested))
95 :group 'paren) 90 :group 'paren-matching)
96 91
97 (make-face 'paren-match) 92 (make-face 'paren-match)
98 (or (face-differs-from-default-p 'paren-match) 93 (or (face-differs-from-default-p 'paren-match)
99 (copy-face 'highlight 'paren-match)) 94 (copy-face 'highlight 'paren-match))
100 95