tex-append

tex-append is a compiled Lisp function in `tex-mode.el'.

(tex-append FILE-NAME SUFFIX)

Append to FILENAME the suffix SUFFIX, using same algorithm TeX uses.
Pascal-based TeX scans for the first period, C TeX uses the last.
No period is retained immediately before SUFFIX,
so normally SUFFIX starts with one.