]> code.delx.au - gnu-emacs/commitdiff
(reb-cook-regexp): Avoid warning calling lre-compile-string.
authorRichard M. Stallman <rms@gnu.org>
Sat, 16 Jul 2005 17:35:09 +0000 (17:35 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 16 Jul 2005 17:35:09 +0000 (17:35 +0000)
(reb-color-display-p): Avoid warning.

lisp/emacs-lisp/re-builder.el

index 67a682358f41551ce53d10266fd87a4c5a552cbf..9aab41f41dda3c8a41ecb71c568502f7f8752c28 100644 (file)
@@ -319,7 +319,8 @@ Except for Lisp syntax this is the same as `reb-regexp'.")
       ;; emacs/xemacs compatibility
       (if (fboundp 'frame-parameter)
          (frame-parameter (selected-frame) 'display-type)
-       (frame-property (selected-frame) 'display-type))))
+       (if (fboundp 'frame-property)
+           (frame-property (selected-frame) 'display-type)))))
 
 (defsubst reb-lisp-syntax-p ()
   "Return non-nil if RE Builder uses a Lisp syntax."
@@ -610,7 +611,8 @@ 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)
-        (lre-compile-string (eval (car (read-from-string re)))))
+        (if (fboundp 'lre-compile-string)
+            (lre-compile-string (eval (car (read-from-string re))))))
        ((eq reb-re-syntax 'sregex)
         (apply 'sregex (eval (car (read-from-string re)))))
        ((eq reb-re-syntax 'rx)