Private functions use '/' delimiter, public as usual '-' delimiter.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Wed, 29 Mar 2017 22:56:36 +0300
changeset 1516 ad7b40d1f520
parent 1515 a28c181c1412
child 1517 29677daeb8ab
Private functions use '/' delimiter, public as usual '-' delimiter.
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)