]> code.delx.au - gnu-emacs/commitdiff
* semantic/wisent/python.el (semantic-ctxt-current-function)
authorDavid Engster <dengste@eml.cc>
Sun, 7 Oct 2012 18:23:50 +0000 (20:23 +0200)
committerDavid Engster <dengste@eml.cc>
Sun, 7 Oct 2012 18:23:50 +0000 (20:23 +0200)
  (semantic-ctxt-current-assignment): New overrides, simply returning
  nil.  The defaults do not work correctly and can send the parser in
  an inifinite loop (bug#12458).

lisp/cedet/ChangeLog
lisp/cedet/semantic/wisent/python.el

index 453939e6ce1f21dad36fd52c1c9a185f7efe5f19..0aeeeebc5625e727506b89dcdaa179a3cbed3edd 100644 (file)
@@ -1,3 +1,10 @@
+2012-10-07  David Engster  <deng@randomsample.de>
+
+       * semantic/wisent/python.el (semantic-ctxt-current-function)
+       (semantic-ctxt-current-assignment): New overrides, simply
+       returning nil.  The defaults do not work correctly and can send
+       the parser in an inifinite loop (bug#12458).
+
 2012-10-07  David Engster  <deng@randomsample.de>
 
        * semantic/ede-grammar.el (project-compile-target): Fix grammar
index ea603f251bbb65316872275c75622b1519a2f8b7..a0ea488f0fe99c06c689b8c95ae047c161af9614 100644 (file)
@@ -478,6 +478,22 @@ To be implemented for Python!  For now just return nil."
   (let ((name (semantic-tag-name tag)))
     (concat (mapconcat 'identity (split-string name "\\.") "/") ".py")))
 
+;; Override ctxt-current-function/assignment defaults, since they do
+;; not work properly with Python code, even leading to endless loops
+;; (see bug #xxxxx).
+(define-mode-local-override semantic-ctxt-current-function python-mode (&optional point)
+  "Return the current function call the cursor is in at POINT.
+The function returned is the one accepting the arguments that
+the cursor is currently in.  It will not return function symbol if the
+cursor is on the text representing that function."
+  nil)
+
+(define-mode-local-override semantic-ctxt-current-assignment python-mode (&optional point)
+  "Return the current assignment near the cursor at POINT.
+Return a list as per `semantic-ctxt-current-symbol'.
+Return nil if there is nothing relevant."
+  nil)
+
 ;;; Enable Semantic in `python-mode'.
 ;;