summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/rx.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el
index d7677f14443..52a35ffa2a7 100644
--- a/lisp/emacs-lisp/rx.el
+++ b/lisp/emacs-lisp/rx.el
@@ -477,6 +477,9 @@ If NEGATED, negate the sense (thus making it positive)."
((eq arg 'word-boundary)
(rx--translate-symbol
(if negated 'word-boundary 'not-word-boundary)))
+ ((let ((expanded (rx--expand-def arg)))
+ (and expanded
+ (rx--translate-not negated (list expanded)))))
(t (error "Illegal argument to rx `not': %S" arg)))))
(defun rx--atomic-regexp (item)