summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/km-python.el60
1 files changed, 0 insertions, 60 deletions
diff --git a/lisp/km-python.el b/lisp/km-python.el
index 5f50131..339e8be 100644
--- a/lisp/km-python.el
+++ b/lisp/km-python.el
@@ -203,65 +203,5 @@ being turned on."
(when (< (current-indentation) indentation)
(indent-line-to indentation))))))
-
-;;; Pydoc
-
-(require 'pydoc)
-
-(defvar km/pydoc-names nil
- "List of names that have been sucessfully loaded by `pydoc'.")
-
-(defvar km/pydoc-names-file "~/.emacs.d/.pydoc-names"
- "File to save `km/pydoc-names' to.")
-
-;;;###autoload
-(defun km/pydoc ()
- "Run `pydoc', prompting with `km/pydoc-names'."
- (interactive)
- (let* ((default-directory "~/")
- (initial-name (and (use-region-p)
- (buffer-substring-no-properties
- (region-beginning)
- (region-end))))
- (name (completing-read "Name: " km/pydoc-names nil nil
- initial-name)))
- (pydoc name)))
-
-(defun km/pydoc-store-name ()
- "Store the name for the current pydoc object."
- (with-current-buffer (pydoc-buffer)
- (unless (eq (plist-get pydoc-info :type) 'not-found)
- (cl-pushnew (substring-no-properties (car (cdr help-xref-stack-item)))
- km/pydoc-names
- :test #'string=))))
-
-(defun km/pydoc-save-names-file (&optional file)
- "Save `km/pydoc-names' to FILE.
-FILE is `km/pydoc-names-file' by default."
- (interactive
- (list
- (read-file-name (format "Save file (default %s): "
- km/pydoc-names-file)
- nil km/pydoc-names-file t)))
- (setq file (or file km/pydoc-names-file))
- (when (file-writable-p file)
- (with-temp-file file
- (let (print-length)
- (print (sort km/pydoc-names #'string-lessp)
- (current-buffer))))))
-
-;;;###autoload
-(defun km/pydoc-read-names-file (&optional file)
- "Read `km/pydoc-names-file' from FILE.
-FILE is `km/pydoc-names-file' by default."
- (interactive
- (list
- (read-file-name (format "Read file (default %s): "
- km/pydoc-names-file)
- nil km/pydoc-names-file t)))
- (with-temp-buffer
- (insert-file-contents (or file km/pydoc-names-file))
- (setq km/pydoc-names (read (current-buffer)))))
-
(provide 'km-python)
;;; km-python.el ends here