Function: wisent-python-default-setup

wisent-python-default-setup is an autoloaded and byte-compiled function defined in python.el.gz.

Signature

(wisent-python-default-setup)

Documentation

Setup buffer for parse.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/wisent/python.el.gz
;;; Enable Semantic in `python-mode'.
;;

;;;###autoload
(defun wisent-python-default-setup ()
  "Setup buffer for parse."
  (wisent-python-wy--install-parser)
  (setq-local parse-sexp-ignore-comments t)
  ;; Give python modes the possibility to overwrite this:
  (if (not comment-start-skip)
      (setq-local comment-start-skip "#+\\s-*"))
  (setq
  ;; Character used to separation a parent/child relationship
   semantic-type-relation-separator-character '(".")
   semantic-command-separation-character ";"
   ;; Parsing
   semantic-tag-expand-function #'semantic-python-expand-tag

   ;; Semantic to take over from the one provided by python.
   ;; The python one, if it uses the senator advice, will hang
   ;; Emacs unrecoverably.
   imenu-create-index-function #'semantic-create-imenu-index

   ;; I need a python guru to update this list:
   semantic-symbol->name-assoc-list-for-type-parts '((variable . "Variables")
						     (function . "Methods"))
   semantic-symbol->name-assoc-list '((type . "Classes")
				      (variable . "Variables")
				      (function . "Functions")
				      (include  . "Imports")
				      (package  . "Package")
				      (code . "Code")))
   )