summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1998-10-28 04:08:13 (GMT)
committerBarry Warsaw <barry@python.org>1998-10-28 04:08:13 (GMT)
commit1d5f9884579cffea181467b5b4366eb330047ce6 (patch)
treec967093ea6d048f797612d043ef0230cd98917a4 /Misc
parent6839d3af106e90f42863faa4c4980585d85d6e86 (diff)
downloadcpython-1d5f9884579cffea181467b5b4366eb330047ce6.zip
cpython-1d5f9884579cffea181467b5b4366eb330047ce6.tar.gz
cpython-1d5f9884579cffea181467b5b4366eb330047ce6.tar.bz2
(py-imenu-method-regexp): Fix suggested by Daniel Calvelo to
generalize the matching of function arguments.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/python-mode.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el
index 5e9cb0b..12c2d11 100644
--- a/Misc/python-mode.el
+++ b/Misc/python-mode.el
@@ -87,7 +87,7 @@ of the Custom library from:
See the Python Mode home page for details:
- <http://www.python.org/ftp/emacs/>
+ <http://www.python.org/emacs/python-mode>
")))
@@ -708,7 +708,8 @@ package. Note that the latest X/Emacs releases contain this package.")
"\\(def[ \t]+" ; function definitions start with def
"\\([a-zA-Z0-9_]+\\)" ; name is here
; function arguments...
- "[ \t]*(\\([-+/a-zA-Z0-9_=,\* \t\n.()\"'#]*\\))"
+;; "[ \t]*(\\([-+/a-zA-Z0-9_=,\* \t\n.()\"'#]*\\))"
+ "[ \t]*(\\([^:#]*\\))"
"\\)" ; end of def
"[ \t]*:" ; and then the :
"\\)" ; >>methods and functions<<
@@ -766,6 +767,9 @@ of how this works."
py-imenu-method-arg-parens
py-imenu-method-no-arg-parens))
(goto-char (point-min))
+ ;; Warning: When the buffer has no classes or functions, this will
+ ;; return nil, which seems proper according to the Imenu API, but
+ ;; causes an error in the XEmacs port of Imenu. Sigh.
(py-imenu-create-index-engine nil))
(defun py-imenu-create-index-engine (&optional start-indent)