Function: prolog-electric--underscore
prolog-electric--underscore is a byte-compiled function defined in
prolog.el.gz.
Signature
(prolog-electric--underscore)
Documentation
Replace variable with an underscore.
If prolog-electric-underscore-flag is non-nil and the point is
on a variable then replace the variable with underscore and skip
the following comma and whitespace, if any.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/prolog.el.gz
(defun prolog-electric--underscore ()
"Replace variable with an underscore.
If `prolog-electric-underscore-flag' is non-nil and the point is
on a variable then replace the variable with underscore and skip
the following comma and whitespace, if any."
(when prolog-electric-underscore-flag
(let ((case-fold-search nil))
(when (and (not (nth 8 (syntax-ppss)))
(eq (char-before) ?_)
(save-excursion
(skip-chars-backward "[:alpha:]_")
(looking-at "\\_<[_[:upper:]][[:alnum:]_]*\\_>")))
(replace-match "_")
(skip-chars-forward ", \t\n")))))