summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/re-builder.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/re-builder.el')
-rw-r--r--lisp/emacs-lisp/re-builder.el20
1 files changed, 8 insertions, 12 deletions
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index 86215f6519c..ce8d98df807 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -96,7 +96,7 @@
;; out.
;; Q: But how can I then make out the sub-expressions?
-;; A: Thats where the `sub-expression mode' comes in. In it only the
+;; A: That's where the `sub-expression mode' comes in. In it only the
;; digit keys are assigned to perform an update that will flash the
;; corresponding subexp only.
@@ -187,14 +187,14 @@ Set it to nil if you don't want limits here."
(defvar reb-target-window nil
"Window to which the RE is applied to.")
-(defvar reb-regexp nil
+(defvar-local reb-regexp nil
"Last regexp used by RE Builder.")
-(defvar reb-regexp-src nil
+(defvar-local reb-regexp-src nil
"Last regexp used by RE Builder before processing it.
Except for Lisp syntax this is the same as `reb-regexp'.")
-(defvar reb-overlays nil
+(defvar-local reb-overlays nil
"List of overlays of the RE Builder.")
(defvar reb-window-config nil
@@ -212,10 +212,6 @@ Except for Lisp syntax this is the same as `reb-regexp'.")
(defvar reb-valid-string ""
"String in mode line showing validity of RE.")
-(make-variable-buffer-local 'reb-overlays)
-(make-variable-buffer-local 'reb-regexp)
-(make-variable-buffer-local 'reb-regexp-src)
-
(defconst reb-buffer "*RE-Builder*"
"Buffer to use for the RE Builder.")
@@ -271,7 +267,7 @@ Except for Lisp syntax this is the same as `reb-regexp'.")
(define-derived-mode reb-mode nil "RE Builder"
"Major mode for interactively building Regular Expressions."
- (set (make-local-variable 'blink-matching-paren) nil)
+ (setq-local blink-matching-paren nil)
(reb-mode-common))
(defvar reb-lisp-mode-map
@@ -489,7 +485,7 @@ Optional argument SYNTAX must be specified if called non-interactively."
(interactive
(list (intern
(completing-read
- (format "Select syntax (default %s): " reb-re-syntax)
+ (format-prompt "Select syntax" reb-re-syntax)
'(read string sregex rx)
nil t nil nil (symbol-name reb-re-syntax)
'reb-change-syntax-hist))))
@@ -832,8 +828,8 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions."
(let ((font-lock-is-on font-lock-mode))
(font-lock-mode -1)
(kill-local-variable 'font-lock-set-defaults)
- ;;(set (make-local-variable 'reb-re-syntax) 'string)
- ;;(set (make-local-variable 'reb-re-syntax) 'rx)
+ ;;(setq-local reb-re-syntax 'string)
+ ;;(setq-local reb-re-syntax 'rx)
(setq font-lock-defaults
(cond
((memq reb-re-syntax '(read string))