From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Raoul Gough Newsgroups: gmane.emacs.bugs Subject: viper-go-away is lame Date: Thu, 11 Jan 2007 23:07:48 +0000 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1168611227 15846 80.91.229.12 (12 Jan 2007 14:13:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 Jan 2007 14:13:47 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 12 15:13:43 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H5NA1-0007h5-TO for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Jan 2007 15:13:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H5NA1-0003fB-DI for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Jan 2007 09:13:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H5910-0003HA-Ga for bug-gnu-emacs@gnu.org; Thu, 11 Jan 2007 18:07:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H590x-0003GE-LD for bug-gnu-emacs@gnu.org; Thu, 11 Jan 2007 18:07:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H590x-0003G9-HI for bug-gnu-emacs@gnu.org; Thu, 11 Jan 2007 18:07:19 -0500 Original-Received: from [217.12.11.96] (helo=smtp007.mail.ukl.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.52) id 1H590w-0006QW-6i for bug-gnu-emacs@gnu.org; Thu, 11 Jan 2007 18:07:19 -0500 Original-Received: (qmail 74888 invoked from network); 11 Jan 2007 23:07:16 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Received:X-YMail-OSG:To:Subject:From:Date:Message-ID:User-Agent:MIME-Version:Content-Type; b=hewwQB5NyUPueHlCfWQiwPdwRnU07pRZ9cQ8NopJ/heNwBmT1h3s/40E9FfHpLQiusHVpI0ilEy2JB/veyJj920ZOvvXQZnhXfQOMh4xfPrTwP0Fs7VEaitokypjBTh1ivCxzum0zqYNiMWXCE2FJieBqeUaH4IdmytBDMsf/DA= ; Original-Received: from unknown (HELO ALBERT) (raoulgough@89.213.52.80 with login) by smtp007.mail.ukl.yahoo.com with SMTP; 11 Jan 2007 23:07:16 -0000 X-YMail-OSG: gqTV2rYVM1lREwNBs9xiUJu_W2TxebIFKJafVQP9M2RENjTZ5CBoWHJNYmrafeIOXaw6qotrV_2yBdtTS6ypf3QeacBD7eIhTMNCyrwn3bsXL0fTl4JmBFuNdSWh4je.JjNsI4sPLiF_gNMgNUeKW_qMBhOWezSDibJvpxUSP3gHvr.AGUs9_5ilyA-- Original-To: bug-gnu-emacs@gnu.org User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (windows-nt) X-Mailman-Approved-At: Fri, 12 Jan 2007 09:13:34 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:15525 Archived-At: This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. In GNU Emacs 21.3.1 (i386-msvc-nt5.0.2195) of 2003-03-28 on buffy configured using `configure --with-msvc (12.00)' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ENA locale-coding-system: iso-latin-1 default-enable-multibyte-characters: t Please describe exactly what actions triggered the bug and the precise symptoms of the bug: The function viper-go-away doesn't do a very good job of "exiting" viper, because the next time you open a file, it reverts Emacs back into viper-mode. e. g. M-x viper M-x viper-go-away C-x C-f foo.txt ;; viper "restarts" itself here This is caused by viper-go-away not cleaning up the changes viper made to default-major-mode, initial-major-mode and find-file-hooks. The following additions to viper-go-away should do the trick, maybe there's a better way to fix the find-file-hooks via viper-remove-hooks but I'm not sure. (remove-hook 'find-file-hooks 'set-viper-state-in-major-mode) (if (eq default-major-mode 'viper-mode) (setq default-major-mode 'fundamental-mode)) (setq initial-major-mode 'lisp-interaction-mode) By the way, viper.el in the CVS head *appears* to have the same deficiency, but I haven't tested it. -- Raoul Gough. Send instant messages to your online friends http://uk.messenger.yahoo.com