Function: python-util-clone-local-variables

python-util-clone-local-variables is a byte-compiled function defined in python.el.gz.

Signature

(python-util-clone-local-variables FROM-BUFFER &optional REGEXP)

Documentation

Clone local variables from FROM-BUFFER.

Optional argument REGEXP selects variables to clone and defaults to "^python-".

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
;; Stolen from org-mode
(defun python-util-clone-local-variables (from-buffer &optional regexp)
  "Clone local variables from FROM-BUFFER.
Optional argument REGEXP selects variables to clone and defaults
to \"^python-\"."
  (mapc
   (lambda (pair)
     (and (symbolp (car pair))
          (string-match (or regexp "^python-")
                        (symbol-name (car pair)))
          (set (make-local-variable (car pair))
               (cdr pair))))
   (buffer-local-variables from-buffer)))