aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorFabián Ezequiel Gallina2012-05-17 00:03:16 -0300
committerFabián Ezequiel Gallina2012-05-17 00:03:16 -0300
commit4cafacb52a62b81ea1396e540ead833c81ac20a4 (patch)
tree875a6a56085be669146e5f199570221554f7d215 /lisp/progmodes/python.el
parent107c2439fa1e48afebe20ed96fc5998011e07484 (diff)
downloademacs-4cafacb52a62b81ea1396e540ead833c81ac20a4.tar.gz
emacs-4cafacb52a62b81ea1396e540ead833c81ac20a4.zip
docstring enhancements
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el27
1 files changed, 16 insertions, 11 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 075aac4c0f5..66da1a1388b 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -46,7 +46,12 @@
46;; causes the current line to be dedented automatically if needed. 46;; causes the current line to be dedented automatically if needed.
47 47
48;; Movement: `beginning-of-defun' and `end-of-defun' functions are 48;; Movement: `beginning-of-defun' and `end-of-defun' functions are
49;; properly implemented. 49;; properly implemented. Also there are specialized
50;; `forward-sentence' and `backward-sentence' replacements
51;; (`python-nav-forward-sentence', `python-nav-backward-sentence'
52;; respectively). Extra functions `python-nav-sentence-start' and
53;; `python-nav-sentence-end' are included to move to the beginning and
54;; to the end of a setence while taking care of multiline definitions.
50 55
51;; Shell interaction: is provided and allows you easily execute any 56;; Shell interaction: is provided and allows you easily execute any
52;; block of code of your current buffer in an inferior Python process. 57;; block of code of your current buffer in an inferior Python process.
@@ -57,7 +62,7 @@
57;; IPython) it should be easy to integrate another way to calculate 62;; IPython) it should be easy to integrate another way to calculate
58;; completions. You just need to specify your custom 63;; completions. You just need to specify your custom
59;; `python-shell-completion-setup-code' and 64;; `python-shell-completion-setup-code' and
60;; `python-shell-completion-string-code' 65;; `python-shell-completion-string-code'.
61 66
62;; Here is a complete example of the settings you would use for 67;; Here is a complete example of the settings you would use for
63;; iPython 68;; iPython
@@ -124,8 +129,8 @@
124;; might guessed you should run `python-shell-send-buffer' from time 129;; might guessed you should run `python-shell-send-buffer' from time
125;; to time to get better results too. 130;; to time to get better results too.
126 131
127;; imenu: This mode supports imenu. It builds a plain or tree menu 132;; imenu: This mode supports imenu. It builds a plain or tree menu
128;; depending on the value of `python-imenu-make-tree'. Also you can 133;; depending on the value of `python-imenu-make-tree'. Also you can
129;; customize if menu items should include its type using 134;; customize if menu items should include its type using
130;; `python-imenu-include-defun-type'. 135;; `python-imenu-include-defun-type'.
131 136
@@ -291,7 +296,7 @@
291 "Additional Python specific sexps for `python-rx'")) 296 "Additional Python specific sexps for `python-rx'"))
292 297
293(defmacro python-rx (&rest regexps) 298(defmacro python-rx (&rest regexps)
294 "Python mode especialized rx macro which supports common python named REGEXPS." 299 "Python mode specialized rx macro which supports common python named REGEXPS."
295 (let ((rx-constituents (append python-rx-constituents rx-constituents))) 300 (let ((rx-constituents (append python-rx-constituents rx-constituents)))
296 (cond ((null regexps) 301 (cond ((null regexps)
297 (error "No regexp")) 302 (error "No regexp"))
@@ -993,14 +998,14 @@ Returns nil if point is not in a def or class."
993 (forward-line 1))))) 998 (forward-line 1)))))
994 999
995(defun python-nav-backward-sentence (&optional arg) 1000(defun python-nav-backward-sentence (&optional arg)
996 "Move backward to start of sentence. With arg, do it arg times. 1001 "Move backward to start of sentence. With ARG, do it arg times.
997See `python-nav-forward-sentence' for more information." 1002See `python-nav-forward-sentence' for more information."
998 (interactive "^p") 1003 (interactive "^p")
999 (or arg (setq arg 1)) 1004 (or arg (setq arg 1))
1000 (python-nav-forward-sentence (- arg))) 1005 (python-nav-forward-sentence (- arg)))
1001 1006
1002(defun python-nav-forward-sentence (&optional arg) 1007(defun python-nav-forward-sentence (&optional arg)
1003 "Move forward to next end of sentence. With argument, repeat. 1008 "Move forward to next end of sentence. With ARG, repeat.
1004With negative argument, move backward repeatedly to start of sentence." 1009With negative argument, move backward repeatedly to start of sentence."
1005 (interactive "^p") 1010 (interactive "^p")
1006 (or arg (setq arg 1)) 1011 (or arg (setq arg 1))
@@ -2261,10 +2266,10 @@ character address of the specified TYPE."
2261 2266
2262;; Stolen from GNUS 2267;; Stolen from GNUS
2263(defun python-util-merge (type list1 list2 pred) 2268(defun python-util-merge (type list1 list2 pred)
2264 "Destructively merge lists LIST1 and LIST2 to produce a new list. 2269 "Destructively merge lists to produce a new one.
2265Argument TYPE is for compatibility and ignored. 2270Argument TYPE is for compatibility and ignored. LIST1 and LIST2
2266Ordering of the elements is preserved according to PRED, a `less-than' 2271are the list to be merged. Ordering of the elements is preserved
2267predicate on the elements." 2272according to PRED, a `less-than' predicate on the elements."
2268 (let ((res nil)) 2273 (let ((res nil))
2269 (while (and list1 list2) 2274 (while (and list1 list2)
2270 (if (funcall pred (car list2) (car list1)) 2275 (if (funcall pred (car list2) (car list1))