; Minor cleanup in re-builder after my last commit

* lisp/emacs-lisp/re-builder.el (reb-lisp-mode, reb-cook-regexp):
Very minor cleanup (by popular demand).
This commit is contained in:
Stefan Kangas 2021-12-03 17:18:33 +01:00
parent ddc875d9f7
commit 20124d78e7

View file

@ -274,8 +274,8 @@ Except for Lisp syntax this is the same as `reb-regexp'.")
emacs-lisp-mode "RE Builder Lisp"
"Major mode for interactively building symbolic Regular Expressions."
;; Pull in packages as needed
(cond ((eq reb-re-syntax 'rx) ; rx-to-string is autoloaded
(require 'rx))) ; require rx anyway
(when (eq reb-re-syntax 'rx) ; rx-to-string is autoloaded
(require 'rx)) ; require rx anyway
(reb-mode-common))
(defvar reb-subexp-mode-map
@ -606,9 +606,9 @@ 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 'rx)
(rx-to-string (eval (car (read-from-string re)))))
(t re)))
(if (eq reb-re-syntax 'rx)
(rx-to-string (eval (car (read-from-string re))))
re))
(defun reb-update-regexp ()
"Update the regexp for the target buffer.