aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron S. Hawley2010-07-28 01:38:46 +0200
committerJuanma Barranquero2010-07-28 01:38:46 +0200
commit128440c97f540ae93a6579985292425d5f8a1cea (patch)
tree36228f2101d797d5c9a57c8b2d7ee99d37ce7ae5
parentae0c249465611c8022c5549a2a3e322b14df3f42 (diff)
downloademacs-128440c97f540ae93a6579985292425d5f8a1cea.tar.gz
emacs-128440c97f540ae93a6579985292425d5f8a1cea.zip
* emacs-lisp/re-builder.el: Remove references to package `lisp-re' (bug#4369).
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/emacs-lisp/re-builder.el25
2 files changed, 15 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index dd3911f61f4..c8fb46acf4e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12010-07-27 Aaron S. Hawley <ashawley@burlingtontelecom.net>
2
3 * emacs-lisp/re-builder.el (reb-re-syntax, reb-lisp-mode)
4 (reb-lisp-syntax-p, reb-change-syntax, reb-cook-regexp):
5 Remove references to package `lisp-re' (bug#4369).
6
12010-07-27 Tom Tromey <tromey@redhat.com> 72010-07-27 Tom Tromey <tromey@redhat.com>
2 8
3 * progmodes/js.el (js-mode): 9 * progmodes/js.el (js-mode):
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index ec1a704ce0b..1845effd5bb 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -61,14 +61,12 @@
61;; this limit allowing an easy way to see all matches. 61;; this limit allowing an easy way to see all matches.
62 62
63;; Currently `re-builder' understands five different forms of input, 63;; Currently `re-builder' understands five different forms of input,
64;; namely `read', `string', `rx', `sregex' and `lisp-re' syntax. Read 64;; namely `read', `string', `rx', and `sregex' syntax. Read
65;; syntax and string syntax are both delimited by `"'s and behave 65;; syntax and string syntax are both delimited by `"'s and behave
66;; according to their name. With the `string' syntax there's no need 66;; according to their name. With the `string' syntax there's no need
67;; to escape the backslashes and double quotes simplifying the editing 67;; to escape the backslashes and double quotes simplifying the editing
68;; somewhat. The other three allow editing of symbolic regular 68;; somewhat. The other three allow editing of symbolic regular
69;; expressions supported by the packages of the same name. (`lisp-re' 69;; expressions supported by the packages of the same name.
70;; is a package by me and its support may go away as it is nearly the
71;; same as the `sregex' package in Emacs)
72 70
73;; Editing symbolic expressions is done through a major mode derived 71;; Editing symbolic expressions is done through a major mode derived
74;; from `emacs-lisp-mode' so you'll get all the good stuff like 72;; from `emacs-lisp-mode' so you'll get all the good stuff like
@@ -128,12 +126,11 @@
128 126
129(defcustom reb-re-syntax 'read 127(defcustom reb-re-syntax 'read
130 "Syntax for the REs in the RE Builder. 128 "Syntax for the REs in the RE Builder.
131Can either be `read', `string', `sregex', `lisp-re', `rx'." 129Can either be `read', `string', `sregex', or `rx'."
132 :group 're-builder 130 :group 're-builder
133 :type '(choice (const :tag "Read syntax" read) 131 :type '(choice (const :tag "Read syntax" read)
134 (const :tag "String syntax" string) 132 (const :tag "String syntax" string)
135 (const :tag "`sregex' syntax" sregex) 133 (const :tag "`sregex' syntax" sregex)
136 (const :tag "`lisp-re' syntax" lisp-re)
137 (const :tag "`rx' syntax" rx))) 134 (const :tag "`rx' syntax" rx)))
138 135
139(defcustom reb-auto-match-limit 200 136(defcustom reb-auto-match-limit 200
@@ -281,9 +278,8 @@ Except for Lisp syntax this is the same as `reb-regexp'.")
281(define-derived-mode reb-lisp-mode 278(define-derived-mode reb-lisp-mode
282 emacs-lisp-mode "RE Builder Lisp" 279 emacs-lisp-mode "RE Builder Lisp"
283 "Major mode for interactively building symbolic Regular Expressions." 280 "Major mode for interactively building symbolic Regular Expressions."
284 (cond ((eq reb-re-syntax 'lisp-re) ; Pull in packages 281 ;; Pull in packages as needed
285 (require 'lisp-re)) ; as needed 282 (cond ((eq reb-re-syntax 'sregex) ; sregex is not autoloaded
286 ((eq reb-re-syntax 'sregex) ; sregex is not autoloaded
287 (require 'sregex)) ; right now.. 283 (require 'sregex)) ; right now..
288 ((eq reb-re-syntax 'rx) ; rx-to-string is autoloaded 284 ((eq reb-re-syntax 'rx) ; rx-to-string is autoloaded
289 (require 'rx))) ; require rx anyway 285 (require 'rx))) ; require rx anyway
@@ -329,7 +325,7 @@ Except for Lisp syntax this is the same as `reb-regexp'.")
329 325
330(defsubst reb-lisp-syntax-p () 326(defsubst reb-lisp-syntax-p ()
331 "Return non-nil if RE Builder uses a Lisp syntax." 327 "Return non-nil if RE Builder uses a Lisp syntax."
332 (memq reb-re-syntax '(lisp-re sregex rx))) 328 (memq reb-re-syntax '(sregex rx)))
333 329
334(defmacro reb-target-binding (symbol) 330(defmacro reb-target-binding (symbol)
335 "Return binding for SYMBOL in the RE Builder target buffer." 331 "Return binding for SYMBOL in the RE Builder target buffer."
@@ -489,10 +485,10 @@ Optional argument SYNTAX must be specified if called non-interactively."
489 (list (intern 485 (list (intern
490 (completing-read "Select syntax: " 486 (completing-read "Select syntax: "
491 (mapcar (lambda (el) (cons (symbol-name el) 1)) 487 (mapcar (lambda (el) (cons (symbol-name el) 1))
492 '(read string lisp-re sregex rx)) 488 '(read string sregex rx))
493 nil t (symbol-name reb-re-syntax))))) 489 nil t (symbol-name reb-re-syntax)))))
494 490
495 (if (memq syntax '(read string lisp-re sregex rx)) 491 (if (memq syntax '(read string sregex rx))
496 (let ((buffer (get-buffer reb-buffer))) 492 (let ((buffer (get-buffer reb-buffer)))
497 (setq reb-re-syntax syntax) 493 (setq reb-re-syntax syntax)
498 (when buffer 494 (when buffer
@@ -616,10 +612,7 @@ optional fourth argument FORCE is non-nil."
616 612
617(defun reb-cook-regexp (re) 613(defun reb-cook-regexp (re)
618 "Return RE after processing it according to `reb-re-syntax'." 614 "Return RE after processing it according to `reb-re-syntax'."
619 (cond ((eq reb-re-syntax 'lisp-re) 615 (cond ((eq reb-re-syntax 'sregex)
620 (when (fboundp 'lre-compile-string)
621 (lre-compile-string (eval (car (read-from-string re))))))
622 ((eq reb-re-syntax 'sregex)
623 (apply 'sregex (eval (car (read-from-string re))))) 616 (apply 'sregex (eval (car (read-from-string re)))))
624 ((eq reb-re-syntax 'rx) 617 ((eq reb-re-syntax 'rx)
625 (rx-to-string (eval (car (read-from-string re))))) 618 (rx-to-string (eval (car (read-from-string re)))))