From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tom Browder Newsgroups: gmane.emacs.help Subject: Can one modify a variable definition in a major mode depending on buffer name? Date: Sat, 30 Jul 2016 12:33:57 -0500 Message-ID: References: <867fc3rym2.fsf@student.uu.se> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1469900084 23260 80.91.229.8 (30 Jul 2016 17:34:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 30 Jul 2016 17:34:44 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: John Mastro Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 30 19:34:31 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bTY9f-0005zC-9i for geh-help-gnu-emacs@m.gmane.org; Sat, 30 Jul 2016 19:34:31 +0200 Original-Received: from localhost ([::1]:36566 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTY9b-0001KZ-FH for geh-help-gnu-emacs@m.gmane.org; Sat, 30 Jul 2016 13:34:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTY99-0001J6-KB for help-gnu-emacs@gnu.org; Sat, 30 Jul 2016 13:34:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bTY98-0004rt-Rr for help-gnu-emacs@gnu.org; Sat, 30 Jul 2016 13:33:59 -0400 Original-Received: from mail-oi0-x229.google.com ([2607:f8b0:4003:c06::229]:34886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTY98-0004rc-NJ for help-gnu-emacs@gnu.org; Sat, 30 Jul 2016 13:33:58 -0400 Original-Received: by mail-oi0-x229.google.com with SMTP id l72so145428244oig.2 for ; Sat, 30 Jul 2016 10:33:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/UPLHsx494Ebm4z878Q5DLaQQAiCqa8o0UeWKAYm2QU=; b=XdIcMBSPUKrmWy0mab7NMvF9mwAGmcwDhLTA+fQxBMzZyUtknkaJvAyj1j44nw0uFo yccnajY8oLWe7YfzlczFoQYQcyb6eaJgBEN8OeTQ7E8AUFKxonTNiv7vqfqSSuSvvgdI cQZIMWIaKrbRcmhKiGJkt1Ih0LOl1kCD8z9AHmNUba13gh+k2On/65RDMZLtexLT4Ey+ sH8jg5CGRZ5gMoWgmIzACM3x+0XHPqK3BlPaESNmVcEXSKSrktZAvF1JdR2prDvHNyak f3G+lHaai9Hg/YltUtuqf+4AXafgYkv4veQG6bikO+cp8Ue2JsGk/jA1CEZNVhbnLyfJ lAtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/UPLHsx494Ebm4z878Q5DLaQQAiCqa8o0UeWKAYm2QU=; b=R8iTeUUQ8jTTyYVDjmKXIJw1ITGEdFNBGFP2c2ULtJMTOMYUgtLlR4mkuG7rctQqNC F2B9rBQxi/AB+4Zkn6Ed59obqEDxsY2HTfidg3xjyYWZHafVGuBnssILIB9G5VjYZ5Hn m3rH1KRqhUHoN2DZPkRYwBIqc93UGgtrQd2E6iBmINLrE5KPMJMEgnItjA8CMuzeFsYd rGi/Go3wsCTaMuMklQZGdaf0oV/KKzbpP9y/JKn//jGP27HrCdFujWjcETijR4tJtG9b a2ISteXpCW5SwidQ9PBxV+BTd9IYNJRdf3VU5SXcfhCq/H7d6oAkgXof9zwAs/+no0ft ZOTA== X-Gm-Message-State: AEkoouvu4rmbiPx35cE9yI9HJCnZfEmRRlU1LabC0stnHuTdewypnXIo8apT5hX1M8FUoUxnwk7Q/nSbOuSFLQ== X-Received: by 10.202.226.204 with SMTP id z195mr26582551oig.120.1469900038285; Sat, 30 Jul 2016 10:33:58 -0700 (PDT) Original-Received: by 10.157.62.135 with HTTP; Sat, 30 Jul 2016 10:33:57 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::229 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:111025 Archived-At: On Saturday, July 30, 2016, John Mastro > wrote: > > (let*((filename (buffer-name)) > > (filename-parts (split-string filename "\\.")) > > (extention (cadr filename-parts) )) > > (when (string-equal extention "nqp") > > (setq-local perl-propaganda "Do it today, in a different way!") ))) > > aka (when (string-match-p "\\.nqp\\'" (buffer-name)) ... Thanks, John. It seems like elisp has the same motto as Perl, i.e., "TIMTOWTDI." Best, -Tom