Thierry Volpiatto <[email protected]> writes: > Also, to avoid repetition, what about somthing like that: > > #+BEGIN_SRC lisp > (defun tramp-parse-sfile (filename function) > "Return a list of (user host) tuples allowed to access. > User is always nil." > ;; On Windows, there are problems in completion when > ;; `default-directory' is remote. > (let ((default-directory (tramp-compat-temporary-file-directory)) > res) > (when (file-readable-p filename) > (with-temp-buffer > (insert-file-contents filename) > (goto-char (point-min)) > (while (not (eobp)) > (push (funcall function) res)))) > res)) > > (defun tramp-parse-shosts (filename) > "Return a list of (user host) tuples allowed to access. > User is always nil." > (tramp-parse-sfile filename 'tramp-parse-shosts-group)) > > (defun tramp-parse-sconfig (filename) > "Return a list of (user host) tuples allowed to access. > User is always nil." > (tramp-parse-sfile filename 'tramp-parse-sconfig-group)) > > #+END_SRC
Good idea. I will check, which functions coujld be merged; likely more than only tramp-parse-shosts and tramp-parse-sconfig. Best regards, Michael. _______________________________________________ Tramp-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/tramp-devel
