# HG changeset patch # User Oleksandr Gavenko # Date 1490817396 -10800 # Node ID ad7b40d1f520c2b9bc944f2b50da0212d8d46644 # Parent a28c181c1412256d52b303d9c7945202d6c95129 Private functions use '/' delimiter, public as usual '-' delimiter. diff -r a28c181c1412 -r ad7b40d1f520 pypi.el --- a/pypi.el Wed Mar 29 22:52:52 2017 +0300 +++ b/pypi.el Wed Mar 29 22:56:36 2017 +0300 @@ -11,17 +11,17 @@ ;;; Code: -(defvar pypi.buffer-name "*Pip*") +(defvar pypi/buffer-name "*Pip*") -(defvar pypi.pkg-history nil) +(defvar pypi/pkg-history nil) -(defvar pypi.url "https://pypi.python.org/pypi/%s/json") +(defvar pypi/url "https://pypi.python.org/pypi/%s/json") -(defun pypi.pkg-callback (status) +(defun pypi/pkg-callback (status) (let ( (buffer (current-buffer)) content-type status ) (setq content-type (mail-fetch-field "Content-Type")) (setq status url-http-response-status) - (switch-to-buffer pypi.buffer-name) + (switch-to-buffer pypi/buffer-name) (erase-buffer) (url-insert buffer) (fundamental-mode) @@ -29,12 +29,12 @@ (js-mode)))) ;;;###autoload -(defun pypi.pkg (pkg) +(defun pypi-pkg (pkg) (interactive (list (read-string "Python package: " (if (region-active-p) (buffer-substring (mark) (point)) (thing-at-point 'symbol)) - 'pypi.pkg-history))) - (url-retrieve (format pypi.url pkg) #'pypi.pkg-callback)) + 'pypi/pkg-history))) + (url-retrieve (format pypi/url pkg) #'pypi/pkg-callback)) (provide 'pypi)