From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai Grossjohann Newsgroups: gmane.emacs.help Subject: Re: reloading mode Date: Sat, 27 Nov 2004 21:14:21 +0100 Message-ID: <86k6s7oxr6.fsf@ketchup.de.uu.net> References: <20041123095847.GA4069@matijek.v10a.ath.cx> <87ekikbxh5.fsf@enki.rimspace.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1101586539 25503 80.91.229.6 (27 Nov 2004 20:15:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 27 Nov 2004 20:15:39 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 27 21:15:34 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CY8yk-00019Q-00 for ; Sat, 27 Nov 2004 21:15:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CY983-0003zh-Ty for geh-help-gnu-emacs@m.gmane.org; Sat, 27 Nov 2004 15:25:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CY97U-0003m1-J3 for help-gnu-emacs@gnu.org; Sat, 27 Nov 2004 15:24:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CY97T-0003lL-HZ for help-gnu-emacs@gnu.org; Sat, 27 Nov 2004 15:24:35 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CY97T-0003lH-Df for help-gnu-emacs@gnu.org; Sat, 27 Nov 2004 15:24:35 -0500 Original-Received: from [80.91.229.2] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CY8xp-0005Bi-Rl for help-gnu-emacs@gnu.org; Sat, 27 Nov 2004 15:14:38 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CY8xp-0002Vn-00 for ; Sat, 27 Nov 2004 21:14:37 +0100 Original-Received: from p5487cb14.dip.t-dialin.net ([84.135.203.20]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 27 Nov 2004 21:14:37 +0100 Original-Received: from kai by p5487cb14.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 27 Nov 2004 21:14:37 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 24 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: p5487cb14.dip.t-dialin.net User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:XQgkyLjc3oCXWLEKBoBLnU0lsVQ= X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:22373 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:22373 Daniel Pittman writes: > On 23 Nov 2004, Alex Polite wrote: >> I'm altering a mode (transcript.el). Restarting emacs after every edit >> to the mode file is very tedious. What's the right way of doing it? > > You can put your cursor at or after the closing bracket in the > expression and hit 'C-M-x' to run `eval-defun' and, as such, execute the > changed code. C-M-x is used *inside* the expression to evaluate. C-x C-e is used after the closing parenthesis. One other difference is that C-M-x only evaluates top-level expressions, but C-x C-e can be used inside expressions, too. C-M-x handles defvar specially, I think that C-x C-e does not. (The special handling means that changing the value in a defvar and then doing C-M-x in it changes the value of the variable in Emacs, although the standard definition of defvar does not change the variable's value, if it already has one.) Kai