From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.help Subject: Re: reloading mode Date: Tue, 23 Nov 2004 22:45:10 +1100 Message-ID: <87ekikbxh5.fsf@enki.rimspace.net> References: <20041123095847.GA4069@matijek.v10a.ath.cx> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1101211349 18576 80.91.229.6 (23 Nov 2004 12:02:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 23 Nov 2004 12:02:29 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 23 13:02:22 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 1CWZNE-0004y9-00 for ; Tue, 23 Nov 2004 13:02:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWZWH-0004eK-NG for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Nov 2004 07:11:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CWZW4-0004eA-6a for help-gnu-emacs@gnu.org; Tue, 23 Nov 2004 07:11:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CWZW3-0004dv-Na for help-gnu-emacs@gnu.org; Tue, 23 Nov 2004 07:11:27 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWZW3-0004di-DC for help-gnu-emacs@gnu.org; Tue, 23 Nov 2004 07:11:27 -0500 Original-Received: from [80.91.229.2] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CWZMi-0008H5-GS for help-gnu-emacs@gnu.org; Tue, 23 Nov 2004 07:01:48 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CWZMg-0001ko-00 for ; Tue, 23 Nov 2004 13:01:46 +0100 Original-Received: from 203-217-29-45.perm.iinet.net.au ([203.217.29.45]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 23 Nov 2004 13:01:46 +0100 Original-Received: from daniel by 203-217-29-45.perm.iinet.net.au with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 23 Nov 2004 13:01:46 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 26 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 203-217-29-45.perm.iinet.net.au User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:I+Wj2y1U9YC1KiQoG7dNKMnsCNk= 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:22231 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:22231 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. Alternately, `M-x eval-buffer' in the mode buffer will run all the code there, changing the definitions at runtime. Finally, you can `M-x load-file', then specify which Lisp file to load, or even `M-x byte-compile-file' to byte-compile it before you load it. Anyway, if you change a function, or whatever, you can simply execute that Lisp code at runtime and the change takes immediate effect within Emacs. Regards, Daniel -- Advertising is a valuable economic factor because it is the cheapest way of selling goods, especially if the goods are worthless. -- Sinclair Lewis