Function: rst-compile-find-conf
rst-compile-find-conf is an interactive and byte-compiled function
defined in rst.el.gz.
Signature
(rst-compile-find-conf)
Documentation
Look for the configuration file in the parents of the current path.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/rst.el.gz
(defun rst-compile-find-conf ()
"Look for the configuration file in the parents of the current path."
(interactive)
(let ((file-name "docutils.conf")
(buffer-file (buffer-file-name)))
;; Move up in the dir hierarchy till we find a change log file.
(let* ((dir (file-name-directory buffer-file))
(prevdir nil))
(while (and (or (not (string= dir prevdir))
(setq dir nil)
nil)
(not (file-exists-p (concat dir file-name))))
;; Move up to the parent dir and try again.
(setq prevdir dir)
(setq dir (expand-file-name (file-name-directory
(directory-file-name
(file-name-directory dir))))))
(or (and dir (concat dir file-name)) nil))))