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 07:54:09 -0500 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1469886677 31634 80.91.229.8 (30 Jul 2016 13:51:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 30 Jul 2016 13:51:17 +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 Jul 30 15:50:53 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 1bTUdg-0007im-Q6 for geh-help-gnu-emacs@m.gmane.org; Sat, 30 Jul 2016 15:49:17 +0200 Original-Received: from localhost ([::1]:35522 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTTn3-00031h-FU for geh-help-gnu-emacs@m.gmane.org; Sat, 30 Jul 2016 08:54:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTTmQ-0002y6-6S for help-gnu-emacs@gnu.org; Sat, 30 Jul 2016 08:54:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bTTmO-0002DE-B1 for help-gnu-emacs@gnu.org; Sat, 30 Jul 2016 08:54:13 -0400 Original-Received: from mail-oi0-x233.google.com ([2607:f8b0:4003:c06::233]:32800) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTTmO-0002Cz-5o for help-gnu-emacs@gnu.org; Sat, 30 Jul 2016 08:54:12 -0400 Original-Received: by mail-oi0-x233.google.com with SMTP id j185so139497569oih.0 for ; Sat, 30 Jul 2016 05:54:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=4fFp8Ck7PQBLOWwUXdELlT3th9mVHcmwI960tTZdilQ=; b=mLJiUTyVOGnGJR3ewWwe3CL6TQiaYGK3+kivQQlMrKFchaT5Htwr0xYKgmZ6cJ20lv xgXo/ez8uIzEg13SW8CqmbCoYmkSUrY3srXx338nHer8IDz4sBGdqT2svyNHxBs3mUMn SyT3d0zgOukHiPYWPjGhoAEmP7rONOtGkbGdJo1ABXrD19yQ9SXr2UjyCNYcJqA3STqJ yLhSkpS9Wh+Yf+Hux9IIe3ls0r5nSeGBkEXUHr4+XPvIOOZnQCHokkeDXCZ2PwLvgHPi IwHtzeoeeHAYP7lpErBs5/VG4P/oGBG3F4/NqhvPm1dEaSCj1NmU6RhOhS81Z2DCUrML wCxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=4fFp8Ck7PQBLOWwUXdELlT3th9mVHcmwI960tTZdilQ=; b=RUD0iwXFziPfxW6PggRt4io89JG6QiHY8mb7c7tQ60jnxJMVHAY7kBZVlqVKR3SUzl Uk4uFgf/yyaaqmLZbZegvLp3jJCGO8JYAhXE96T33JN/1J0FMT43l6m3yjFFLQMJllJK AbuPi8SDSWtwa/Bpmhjs1sDNX5wM2XNaiQoFc7es06vNENHKwMHsrErty656Jj8bmdUq z0zwALXFicDMMp+YHG7JEPxMUz8Wex2tgPhWvmHnhNstxo8rNeXrdai/n131OTyk0dsz qTUnjITW+g7MNguASX8ZM7YvPCrmRcc4VuKeCQbAyq+2CPsYC0KLvOhNyaD4BE5IqbpJ x4jQ== X-Gm-Message-State: AEkooutVUxeyWjRIvhc+HxfZOFQSUHYXndqKOuRGm8H3riGctpF7ql1okkz79yLCYFYqrnMgK5XbzVUh8iu5XA== X-Received: by 10.157.32.82 with SMTP id n76mr29481295ota.30.1469883251437; Sat, 30 Jul 2016 05:54:11 -0700 (PDT) Original-Received: by 10.157.17.142 with HTTP; Sat, 30 Jul 2016 05:54:09 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::233 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:111018 Archived-At: I think I can do that, with some experimentation, but can anyone confirm that it's reasonably possible? My use case is modifying our perl6-mode for the slight difference in allowable identifiers between Perl 6 and NQP (Not Quite Perl). By convention, nqp files end in ".nqp" so that the buffer name should be a good way to automatically change the single regex bound to a var name in the mode file. That would save having to write another major mode just for such a small change. Thanks. Best regards, -Tom