mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	(py-imenu-method-regexp): Fix suggested by Daniel Calvelo to
generalize the matching of function arguments.
This commit is contained in:
		
							parent
							
								
									6839d3af10
								
							
						
					
					
						commit
						1d5f988457
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue