From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alex Kost Newsgroups: gmane.emacs.help Subject: Re: Help needed with defadvice Date: Sat, 23 Nov 2013 19:43:13 +0400 Message-ID: <87vbzj2kfi.fsf@gmail.com> References: <8738mo7w0j.fsf@gmail.com> <87y54g5cd6.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1385221424 21233 80.91.229.3 (23 Nov 2013 15:43:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Nov 2013 15:43:44 +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 Nov 23 16:43:49 2013 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 1VkFN4-0002TE-7J for geh-help-gnu-emacs@m.gmane.org; Sat, 23 Nov 2013 16:43:46 +0100 Original-Received: from localhost ([::1]:44132 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkFN3-0002xT-Rc for geh-help-gnu-emacs@m.gmane.org; Sat, 23 Nov 2013 10:43:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkFMj-0002xE-5T for help-gnu-emacs@gnu.org; Sat, 23 Nov 2013 10:43:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VkFMa-0002yo-OK for help-gnu-emacs@gnu.org; Sat, 23 Nov 2013 10:43:25 -0500 Original-Received: from mail-la0-x22c.google.com ([2a00:1450:4010:c03::22c]:36491) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkFMa-0002yY-Go for help-gnu-emacs@gnu.org; Sat, 23 Nov 2013 10:43:16 -0500 Original-Received: by mail-la0-f44.google.com with SMTP id ep20so1787071lab.31 for ; Sat, 23 Nov 2013 07:43:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=SmnVEYrubLbZEGHsHHVfPPdW9N16vTW/Ac4pl72fFMc=; b=XF7fFw79vmwVifx7bxWCgMWJwS1j/r08ZgX5ujl1/Ucty4jd+yfIR92qT0SUkYTH1/ IimLK3thGYLriWQRYp0QhlIDhL5RT0b8Au13ck97KG5yeZtOHHma6KNvLJu6hMU0v+p+ QJMtX4SnVcZ1ur+U/cXQdR7tNn/LaNRn8e/p58EIB5lls6rEUHv8J+br1ESHO58GqyZF lfi4RsNcl9C1GKz+9DLtQIRLZqzJtsX3MhynqIlnH4F00BTmIF25yfd8mzYQHSuEVVZE TE4eAl1cNYHVW0Ss4kaH4KvjS4azyuqHBX8kvY0VyaI+i58vk3J2qypYGafb//OMl9zG xIbQ== X-Received: by 10.152.1.197 with SMTP id 5mr4631183lao.0.1385221395380; Sat, 23 Nov 2013 07:43:15 -0800 (PST) Original-Received: from leviafan (128-70-197-79.broadband.corbina.ru. [128.70.197.79]) by mx.google.com with ESMTPSA id np10sm7204770lbb.7.2013.11.23.07.43.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Nov 2013 07:43:14 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Sat, 23 Nov 2013 09:48:44 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22c 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:94587 Archived-At: Stefan Monnier (2013-11-23 18:48 +0400) wrote: >> (,(or parent 'kill-all-local-variables)) <<<<<<<<< > [...] >> Does anyone know why this is there? > > Read the Elisp manual's description of what a major mode should do. > Buffer-local variables are (in their majority) specific a particular > major mode, hence they are reset when the major mode changes. Thanks for the explanation. (info "(elisp) Creating Buffer-Local") tells about that. Happily there is still a possibility for a buffer-local variable to survive after `kill-all-local-variables': setting a `permanent-local' property of that variable to non-nil. Perry Smith, I think this can help you.