#!/usr/bin/python

import re, os

def get_password_emacs(machine, login, port):
    s = "machine %s login %s port %s password ([^ ]*)\n" % (machine, login, port)
    p = re.compile(s)
    authinfo = os.popen("gpg -q -d ~/.authinfo.gpg").read()
    return p.search(authinfo).group(1)

@@ -73,16 +73,183 @@
  port):%0A
+    %22%22%22Return password for the given machine/login/port.%0A%0A    Your .authinfo.gpg file had better follow the following order, or%0A    you will not get a result.%0A    %22%22%22%0A
     s = 

Add a comment for the get_password_emacs function