Mercurial > cpython-lru_cache-weakref
diff Misc/python-mode.el @ 9458:e7d984f266cc legacy-trunk
(py-imenu-method-regexp): Fix suggested by Daniel Calvelo to
generalize the matching of function arguments.
| author | Barry Warsaw <barry@python.org> |
|---|---|
| date | Wed, 28 Oct 1998 04:08:13 +0000 |
| parents | 54422b46f6d1 |
| children | a3bcf1b36551 |
line wrap: on
line diff
--- a/Misc/python-mode.el Wed Oct 28 00:10:45 1998 +0000 +++ b/Misc/python-mode.el Wed Oct 28 04:08:13 1998 +0000 @@ -87,7 +87,7 @@ 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 @@ "\\(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 @@ 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)
