Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
128440c9
Commit
128440c9
authored
Jul 28, 2010
by
Aaron S. Hawley
Committed by
Juanma Barranquero
Jul 28, 2010
Browse files
* emacs-lisp/re-builder.el: Remove references to package `lisp-re' (bug#4369).
parent
ae0c2494
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
16 deletions
+15
-16
lisp/ChangeLog
lisp/ChangeLog
+6
-0
lisp/emacs-lisp/re-builder.el
lisp/emacs-lisp/re-builder.el
+9
-16
No files found.
lisp/ChangeLog
View file @
128440c9
2010-07-27 Aaron S. Hawley <ashawley@burlingtontelecom.net>
* emacs-lisp/re-builder.el (reb-re-syntax, reb-lisp-mode)
(reb-lisp-syntax-p, reb-change-syntax, reb-cook-regexp):
Remove references to package `lisp-re' (bug#4369).
2010-07-27 Tom Tromey <tromey@redhat.com>
* progmodes/js.el (js-mode):
...
...
lisp/emacs-lisp/re-builder.el
View file @
128440c9
...
...
@@ -61,14 +61,12 @@
;; this limit allowing an easy way to see all matches.
;; Currently `re-builder' understands five different forms of input,
;; namely `read', `string', `rx', `sregex
' and `lisp-re
' syntax. Read
;; namely `read', `string', `rx',
and
`sregex' syntax. Read
;; syntax and string syntax are both delimited by `"'s and behave
;; according to their name. With the `string' syntax there's no need
;; to escape the backslashes and double quotes simplifying the editing
;; somewhat. The other three allow editing of symbolic regular
;; expressions supported by the packages of the same name. (`lisp-re'
;; is a package by me and its support may go away as it is nearly the
;; same as the `sregex' package in Emacs)
;; expressions supported by the packages of the same name.
;; Editing symbolic expressions is done through a major mode derived
;; from `emacs-lisp-mode' so you'll get all the good stuff like
...
...
@@ -128,12 +126,11 @@
(
defcustom
reb-re-syntax
'read
"Syntax for the REs in the RE Builder.
Can either be `read', `string', `sregex',
`lisp-re',
`rx'."
Can either be `read', `string', `sregex',
or
`rx'."
:group
're-builder
:type
'
(
choice
(
const
:tag
"Read syntax"
read
)
(
const
:tag
"String syntax"
string
)
(
const
:tag
"`sregex' syntax"
sregex
)
(
const
:tag
"`lisp-re' syntax"
lisp-re
)
(
const
:tag
"`rx' syntax"
rx
)))
(
defcustom
reb-auto-match-limit
200
...
...
@@ -281,9 +278,8 @@ Except for Lisp syntax this is the same as `reb-regexp'.")
(
define-derived-mode
reb-lisp-mode
emacs-lisp-mode
"RE Builder Lisp"
"Major mode for interactively building symbolic Regular Expressions."
(
cond
((
eq
reb-re-syntax
'lisp-re
)
; Pull in packages
(
require
'lisp-re
))
; as needed
((
eq
reb-re-syntax
'sregex
)
; sregex is not autoloaded
;; Pull in packages as needed
(
cond
((
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
...
...
@@ -329,7 +325,7 @@ Except for Lisp syntax this is the same as `reb-regexp'.")
(
defsubst
reb-lisp-syntax-p
()
"Return non-nil if RE Builder uses a Lisp syntax."
(
memq
reb-re-syntax
'
(
lisp-re
sregex
rx
)))
(
memq
reb-re-syntax
'
(
sregex
rx
)))
(
defmacro
reb-target-binding
(
symbol
)
"Return binding for SYMBOL in the RE Builder target buffer."
...
...
@@ -489,10 +485,10 @@ Optional argument SYNTAX must be specified if called non-interactively."
(
list
(
intern
(
completing-read
"Select syntax: "
(
mapcar
(
lambda
(
el
)
(
cons
(
symbol-name
el
)
1
))
'
(
read
string
lisp-re
sregex
rx
))
'
(
read
string
sregex
rx
))
nil
t
(
symbol-name
reb-re-syntax
)))))
(
if
(
memq
syntax
'
(
read
string
lisp-re
sregex
rx
))
(
if
(
memq
syntax
'
(
read
string
sregex
rx
))
(
let
((
buffer
(
get-buffer
reb-buffer
)))
(
setq
reb-re-syntax
syntax
)
(
when
buffer
...
...
@@ -616,10 +612,7 @@ optional fourth argument FORCE is non-nil."
(
defun
reb-cook-regexp
(
re
)
"Return RE after processing it according to `reb-re-syntax'."
(
cond
((
eq
reb-re-syntax
'lisp-re
)
(
when
(
fboundp
'lre-compile-string
)
(
lre-compile-string
(
eval
(
car
(
read-from-string
re
))))))
((
eq
reb-re-syntax
'sregex
)
(
cond
((
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
)))))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment