[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/re-builder.el
From: |
John Paul Wallington |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/re-builder.el |
Date: |
Sat, 07 Aug 2004 08:06:36 -0400 |
Index: emacs/lisp/emacs-lisp/re-builder.el
diff -c emacs/lisp/emacs-lisp/re-builder.el:1.16
emacs/lisp/emacs-lisp/re-builder.el:1.17
*** emacs/lisp/emacs-lisp/re-builder.el:1.16 Fri Jul 9 17:16:59 2004
--- emacs/lisp/emacs-lisp/re-builder.el Sat Aug 7 12:02:43 2004
***************
*** 135,140 ****
--- 135,141 ----
(const :tag "String syntax" string)
(const :tag "`sregex' syntax" sregex)
(const :tag "`lisp-re' syntax" lisp-re)
+ (const :tag "`rx' syntax" rx)
(value: string)))
(defcustom reb-auto-match-limit 200
***************
*** 261,267 ****
(cond ((eq reb-re-syntax 'lisp-re) ; Pull in packages
(require 'lisp-re)) ; as needed
((eq reb-re-syntax 'sregex) ; sregex is not autoloaded
! (require 'sregex))) ; right now..
(reb-mode-common))
;; Use the same "\C-c" keymap as `reb-mode' and use font-locking from
--- 262,270 ----
(cond ((eq reb-re-syntax 'lisp-re) ; Pull in packages
(require 'lisp-re)) ; as needed
((eq reb-re-syntax 'sregex) ; sregex is not autoloaded
! (require 'sregex)) ; right now..
! ((eq reb-re-syntax 'rx) ; rx-to-string is autoloaded
! (require 'rx))) ; require rx anyway
(reb-mode-common))
;; Use the same "\C-c" keymap as `reb-mode' and use font-locking from
***************
*** 320,326 ****
(defsubst reb-lisp-syntax-p ()
"Return non-nil if RE Builder uses a Lisp syntax."
! (memq reb-re-syntax '(lisp-re sregex)))
(defmacro reb-target-binding (symbol)
"Return binding for SYMBOL in the RE Builder target buffer."
--- 323,329 ----
(defsubst reb-lisp-syntax-p ()
"Return non-nil if RE Builder uses a Lisp syntax."
! (memq reb-re-syntax '(lisp-re sregex rx)))
(defmacro reb-target-binding (symbol)
"Return binding for SYMBOL in the RE Builder target buffer."
***************
*** 466,475 ****
(list (intern
(completing-read "Select syntax: "
(mapcar (lambda (el) (cons (symbol-name el) 1))
! '(read string lisp-re sregex))
nil t (symbol-name reb-re-syntax)))))
! (if (memq syntax '(read string lisp-re sregex))
(let ((buffer (get-buffer reb-buffer)))
(setq reb-re-syntax syntax)
(if buffer
--- 469,478 ----
(list (intern
(completing-read "Select syntax: "
(mapcar (lambda (el) (cons (symbol-name el) 1))
! '(read string lisp-re sregex rx))
nil t (symbol-name reb-re-syntax)))))
! (if (memq syntax '(read string lisp-re sregex rx))
(let ((buffer (get-buffer reb-buffer)))
(setq reb-re-syntax syntax)
(if buffer
***************
*** 604,609 ****
--- 607,614 ----
(lre-compile-string (eval (car (read-from-string re)))))
((eq reb-re-syntax 'sregex)
(apply 'sregex (eval (car (read-from-string re)))))
+ ((eq reb-re-syntax 'rx)
+ (rx-to-string (eval (car (read-from-string re)))))
(t re)))
(defun reb-update-regexp ()
***************
*** 670,676 ****
(overlay-put overlay 'priority i)))
(setq i (1+ i))))))
(let ((count (if subexp submatches matches)))
! (message"%s %smatch%s%s"
(if (= 0 count) "No" (int-to-string count))
(if subexp "subexpression " "")
(if (= 1 count) "" "es")
--- 675,681 ----
(overlay-put overlay 'priority i)))
(setq i (1+ i))))))
(let ((count (if subexp submatches matches)))
! (message "%s %smatch%s%s"
(if (= 0 count) "No" (int-to-string count))
(if subexp "subexpression " "")
(if (= 1 count) "" "es")
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/re-builder.el,
John Paul Wallington <=