From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Sean Richards Newsgroups: gmane.emacs.help Subject: viper and py-electric-backspace Date: Mon, 06 Oct 2003 22:29:33 +1300 Organization: Xtra Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87he2m3e9u.fsf@hugin.valhalla.net> Reply-To: sean_news@myrealbox.com NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1065433586 15817 80.91.224.253 (6 Oct 2003 09:46:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 6 Oct 2003 09:46:26 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 06 11:46:24 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A6Rwe-0000Cz-00 for ; Mon, 06 Oct 2003 11:46:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A6RwD-0004nm-Fg for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Oct 2003 05:45:57 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!nntp.cifnet.net!news-out.newsfeeds.com!propagator2-maxim!news-in.superfeed.net!newsfeed01.tsnz.net!news.xtra.co.nz!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:Y3v0YNzrIdkkaRVzKADd3fyUdkw= Original-Lines: 22 Original-NNTP-Posting-Host: 203.96.102.247 Original-X-Complaints-To: newsadmin@xtra.co.nz Original-X-Trace: news.xtra.co.nz 1065432638 203.96.102.247 (Mon, 06 Oct 2003 22:30:38 NZDT) Original-NNTP-Posting-Date: Mon, 06 Oct 2003 22:30:38 NZDT Original-Xref: shelby.stanford.edu gnu.emacs.help:117086 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:13014 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13014 Hi, I need some help getting viper to play nice with python-mode. How do I get backspace to call py-electric-backspace when I am using viper as well? When in insert mode C-h k on backspace gives 'viper-backward-char' as the function it is mapped to. So I think I need to use a defadvice around viper-backward-char. Something like ... (defadvice viper-backward-char (around my-viper-py-backspace activate) (if (check if we are in python-mode) (py-electric-backspace someargument) ad-do-it)) OK so I am not sure how to check what the buffer mode is. Use mode-name or something better? And the argument to py-electric-backspace? Am I on the right track or completely lost? Cheers, Sean -- "Hver sin smak", sa vintapperen, han drakk mens de andre sloss.