comparison lisp/emacs-lisp/regexp-opt.el @ 90197:b7da78284d4c

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-65 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 425-445) - Remove "-face" suffix from gnus faces - Update from CVS - Remove "-face" suffix from MH-E faces - Remove "-face" suffix from cc-mode faces - Remove "-face" suffix from eshell faces - Remove "-face" suffix from ediff faces - Implement tty vertical-divider face - Rename vertical-divider face to vertical-border - Change escape-glyph color on dark backgrounds back to cyan - Update reference to renamed Buffer-menu-buffer face
author Miles Bader <miles@gnu.org>
date Fri, 24 Jun 2005 01:59:52 +0000
parents f2ebccfa87d4 8d59a5d179f2
children f9a65d7ebd29
comparison
equal deleted inserted replaced
90196:82d495f87e7b 90197:b7da78284d4c
114 114
115 ;;;###autoload 115 ;;;###autoload
116 (defun regexp-opt-depth (regexp) 116 (defun regexp-opt-depth (regexp)
117 "Return the depth of REGEXP. 117 "Return the depth of REGEXP.
118 This means the number of non-shy regexp grouping constructs 118 This means the number of non-shy regexp grouping constructs
119 \(parenthesised expressions) in REGEXP." 119 \(parenthesized expressions) in REGEXP."
120 (save-match-data 120 (save-match-data
121 ;; Hack to signal an error if REGEXP does not have balanced parentheses. 121 ;; Hack to signal an error if REGEXP does not have balanced parentheses.
122 (string-match regexp "") 122 (string-match regexp "")
123 ;; Count the number of open parentheses in REGEXP. 123 ;; Count the number of open parentheses in REGEXP.
124 (let ((count 0) start last) 124 (let ((count 0) start last)