diff options
| author | Eli Zaretskii | 2006-03-03 12:20:26 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2006-03-03 12:20:26 +0000 |
| commit | a6966c1ce7007f8c18545ddc256f40c09fa0808d (patch) | |
| tree | 98b0142f4358ef35dc1f95474e63feea61dab962 | |
| parent | ddb72af931020f643a7f0afff66e0eb80b4072ff (diff) | |
| download | emacs-a6966c1ce7007f8c18545ddc256f40c09fa0808d.tar.gz emacs-a6966c1ce7007f8c18545ddc256f40c09fa0808d.zip | |
(rx-check-any, rx-check-not): Quote "]"s in regexps when they have no
special meaning.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/rx.el | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 207c6c89ce8..88bcf6f98c1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2006-03-03 Martin Rudalics <rudalics@gmx.at> | 1 | 2006-03-03 Martin Rudalics <rudalics@gmx.at> |
| 2 | 2 | ||
| 3 | * font-lock.el (lisp-font-lock-keywords-2) | ||
| 4 | * emacs-lisp/rx.el (rx-check-any, rx-check-not) | ||
| 5 | * generic-x.el (reg-generic-mode): Quote "]"s in regexps when | ||
| 6 | they have no special meaning. | ||
| 7 | |||
| 3 | * midnight.el (clean-buffer-list): Handle case where base-buffer of | 8 | * midnight.el (clean-buffer-list): Handle case where base-buffer of |
| 4 | indirect buffer gets killed before indirect buffer. Use dolist. | 9 | indirect buffer gets killed before indirect buffer. Use dolist. |
| 5 | 10 | ||
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index 763aa97f214..694544e3c52 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el | |||
| @@ -372,8 +372,8 @@ FORM is of the form `(and FORM1 ...)'." | |||
| 372 | (if (eq ?^ (aref arg 0)) | 372 | (if (eq ?^ (aref arg 0)) |
| 373 | (setq arg (concat "\\" arg))) | 373 | (setq arg (concat "\\" arg))) |
| 374 | ;; Remove ] and set flag for adding it to start of overall result. | 374 | ;; Remove ] and set flag for adding it to start of overall result. |
| 375 | (when (string-match "]" arg) | 375 | (when (string-match "\\]" arg) |
| 376 | (setq arg (replace-regexp-in-string "]" "" arg) | 376 | (setq arg (replace-regexp-in-string "\\]" "" arg) |
| 377 | rx-bracket "]"))) | 377 | rx-bracket "]"))) |
| 378 | (when (symbolp arg) | 378 | (when (symbolp arg) |
| 379 | (let ((translation (condition-case nil | 379 | (let ((translation (condition-case nil |
| @@ -405,7 +405,7 @@ ARG is optional." | |||
| 405 | (defun rx-check-not (arg) | 405 | (defun rx-check-not (arg) |
| 406 | "Check arg ARG for Rx `not'." | 406 | "Check arg ARG for Rx `not'." |
| 407 | (unless (or (and (symbolp arg) | 407 | (unless (or (and (symbolp arg) |
| 408 | (string-match "\\`\\[\\[:[-a-z]:]]\\'" | 408 | (string-match "\\`\\[\\[:[-a-z]:\\]\\]\\'" |
| 409 | (condition-case nil | 409 | (condition-case nil |
| 410 | (rx-to-string arg 'no-group) | 410 | (rx-to-string arg 'no-group) |
| 411 | (error "")))) | 411 | (error "")))) |