comparison lisp/emacs-lisp/re-builder.el @ 89966:d8411455de48

Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-32 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-486 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-487 Tweak permissions * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-488 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-489 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-490 Update from CVS: man/fixit.texi (Spelling): Fix typo. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-491 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-494 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-495 Update from CVS: Add missing lisp/mh-e files * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-496 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-499 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-500 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-513 Update from CVS
author Miles Bader <miles@gnu.org>
date Fri, 27 Aug 2004 07:00:34 +0000
parents 3fd4a5c21153 7dbbaf3dc171
children cb67264d6096
comparison
equal deleted inserted replaced
89965:5e9097d1ad99 89966:d8411455de48
43 ;; shown only in the modeline without throwing the errors at you. If 43 ;; shown only in the modeline without throwing the errors at you. If
44 ;; you want to know the reason why RE Builder considers it as invalid 44 ;; you want to know the reason why RE Builder considers it as invalid
45 ;; call `reb-force-update' ("\C-c\C-u") which should reveal the error. 45 ;; call `reb-force-update' ("\C-c\C-u") which should reveal the error.
46 46
47 ;; The target buffer can be changed with `reb-change-target-buffer' 47 ;; The target buffer can be changed with `reb-change-target-buffer'
48 ;; ("\C-c\C-b"). Changing the target buffer automatically removes 48 ;; ("\C-c\C-b"). Changing the target buffer automatically removes
49 ;; the overlays from the old buffer and displays the new one in the 49 ;; the overlays from the old buffer and displays the new one in the
50 ;; target window. 50 ;; target window.
51 51
52 ;; The `re-builder' keeps the focus while updating the matches in the 52 ;; The `re-builder' keeps the focus while updating the matches in the
53 ;; target buffer so corrections are easy to incorporate. If you are 53 ;; target buffer so corrections are easy to incorporate. If you are
227 227
228 (defconst reb-buffer "*RE-Builder*" 228 (defconst reb-buffer "*RE-Builder*"
229 "Buffer to use for the RE Builder.") 229 "Buffer to use for the RE Builder.")
230 230
231 ;; Define the local "\C-c" keymap 231 ;; Define the local "\C-c" keymap
232 (defvar reb-mode-map nil 232 (defvar reb-mode-map
233 (let ((map (make-sparse-keymap)))
234 (define-key map "\C-c\C-c" 'reb-toggle-case)
235 (define-key map "\C-c\C-q" 'reb-quit)
236 (define-key map "\C-c\C-w" 'reb-copy)
237 (define-key map "\C-c\C-s" 'reb-next-match)
238 (define-key map "\C-c\C-r" 'reb-prev-match)
239 (define-key map "\C-c\C-i" 'reb-change-syntax)
240 (define-key map "\C-c\C-e" 'reb-enter-subexp-mode)
241 (define-key map "\C-c\C-b" 'reb-change-target-buffer)
242 (define-key map "\C-c\C-u" 'reb-force-update)
243 map)
233 "Keymap used by the RE Builder.") 244 "Keymap used by the RE Builder.")
234
235 (if (not reb-mode-map)
236 (progn
237 (setq reb-mode-map (make-sparse-keymap))
238 (define-key reb-mode-map "\C-c\C-c" 'reb-toggle-case)
239 (define-key reb-mode-map "\C-c\C-q" 'reb-quit)
240 (define-key reb-mode-map "\C-c\C-w" 'reb-copy)
241 (define-key reb-mode-map "\C-c\C-s" 'reb-next-match)
242 (define-key reb-mode-map "\C-c\C-r" 'reb-prev-match)
243 (define-key reb-mode-map "\C-c\C-i" 'reb-change-syntax)
244 (define-key reb-mode-map "\C-c\C-e" 'reb-enter-subexp-mode)
245 (define-key reb-mode-map "\C-c\C-b" 'reb-change-target-buffer)
246 (define-key reb-mode-map "\C-c\C-u" 'reb-force-update)))
247 245
248 (defun reb-mode () 246 (defun reb-mode ()
249 "Major mode for interactively building Regular Expressions. 247 "Major mode for interactively building Regular Expressions.
250 \\{reb-mode-map}" 248 \\{reb-mode-map}"
251 (interactive) 249 (interactive)
365 (reb-do-update 363 (reb-do-update
366 (if reb-subexp-mode reb-subexp-displayed nil)) 364 (if reb-subexp-mode reb-subexp-displayed nil))
367 (reb-update-modestring)))) 365 (reb-update-modestring))))
368 366
369 (defun reb-force-update () 367 (defun reb-force-update ()
370 "Forces an update in the RE Builder target window without a match limit." 368 "Force an update in the RE Builder target window without a match limit."
371 (interactive) 369 (interactive)
372 370
373 (let ((reb-auto-match-limit nil)) 371 (let ((reb-auto-match-limit nil))
374 (reb-update-overlays 372 (reb-update-overlays
375 (if reb-subexp-mode reb-subexp-displayed nil)))) 373 (if reb-subexp-mode reb-subexp-displayed nil))))