X-Git-Url: https://cgit.sxemacs.org/?p=riece;a=blobdiff_plain;f=lisp%2Friece-compat.el;h=2bc6469bd3425dc5c82e1f2cd678eceef6cd73aa;hp=bcc82ac326ee1a19bd03e4f204658ce6b93bad65;hb=8219491a71b09f19b75e3c569c98ef20300d1269;hpb=fe7ce5e9a344721b1ecdd4d9ec1adce5dc908a49 diff --git a/lisp/riece-compat.el b/lisp/riece-compat.el index bcc82ac..2bc6469 100644 --- a/lisp/riece-compat.el +++ b/lisp/riece-compat.el @@ -24,6 +24,10 @@ ;;; Code: +(if (featurep 'xemacs) + (require 'riece-xemacs) + (require 'riece-emacs)) + (defalias 'riece-mode-line-buffer-identification 'identity) @@ -55,6 +59,19 @@ (setq riece-read-passwd 'ange-ftp-read-passwd)))) (funcall riece-read-passwd prompt)) +(if (string-match "0\\{0\\}" "") + (defun riece-make-interval-regexp (regexp min &optional max) + (if max + (format "%s\\{%d,%d\\}" regexp min max) + (format "%s\\{%d\\}" regexp min))) + ;; Emacs 20.7 doesn't support \{...\} in regexps. + (defun riece-make-interval-regexp (regexp min &optional max) + (mapconcat #'identity + (nconc (make-list min regexp) + (if max + (make-list (- max min) (concat regexp "?")))) + ""))) + (provide 'riece-compat) ;;; riece-compat.el ends here