Function: pcomplete-read-hosts

pcomplete-read-hosts is a byte-compiled function defined in pcomplete.el.gz.

Signature

(pcomplete-read-hosts FILE RESULT-VAR TIMESTAMP-VAR)

Documentation

Read the contents of /etc/hosts for host names.

Aliases

eshell-read-hosts (obsolete since 28.1)

Source Code

;; Defined in /usr/src/emacs/lisp/pcomplete.el.gz
(defun pcomplete-read-hosts (file result-var timestamp-var)
  "Read the contents of /etc/hosts for host names."
  (if (or (not (symbol-value result-var))
          (not (symbol-value timestamp-var))
          (time-less-p
           (symbol-value timestamp-var)
           (file-attribute-modification-time (file-attributes file))))
      (progn
        (set result-var (apply #'nconc (pcomplete-read-hosts-file file)))
        (set timestamp-var (current-time))))
  (symbol-value result-var))