From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikodemus Siivola Newsgroups: gmane.emacs.devel Subject: lisp-mode and buffer local variables Date: Thu, 9 Jun 2011 00:47:43 +0300 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1307569696 25845 80.91.229.12 (8 Jun 2011 21:48:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Jun 2011 21:48:16 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 08 23:48:12 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QUQbi-00050N-Ss for ged-emacs-devel@m.gmane.org; Wed, 08 Jun 2011 23:48:11 +0200 Original-Received: from localhost ([::1]:48001 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUQbh-00025p-Oe for ged-emacs-devel@m.gmane.org; Wed, 08 Jun 2011 17:48:09 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:34437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUQbK-00025K-HT for emacs-devel@gnu.org; Wed, 08 Jun 2011 17:47:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUQbJ-0000cM-Bk for emacs-devel@gnu.org; Wed, 08 Jun 2011 17:47:46 -0400 Original-Received: from mail-pw0-f41.google.com ([209.85.160.41]:47729) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUQbJ-0000cF-1C for emacs-devel@gnu.org; Wed, 08 Jun 2011 17:47:45 -0400 Original-Received: by pwi12 with SMTP id 12so543952pwi.0 for ; Wed, 08 Jun 2011 14:47:43 -0700 (PDT) Original-Received: by 10.142.230.3 with SMTP id c3mr351964wfh.433.1307569663129; Wed, 08 Jun 2011 14:47:43 -0700 (PDT) Original-Received: by 10.142.223.3 with HTTP; Wed, 8 Jun 2011 14:47:43 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.160.41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:140309 Archived-At: I'm working on styles for Common Lisp indentation in my cl-indent.el fork. The intention is to use a buffer local variable common-lisp-style to set things up: ;; -*- common-lisp-style: foo -*- However, lisp-mode kills all buffer local variables, and I'm uncertain how to best deal with this. As a somewhat terrible workaround I currently add a lisp-mode-hook: ;;; `lisp-mode' kills all buffer-local variables. Get them back, and magically ;;; use the right indentation function. ;;; ;;; FIXME: there has got to be a better way to do this for Common Lisp files ;;; only, without requiring .emacs customizations. (add-hook 'lisp-mode-hook (lambda () (hack-local-variables) (when common-lisp-style (set (make-local-variable 'lisp-indent-function) 'common-lisp-indent-function) (common-lisp-set-style (symbol-name common-lisp-style))))) This, however seems pretty intrusive. ...what should I be doing instead? Cheers, -- nikodemus