Function: shadow-define-regexp-group

shadow-define-regexp-group is an autoloaded, interactive and byte-compiled function defined in shadowfile.el.gz.

Signature

(shadow-define-regexp-group)

Documentation

Make each of a group of files be shared between hosts.

Prompts for regular expression; files matching this are shared between a list of sites, which are also prompted for. The filenames must be identical on all hosts (if they aren't, use shadow-define-literal-group instead of this function). Each site can be either a hostname or the name of a cluster (see shadow-define-cluster).

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/shadowfile.el.gz
;;;###autoload
(defun shadow-define-regexp-group ()
  "Make each of a group of files be shared between hosts.
Prompts for regular expression; files matching this are shared between a list
of sites, which are also prompted for.  The filenames must be identical on all
hosts (if they aren't, use `shadow-define-literal-group' instead of this
function).  Each site can be either a hostname or the name of a cluster (see
`shadow-define-cluster')."
  (interactive)
  (let ((regexp (read-string
		 "Filename regexp: "
		 (if (buffer-file-name)
		     (shadow-regexp-superquote
                      (file-local-name (buffer-file-name))))))
	site sites)
    (while (setq site (shadow-read-site))
      (setq sites (cons site sites)))
    (setq shadow-regexp-groups
	  (cons (shadow-make-group regexp sites)
		shadow-regexp-groups))
    (shadow-write-info-file)))