<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 3: Determining the current class</title><link href="https://sourceforge.net/p/python-mode/feature-requests/3/" rel="alternate"/><link href="https://sourceforge.net/p/python-mode/feature-requests/3/feed.atom" rel="self"/><id>https://sourceforge.net/p/python-mode/feature-requests/3/</id><updated>2005-01-06T06:32:30Z</updated><subtitle>Recent changes to 3: Determining the current class</subtitle><entry><title>Determining the current class</title><link href="https://sourceforge.net/p/python-mode/feature-requests/3/" rel="alternate"/><published>2005-01-06T06:32:30Z</published><updated>2005-01-06T06:32:30Z</updated><author><name>ytrewq1</name><uri>https://sourceforge.net/u/ytrewq1/</uri></author><id>https://sourceforge.netfa17972713751bf41d2bbaf099ca861561517647</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'd like some way to easily determine the class that&lt;br /&gt;
the Emacs point is in.  I looked for a way but didn't&lt;br /&gt;
find anything relevant.&lt;/p&gt;
&lt;p&gt;For the moment, I've put together something that&lt;br /&gt;
attempts to determine the current class and display it&lt;br /&gt;
via the echo area.  Code follows:&lt;/p&gt;
&lt;p&gt;(defun py-show-current-class ()&lt;br /&gt;
(interactive)&lt;br /&gt;
(save-excursion&lt;br /&gt;
(let ((class-name nil))&lt;br /&gt;
(if (py-go-up-tree-to-keyword "class")&lt;br /&gt;
(setq class-name (py-current-defun))&lt;br /&gt;
(setq class-name "None determined"))&lt;br /&gt;
(message (format "Current class: %s" class-name)))))&lt;/p&gt;
&lt;p&gt;P.S. I thought of working with which-function-mode, but&lt;br /&gt;
the mode line seems too crowded already.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>