From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: setting the mode of a buffer Date: 12 Mar 2014 22:19:17 GMT Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1394662813 24914 80.91.229.3 (12 Mar 2014 22:20:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Mar 2014 22:20:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 12 23:20:23 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 1WNrVb-00080Y-V3 for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Mar 2014 23:20:20 +0100 Original-Received: from localhost ([::1]:35206 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNrVb-0002O6-Gf for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Mar 2014 18:20:19 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 32 Original-X-Trace: individual.net mZAyMTtSTOny+tNkQhoivQ/qAZO2pxlsofACLAJT+WP6Q/rTRY Cancel-Lock: sha1:MzXD3wX/3lLEAFYkiyKRH7dVXDk= Mail-Copies-To: nobody X-Editor: Emacs of course! User-Agent: slrn/pre1.0.0-18 (Linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:204209 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:96479 Archived-At: lee wrote: > Joost Kremers writes: > The mode is byte-compiled --- it mainly provides some syntax > highlighting. Mostly, changes are to defcustoms to add another keyword > for the highlighting. Reevaluating a defcustom will normally reset the value of the variable, so there's no need to unload and reload the file. > When I make a change, I byte-compile again. From there on, I need some > way to apply the changes. So far, Iīve 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īt emacs figure that it already knows the mode > because itīs already loaded and continue to use the previous version? You do need to reload it, compiling alone is not enough. 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.) -- Joost Kremers joostkremers@fastmail.fm Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9)