Function: wisent-python-lex-buffer

wisent-python-lex-buffer is an interactive and byte-compiled function defined in python.el.gz.

Signature

(wisent-python-lex-buffer)

Documentation

Run wisent-python-lexer on current buffer.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/wisent/python.el.gz
;;; Test
;;

(defun wisent-python-lex-buffer ()
  "Run `wisent-python-lexer' on current buffer."
  (interactive)
  (semantic-lex-init)
  (let ((token-stream (semantic-lex (point-min) (point-max) 0)))
    (with-current-buffer (get-buffer-create "*wisent-python-lexer*")
      (erase-buffer)
      (pp token-stream (current-buffer))
      (goto-char (point-min))
      (pop-to-buffer (current-buffer)))))