Function: prolog-variables-to-anonymous

prolog-variables-to-anonymous is an interactive and byte-compiled function defined in prolog.el.gz.

Signature

(prolog-variables-to-anonymous BEG END)

Documentation

Replace all variables within a region BEG to END by anonymous variables.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/prolog.el.gz
(defun prolog-variables-to-anonymous (beg end)
  "Replace all variables within a region BEG to END by anonymous variables."
  (interactive "r")
  (save-excursion
    (let ((case-fold-search nil))
      (goto-char end)
      (while (re-search-backward "\\<[A-Z_][a-zA-Z_0-9]*\\>" beg t)
        (progn
          (replace-match "_")
          (backward-char)))
      )))