From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: lee Newsgroups: gmane.emacs.help Subject: Re: setting the mode of a buffer Date: Sat, 15 Mar 2014 22:09:22 +0100 Organization: my virtual residence Message-ID: <87a9cruq2l.fsf@yun.yagibdah.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1394918116 25441 80.91.229.3 (15 Mar 2014 21:15:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Mar 2014 21:15:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Mar 15 22:15:25 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WOvvK-0004Kp-JB for geh-help-gnu-emacs@m.gmane.org; Sat, 15 Mar 2014 22:15:18 +0100 Original-Received: from localhost ([::1]:51206 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOvvK-0006ZE-2M for geh-help-gnu-emacs@m.gmane.org; Sat, 15 Mar 2014 17:15:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOvuq-0006M7-52 for help-gnu-emacs@gnu.org; Sat, 15 Mar 2014 17:14:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOvue-0002lT-4K for help-gnu-emacs@gnu.org; Sat, 15 Mar 2014 17:14:48 -0400 Original-Received: from client-194-42-186-216.muenet.net ([194.42.186.216]:36519 helo=yun.yagibdah.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOvud-0002jX-My for help-gnu-emacs@gnu.org; Sat, 15 Mar 2014 17:14:36 -0400 Original-Received: from lee by yun.yagibdah.de with local (Exim 4.80.1) (envelope-from ) id 1WOvuT-0005kO-U4 for help-gnu-emacs@gnu.org; Sat, 15 Mar 2014 22:14:25 +0100 In-Reply-To: (Joost Kremers's message of "12 Mar 2014 22:19:17 GMT") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Mail-Followup-To: help-gnu-emacs@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 194.42.186.216 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:96522 Archived-At: Joost Kremers writes: > lee wrote: > [...] >> When I make a change, I byte-compile again. From there on, I need some >> way to apply the changes. So far, I=C2=B4ve been reloading the mode to >> achieve this. > > Yes, but you do not need to unload it first. If you reload the file, the > new definitions will replace the old ones. >> Are you saying that changes are magically applied by recompiling? Or >> should I use 'M-x eval-defun my-mode' to apply them after recompiling? >> And when I do so, wouldn=C2=B4t emacs figure that it already knows the m= ode >> because it=C2=B4s already loaded and continue to use the previous versio= n? > > You do need to reload it, compiling alone is not enough. Hm, yes, I have made another mode yesterday, and re-compiling and reloading it and C-x C-e to redefine functions worked fine. > IME defvar definitions aren't always updated when you reload a file, but > that's easily remedied with a setq in an *ielm* buffer. (Do `M-x ielm' > if you don't know about ielm. It's a god send.) Wow, ielm is really good to know, thanks! --=20 Knowledge is volatile and fluid. Software is power.